rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
print 'allowing new servers to connect'
if DEBUG1: print 'allowing new servers to connect'
def main(): # Forwarder IP ip = getmyip() FORWARDER_STATE["ip"] = ip # Setup a port for servers to connect server_wait_handle = waitforconn(ip, mycontext['SERVER_PORT'], new_server) mycontext['server_wait_info']={'handle':server_wait_handle,'active':True, 'servers_connected':0, 'lock':getlock()} # Setup a port for clients to connect client_wait_handle = waitforconn(ip, mycontext['CLIENT_PORT'], inbound_connection) # Advertise the forwarder nat_forwarder_advertise(ip,mycontext['SERVER_PORT'],mycontext['CLIENT_PORT']) nat_toggle_advertisement(True) # DEBUG if DEBUG1: print getruntime(),"Forwarder Started on",ip # Periodically check the multiplexers, see if they are alive while True: sleep(CHECK_INTERVAL) # DEBUG if DEBUG3: print getruntime(), "Polling for dead connections." # Check each multiplexer for (id, info) in CONNECTIONS.items(): # Check server type connections for their status if info["type"] == TYPE_MUX: mux = info["mux"] status = mux.isAlive() # Check if the mux is no longer initialized if not status: # DEBUG if DEBUG1: print getruntime(),"Connection #",id,"dead. Removing..." # De-register this server deregister_server(id, None) # if a stopcomm was called check and see if we can do a new waitforconn sleep(WAIT_INTERVAL) #make sure servers are disconnected server_wait_dict = mycontext['server_wait_info'] server_wait_dict['lock'].acquire() if (not server_wait_dict['active']) and (server_wait_dict['servers_connected'] < MAX_SERVERS): #commented out until stopcomm issue is resolved #server_wait_dict['handle'] = waitforconn(ip,mycontext['SERVER_PORT'],new_server) # start advertising the forwarder nat_toggle_advertisement(True) print 'allowing new servers to connect' server_wait_dict['active'] = True server_wait_dict['lock'].release()
fdeb6103f1505d38139a95f8848fff0fde7c90a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/fdeb6103f1505d38139a95f8848fff0fde7c90a0/forwarder_rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 2457, 20099, 2971, 2359, 273, 336, 4811, 625, 1435, 12108, 16777, 4179, 67, 7998, 9614, 625, 11929, 273, 2359, 225, 468, 10939, 279, 1756, 364, 7084, 358, 3077, 1438, 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, 468, 2457, 20099, 2971, 2359, 273, 336, 4811, 625, 1435, 12108, 16777, 4179, 67, 7998, 9614, 625, 11929, 273, 2359, 225, 468, 10939, 279, 1756, 364, 7084, 358, 3077, 1438, 67,...
except:
except TypeError:
def span(gens, base_ring=None, check=True, already_echelonized=False): """ Return the $R$-span of gens (a list of vectors) where R = base_ring. EXAMPLES: sage: V = span([[1,2,5], [2,2,2]], QQ); V Vector space of degree 3 and dimension 2 over Rational Field Basis matrix: [ 1 0 -3] [ 0 1 4] sage: span([V.gen(0)], QuadraticField(-7,'a')) Vector space of degree 3 and dimension 1 over Number Field in a with defining polynomial x^2 + 7 Basis matrix: [ 1 0 -3] sage: span([[1,2,3], [2,2,2], [1,2,5]], GF(2)) Vector space of degree 3 and dimension 1 over Finite Field of size 2 Basis matrix: [1 0 1] """ if base_ring is None: R = self.base_ring() else: R = base_ring if not isinstance(R, principal_ideal_domain.PrincipalIdealDomain): raise TypeError, "The base_ring (= %s) must be a principal ideal domain."%R if len(gens) == 0: return FreeModule(R, 0) else: x = gens[0] if isinstance(x,(list,tuple)): try: gens = [ [ R(c) for c in v ] for v in gens ] except: R = R.fraction_field() try: gens = [ [ R(c) for c in v ] for v in gens ] except: raise ValueError, \ "The elements of gens (= %s) must be defined over " + \ "base_ring (= %s) or its field of fractions."%(gens, base_ring) M = FreeModule(R,len(x)) else: M = x.parent() return M.span(gens=gens, base_ring=base_ring, check=check, already_echelonized=already_echelonized)
6875d7c71609de038c71080542943969764ed340 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6875d7c71609de038c71080542943969764ed340/free_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4548, 12, 23730, 16, 1026, 67, 8022, 33, 7036, 16, 866, 33, 5510, 16, 1818, 67, 8987, 292, 265, 1235, 33, 8381, 4672, 3536, 2000, 326, 271, 54, 8, 17, 3969, 434, 314, 773, 261, 69, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4548, 12, 23730, 16, 1026, 67, 8022, 33, 7036, 16, 866, 33, 5510, 16, 1818, 67, 8987, 292, 265, 1235, 33, 8381, 4672, 3536, 2000, 326, 271, 54, 8, 17, 3969, 434, 314, 773, 261, 69, ...
for path, folders, files in os.walk(root): for file in files: yield path, file
for path, folders, files in os.walk(root): for file in files: yield path, file
def files(root): for path, folders, files in os.walk(root): for file in files: yield path, file
633e729fafe639c8598b2bed45f16557d7c7726b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12499/633e729fafe639c8598b2bed45f16557d7c7726b/pypt_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1390, 12, 3085, 4672, 364, 589, 16, 9907, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 4672, 364, 585, 316, 1390, 30, 2824, 589, 16, 585, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1390, 12, 3085, 4672, 364, 589, 16, 9907, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 4672, 364, 585, 316, 1390, 30, 2824, 589, 16, 585, 282, 2, -100, -100, -100, -100, -100, -100, -100,...
except ValueError, TypeError:
except (ValueError, TypeError):
def change_response(status, headers, exc_info=None): new_url = None parts = status.split(' ') try: code = int(parts[0]) except ValueError, TypeError: raise Exception( '_StatusBasedRedirect middleware ' 'received an invalid status code %s'%repr(parts[0]) ) message = ' '.join(parts[1:]) new_url = self.mapper( code, message, environ, self.global_conf, self.kw ) if not (new_url == None or isinstance(new_url, str)): raise TypeError( 'Expected the url to internally ' 'redirect to in the _StatusBasedRedirect error_mapper' 'to be a string or None, not %s'%repr(new_url) ) if new_url: url.append(new_url) code_message.append([code, message]) return start_response(status, headers, exc_info)
15e51654e469e87a6974e46969e8ec1295937f96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11400/15e51654e469e87a6974e46969e8ec1295937f96/errordocument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 394, 67, 718, 273, 599, 2140, 273, 1267, 18, 4939, 2668, 8624, 775, 30, 981, 273, 509, 12, 6019, 63, 20, 5717,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 2740, 12, 2327, 16, 1607, 16, 3533, 67, 1376, 33, 7036, 4672, 394, 67, 718, 273, 599, 2140, 273, 1267, 18, 4939, 2668, 8624, 775, 30, 981, 273, 509, 12, 6019, 63, 20, 5717,...
class comment(Special, Invisible, PreBibliographic, TextElement): pass
class comment(Special, Invisible, PreBibliographic, FixedTextElement): pass
def astext(self): return self.get('delimiter', ' ') + TextElement.astext(self)
60526fedf248047dad2895e02c7d8b77fe3dc69a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/60526fedf248047dad2895e02c7d8b77fe3dc69a/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3364, 408, 12, 2890, 4672, 327, 365, 18, 588, 2668, 15751, 2187, 296, 8624, 397, 3867, 1046, 18, 689, 408, 12, 2890, 13, 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, 3364, 408, 12, 2890, 4672, 327, 365, 18, 588, 2668, 15751, 2187, 296, 8624, 397, 3867, 1046, 18, 689, 408, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
error_handler=log.err)
error_handler=d.errback)
def disable_pin_cb(): # now enable it again self.device.EnablePin(pin, True, dbus_interface=CRD_INTFACE, reply_handler=lambda: d.callback(True), error_handler=log.err)
45c00959c14e666ef31b3f93137f14e6d66959e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/45c00959c14e666ef31b3f93137f14e6d66959e4/test_dbus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4056, 67, 13097, 67, 7358, 13332, 468, 2037, 4237, 518, 3382, 365, 18, 5964, 18, 8317, 12178, 12, 13097, 16, 1053, 16, 21866, 67, 5831, 33, 5093, 40, 67, 3217, 11300, 16, 4332, 67, 417...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4056, 67, 13097, 67, 7358, 13332, 468, 2037, 4237, 518, 3382, 365, 18, 5964, 18, 8317, 12178, 12, 13097, 16, 1053, 16, 21866, 67, 5831, 33, 5093, 40, 67, 3217, 11300, 16, 4332, 67, 417...
elif 'section' in context and context['section']=='Feature':
elif context.has_key('section') and context['section']=='Feature' or context.has_key('case_search') and context['case_search']=='feature':
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): if context is None: context = {} if 'section' in context and context['section']=='Bug Tracking': cr.execute('select c.id from crm_case c left join project_project p on p.id=c.project_id where c.section_id=p.section_bug_id') return map(lambda x: x[0], cr.fetchall()) elif 'section' in context and context['section']=='Feature': cr.execute('select c.id from crm_case c left join project_project p on p.id=c.project_id where c.section_id=p.section_feature_id') return map(lambda x: x[0], cr.fetchall()) elif 'section' in context and context['section']=='Support': cr.execute('select c.id from crm_case c left join project_project p on p.id=c.project_id where c.section_id=p.section_support_id') return map(lambda x: x[0], cr.fetchall()) elif 'section' in context and context['section']=='Announce': cr.execute('select c.id from crm_case c left join project_project p on p.id=c.project_id where c.section_id=p.section_annouce_id') return map(lambda x: x[0], cr.fetchall()) return super(crm_case, self).search(cr, uid, args, offset, limit, order, context, count)
2adf2a9777e63a6e4607fd01ba98c12072e53bbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/2adf2a9777e63a6e4607fd01ba98c12072e53bbe/portal_project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 309, 819, 353, 599, 30, 819, 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, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 309, 819, 353, 599, 30, 819, 273...
if debug: print 'TwistedProtocolWrapper.clear'
def clear(self): """ Clear this instance, after which it is ready for reuse. """ if debug: print 'TwistedProtocolWrapper.clear' if getattr(self, 'tlsStarted', 0): self.sslBio = None self.ssl = None self.internalBio = None self.networkBio = None self.data = '' self.encrypted = '' self.tlsStarted = 0 self.checked = 0 self.isClient = 1 self.helloDone = 0 # We can reuse self.ctx and it will be deleted automatically # when this instance dies
0d744c2b75d7743166aae6153b80108ba536c300 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10522/0d744c2b75d7743166aae6153b80108ba536c300/TwistedProtocolWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 4672, 3536, 10121, 333, 791, 16, 1839, 1492, 518, 353, 5695, 364, 11827, 18, 3536, 309, 3869, 12, 2890, 16, 296, 17116, 9217, 2187, 374, 4672, 365, 18, 8157, 38, 1594, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2424, 12, 2890, 4672, 3536, 10121, 333, 791, 16, 1839, 1492, 518, 353, 5695, 364, 11827, 18, 3536, 309, 3869, 12, 2890, 16, 296, 17116, 9217, 2187, 374, 4672, 365, 18, 8157, 38, 1594, ...
this = apply(_quickfix.new_QuoteStatusReqID, args)
this = _quickfix.new_QuoteStatusReqID(*args)
def __init__(self, *args): this = apply(_quickfix.new_QuoteStatusReqID, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 10257, 1482, 6113, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 10257, 1482, 6113, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
self.preloadimg_next_pixbuf_original = None self.preloadimg_prev_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_prev_image, False)
def delete_image(self, action): if len(self.image_list) > 0: temp_slideshow_mode = self.slideshow_mode if self.slideshow_mode == True: self.toggle_slideshow(None) delete_dialog = gtk.Dialog(_('Delete Image'), self.window, gtk.DIALOG_MODAL) if self.confirm_delete == True: permlabel = gtk.Label(_('Are you sure you wish to permanently delete') + ' ' + os.path.split(self.currimg_name)[1] + '?') permlabel.set_line_wrap(True) permlabel.set_alignment(0, 0.1) warningicon = gtk.Image() warningicon.set_from_stock(gtk.STOCK_DIALOG_WARNING, gtk.ICON_SIZE_DIALOG) hbox = gtk.HBox() hbox.pack_start(warningicon, False, False, 10) hbox.pack_start(permlabel, False, False, 10) delete_dialog.vbox.pack_start(gtk.Label(), False, False, 0) delete_dialog.vbox.pack_start(hbox, False, False, 0) cancelbutton = delete_dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) deletebutton = delete_dialog.add_button(gtk.STOCK_DELETE, gtk.RESPONSE_YES) delete_dialog.set_has_separator(False) deletebutton.set_property('has-focus', True) delete_dialog.set_default_response(gtk.RESPONSE_YES) delete_dialog.vbox.show_all() response = delete_dialog.run() else: response = gtk.RESPONSE_YES if response == gtk.RESPONSE_YES: try: os.remove(self.currimg_name) templist = self.image_list self.image_list = [] for item in templist: if item != self.currimg_name: self.image_list.append(item) if len(self.image_list) >= 1: use_preloadimg_next = True use_preloadimg_prev = False if len(self.image_list) == 1: self.curr_img_in_list = 0 use_preloadimg_next = False use_preloadimg_prev = False elif self.curr_img_in_list == len(self.image_list): self.curr_img_in_list -= 1 use_preloadimg_next = False use_preloadimg_prev = True self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) gtk.main_iteration() try: self.load_new_image(use_preloadimg_next, use_preloadimg_prev, False, True, True) except: self.image_load_failed(True) self.set_go_navigation_sensitivities(False) self.preloadimg_next_pixbuf_original = None self.preloadimg_prev_pixbuf_original = None self.preload_when_idle = gobject.idle_add(self.preload_next_image, False) self.preload_when_idle2 = gobject.idle_add(self.preload_prev_image, False) else: self.imageview.clear() self.update_title() self.statusbar.push(self.statusbar.get_context_id(""), "") self.image_loaded = False self.set_slideshow_sensitivities() self.set_image_sensitivities(False) self.set_go_navigation_sensitivities(False) except: error_dialog = gtk.MessageDialog(self.window, gtk.DIALOG_MODAL, gtk.MESSAGE_WARNING, gtk.BUTTONS_OK, _('Unable to delete') + ' ' + self.currimg_name) error_dialog.set_title(_("Unable to delete")) error_dialog.run() error_dialog.destroy() delete_dialog.destroy() if temp_slideshow_mode == True: self.toggle_slideshow(None)
b2e5967bb60ec75f61407fa81eb48dca2dcd947b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/b2e5967bb60ec75f61407fa81eb48dca2dcd947b/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 2730, 12, 2890, 16, 1301, 4672, 309, 562, 12, 2890, 18, 2730, 67, 1098, 13, 405, 374, 30, 1906, 67, 2069, 4369, 13606, 67, 3188, 273, 365, 18, 2069, 4369, 13606, 67, 3188, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 2730, 12, 2890, 16, 1301, 4672, 309, 562, 12, 2890, 18, 2730, 67, 1098, 13, 405, 374, 30, 1906, 67, 2069, 4369, 13606, 67, 3188, 273, 365, 18, 2069, 4369, 13606, 67, 3188, ...
elif isinstance( mode, selectAtomsMode):
elif isinstance( mode, selectAtomsMode) and mode.modename == selectAtomsMode.modename:
def update_select_mode(self): #bruce 050124; should generalize and refile; should be used for more or for all events ###@@@ """This should be called at the end of event handlers which might have changed the current internal selection mode (atoms vs chunks), to resolve disagreements between that and the visible selection mode iff it's one of the Select modes. If the current mode is not one of Select Atoms or Select Chunks, this routine has no effect. (In particular, if selwhat changed but could be changed back to what it was, it does nothing to correct that, and indeed it doesn't know the old value of selwhat unless the current mode (being a selectMode) implies that.) [We should generalize this so that other modes could constrain the selection mode to just one of atoms vs chunks if they wanted to. However, the details of this need design, since for those modes we'd change the selection whereas for the select modes we change which mode we're in and don't change the selection. ###@@@] If possible, we leave the visible mode the same (even changing assy.selwhat to fit, if nothing is actually selected [that part was NIM until 050519]). But if forced to, by what is currently selected, then we change the visible selection mode to fit what is actually selected. (We always assert that selwhat permitted whatever was selected to be selected.) """ #bruce 050519 revised docstring and totally rewrote code. assy = self.assy win = self.win mode = self.win.glpane.mode del self part = assy.part # 0. Appraise the situation. # 0a: assy.selwhat is what internal code thinks selection restriction is, currently. selwhat = assy.selwhat assert selwhat in (SELWHAT_CHUNKS, SELWHAT_ATOMS) # any more choices, or change in rules, requires rewriting this method # 0b. What does current mode think it needs to be? # (Someday we might distinguish modes that constrain this, # vs modes that change to fit it or to fit the actual selection. # For now we only handle modes that change to fit the actual selection.) selwhat_from_mode = None # most modes don't care if isinstance( mode, selectMolsMode): selwhat_from_mode = SELWHAT_CHUNKS elif isinstance( mode, selectAtomsMode): selwhat_from_mode = SELWHAT_ATOMS change_mode_to_fit = (selwhat_from_mode is not None) # used later; someday some modes won't follow this # 0c. What does current selection itself think it needs to be? # (If its desires are inconsistent, complain and fix them.) if assy.selatoms and assy.selmols: print "bug, fyi: there are both atoms and chunks selected. Deselecting some of them to fit current mode or internal code." new_selwhat_influences = ( selwhat_from_mode, selwhat) # old mode has first say in this case, if it wants it #e (We could rewrite this (equivalently) to just use the other case with selwhat_from_sel = None.) else: # figure out what to do, in this priority order: actual selection, old mode, internal code. if assy.selatoms: selwhat_from_sel = SELWHAT_ATOMS elif assy.selmols: selwhat_from_sel = SELWHAT_CHUNKS else: selwhat_from_sel = None new_selwhat_influences = ( selwhat_from_sel, selwhat_from_mode, selwhat) if selwhat_from_sel is not None and selwhat_from_sel != selwhat: # following code will fix this with no harm, so let's not consider it a big deal, # but it does indicate a bug -- so just print a debug-only message. # (As of 050519 740pm, we get this from the jig cmenu command "select this jig's atoms" # when the current mode is more compatible with selecting chunks. But I think this causes # no harm, so I might as well wait until we further revise selection code to fix it.) if platform.atom_debug: print "atom_debug: bug, fyi: actual selection (%s) inconsistent " \ "with internal variable for that (%s); will fix internal variable" % \ (SELWHAT_NAMES[selwhat_from_sel], SELWHAT_NAMES[selwhat]) # Let the strongest (first listed) influence, of those with an opinion, # decide what selmode we'll be in now, and make everything consistent with that. for opinion in new_selwhat_influences: if opinion is not None: # We have our decision. Carry it out (on mode, selection, and assy.selwhat) and return. selwhat = opinion if change_mode_to_fit and selwhat_from_mode != selwhat: #bruce 050520 fix bug 644 by only doing this if needed (i.e. if selwhat_from_mode != selwhat). # Without this fix, redundantly changing the mode using these tool buttons # immediately cancels (or completes?) any node-renaming-by-dblclick # right after it gets initiated (almost too fast to see). if selwhat == SELWHAT_CHUNKS: win.toolsSelectMolecules() elif selwhat == SELWHAT_ATOMS: win.toolsSelectAtoms() #bruce 050504 making use of this case for the first time; seems to work # that might have fixed the following too, but never mind, we'll just always do it -- sometimes it's needed. if selwhat == SELWHAT_CHUNKS: part.unpickatoms() assy.set_selwhat(SELWHAT_CHUNKS) elif selwhat == SELWHAT_ATOMS: if assy.selmols: # only if needed (due to a bug), since this also desels Groups and Jigs # (never happens if no bug, since then the actual selection has the strongest say -- as of 050519 anyway) part.unpickparts() assy.set_selwhat(SELWHAT_ATOMS) # (this by itself does not deselect anything, as of 050519) return assert 0, "new_selwhat_influences should not have ended in None: %r" % (new_selwhat_influences,) # scratch comments: # if we had been fixing selwhat in the past, it would have fixed bug 500 in spite of permit_pick_parts in cm_hide/cm_unhide. # So why aren't we? let's find out with some debug code... (now part of the above, in theory) return
66125e12afaea8f60813c63408ef51d59ad6926b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/66125e12afaea8f60813c63408ef51d59ad6926b/TreeWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4025, 67, 3188, 12, 2890, 4672, 468, 2848, 3965, 374, 9172, 3247, 31, 1410, 7470, 554, 471, 283, 768, 31, 1410, 506, 1399, 364, 1898, 578, 364, 777, 2641, 11849, 30989, 36, 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, 1089, 67, 4025, 67, 3188, 12, 2890, 4672, 468, 2848, 3965, 374, 9172, 3247, 31, 1410, 7470, 554, 471, 283, 768, 31, 1410, 506, 1399, 364, 1898, 578, 364, 777, 2641, 11849, 30989, 36, 3...
print prevLogTestName + " different"
def logAdvance(log): logTestName = None logLineNum = sys.maxint logLine = log.readline() # print "advance log: " + logLine look = re.match('(\d+):@@ test: (\S+) (\S+)? @@',logLine) if look != None: logLineNum = int(look.group(1)) logTestName = look.group(2) # group(3) if present is status return logLineNum, logTestName
45beb1549a18708cf4dbae21bb0e714b4043e026 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/45beb1549a18708cf4dbae21bb0e714b4043e026/dregress.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 1871, 5882, 12, 1330, 4672, 613, 4709, 461, 273, 599, 613, 1670, 2578, 273, 2589, 18, 1896, 474, 613, 1670, 273, 613, 18, 896, 1369, 1435, 468, 1172, 315, 361, 5882, 613, 30, 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, 613, 1871, 5882, 12, 1330, 4672, 613, 4709, 461, 273, 599, 613, 1670, 2578, 273, 2589, 18, 1896, 474, 613, 1670, 273, 613, 18, 896, 1369, 1435, 468, 1172, 315, 361, 5882, 613, 30, 315,...
return so(name=nae, guid=guid)
return so(name=name, guid=guid)
def get_driver_info(self, id): name = c_char_p() guid = GUID() ckresult(_dll.FMOD_System_GetDriverInfo(self._ptr, id, byref(name), sizeof(name), byref(guid))) return so(name=nae, guid=guid)
aa1a85b13c8a96595fae40430e60779f24c19e24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12116/aa1a85b13c8a96595fae40430e60779f24c19e24/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7407, 67, 1376, 12, 2890, 16, 612, 4672, 508, 273, 276, 67, 3001, 67, 84, 1435, 9875, 273, 20322, 1435, 12622, 2088, 24899, 27670, 18, 42, 6720, 67, 3163, 67, 967, 4668, 966, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7407, 67, 1376, 12, 2890, 16, 612, 4672, 508, 273, 276, 67, 3001, 67, 84, 1435, 9875, 273, 20322, 1435, 12622, 2088, 24899, 27670, 18, 42, 6720, 67, 3163, 67, 967, 4668, 966, ...
if isinstance(err[0], GSTestFailure):
if isinstance(err[1], GSTestFailure):
def printErrorList(self, flavor, errors): handoff = [] for test, err in errors: if isinstance(err[0], GSTestFailure): self.stream.writeln(self.separator1) self.stream.writeln("%s: %s" % (flavor, self.getDescription(test))) self.stream.writeln(self.separator2) lines = err[1].args[0] if type(lines) == types.StringType: lines = string.split(lines, '\n') if lines[-1] == '': del lines[-1] for line in lines: self.stream.writeln(line) else: handoff.append((test, err)) if len(handoff) > 0: unittest._TextTestResult.printErrorList(self, flavor, handoff)
da8c9dfe806fb916c6d026f2f881f54eba03a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/da8c9dfe806fb916c6d026f2f881f54eba03a5e1/gstestutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 668, 682, 12, 2890, 16, 19496, 16, 1334, 4672, 948, 3674, 273, 5378, 364, 1842, 16, 393, 316, 1334, 30, 309, 1549, 12, 370, 63, 21, 6487, 611, 882, 395, 5247, 4672, 365, 18, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 668, 682, 12, 2890, 16, 19496, 16, 1334, 4672, 948, 3674, 273, 5378, 364, 1842, 16, 393, 316, 1334, 30, 309, 1549, 12, 370, 63, 21, 6487, 611, 882, 395, 5247, 4672, 365, 18, 32...
def depart_paragraph(self, node):
def break_para(self): '''Break the previous paragraphish. ''' if self.first_paragraph: self.first_paragraph = False return
def depart_paragraph(self, node): self.add_text('\n')
5d96b2fca5272e18a020af9d7b6aa61d1e9e1eb0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/541/5d96b2fca5272e18a020af9d7b6aa61d1e9e1eb0/rst_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 898, 67, 25072, 12, 2890, 4672, 9163, 7634, 326, 2416, 10190, 1468, 18, 9163, 309, 365, 18, 3645, 67, 22445, 30, 365, 18, 3645, 67, 22445, 273, 1083, 327, 365, 18, 1289, 67, 955, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 898, 67, 25072, 12, 2890, 4672, 9163, 7634, 326, 2416, 10190, 1468, 18, 9163, 309, 365, 18, 3645, 67, 22445, 30, 365, 18, 3645, 67, 22445, 273, 1083, 327, 365, 18, 1289, 67, 955, 2668,...
svg += ' d="M %0.2f,%d,%0.2f,%d"\n' % (ln, height1, ln, height2)
svg += ' d="M %0.2f,%d,%0.2f,%d"\n' % (log, height1, log, height2)
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12px;fill:#0000ff;">\n' svg += ' <tspan\n' svg += ' x="%0.2f"\n' % (ln) svg += ' y="%d"\n' % (height3) svg += ' style="font-size:12px;text-align:center;text-anchor:middle;font-family:Bitstream Vera Sans;">%s</tspan></text>\n' % (string) svg += ' <path\n' svg += ' d="M %0.2f,%d,%0.2f,%d"\n' % (ln, height1, ln, height2) svg += ' style="fill:none;stroke:#0000ff;stroke-width:1px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />\n' return svg
165ca7c39e7dc341d61764ed36821e9d89caebd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5595/165ca7c39e7dc341d61764ed36821e9d89caebd7/genslides.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4582, 67, 3355, 12, 2890, 16, 1384, 16, 2072, 23, 16, 2072, 22, 16, 2072, 21, 16, 533, 16, 9668, 33, 8381, 16, 3159, 33, 21, 18, 20, 4672, 3536, 15211, 4582, 13999, 16, 425, 18, 75...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4582, 67, 3355, 12, 2890, 16, 1384, 16, 2072, 23, 16, 2072, 22, 16, 2072, 21, 16, 533, 16, 9668, 33, 8381, 16, 3159, 33, 21, 18, 20, 4672, 3536, 15211, 4582, 13999, 16, 425, 18, 75...
sage: print is_disjoint(T1, T2)
sage: _, t1, t2, t3 = tau123(T1, T2) sage: U1, U2 = tau_to_bitrade(t1, t2, t3) sage: assert is_bitrade(U1, U2) sage: U1 [0 1 2 3 4] [1 2 3 4 0] [2 3 4 0 1] [3 4 0 1 2] [4 0 1 2 3] sage: U2 [4 0 1 2 3] [0 1 2 3 4] [1 2 3 4 0] [2 3 4 0 1] [3 4 0 1 2] """ c1 = t1.to_cycles() c2 = t2.to_cycles() c3 = t3.to_cycles() pt_to_cycle1 = {} pt_to_cycle2 = {} pt_to_cycle3 = {} for i in range(len(c1)): for j in range(len(c1[i])): pt_to_cycle1[c1[i][j]] = i for i in range(len(c2)): for j in range(len(c2[i])): pt_to_cycle2[c2[i][j]] = i for i in range(len(c3)): for j in range(len(c3[i])): pt_to_cycle3[c3[i][j]] = i n = max(len(c1), len(c2), len(c3)) T1 = LatinSquare(n) T2 = LatinSquare(n) for r in range(len(c1)): for c in range(len(c2)): for s in range(len(c3)): nr_common = len(reduce(sets.Set.intersection, \ [sets.Set(c1[r]), sets.Set(c2[c]), sets.Set(c3[s])])) assert nr_common in [0, 1] if nr_common == 1: T1[r, c] = s for cycle in c1: for pt1 in cycle: pt2 = t1[pt1 - 1] pt3 = t2[pt2 - 1] assert t3[pt3 - 1] == pt1 r = pt_to_cycle1[pt1] c = pt_to_cycle2[pt2] s = pt_to_cycle3[pt3] T2[r, c] = s return T1, T2 def bitrade_from_group(a, b, c, G): """ Given group elements a, b, c in G such that abc = 1 and the subgroups <a>, <b>, <c> intersect (pairwise) only in the identity, construct a bitrade (T1, T2) where rows, columns, and symbols correspond to cosets of <a>, <b>, and <c>, respectively. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: a, b, c, G = alternating_group_bitrade_generators(1) sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: T1 [ 0 2 -1 1] [-1 0 1 3] [ 3 -1 0 2] [ 1 3 2 -1] sage: T2 [ 1 0 -1 2] [-1 3 0 1] [ 0 -1 2 3] [ 3 2 1 -1] """ hom = gap.ActionHomomorphism(G, gap.RightCosets(G, gap.TrivialSubgroup(G)), gap.OnRight) t1 = gap.Image(hom, a) t2 = gap.Image(hom, b) t3 = gap.Image(hom, c) t1 = Permutation(str(t1).replace('\n', '')) t2 = Permutation(str(t2).replace('\n', '')) t3 = Permutation(str(t3).replace('\n', '')) return tau_to_bitrade(t1, t2, t3) def is_disjoint(T1, T2): """ The partial latin squares T1 and T2 are disjoint if T1[r, c] != T2[r, c] or T1[r, c] == T2[r, c] == -1 for each cell [r, c]. EXAMPLES: sage: from sage.combinat.matrices.latin import is_disjoint, back_circulant, isotopism sage: is_disjoint(back_circulant(2), back_circulant(2)) False sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y = isotopism(5) sage: z = isotopism(5) sage: T2 = T1.apply_isotopism(x, y, z) sage: is_disjoint(T1, T2)
def is_disjoint(T1, T2): """ The partial latin squares T1 and T2 are disjoint if T1[r, c] != T2[r, c] or T1[r, c] == T2[r, c] == -1 for each cell [r, c]. EXAMPLES: sage: from sage.combinat.matrices.latin import is_disjoint, back_circulant, isotopism sage: is_disjoint(back_circulant(2), back_circulant(2)) False sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y = isotopism(5) # identity sage: z = isotopism(5) # identity sage: T2 = T1.apply_isotopism(x, y, z) sage: print is_disjoint(T1, T2) True """ for i in range(T1.nrows()): for j in range(T1.ncols()): if T1[i, j] < 0 and T2[i, j] < 0: continue if T1[i, j] == T2[i, j]: return False return True
0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2251, 16452, 12, 56, 21, 16, 399, 22, 4672, 3536, 1021, 4702, 30486, 31206, 399, 21, 471, 399, 22, 854, 1015, 16452, 309, 399, 21, 63, 86, 16, 276, 65, 480, 399, 22, 63, 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, 353, 67, 2251, 16452, 12, 56, 21, 16, 399, 22, 4672, 3536, 1021, 4702, 30486, 31206, 399, 21, 471, 399, 22, 854, 1015, 16452, 309, 399, 21, 63, 86, 16, 276, 65, 480, 399, 22, 63, 8...
ffi_builddir, ffi_srcdir]
ffi_builddir, os.path.join(ffi_srcdir, 'src')]
def configure_ctypes(self, ext): if not self.use_system_libffi: if sys.platform == 'darwin': return self.configure_ctypes_darwin(ext)
854f5ca0da2524f2188be35e07f7de571e75329f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/854f5ca0da2524f2188be35e07f7de571e75329f/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 299, 989, 12, 2890, 16, 1110, 4672, 309, 486, 365, 18, 1202, 67, 4299, 67, 2941, 1403, 77, 30, 309, 2589, 18, 9898, 422, 296, 28076, 4278, 327, 365, 18, 14895, 67, 299, 989...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5068, 67, 299, 989, 12, 2890, 16, 1110, 4672, 309, 486, 365, 18, 1202, 67, 4299, 67, 2941, 1403, 77, 30, 309, 2589, 18, 9898, 422, 296, 28076, 4278, 327, 365, 18, 14895, 67, 299, 989...
icon = QIcon(":/images/rluu/triangleRuler.png")
icon = QIcon(":/images/tango-icon-theme-0.8.90/32x32/categories/applications-system.png")
def _createActions(self): """Creates all the QAction objects that will be mapped to the choices on the menu, toolbar and keyboard shortcuts."""
902f9c835d191f242dd26dc453ae508e818b2c1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6120/902f9c835d191f242dd26dc453ae508e818b2c1b/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 6100, 12, 2890, 4672, 3536, 2729, 777, 326, 2238, 1803, 2184, 716, 903, 506, 5525, 358, 326, 7246, 603, 326, 3824, 16, 12748, 471, 16263, 25641, 12123, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 6100, 12, 2890, 4672, 3536, 2729, 777, 326, 2238, 1803, 2184, 716, 903, 506, 5525, 358, 326, 7246, 603, 326, 3824, 16, 12748, 471, 16263, 25641, 12123, 2, -100, -100, -100, -1...
originAss =string.splitfields(originList[0])[originAssCol]
originAss =originList[0].split()[originAssCol]
def predictNOE(peaklist,originNuc,detectedNuc,originResNum,toResNum):
b6f4304a9e1c98ac4ed81730027b28d8219fd7b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/b6f4304a9e1c98ac4ed81730027b28d8219fd7b6/NOEtools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7810, 3417, 41, 12, 10244, 1098, 16, 10012, 50, 5286, 16, 8238, 828, 50, 5286, 16, 10012, 607, 2578, 16, 869, 607, 2578, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7810, 3417, 41, 12, 10244, 1098, 16, 10012, 50, 5286, 16, 8238, 828, 50, 5286, 16, 10012, 607, 2578, 16, 869, 607, 2578, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def fl_set_canvas_visual(pObject, vi): """ fl_set_canvas_visual(pObject, vi)
def fl_set_canvas_visual(pObject, pVisual): """ fl_set_canvas_visual(pObject, pVisual) @param pObject : pointer to canvas object @param pVisual : pointer to Visual
def fl_set_canvas_visual(pObject, vi): """ fl_set_canvas_visual(pObject, vi) """ _fl_set_canvas_visual = cfuncproto( load_so_libforms(), "fl_set_canvas_visual", None, [cty.POINTER(FL_OBJECT), cty.POINTER(Visual)], """void fl_set_canvas_visual(FL_OBJECT * obj, Visual * vi) """) keep_elem_refs(pObject, vi) _fl_set_canvas_visual(pObject, vi)
197b7293f22d67e3c0811c99134c95d0d70c0239 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/197b7293f22d67e3c0811c99134c95d0d70c0239/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 15424, 67, 26671, 12, 84, 921, 16, 293, 25780, 4672, 3536, 1183, 67, 542, 67, 15424, 67, 26671, 12, 84, 921, 16, 293, 25780, 13, 225, 632, 891, 293, 921, 294, 4407...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 67, 15424, 67, 26671, 12, 84, 921, 16, 293, 25780, 4672, 3536, 1183, 67, 542, 67, 15424, 67, 26671, 12, 84, 921, 16, 293, 25780, 13, 225, 632, 891, 293, 921, 294, 4407...
B = concatenate((B,lh),axis=0) w = concatenate((yk,rh),axis=0)
B = np.concatenate((B,lh),axis=0) w = np.concatenate((yk,rh),axis=0)
def _find_user(xk, yk, order, conds, B): lh = conds[0] rh = conds[1] B = concatenate((B,lh),axis=0) w = concatenate((yk,rh),axis=0) M,N = B.shape if (M>N): raise ValueError("over-specification of conditions") elif (M<N): return _find_smoothest(xk, yk, order, None, B) else: return np.dual.solve(B, w)
c762541de16356acb89d1abac6ed80c061252d6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12971/c762541de16356acb89d1abac6ed80c061252d6f/interpolate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 1355, 12, 92, 79, 16, 677, 79, 16, 1353, 16, 30958, 16, 605, 4672, 29143, 273, 30958, 63, 20, 65, 6259, 273, 30958, 63, 21, 65, 605, 273, 1130, 18, 16426, 275, 340, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 67, 1355, 12, 92, 79, 16, 677, 79, 16, 1353, 16, 30958, 16, 605, 4672, 29143, 273, 30958, 63, 20, 65, 6259, 273, 30958, 63, 21, 65, 605, 273, 1130, 18, 16426, 275, 340, ...
sage: L = E.Lseries().at1(300)[0]; L
sage: L = E.lseries().at1(300)[0]; L
def __call__(self, x, base=0): """ Coerce $x$ into the field of rational numbers.
6be4e4508bce58199bdc592103a2e75ae2127c17 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6be4e4508bce58199bdc592103a2e75ae2127c17/rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 1026, 33, 20, 4672, 3536, 7695, 2765, 271, 92, 8, 1368, 326, 652, 434, 436, 8371, 5600, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 1026, 33, 20, 4672, 3536, 7695, 2765, 271, 92, 8, 1368, 326, 652, 434, 436, 8371, 5600, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if type(curObj) is not types.FileType:
def run(self): try: while True: # yield up here instead of at the end, since we skip back to the # top of the while loop from various points yield None #import pdb;pdb.set_trace() curObj = None if self._curObjRef is None: self._curObjRef = self._baseObjRef try: for result in self._curObjRef.getContainer(): yield None curObj = result except: self.notify.debug('lost current container: %s' % self._curObjRef) # that container is gone, try again self._curObjRef = None continue self.notify.debug('--> %s' % self._curObjRef)
2144050758ff193ad2f7bd973df523fae0d7fd5c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/2144050758ff193ad2f7bd973df523fae0d7fd5c/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 468, 2824, 731, 2674, 3560, 434, 622, 326, 679, 16, 3241, 732, 2488, 1473, 358, 326, 468, 1760, 434, 326, 1323, 2798, 628, 11191, 3143, 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, 1086, 12, 2890, 4672, 775, 30, 1323, 1053, 30, 468, 2824, 731, 2674, 3560, 434, 622, 326, 679, 16, 3241, 732, 2488, 1473, 358, 326, 468, 1760, 434, 326, 1323, 2798, 628, 11191, 3143, 2...
"library_order",
def reorder_tests(tests, first_test): try: n = tests.index(first_test) return [first_test] + tests[:n] + tests[n+1:] except ValueError: return tests
33b864e88e584ca2bf255e31cb8b1aac45e92d41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9981/33b864e88e584ca2bf255e31cb8b1aac45e92d41/test_all.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19427, 67, 16341, 12, 16341, 16, 1122, 67, 3813, 4672, 775, 30, 290, 273, 7434, 18, 1615, 12, 3645, 67, 3813, 13, 327, 306, 3645, 67, 3813, 65, 397, 7434, 10531, 82, 65, 397, 7434, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19427, 67, 16341, 12, 16341, 16, 1122, 67, 3813, 4672, 775, 30, 290, 273, 7434, 18, 1615, 12, 3645, 67, 3813, 13, 327, 306, 3645, 67, 3813, 65, 397, 7434, 10531, 82, 65, 397, 7434, 6...
""" system("mkdir /home/olzzen/fh/6sem/dia/cluster") system("mkdir /home/olzzen/fh/6sem/dia/cluster/cluster%i"%position) z = 0 for i in string: file = r"/home/olzzen/fh/6sem/dia/cluster/cluster%i/%i.png"%(position,z) i.save_PNG( file ) z += 1 position = position + 1 """
def string_segmentation(args, cluster, ccs, string, groups, phrases, H_a, theta, R, hough_image, image): """This function should perform the string segmentation."""
9e15be3b5c97366b8220a0015a4f1951810d7a95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2794/9e15be3b5c97366b8220a0015a4f1951810d7a95/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 67, 9273, 367, 12, 1968, 16, 2855, 16, 276, 2143, 16, 533, 16, 3252, 16, 31413, 16, 670, 67, 69, 16, 7338, 16, 534, 16, 366, 4966, 67, 2730, 16, 1316, 4672, 3536, 2503, 445, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 533, 67, 9273, 367, 12, 1968, 16, 2855, 16, 276, 2143, 16, 533, 16, 3252, 16, 31413, 16, 670, 67, 69, 16, 7338, 16, 534, 16, 366, 4966, 67, 2730, 16, 1316, 4672, 3536, 2503, 445, 1...
self.install_egg_scripts(dist)
if not self.editable: self.install_egg_scripts(dist)
def process_distribution(self, requirement, dist, deps=True, *info): self.update_pth(dist) self.package_index.add(dist) self.local_index.add(dist) self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist log.info(self.installation_report(requirement, dist, *info)) if (dist.has_metadata('dependency_links.txt') and not self.no_find_links): self.package_index.add_find_links( dist.get_metadata_lines('dependency_links.txt') ) if not deps and not self.always_copy: return elif requirement is not None and dist.key != requirement.key: log.warn("Skipping dependencies for %s", dist) return # XXX this is not the distribution we were looking for elif requirement is None or dist not in requirement: # if we wound up with a different version, resolve what we've got distreq = dist.as_requirement() requirement = requirement or distreq requirement = Requirement( distreq.project_name, distreq.specs, requirement.extras ) log.info("Processing dependencies for %s", requirement) try: distros = WorkingSet([]).resolve( [requirement], self.local_index, self.easy_install ) except DistributionNotFound, e: raise DistutilsError( "Could not find required distribution %s" % e.args ) except VersionConflict, e: raise DistutilsError( "Installed distribution %s conflicts with requirement %s" % e.args ) if self.always_copy or self.always_copy_from: # Force all the relevant distros to be copied or activated for dist in distros: if dist.key not in self.installed_projects: self.easy_install(dist.as_requirement()) log.info("Finished processing dependencies for %s", requirement)
17826cc55c5fe3435767cea1e7cbb8ca9873e21d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/495/17826cc55c5fe3435767cea1e7cbb8ca9873e21d/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 16279, 12, 2890, 16, 12405, 16, 2411, 16, 8740, 33, 5510, 16, 380, 1376, 4672, 365, 18, 2725, 67, 2397, 12, 4413, 13, 365, 18, 5610, 67, 1615, 18, 1289, 12, 4413, 13, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 16279, 12, 2890, 16, 12405, 16, 2411, 16, 8740, 33, 5510, 16, 380, 1376, 4672, 365, 18, 2725, 67, 2397, 12, 4413, 13, 365, 18, 5610, 67, 1615, 18, 1289, 12, 4413, 13, 365, ...
{"mode": value.mode, "size":value.size, "data":imageData})
{"mode": value.mode, "size":value.size, "data":image_data})
def _SetNodeProps(element, name, value): "Set the properties of the node based on the type of object" # if it is a ctypes structure if isinstance(value, ctypes.Structure): # create an element for the structure structElem = SubElement(element, name) #clsModule = value.__class__.__module__ clsName = value.__class__.__name__ structElem.set("__type__", "%s" % clsName) # iterate over the fields in the structure for propName in value._fields_: propName = propName[0] itemVal = getattr(value, propName) if isinstance(itemVal, (int, long)): propName += "_LONG" itemVal = unicode(itemVal) structElem.set(propName, _EscapeSpecials(itemVal)) elif isinstance(value, PIL.Image.Image): try: # if the image is too big then don't try to # write it out - it would probably product a MemoryError # anyway if value.size[0] * value.size[1] > (5000*5000): raise MemoryError imageData = value.tostring().encode("bz2").encode("base64") _SetNodeProps( element, name + "_IMG", {"mode": value.mode, "size":value.size, "data":imageData}) # a system error is raised from time to time when we try to grab # the image of a control that has 0 height or width except (SystemError, MemoryError): pass elif isinstance(value, (list, tuple)): # add the element to hold the values #listElem = SubElement(element, name) # remove the s at the end (if there) #name = name.rstrip('s') for i, attrVal in enumerate(value): _SetNodeProps(element, "%s_%05d"%(name, i), attrVal) elif isinstance(value, dict): dictElem = SubElement(element, name) for n, val in value.items(): _SetNodeProps(dictElem, n, val) else: if isinstance(value, bool): value = long(value) if isinstance(value, (int, long)): name += "_LONG" element.set(name, _EscapeSpecials(value))
a2e87232816d4bfedfe39b030eaf1ed824a31310 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/a2e87232816d4bfedfe39b030eaf1ed824a31310/XMLHelpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 694, 907, 5047, 12, 2956, 16, 508, 16, 460, 4672, 315, 694, 326, 1790, 434, 326, 756, 2511, 603, 326, 618, 434, 733, 6, 225, 468, 309, 518, 353, 279, 6983, 3695, 309, 1549, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 694, 907, 5047, 12, 2956, 16, 508, 16, 460, 4672, 315, 694, 326, 1790, 434, 326, 756, 2511, 603, 326, 618, 434, 733, 6, 225, 468, 309, 518, 353, 279, 6983, 3695, 309, 1549, 12, ...
return "all"
return "all"
def _GetSubLanguages(self, language): """Return all suported subtitles languages in a dictionary If language var is set, returns SubLanguageID for it """ self.log.debug("----------------") self.log.debug("GetSubLanguages RPC method starting...") if(language == "all"): # return result right away if no 'translation' needed return "all" info = self.xmlrpc_server.GetSubLanguages(language) self.log.debug("GetSubLanguages complete in %s"% info['seconds']) if language: for lang in info['data']: if lang['ISO639'] == language: return lang['SubLanguageID'] return info['data']
15ef8e4728d7ac88b219ea352f879a8f70034986 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/15ef8e4728d7ac88b219ea352f879a8f70034986/OSDBServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 1676, 12912, 12, 2890, 16, 2653, 4672, 3536, 990, 777, 1169, 24726, 720, 17643, 8191, 316, 279, 3880, 971, 2653, 569, 353, 444, 16, 1135, 2592, 3779, 734, 364, 518, 3536, 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, 967, 1676, 12912, 12, 2890, 16, 2653, 4672, 3536, 990, 777, 1169, 24726, 720, 17643, 8191, 316, 279, 3880, 971, 2653, 569, 353, 444, 16, 1135, 2592, 3779, 734, 364, 518, 3536, 365, ...
self.assertRaises(Exception, test_view('currency'))
test_view('currency')
def test0005views(self): ''' Test views. ''' self.assertRaises(Exception, test_view('currency'))
c9fa45d94e1f2ce4358e6adc16feb5644438a07e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9272/c9fa45d94e1f2ce4358e6adc16feb5644438a07e/test_currency.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3784, 25, 7061, 12, 2890, 4672, 9163, 7766, 7361, 18, 9163, 365, 18, 11231, 12649, 6141, 12, 503, 16, 1842, 67, 1945, 2668, 7095, 26112, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3784, 25, 7061, 12, 2890, 4672, 9163, 7766, 7361, 18, 9163, 365, 18, 11231, 12649, 6141, 12, 503, 16, 1842, 67, 1945, 2668, 7095, 26112, 2, -100, -100, -100, -100, -100, -100, -100...
], CONTEXT)
], 0, None, None, CONTEXT)
def test0050char(self): ''' Test Char. ''' char1_id = self.char.create({ 'char': 'Test', }, CONTEXT) self.assert_(char1_id)
52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 3361, 3001, 12, 2890, 4672, 9163, 7766, 3703, 18, 9163, 1149, 21, 67, 350, 273, 365, 18, 3001, 18, 2640, 12590, 296, 3001, 4278, 296, 4709, 2187, 19879, 13862, 13, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 3361, 3001, 12, 2890, 4672, 9163, 7766, 3703, 18, 9163, 1149, 21, 67, 350, 273, 365, 18, 3001, 18, 2640, 12590, 296, 3001, 4278, 296, 4709, 2187, 19879, 13862, 13, 365, 18, ...
if self.defer is not None: self.defer.errback(RelayError("Relay at %s disconnected" % self.ip))
for command, defer, timer in self.commands.itervalues(): timer.cancel() defer.errback(RelayError("Relay at %s disconnected" % self.ip))
def connectionLost(self, reason): log.debug("Relay at %s disconnected" % self.ip) self.factory.protocols.remove(self) if self.defer is not None: self.defer.errback(RelayError("Relay at %s disconnected" % self.ip))
7334b2daad04c078db609f04d3840fc8e73f34da /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3445/7334b2daad04c078db609f04d3840fc8e73f34da/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1459, 19024, 12, 2890, 16, 3971, 4672, 613, 18, 4148, 2932, 27186, 622, 738, 87, 17853, 6, 738, 365, 18, 625, 13, 365, 18, 6848, 18, 31018, 18, 4479, 12, 2890, 13, 309, 365, 18, 1897...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1459, 19024, 12, 2890, 16, 3971, 4672, 613, 18, 4148, 2932, 27186, 622, 738, 87, 17853, 6, 738, 365, 18, 625, 13, 365, 18, 6848, 18, 31018, 18, 4479, 12, 2890, 13, 309, 365, 18, 1897...
result_tmp = result_tmp + temp_res return result_tmp
return temp_res
def _sum_debit(self, data): if not self.ids: return 0.0 result_tmp = 0.0 temp_res = 0.0 if self.date_lst: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s" \ "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or 0.0) if self.initial_balance: self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line AS l " \ "WHERE l.account_id IN %s " \ "AND " + self.init_query + "" , (tuple(self.account_ids), )) temp_res += float(self.cr.fetchone()[0] or 0.0) result_tmp = result_tmp + temp_res return result_tmp
ac1584df430288117e384a231f5a84958ac74009 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac1584df430288117e384a231f5a84958ac74009/partner_balance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1364, 67, 323, 3682, 12, 2890, 16, 501, 4672, 309, 486, 365, 18, 2232, 30, 327, 374, 18, 20, 563, 67, 5645, 273, 374, 18, 20, 1906, 67, 455, 273, 374, 18, 20, 309, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1364, 67, 323, 3682, 12, 2890, 16, 501, 4672, 309, 486, 365, 18, 2232, 30, 327, 374, 18, 20, 563, 67, 5645, 273, 374, 18, 20, 1906, 67, 455, 273, 374, 18, 20, 309, 365, 18, ...
print proj_y
print "proj_y: " + str(proj_y)
def update(self): if self.alive: # FIXME - Need to figure out how to get time into this formula for y #print "projectile y: " + str(proj_y) (curr_x, curr_y) = self.pos tx = self.t/10.0 proj_y = self.h0 + (tx * self.velocity * math.sin(self.rad_angle)) - (self.gravity * tx * tx) / 2 size = ((proj_y / 20) + self.min_size) self.image = pygame.Surface((size,size)) self.image.fill(self.color) proj_x = self.velocity * math.cos(self.rad_angle) * tx if proj_y < 0: print "proj_x:" + str(proj_x) self.hit_ground() if (curr_y >= 500 and curr_y <= 600): if (proj_y < 10): self.bounce = True print proj_y if (self.bounce == False): self.pos = (curr_x, (SCREEN_WIDTH - ((proj_x * 20)) + 20 )) else: self.pos = (curr_x, (curr_y + (tx*10))) self.rect.center = self.pos self.t = self.t + 1
25adcc4c56b6447a6930c8e2f3924510c2cd6046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12377/25adcc4c56b6447a6930c8e2f3924510c2cd6046/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 309, 365, 18, 11462, 30, 468, 9852, 300, 12324, 358, 7837, 596, 3661, 358, 336, 813, 1368, 333, 8013, 364, 677, 468, 1188, 315, 4406, 398, 677, 30, 315, 397, 609,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 309, 365, 18, 11462, 30, 468, 9852, 300, 12324, 358, 7837, 596, 3661, 358, 336, 813, 1368, 333, 8013, 364, 677, 468, 1188, 315, 4406, 398, 677, 30, 315, 397, 609,...
consumed = {'CPU':cpu,'CPULimit':cpuLimit,'WallClock':wallClock,'WallClockLimit':wallClockLimit} self.log.debug(consumed)
consumed = {'CPU':cpu, 'CPULimit':cpuLimit, 'WallClock':wallClock, 'WallClockLimit':wallClockLimit} self.log.debug( consumed )
def getResourceUsage(self): """Returns a dictionary containing CPUConsumed, CPULimit, WallClockConsumed and WallClockLimit for current slot. All values returned in seconds. """ if not self.jobID: return S_ERROR('Could not determine batch jobID from QSUB_REQNAME env var.')
013577d2510d87cdaee909fee435302cb1869e76 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/013577d2510d87cdaee909fee435302cb1869e76/BQSTimeLeft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5070, 5357, 12, 2890, 4672, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924, 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, 5070, 5357, 12, 2890, 4672, 3536, 1356, 279, 3880, 4191, 12154, 20554, 16, 5181, 1506, 1038, 16, 678, 454, 14027, 20554, 471, 678, 454, 14027, 3039, 364, 783, 4694, 18, 225, 4826, 924, 2...
if b[:1] == '/':
if b.startswith('/'):
def join(a, *p): """Join two or more pathname components, inserting '/' as needed""" path = a for b in p: if b[:1] == '/': path = b elif path == '' or path[-1:] == '/': path = path + b else: path = path + '/' + b return path
48d5c66045fe77d7b9b73d9a94f35f2863ee0d26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/48d5c66045fe77d7b9b73d9a94f35f2863ee0d26/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 69, 16, 380, 84, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 2023, 487, 3577, 8395, 589, 273, 279, 364, 324, 316, 293, 30, 309, 324, 18, 17514, 1918, 2668, 2473...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 69, 16, 380, 84, 4672, 3536, 4572, 2795, 578, 1898, 9806, 4085, 16, 21079, 2023, 487, 3577, 8395, 589, 273, 279, 364, 324, 316, 293, 30, 309, 324, 18, 17514, 1918, 2668, 2473...
mod, name, port = sys.argv[1:]
mod, name, port, level = sys.argv[1:]
def serve(): mod, name, port = sys.argv[1:] __import__(mod) logger.info('serving') getattr(sys.modules[mod], name)(('localhost', int(port)), Server) run()
e9f2eba1bb0bbf9bffdde2cd2fc1a343c4aea9cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9502/e9f2eba1bb0bbf9bffdde2cd2fc1a343c4aea9cc/wordcount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 13332, 681, 16, 508, 16, 1756, 16, 1801, 273, 2589, 18, 19485, 63, 21, 26894, 1001, 5666, 972, 12, 1711, 13, 1194, 18, 1376, 2668, 550, 6282, 6134, 3869, 12, 9499, 18, 6400, 63,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 13332, 681, 16, 508, 16, 1756, 16, 1801, 273, 2589, 18, 19485, 63, 21, 26894, 1001, 5666, 972, 12, 1711, 13, 1194, 18, 1376, 2668, 550, 6282, 6134, 3869, 12, 9499, 18, 6400, 63,...
print time.ctime() + " : pinging critical machines"
log("pinging critical machines")
def main(): """ <Purpose> Ping all the machines to see if they are up <Exceptions> none <Side Effects> Prints the ping result <Returns> None. """ # setup the gmail user/password to use when sending email success,explanation_str = send_gmail.init_gmail() if not success: log(explanation_str) sys.exit(0) print time.ctime() + " : pinging critical machines" #list of machines thats getting pinged pinglist = [] #list that contains all the ping results result_queue = [] #create a thread for each machine and ping them for host in machine_list: current_machine = ping(str(host), result_queue) pinglist.append(current_machine) current_machine.start() #join all the threads for ping_host in pinglist: ping_host.join() #variable that keeps track if any machines are down ALL_MACHINES_RUNNING = True error_message="WARNING: Seattle machines are down! Seattle developers please check on the machines.\n" error_message+="Displaying ping result:\n" #check to see if all the results were successful #on failures notify the admins and send a message to the irc for (success, result) in result_queue: if not success: ALL_MACHINES_RUNNING = False error_message += result+"\n" #if all machines were pinged successfully, notify on irc if option -m was used to run ping_machines.py if ALL_MACHINES_RUNNING: if sys.argv[1] == '-m': irc_seattlebot.send_msg("The machines: "+str(machine_list)+" were pinged successfully") else: handle_exception(error_message) irc_seattlebot.send_msg(error_message) print time.ctime() + " : Done pinging all machiens." print "--------------------------------------------"
cafb94406cce24637e70cedf2c6152f49f60d24b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7274/cafb94406cce24637e70cedf2c6152f49f60d24b/ping_machines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 411, 10262, 4150, 34, 18214, 777, 326, 15942, 358, 2621, 309, 2898, 854, 731, 225, 411, 11416, 34, 6555, 225, 411, 8895, 30755, 87, 34, 3038, 87, 326, 10087, 563, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 411, 10262, 4150, 34, 18214, 777, 326, 15942, 358, 2621, 309, 2898, 854, 731, 225, 411, 11416, 34, 6555, 225, 411, 8895, 30755, 87, 34, 3038, 87, 326, 10087, 563, 225,...
def first_action_callback(O, tardy_model):
def first_action_callback(O, tardy_model, rmsd_calculator):
def first_action_callback(O, tardy_model): O.tardy_model = tardy_model tpo = tardy_model.potential_obj O.draw_map.set_unit_cell_and_density_map( unit_cell=tpo.geo_manager.crystal_symmetry.unit_cell(), density_map=tpo.density_map) O.points = tardy_model.sites_moved().deep_copy() if (tpo.ideal_sites_cart is not None): O.points.extend(tpo.ideal_sites_cart) if (O.points.size() < 20): if (tpo.ideal_sites_cart is None): O.labels = tardy_model.labels else: O.labels = tardy_model.labels + [""] * len(tardy_model.labels) def draw_ideal_line(): if (tpo.ideal_sites_cart is None): return n = tardy_model.tardy_tree.n_vertices ideal_line = tuple([i+n for i in line]) O.line_i_seqs.append(ideal_line) O.line_colors[ideal_line] = [0.6]*3 if (tardy_model.potential_obj.reduced_geo_manager is not None): for line,color in tardy_model.tardy_tree.viewer_lines_with_colors( include_loop_edge_bendings=False): draw_ideal_line() O.line_i_seqs.append(line) O.line_colors[line] = color print "\n".join(tardy_model.tardy_tree.viewer_lines_with_colors_legend( include_loop_edge_bendings=False)) else: for line in tardy_model.potential_obj.geo_manager.simple_edge_list(): draw_ideal_line() O.line_i_seqs.append(line) O.line_colors[line] = (1,0,0) mcs = minimum_covering_sphere(O.points, epsilon=1.e-2) O.minimum_covering_sphere = sphere_3d( center=mcs.center(), radius=mcs.radius()*2.0) O.flag_show_minimum_covering_sphere = False O.flag_show_rotation_center = False O.show_key_stroke_help() if (O.first_first): O.first_first = False else: O.action_callback()
382ec955ff6cb30dd991d186338b816aae67831b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/382ec955ff6cb30dd991d186338b816aae67831b/wx_tardy_pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1122, 67, 1128, 67, 3394, 12, 51, 16, 268, 1060, 93, 67, 2284, 16, 27806, 72, 67, 12780, 639, 4672, 531, 18, 88, 1060, 93, 67, 2284, 273, 268, 1060, 93, 67, 2284, 268, 1631, 273, 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, 1122, 67, 1128, 67, 3394, 12, 51, 16, 268, 1060, 93, 67, 2284, 16, 27806, 72, 67, 12780, 639, 4672, 531, 18, 88, 1060, 93, 67, 2284, 273, 268, 1060, 93, 67, 2284, 268, 1631, 273, 2...
self.bossLiteSession.purgeService( task )
self.scheduler.purgeService( task )
def purgeService( self, taskId, jobRange='all') : """ purge the service used by the scheduler from job files not available for every scheduler
ab1502697d25b5cdbc11147ff7cda81e6dc66ab2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/ab1502697d25b5cdbc11147ff7cda81e6dc66ab2/BossLiteAPISched.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 1179, 12, 365, 16, 15321, 16, 1719, 2655, 2218, 454, 6134, 294, 3536, 11668, 326, 1156, 1399, 635, 326, 8129, 628, 1719, 1390, 486, 2319, 364, 3614, 8129, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 1179, 12, 365, 16, 15321, 16, 1719, 2655, 2218, 454, 6134, 294, 3536, 11668, 326, 1156, 1399, 635, 326, 8129, 628, 1719, 1390, 486, 2319, 364, 3614, 8129, 2, -100, -100, -100, -10...
g['SO'] = '.ppc.slb'
g['SO'] = '.ppc.slb'
def _init_mac(): """Initialize the module as appropriate for Macintosh systems""" g = {} # set basic install directories g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1) g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1) # XXX hmmm.. a normal install puts include files here g['INCLUDEPY'] = get_python_inc(plat_specific=0) import MacOS if not hasattr(MacOS, 'runtimemodel'): g['SO'] = '.ppc.slb' else: g['SO'] = '.%s.slb' % MacOS.runtimemodel # XXX are these used anywhere? g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") global _config_vars _config_vars = g
99f9baa33190482784900970fd3e1c76e7cb48d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/99f9baa33190482784900970fd3e1c76e7cb48d6/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 5821, 13332, 3536, 7520, 326, 1605, 487, 5505, 364, 13217, 474, 17636, 14908, 8395, 314, 273, 2618, 468, 444, 5337, 3799, 6402, 314, 3292, 14484, 1639, 882, 3546, 273, 336, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 5821, 13332, 3536, 7520, 326, 1605, 487, 5505, 364, 13217, 474, 17636, 14908, 8395, 314, 273, 2618, 468, 444, 5337, 3799, 6402, 314, 3292, 14484, 1639, 882, 3546, 273, 336, ...
UserDict.UserDict.__init__(self, *args, **kw)
def __init__(self, *args, **kw): UserDict.UserDict.__init__(self, *args, **kw) def remove(wr, selfref=ref(self)): self = selfref() if self is not None: del self.data[wr.key] self._remove = remove
9166e1a24ac7b15776ffd38e436fa51a9b002674 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9166e1a24ac7b15776ffd38e436fa51a9b002674/weakref.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 1652, 1206, 12, 91, 86, 16, 365, 1734, 33, 1734, 12, 2890, 3719, 30, 365, 273, 365, 1734, 1435, 309, 365, 353, 486, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 1652, 1206, 12, 91, 86, 16, 365, 1734, 33, 1734, 12, 2890, 3719, 30, 365, 273, 365, 1734, 1435, 309, 365, 353, 486, 59...
print "!! %s::%s (%s)" % (klass, sys.exc_value, sys.exc_type) return False
def load (self, path, name, klass): # Aggiungiamo la path old = sys.path sys.path.append (path) try: module = __import__ (name)#, globals (), locals (), [klass]) instance = vars(module)[klass]
2b46fa668727d3b6421dc97e60120012863df15b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2406/2b46fa668727d3b6421dc97e60120012863df15b/engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 261, 2890, 16, 589, 16, 508, 16, 7352, 4672, 468, 5495, 10052, 318, 10052, 301, 83, 7125, 589, 1592, 273, 2589, 18, 803, 2589, 18, 803, 18, 6923, 261, 803, 13, 225, 775, 30, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 261, 2890, 16, 589, 16, 508, 16, 7352, 4672, 468, 5495, 10052, 318, 10052, 301, 83, 7125, 589, 1592, 273, 2589, 18, 803, 2589, 18, 803, 18, 6923, 261, 803, 13, 225, 775, 30, 16...
self._control.setTextCursor(cursor)
def _insert_plain_text_into_buffer(self, text): """ Inserts text into the input buffer at the current cursor position, ensuring that continuation prompts are inserted as necessary. """ lines = unicode(text).splitlines(True) if lines: self._keep_cursor_in_buffer() cursor = self._control.textCursor() cursor.beginEditBlock() cursor.insertText(lines[0]) for line in lines[1:]: if self._continuation_prompt_html is None: cursor.insertText(self._continuation_prompt) else: self._continuation_prompt = \ self._insert_html_fetching_plain_text( cursor, self._continuation_prompt_html) cursor.insertText(line) cursor.endEditBlock() self._control.setTextCursor(cursor)
9ef471da588e333547e025acd8b584976b9e878b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4217/9ef471da588e333547e025acd8b584976b9e878b/console_widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 67, 7446, 67, 955, 67, 18591, 67, 4106, 12, 2890, 16, 977, 4672, 3536, 8040, 87, 977, 1368, 326, 810, 1613, 622, 326, 783, 3347, 1754, 16, 24831, 716, 17378, 3012, 1092, 854...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 67, 7446, 67, 955, 67, 18591, 67, 4106, 12, 2890, 16, 977, 4672, 3536, 8040, 87, 977, 1368, 326, 810, 1613, 622, 326, 783, 3347, 1754, 16, 24831, 716, 17378, 3012, 1092, 854...
dlg = Gtk.MessageDialog( type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK ) dlg.set_markup( '<b>%s</b>' % _('An error occurred while fetching albums.') )
def on_fetch_albums_error(self, treeview, exc): """ Called when an error occured in the thread. """ self.reset() pindex = self.treeviews.index(treeview) self.progressbars[pindex].set_fraction(0.0) self.progressbars[pindex].hide() self.running_threads[pindex] = False dlg = Gtk.MessageDialog( type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK ) dlg.set_markup( '<b>%s</b>' % _('An error occurred while fetching albums.') ) # managing exceptions with urllib is a real PITA... :( if hasattr(exc, 'reason'): try: reason = exc.reason[1] except: try: reason = exc.reason[0] except: reason = str(exc) reason = reason.capitalize() msg = _('Failed to connect to Jamendo server.\n%s.') % reason elif hasattr(exc, 'code'): msg = _('The Jamendo server returned code %s.') % exc.code else: msg = str(exc) dlg.format_secondary_text(msg) dlg.run() dlg.destroy()
0d9e72a80eccc8b8f23e0aa8ec6049cf6cc3edc1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11070/0d9e72a80eccc8b8f23e0aa8ec6049cf6cc3edc1/jamendo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5754, 67, 25090, 87, 67, 1636, 12, 2890, 16, 2151, 1945, 16, 3533, 4672, 3536, 11782, 1347, 392, 555, 16206, 316, 326, 2650, 18, 3536, 365, 18, 6208, 1435, 293, 1615, 273, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5754, 67, 25090, 87, 67, 1636, 12, 2890, 16, 2151, 1945, 16, 3533, 4672, 3536, 11782, 1347, 392, 555, 16206, 316, 326, 2650, 18, 3536, 365, 18, 6208, 1435, 293, 1615, 273, 365...
'seleniumHost' : 'http://localhost:4444'
'seleniumHost' : 'http://localhost:4444', 'ieSingleWindow' : False
def __init__(self, testType="remote", seleniumConf=None, testConf=None, autConf=None, browserConf=None, mailConf=None): defaultSeleniumConf = { 'startSelenium' : 'java -jar ../../selenium/current/selenium-server.jar', 'seleniumHost' : 'http://localhost:4444' } defaultTestConf = { 'simulateTest' : False, 'getReportFrom' : 'testLog', 'testLogDir' : '../../logs', 'testReportDir' : '../../reports', #'classPath' : '../../selenium/current/selenium-java-client-driver.jar:../../rhino/current/js.jar', 'seleniumClientDriverJar' : '../../selenium/current/selenium-java-client-driver.jar', 'rhinoJar' : '../../rhino/current/js.jar', 'classPathSeparator' : ';', 'proxyEnable' : 'wscript ../../tool/proxyEnable.vbs', 'proxyDisable' : 'wscript ../../tool/proxyDisable.vbs', 'compatEnable' : 'wscript ../../tool/compatEnable.vbs', 'compatDisable' : 'wscript ../../tool/compatDisable.vbs', 'killSelenium' : 'wscript ../../tool/killselenium.vbs' } self.testType = testType self.seleniumConf = self.getConfig(defaultSeleniumConf, seleniumConf) self.testConf = self.getConfig(defaultTestConf, testConf) self.mailConf = mailConf self.autConf = autConf self.browserConf = browserConf self.trunkrev = None self.buildStatus = {}
f3f0615cc19dbade2cd471c6c59e9e85266e9fc3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/f3f0615cc19dbade2cd471c6c59e9e85266e9fc3/qxtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1842, 559, 1546, 7222, 3113, 29480, 3976, 33, 7036, 16, 1842, 3976, 33, 7036, 16, 2059, 3976, 33, 7036, 16, 4748, 3976, 33, 7036, 16, 4791, 3976, 33, 703...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 559, 1546, 7222, 3113, 29480, 3976, 33, 7036, 16, 1842, 3976, 33, 7036, 16, 2059, 3976, 33, 7036, 16, 4748, 3976, 33, 7036, 16, 4791, 3976, 33, 703...
None, [STRING],
None, [STRING],
def fl_set_directory(p1): """ fl_set_directory(p1) -> num. """ retval = _fl_set_directory(p1) 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, 542, 67, 5149, 12, 84, 21, 4672, 3536, 1183, 67, 542, 67, 5149, 12, 84, 21, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 542, 67, 5149, 12, 84, 21, 13, 327, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 67, 5149, 12, 84, 21, 4672, 3536, 1183, 67, 542, 67, 5149, 12, 84, 21, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 67, 542, 67, 5149, 12, 84, 21, 13, 327, 5...
if opts.help:
if hasattr(opts, 'help') and opts.help:
def _parse_command_opts (self, parser, args):
b9bcf3a85e18ed56d98592c2c90c1d9042132ba8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b9bcf3a85e18ed56d98592c2c90c1d9042132ba8/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3076, 67, 4952, 261, 2890, 16, 2082, 16, 833, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 3076, 67, 4952, 261, 2890, 16, 2082, 16, 833, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print >> sys.stderr, "Cannot found numpy installation."
print >> sys.stderr, "Cannot find numpy installation."
def get_num_include_path (): numpy = None try: numpys = require('numpy >= 1.0.3') except Exception: return False if not numpys: print >> sys.stderr, "Cannot found numpy installation." exit(-1) else: numpy = numpys[0] return resource_filename(numpy.project_name, 'core/include')
0de8cb35c9a93add8519dd534ebe12a9133b12dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6345/0de8cb35c9a93add8519dd534ebe12a9133b12dc/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2107, 67, 6702, 67, 803, 1832, 30, 3972, 273, 599, 225, 775, 30, 818, 84, 1900, 273, 2583, 2668, 15974, 1545, 404, 18, 20, 18, 23, 6134, 1335, 1185, 30, 327, 1083, 225, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2107, 67, 6702, 67, 803, 1832, 30, 3972, 273, 599, 225, 775, 30, 818, 84, 1900, 273, 2583, 2668, 15974, 1545, 404, 18, 20, 18, 23, 6134, 1335, 1185, 30, 327, 1083, 225, 309,...
SAGE_ROOT = misc.SAGE_ROOT
SAGE_ROOT = misc.SAGE_ROOT try: SAGE_SERVER = os.environ['SAGE_SERVER'] + '/hg/' except KeyError: print "Falling back to a hard coded sage server in misc/hg.py" SAGE_SERVER = "http://sage.math.washington.edu/sage/hg/"
def bundle(self, filename, options='', url=None): """ Create an hg changeset bundle with the given filename against the repository at the given url (which is by default the 'official' SAGE repository).
408d738c008dd203b8f05d2dd37890a1eccc99eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/408d738c008dd203b8f05d2dd37890a1eccc99eb/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 4672, 3536, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 3352, 622, 326, 864, 880, 261, 12784, 353, 635, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3440, 12, 2890, 16, 1544, 16, 702, 2218, 2187, 880, 33, 7036, 4672, 3536, 1788, 392, 22576, 22463, 3440, 598, 326, 864, 1544, 5314, 326, 3352, 622, 326, 864, 880, 261, 12784, 353, 635, ...
filename -- where to keep the database
filename -- where to load the database from TODO: once the tutorial is finished in SQLDatabase, copy it here
def complement(self): q = SQLQuery(self.__database__) q.__query_string__ = re.sub(' WHERE ',' WHERE NOT ( ',self.__query_string__) q.__query_string__ += ' )' q.__param_tuple__ = self.__param_tuple__ return q
5ddf79d83938a9c0191ec3af2f60e264a74ecef9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5ddf79d83938a9c0191ec3af2f60e264a74ecef9/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17161, 12, 2890, 4672, 1043, 273, 3063, 1138, 12, 2890, 16186, 6231, 972, 13, 1043, 16186, 2271, 67, 1080, 972, 273, 283, 18, 1717, 2668, 4852, 3316, 4852, 4269, 261, 2265, 2890, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17161, 12, 2890, 4672, 1043, 273, 3063, 1138, 12, 2890, 16186, 6231, 972, 13, 1043, 16186, 2271, 67, 1080, 972, 273, 283, 18, 1717, 2668, 4852, 3316, 4852, 4269, 261, 2265, 2890, 16186, ...
if node.nodeType==Node.ELEMENT_NODE and self.documentElement: raise TypeError, "Two document elements disallowed" else: self.documentElement=node
if node.nodeType==Node.ELEMENT_NODE: if self.documentElement: raise TypeError, "Two document elements disallowed" else: self.documentElement=node
def appendChild( self, node ): if node.nodeType==Node.ELEMENT_NODE and self.documentElement: raise TypeError, "Two document elements disallowed" else: self.documentElement=node Node.appendChild( self, node ) return node
53b2f3c230d74ec5341be22e20cce770986850fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/53b2f3c230d74ec5341be22e20cce770986850fa/minidom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5833, 12, 365, 16, 756, 262, 30, 309, 756, 18, 2159, 559, 631, 907, 18, 10976, 67, 8744, 30, 309, 365, 18, 5457, 1046, 30, 1002, 3580, 16, 315, 11710, 1668, 2186, 24729, 6, 469, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5833, 12, 365, 16, 756, 262, 30, 309, 756, 18, 2159, 559, 631, 907, 18, 10976, 67, 8744, 30, 309, 365, 18, 5457, 1046, 30, 1002, 3580, 16, 315, 11710, 1668, 2186, 24729, 6, 469, 30, ...
f=lambda T,x=x,special=special: special(T,x,func)
f=lambda T,x=x,special=special,func=func: special(T,x,func)
def _findMinMaxValue(V, x, default, func, special=None): if type(V[0][0]) in (TupleType,ListType): if special: f=lambda T,x=x,special=special: special(T,x,func) else: f=lambda T,x=x: T[x] V=map(lambda e,f=f: map(f,e),V) V = filter(len,map(lambda x: filter(lambda x: x is not None,x),V)) if len(V)==0: return default return func(map(func,V))
d053cfc9d3a717e667b371a16bffaf9b2f390b8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/d053cfc9d3a717e667b371a16bffaf9b2f390b8f/axes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 17454, 620, 12, 58, 16, 619, 16, 805, 16, 1326, 16, 4582, 33, 7036, 4672, 309, 618, 12, 58, 63, 20, 6362, 20, 5717, 316, 261, 9038, 559, 16, 19366, 4672, 309, 4582, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 17454, 620, 12, 58, 16, 619, 16, 805, 16, 1326, 16, 4582, 33, 7036, 4672, 309, 618, 12, 58, 63, 20, 6362, 20, 5717, 316, 261, 9038, 559, 16, 19366, 4672, 309, 4582, 30, ...
context2=context.copy()
context2 = context.copy()
def do_create(self, cr, uid, ids, context=None): mod_obj = self.pool.get('ir.model.data') analytic_account_obj = self.pool.get('account.analytic.account') res_partner_obj = self.pool.get('res.partner') account_payment_term_obj = self.pool.get('account.payment.term') invoices = []
f46f7a770b2d814434573b77e25d0d05332000c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f46f7a770b2d814434573b77e25d0d05332000c7/hr_timesheet_invoice_create.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 681, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 892, 6134, 392, 7834, 335, 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, 741, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 681, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 892, 6134, 392, 7834, 335, 67, ...
def __init__(self):
def __init__(self, debug=0):
def __init__(self): """Constructor """ # Calling superclass method _XMLparser.__init__(self) self._parser = xml.sax.make_parser() self._parser.setContentHandler(self) # To avoid ValueError: unknown url type: NCBI_BlastOutput.dtd self._parser.setFeature(xml.sax.handler.feature_validation, 0) self._parser.setFeature(xml.sax.handler.feature_namespaces, 0) self._parser.setFeature(xml.sax.handler.feature_external_pes, 0) self._parser.setFeature(xml.sax.handler.feature_external_ges, 0)
222c25b5ffb6f82620be0e71c5d11e486994dbfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/222c25b5ffb6f82620be0e71c5d11e486994dbfb/NCBIXML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1198, 33, 20, 4672, 3536, 6293, 3536, 468, 21020, 12098, 707, 389, 4201, 4288, 16186, 2738, 972, 12, 2890, 13, 225, 365, 6315, 4288, 273, 2025, 18, 87, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1198, 33, 20, 4672, 3536, 6293, 3536, 468, 21020, 12098, 707, 389, 4201, 4288, 16186, 2738, 972, 12, 2890, 13, 225, 365, 6315, 4288, 273, 2025, 18, 87, 6...
del context[self.CONCURRENCY_CHECK_FIELD]
def _check_concurrency(self, cr, ids, context): if not context: return if context.get(self.CONCURRENCY_CHECK_FIELD) and self._log_access: santa = "(id = %s AND %s < COALESCE(write_date, create_date, now())::timestamp)" for i in range(0, len(ids), cr.IN_MAX): sub_ids = tools.flatten(((i, context[self.CONCURRENCY_CHECK_FIELD][str(i)]) for i in ids[i:i+cr.IN_MAX] if str(i) in context[self.CONCURRENCY_CHECK_FIELD])) if sub_ids: cr.execute("SELECT count(1) FROM %s WHERE %s" % (self._table, " OR ".join([santa]*(len(sub_ids)/2))), sub_ids) res = cr.fetchone() if res and res[0]: raise except_orm('ConcurrencyException', _('Records were modified in the meanwhile'))
9e6378a06bdefaabfccb64b6eb46727213d374bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/9e6378a06bdefaabfccb64b6eb46727213d374bf/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 591, 7095, 12, 2890, 16, 4422, 16, 3258, 16, 819, 4672, 309, 486, 819, 30, 327, 309, 819, 18, 588, 12, 2890, 18, 2248, 7509, 25231, 67, 10687, 67, 6776, 13, 471, 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, 1893, 67, 591, 7095, 12, 2890, 16, 4422, 16, 3258, 16, 819, 4672, 309, 486, 819, 30, 327, 309, 819, 18, 588, 12, 2890, 18, 2248, 7509, 25231, 67, 10687, 67, 6776, 13, 471, 365, ...
rtmp = 'rtmpdump -r %s' % media_url
return self._play_default(media)
def _play_rtmp(self, media): """ Download data with rtmpdump and pipe them to a media player.
73cc25fadbfbf8fb579e93b2bc8ea08e67e6e8a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/73cc25fadbfbf8fb579e93b2bc8ea08e67e6e8a8/media_player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1601, 67, 3797, 1291, 12, 2890, 16, 3539, 4672, 3536, 13059, 501, 598, 436, 5645, 8481, 471, 6010, 2182, 358, 279, 3539, 7291, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1601, 67, 3797, 1291, 12, 2890, 16, 3539, 4672, 3536, 13059, 501, 598, 436, 5645, 8481, 471, 6010, 2182, 358, 279, 3539, 7291, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
if days is not None:
if days is not None:
def __init__(self, absolute_time=None, days=None, hours=None, minutes=None, method=None, extension_elements=None, extension_attributes=None, text=None): self.absolute_time = absolute_time if days is not None: self.days = str(days) else: self.days = None if hours is not None: self.hours = str(hours) else: self.hours = None if minutes is not None: self.minutes = str(minutes) else: self.minutes = None self.method = method self.text = text self.extension_elements = extension_elements or [] self.extension_attributes = extension_attributes or {}
220fb3846b34b52b462236a865acc3580b5bf99c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/220fb3846b34b52b462236a865acc3580b5bf99c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4967, 67, 957, 33, 7036, 16, 4681, 33, 7036, 16, 7507, 33, 7036, 16, 6824, 33, 7036, 16, 707, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4967, 67, 957, 33, 7036, 16, 4681, 33, 7036, 16, 7507, 33, 7036, 16, 6824, 33, 7036, 16, 707, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4...
if npos > self.numobjects: npos = self.numobjects
if npos > self.hashlength: npos = self.hashlength
def nextObject(self, finish=None): if finish: npos = self.numobjects else: self.num += 1 npos = (self.num * self.hashlength) / self.numobjects if npos > self.numobjects: npos = self.numobjects msg = "" if self.hashpos < npos: msg = "#" * (npos - self.hashpos) self.hashpos = npos if finish: msg += "\n" if msg: self._doprint(msg)
ecab68f50c3aac801778373699f68fe4631055e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/ecab68f50c3aac801778373699f68fe4631055e9/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 921, 12, 2890, 16, 4076, 33, 7036, 4672, 309, 4076, 30, 290, 917, 273, 365, 18, 2107, 6911, 469, 30, 365, 18, 2107, 1011, 404, 290, 917, 273, 261, 2890, 18, 2107, 380, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 921, 12, 2890, 16, 4076, 33, 7036, 4672, 309, 4076, 30, 290, 917, 273, 365, 18, 2107, 6911, 469, 30, 365, 18, 2107, 1011, 404, 290, 917, 273, 261, 2890, 18, 2107, 380, 365, 18,...
self.mRenWin.SetWindowId(self.winId())
self.mRenWin.SetWindowInfo(str(int(self.winId())))
def event(self, e): """ event(e: QEvent) -> depends on event type Process window and interaction events """ if e.type()==QtCore.QEvent.ParentAboutToChange: if self.mRenWin: if self.mRenWin.GetMapped(): self.mRenWin.Finalize() else: if e.type==QtCore.QEvent.ParentChange: print 'PARENT CHANGE MIGHT BE WRONG' if self.mRenWin: self.mRenWin.SetWindowId(self.winId()) if self.isVisible(): self.mRenWin.Start() if QtCore.QObject.event(self,e): return 1
816e7a919527af102eae392f6ab903151624a095 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/816e7a919527af102eae392f6ab903151624a095/vtkcell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 12, 2890, 16, 425, 4672, 3536, 871, 12, 73, 30, 2238, 1133, 13, 317, 10935, 603, 871, 618, 4389, 2742, 471, 13581, 2641, 225, 3536, 309, 425, 18, 723, 1435, 631, 23310, 4670, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 12, 2890, 16, 425, 4672, 3536, 871, 12, 73, 30, 2238, 1133, 13, 317, 10935, 603, 871, 618, 4389, 2742, 471, 13581, 2641, 225, 3536, 309, 425, 18, 723, 1435, 631, 23310, 4670, 18, ...
if s[0] in str(conf.supybot.reply.whenAddressedBy.chars):
if s and s[0] in str(conf.supybot.reply.whenAddressedBy.chars):
def bugSnarfer(self, irc, msg, match): r"""\b(?P<bt>(([a-z0-9]+)?\s+bugs?|[a-z0-9]+))\s+#?(?P<bug>\d+(?!\d*\.\d+)((,|\s*(and|en|et|und|ir))\s*#?\d+(?!\d*\.\d+))*)""" if msg.args[0][0] == '#' and not self.registryValue('bugSnarfer', msg.args[0]): return nbugs = msg.tagged('nbugs') if not nbugs: nbugs = 0 if nbugs >= 5: return
a989f3eaeb9837b7a4602e938313219aec0258a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3104/a989f3eaeb9837b7a4602e938313219aec0258a1/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7934, 10461, 297, 586, 12, 2890, 16, 277, 1310, 16, 1234, 16, 845, 4672, 436, 8395, 64, 70, 3680, 52, 32, 23602, 34, 12, 3816, 69, 17, 94, 20, 17, 29, 7941, 10936, 87, 15, 19381, 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, 7934, 10461, 297, 586, 12, 2890, 16, 277, 1310, 16, 1234, 16, 845, 4672, 436, 8395, 64, 70, 3680, 52, 32, 23602, 34, 12, 3816, 69, 17, 94, 20, 17, 29, 7941, 10936, 87, 15, 19381, 3...
if not dart.edge():
try: i = bridges.index(dart.edge()) except ValueError:
def removeEdges(map, edgeLabels): result = 0 bridges = [] for edgeLabel in edgeLabels: edge = map.edge(edgeLabel) if edge.isBridge(): bridges.append(edge) elif map.mergeFaces(edge.dart()): result += 1 while bridges: for edge in bridges: dart = edge.dart() if dart.endNode().degree() == 1: dart.nextAlpha() break if dart.startNode().degree() == 1: break while True: next = dart.clone().nextPhi() bridges.remove(dart.edge()) if map.removeBridge(dart): result += 1 if next.clone().nextSigma() != next: break dart = next if not dart.edge(): break result += removeIsolatedNodes(map) # FIXME: depend on allowIsolatedNodes result += mergeDegree2Nodes(map) return result
6ebd230ed9ab7da864a27f038a6cedfe41009506 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/6ebd230ed9ab7da864a27f038a6cedfe41009506/maputils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 10697, 12, 1458, 16, 3591, 5888, 4672, 563, 273, 374, 225, 324, 1691, 2852, 273, 5378, 364, 3591, 2224, 316, 3591, 5888, 30, 3591, 273, 852, 18, 7126, 12, 7126, 2224, 13, 309, 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, 1206, 10697, 12, 1458, 16, 3591, 5888, 4672, 563, 273, 374, 225, 324, 1691, 2852, 273, 5378, 364, 3591, 2224, 316, 3591, 5888, 30, 3591, 273, 852, 18, 7126, 12, 7126, 2224, 13, 309, 35...
if not _canExecute(cwd.getChild(element)):
if not _canExecute(cwd):
def _findFileFromPath(path, follow_symlinks=True): path = _makeAbsPath(path) for element in path.split('/'): if element == '': cwd = _filesystem elif not isinstance(cwd, FakeDir): raise OSError(errno.ENOTDIR, 'Not a directory' % path) elif element in cwd.getChildren(): cwd = cwd.getChild(element) if not _canExecute(cwd.getChild(element)): raise OSError(errno.EPERM, 'Permission denied') if isinstance(cwd, FakeSymlink): cwd = cwd.dereference() else: raise OSError(errno.ENOENT, 'File not found') if isinstance(cwd, FakeSymlink): if follow_symlinks: cwd = cwd.dereference() return cwd
aa20dce7c6d5bb9f33d932aab3323692451f4886 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/aa20dce7c6d5bb9f33d932aab3323692451f4886/os_mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 812, 23064, 12, 803, 16, 2805, 67, 21278, 87, 33, 5510, 4672, 589, 273, 389, 6540, 9382, 743, 12, 803, 13, 225, 364, 930, 316, 589, 18, 4939, 2668, 2473, 4672, 309, 930, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 812, 23064, 12, 803, 16, 2805, 67, 21278, 87, 33, 5510, 4672, 589, 273, 389, 6540, 9382, 743, 12, 803, 13, 225, 364, 930, 316, 589, 18, 4939, 2668, 2473, 4672, 309, 930, 4...
"""This draws a right-angled triangle. possible attributes: 'x', 'y', 'size', 'color', 'strokeColor' """ def __init__(self): self.x = 0 self.y = 0 self.size = 100 self.color = colors.green self.strokeColor = None def demo(self): D = shapes.Drawing(200, 100) et = RTriangle0() et.x=50 et.y=0 et.draw() D.add(et) labelFontSize = 10 D.add(shapes.String(et.x+(et.size/2),(et.y-(1.2*labelFontSize)), self.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) return D def draw(self): s = self.size g = shapes.Group() ae = s*0.125 triangle = shapes.Polygon(points = [ self.x, self.y, self.x+s, self.y, self.x,self.y+s], fillColor = self.color, strokeColor = self.strokeColor, strokeWidth=s/50.) g.add(triangle) return g
"""This draws a right-angled triangle. possible attributes: 'x', 'y', 'size', 'color', 'strokeColor' """ def __init__(self): self.x = 0 self.y = 0 self.size = 100 self.color = colors.green self.strokeColor = None def draw(self): s = float(self.size) g = shapes.Group() ae = s*0.125 triangle = shapes.Polygon(points = [ self.x, self.y, self.x+s, self.y, self.x,self.y+s], fillColor = self.color, strokeColor = self.strokeColor, strokeWidth=s/50.) g.add(triangle) return g
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # Triangle specific bits ae = s*0.125 #(ae = 'an eighth') triangle = shapes.Polygon(points = [ self.x, self.y, self.x+s, self.y, self.x+(s/2),self.y+s], fillColor = self.color, strokeColor = self.strokeColor, strokeWidth=s/50.) g.add(triangle) return g
a94ee8176f1eaa19b5cc320daa2067dbafd93acd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a94ee8176f1eaa19b5cc320daa2067dbafd93acd/signsandsymbols.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 468, 7470, 3604, 4125, 272, 273, 365, 18, 1467, 225, 468, 1223, 7379, 340, 487, 732, 903, 999, 333, 279, 17417, 314, 273, 14736, 18, 1114, 1435, 225, 468, 10000, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 468, 7470, 3604, 4125, 272, 273, 365, 18, 1467, 225, 468, 1223, 7379, 340, 487, 732, 903, 999, 333, 279, 17417, 314, 273, 14736, 18, 1114, 1435, 225, 468, 10000, ...
smalll = filter(lambda s: s[:1] != '.', bigl)
smalll = [s for s in bigl if s[:1] != '.']
def fetch_completions(self, what, mode): """Return a pair of lists of completions for something. The first list is a sublist of the second. Both are sorted.
4d03384c9c6b58fb8855f43b329539b266165732 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/4d03384c9c6b58fb8855f43b329539b266165732/AutoComplete.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 67, 7806, 1115, 12, 2890, 16, 4121, 16, 1965, 4672, 3536, 990, 279, 3082, 434, 6035, 434, 23738, 364, 5943, 18, 1021, 1122, 666, 353, 279, 26680, 434, 326, 2205, 18, 19118, 854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2158, 67, 7806, 1115, 12, 2890, 16, 4121, 16, 1965, 4672, 3536, 990, 279, 3082, 434, 6035, 434, 23738, 364, 5943, 18, 1021, 1122, 666, 353, 279, 26680, 434, 326, 2205, 18, 19118, 854, ...
if self.old_AR is not None: os.environ['AR'] = self.old_AR
for name, value in self.old_flags: if value is not None: os.environ[name] = value elif name in os.environ: del os.environ[name]
def tearDown(self): if self.old_AR is not None: os.environ['AR'] = self.old_AR
6f9977852ff61be2f55f82bbdb92e486c23d2dd9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/6f9977852ff61be2f55f82bbdb92e486c23d2dd9/test_sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 309, 365, 18, 1673, 67, 985, 353, 486, 599, 30, 1140, 18, 28684, 3292, 985, 3546, 273, 365, 18, 1673, 67, 985, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 309, 365, 18, 1673, 67, 985, 353, 486, 599, 30, 1140, 18, 28684, 3292, 985, 3546, 273, 365, 18, 1673, 67, 985, 2, -100, -100, -100, -100, -100, -100, ...
def onKeyUp (self, event): self.saveTextValue()
def instantiateWidget (self): widget = super (EditTextAttribute, self).instantiateWidget() # We need to save off the changed widget's data into the block periodically # Hopefully OnLoseFocus is getting called every time we lose focus. widget.Bind(wx.EVT_KILL_FOCUS, self.onLoseFocus) return widget
bc19b0d33ddcda2330a97058cf61cec88d49550e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/bc19b0d33ddcda2330a97058cf61cec88d49550e/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10275, 4609, 261, 2890, 4672, 3604, 273, 2240, 261, 4666, 1528, 1499, 16, 365, 2934, 24628, 3840, 4609, 1435, 468, 1660, 1608, 358, 1923, 3397, 326, 3550, 3604, 1807, 501, 1368, 326, 1203,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10275, 4609, 261, 2890, 4672, 3604, 273, 2240, 261, 4666, 1528, 1499, 16, 365, 2934, 24628, 3840, 4609, 1435, 468, 1660, 1608, 358, 1923, 3397, 326, 3550, 3604, 1807, 501, 1368, 326, 1203,...
cmd = compile_cmd(f, m) queue_compile_low.append(cmd)
queue_compile_low.append([compile_command, f])
def compile_command_list(ext_modules, deps): """ Computes a list of commands needed to compile and link the extension modules given in 'ext_modules' """ queue_compile_high = [] queue_compile_med = [] queue_compile_low = [] for m in ext_modules: new_sources = [] for f in m.sources: if f.endswith('.pyx'): dep_file, dep_time = deps.newest_dep(f) dest_file = "%s/%s"%(SITE_PACKAGES, f) dest_time = deps.timestamp(dest_file) if dest_time < dep_time: if dep_file == f: print "Building modified file %s."%f cmd = compile_cmd(f, m) queue_compile_high.append(cmd) elif dep_file == (f[:-4] + '.pxd'): print "Building %s because it depends on %s."%(f, dep_file) cmd = compile_cmd(f, m) queue_compile_med.append(cmd) else: print "Building %s because it depends on %s."%(f, dep_file) cmd = compile_cmd(f, m) queue_compile_low.append(cmd) new_sources.append(process_filename(f, m)) m.sources = new_sources # print "# compile high = ", len(queue_compile_high) # print queue_compile_high # print "# compile med = ", len(queue_compile_med) # print queue_compile_med # print "# compile low = ", len(queue_compile_low) # print queue_compile_low return queue_compile_high + queue_compile_med + queue_compile_low
7462c408b39b7473b3850257a6bc4c7f4806d7e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7462c408b39b7473b3850257a6bc4c7f4806d7e3/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 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, 4074, 67, 3076, 67, 1098, 12, 408, 67, 6400, 16, 8740, 4672, 3536, 14169, 281, 279, 666, 434, 4364, 3577, 358, 4074, 471, 1692, 326, 2710, 4381, 864, 316, 296, 408, 67, 6400, 11, 3536,...
def do_event(self, (dev, val)):
def do_event(self, dev, val):
def do_event(self, (dev, val)): if dev == DEVICE.REDRAW: if self.vin: self.vin.redraw(val) if self.vout: self.vout.redraw(val)
a8993cfe16a04c612da72f72181ac63c6f858224 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a8993cfe16a04c612da72f72181ac63c6f858224/Vedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2575, 12, 2890, 16, 4461, 16, 1244, 4672, 309, 4461, 422, 23996, 18, 5879, 10821, 30, 309, 365, 18, 21529, 30, 365, 18, 21529, 18, 1118, 1899, 12, 1125, 13, 309, 365, 18, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 2575, 12, 2890, 16, 4461, 16, 1244, 4672, 309, 4461, 422, 23996, 18, 5879, 10821, 30, 309, 365, 18, 21529, 30, 365, 18, 21529, 18, 1118, 1899, 12, 1125, 13, 309, 365, 18, 90...
])
] requirements.sort() self.assertEqual(self.desc.systemrequirements, requirements)
def test_attributes(self): # TODO: split this method to improve the error reporting # TODO: figure out how to test the comments self.assertEqual(self.desc.name, 'package name') self.assertEqual(self.desc.version, '0.0.1') self.assertEqual(self.desc.date, '2009-01-01') self.assertEqual(self.desc.author, 'Author Name: testing \':\'s in the value.') self.assertEqual(self.desc.maintainer, 'Maintainer Name') self.assertEqual(self.desc.title, 'Package Title') self.assertEqual(self.desc.description, 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.') self.assertEqual(self.desc.categories, 'Category1,Category2, Category3') self.assertEqual(self.desc.url, 'http://example.org') self.assertEqual(self.desc.systemrequirements, [ '>=g-octave/pkg1-4.3.2', '<g-octave/pkg2-1.2.3', 'g-octave/pkg3' ]) self.assertEqual(self.desc.buildrequires, ['>g-octave/pkg4-1.0.0']) self.assertEqual(self.desc.depends, ['>=sci-mathematics/octave-3.0.0']) self.assertEqual(self.desc.autoload, 'NO') self.assertEqual(self.desc.license, 'GPL version 3 or later')
7e3082348f9812173eb7275b809880c28a4f967b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10378/7e3082348f9812173eb7275b809880c28a4f967b/test_description.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4350, 12, 2890, 4672, 468, 2660, 30, 1416, 333, 707, 358, 21171, 326, 555, 16096, 468, 2660, 30, 7837, 596, 3661, 358, 1842, 326, 5678, 365, 18, 11231, 5812, 12, 2890, 18, 55...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4350, 12, 2890, 4672, 468, 2660, 30, 1416, 333, 707, 358, 21171, 326, 555, 16096, 468, 2660, 30, 7837, 596, 3661, 358, 1842, 326, 5678, 365, 18, 11231, 5812, 12, 2890, 18, 55...
ET.SubElement(root, 'dc:language').text = self.language
ET.SubElement(root, qname('language',DC_NS)).text = self.language
def toElement(self,**kwargs):
e9c4345533fd24eede4febe6e6cd4c5c3b16e15c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/e9c4345533fd24eede4febe6e6cd4c5c3b16e15c/DIDLLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 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, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 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,...
(pi + pi)
2*pi
def __init__(self, x, y, op): Function_arith.__init__(self, x, y, op) Constant.__init__(self)
31372fdd844298d220161205b3a0ae85555e880b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/31372fdd844298d220161205b3a0ae85555e880b/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 677, 16, 1061, 4672, 4284, 67, 297, 483, 16186, 2738, 972, 12, 2890, 16, 619, 16, 677, 16, 1061, 13, 10551, 16186, 2738, 972, 12, 2890, 13, 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, 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, 619, 16, 677, 16, 1061, 4672, 4284, 67, 297, 483, 16186, 2738, 972, 12, 2890, 16, 619, 16, 677, 16, 1061, 13, 10551, 16186, 2738, 972, 12, 2890, 13, 22...
self.DC.SetFont(f) self.DC.SetTextForeground(wx.NamedColour(self.week_font_color))
DC.SetFont(f) DC.SetTextForeground(MakeColor(self.colors[COLOR_HEADER_FONT]))
def DrawWeek(self): # draw the week days width = self.gridx[1]-self.gridx[0] height = self.gridy[1] - self.gridy[0] rect_w = self.gridx[7]-self.gridx[0]
b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/b25cb7db43121f1f6899b7ebfcd6ccc3806dd0f6/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 6630, 12, 2890, 4672, 377, 468, 3724, 326, 4860, 4681, 1835, 273, 365, 18, 5222, 92, 63, 21, 65, 17, 2890, 18, 5222, 92, 63, 20, 65, 2072, 273, 365, 18, 5222, 93, 63, 21, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 6630, 12, 2890, 4672, 377, 468, 3724, 326, 4860, 4681, 1835, 273, 365, 18, 5222, 92, 63, 21, 65, 17, 2890, 18, 5222, 92, 63, 20, 65, 2072, 273, 365, 18, 5222, 93, 63, 21, 65...
self.make_archive(os.path.join(self.dist_dir, archive_basename), self.format, root_dir=self.bdist_dir)
pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) if not self.relative: archive_root = self.bdist_dir else: if (self.distribution.has_ext_modules() and (install.install_base != install.install_platbase)): raise DistutilsPlatformError, \ ("can't make a dumb built distribution where " "base and platbase are different (%s, %s)" % (repr(install.install_base), repr(install.install_platbase))) else: archive_root = os.path.join(self.bdist_dir, ensure_relative(install.install_base)) self.make_archive(pseudoinstall_root, self.format, root_dir=archive_root)
def run (self):
f1d21cbbd7180761f01e2a97176d83e2c8cc282e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f1d21cbbd7180761f01e2a97176d83e2c8cc282e/bdist_dumb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 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, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 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, -100, -100, ...
def createScales(self, instance):
def createScales(self, instance, value=_marker):
def createScales(self, instance): """creates the scales and save them """ sizes = self.getAvailableSizes(instance) if not HAS_PIL or not sizes: return img = self.getRaw(instance) if not img: return filename = self.getFilename(instance) #dot = filename.rfind('.') #filename, ext = filename[:dot], filename[dot:] data = str(img.data) for n, size in sizes.items(): w, h = size id = self.getName() + "_" + n __traceback_info__ = (self, instance, id, w, h) try: imgdata, format = self.scale(data, w, h) except ConflictError: raise except: if not self.swallowResizeExceptions: raise else: log_exc() # scaling failed, don't create a scaled version continue mimetype = 'image/%s' % format.lower() image = self.content_class(id, self.getName(), imgdata, mimetype ) # nice filename: filename_sizename.ext #fname = "%s_%s%s" % (filename, n, ext) #image.filename = fname image.filename = filename # manually use storage delattr(image, 'title') self.getStorage(instance).set(id, instance, image, mimetype=mimetype, filename=filename)
00cb8d22dc308ba46f936f60593fa4ea08abad5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/00cb8d22dc308ba46f936f60593fa4ea08abad5d/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 55, 21177, 12, 2890, 16, 791, 16, 460, 33, 67, 11145, 4672, 3536, 19787, 326, 18211, 471, 1923, 2182, 3536, 8453, 273, 365, 18, 588, 5268, 11923, 12, 1336, 13, 309, 486, 21641, 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, 752, 55, 21177, 12, 2890, 16, 791, 16, 460, 33, 67, 11145, 4672, 3536, 19787, 326, 18211, 471, 1923, 2182, 3536, 8453, 273, 365, 18, 588, 5268, 11923, 12, 1336, 13, 309, 486, 21641, 67...
- a list of the first $n$ prime numbers.
- a list of the first `n` prime numbers.
def primes_first_n(n, leave_pari=False): r""" Return the first `n` primes. INPUT: - `n` - a nonnegative integer OUTPUT: - a list of the first $n$ prime numbers. EXAMPLES:: sage: primes_first_n(10) [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] sage: len(primes_first_n(1000)) 1000 sage: primes_first_n(0) [] """ if n < 0: raise ValueError, "n must be nonnegative" if n < 1: return [] return fast_arith.prime_range(pari.nth_prime(n) + 1)
c5cc436e94fabaa9fa38f5732aff2c6f8ca3be27 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/c5cc436e94fabaa9fa38f5732aff2c6f8ca3be27/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 4485, 67, 3645, 67, 82, 12, 82, 16, 8851, 67, 1065, 77, 33, 8381, 4672, 436, 8395, 2000, 326, 1122, 1375, 82, 68, 846, 4485, 18, 225, 12943, 30, 225, 300, 1375, 82, 68, 300, 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, 846, 4485, 67, 3645, 67, 82, 12, 82, 16, 8851, 67, 1065, 77, 33, 8381, 4672, 436, 8395, 2000, 326, 1122, 1375, 82, 68, 846, 4485, 18, 225, 12943, 30, 225, 300, 1375, 82, 68, 300, 2...
try: body = [output, extra] except NameError: body = [output]
body = [output]
def perform_deleteaccount(req, userID, callback='yes', confirm=0): """delete account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="5"></a>5. Delete account.&nbsp&nbsp&nbsp<small>[<a title="See guide" href="%s/admin/webaccess/guide.html#4">?</a>]</small>""" % weburl res = run_sql("SELECT id, email, password FROM user WHERE id=%s" % userID) output = "" if res: if confirm in [0, "0"]: text = '<b><span class="important">Are you sure you want to delete the account with email: "%s"?</span></b>' % res[0][1] output += createhiddenform(action="deleteaccount", text=text, userID=userID, confirm=1, button="Delete") elif confirm in [1, "1"]: res2 = run_sql("DELETE FROM user WHERE id=%s" % userID) output += '<b><span class="info">Account deleted.</span></b>' if CFG_ACCESS_CONTROL_NOTIFY_USER_ABOUT_DELETION == 1: emailsent = sendAccountDeletedMessage(res[0][1], res[0][1]) else: output += '<b><span class="info">The account id given does not exist.</span></b>' try: body = [output, extra] except NameError: body = [output] if callback: return perform_editaccount(req, userID, mtype='perform_deleteaccount', content=addadminbox(subtitle, body), callback='yes') else: return addadminbox(subtitle, body)
d2e51be3e5c7b1fed22266aa2cd557c1c292e947 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/d2e51be3e5c7b1fed22266aa2cd557c1c292e947/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3733, 4631, 12, 3658, 16, 16299, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 3733, 2236, 8395, 225, 261, 1944, 67, 710, 16, 1357, 67, 2150, 13, 273, 353, 67, 3666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 3733, 4631, 12, 3658, 16, 16299, 16, 1348, 2218, 9707, 2187, 6932, 33, 20, 4672, 3536, 3733, 2236, 8395, 225, 261, 1944, 67, 710, 16, 1357, 67, 2150, 13, 273, 353, 67, 3666, ...
args = deepcopy(args)
args = deepcopy(args, memo)
def _reconstruct(x, info, deep): if isinstance(info, str): return x assert isinstance(info, tuple) n = len(info) assert n in (2, 3) callable, args = info[:2] if n > 2: state = info[2] else: state = {} if deep: args = deepcopy(args) y = callable(*args) if state: if deep: state = deepcopy(state) y.__dict__.update(state) return y
9d258ce6d202c8ad3d551b614524fcdf09902018 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9d258ce6d202c8ad3d551b614524fcdf09902018/copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 10062, 12, 92, 16, 1123, 16, 4608, 4672, 309, 1549, 12, 1376, 16, 609, 4672, 327, 619, 1815, 1549, 12, 1376, 16, 3193, 13, 290, 273, 562, 12, 1376, 13, 1815, 290, 316, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 266, 10062, 12, 92, 16, 1123, 16, 4608, 4672, 309, 1549, 12, 1376, 16, 609, 4672, 327, 619, 1815, 1549, 12, 1376, 16, 3193, 13, 290, 273, 562, 12, 1376, 13, 1815, 290, 316, 261,...
' uint32_t tag;\n'
' ev_uint32_t tag;\n'
def PrintCode(self, file): print >>file, ('/*\n' ' * Implementation of %s\n' ' */\n') % self._name
18e24f6e4d520bca9b77b2978b6e1909e8b964d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/18e24f6e4d520bca9b77b2978b6e1909e8b964d3/event_rpcgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3038, 1085, 12, 2890, 16, 585, 4672, 1172, 1671, 768, 16, 7707, 19, 12174, 82, 11, 296, 380, 25379, 434, 738, 87, 64, 82, 11, 296, 1195, 64, 82, 6134, 738, 365, 6315, 529, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3038, 1085, 12, 2890, 16, 585, 4672, 1172, 1671, 768, 16, 7707, 19, 12174, 82, 11, 296, 380, 25379, 434, 738, 87, 64, 82, 11, 296, 1195, 64, 82, 6134, 738, 365, 6315, 529, 2, -100, ...
c1 = base_ring(a[0].lift() * (j+1) / (3*j + 5))
if p.divides(3*j + 5): c1 = base_ring(lift(a[0]) * (j+1) / (3*j + 5)) else: c1 = a[0] * (j+1) / (3*j + 5)
def reduce_positive(Q, coeffs, offset): """ Applies cohomology relations to incorporate positive powers of $y$ into the $y^0$ term. INPUT: Q -- cubic polynomial coeffs -- list of length 3 lists. The i^th list [a, b, c] represents $y^{2(i - offset)} (a + bx + cx^2) dx/y$. offset -- nonnegative integer OUTPUT: The reduction is performed in-place. The output is placed in coeffs[offset]. Note that coeffs[i] will be meaningless for i > offset after this function is finished. EXAMPLE: sage: R.<x> = Integers(5^3)['x'] sage: Q = x^3 - x + R(1/4) sage: coeffs = [[1, 2, 3], [10, 15, 20]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_positive(Q, coeffs, 0) sage: coeffs[0] [16, 102, 88] sage: coeffs = [[9, 8, 7], [10, 15, 20]] sage: coeffs = [[R.base_ring()(a) for a in row] for row in coeffs] sage: monsky_washnitzer.reduce_positive(Q, coeffs, 0) sage: coeffs[0] [24, 108, 92] """ base_ring = Q.base_ring() next_a = coeffs[len(coeffs) - 1] Qa = Q[1] Qb = Q[0] A = 2*Qa B = 3*Qb for i in range(len(coeffs)-1, offset, -1): j = 2*(i-offset) - 2 a = next_a next_a = coeffs[i-1] a[0] = a[0] - Qa*a[2]/3 # subtract d(y^j + 1) # todo: see comments about pAdicInteger in reduceNegative() # subtract off c1 of d(x y^j + 1) c1 = base_ring(a[0].lift() * (j+1) / (3*j + 5)) # subtract off c2 of d(x^2 y^j + 1) c2 = base_ring(a[1].lift() * (j+1) / (3*j + 7)) next_a[0] = next_a[0] + B*c1 next_a[1] = next_a[1] + A*c1 + B*c2 next_a[2] = next_a[2] + A*c2 coeffs[int(offset)] = next_a
27b77e28ae3b8fbd3ab5545206e95e0ab8882088 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/27b77e28ae3b8fbd3ab5545206e95e0ab8882088/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 67, 21094, 12, 53, 16, 16530, 16, 1384, 4672, 3536, 1716, 5259, 1825, 17125, 4676, 7467, 358, 316, 3850, 3831, 340, 6895, 7602, 414, 434, 271, 93, 8, 1368, 326, 271, 93, 66, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 67, 21094, 12, 53, 16, 16530, 16, 1384, 4672, 3536, 1716, 5259, 1825, 17125, 4676, 7467, 358, 316, 3850, 3831, 340, 6895, 7602, 414, 434, 271, 93, 8, 1368, 326, 271, 93, 66, 20, ...
hg_subprocess = Popen(hg_command.split(), stdout=PIPE, stderr=PIPE)
hg_subprocess = Popen(hg_command_tuple, stdout=PIPE, stderr=PIPE)
def run_mercurial_command(hg_command): try: hg_subprocess = Popen(hg_command.split(), stdout=PIPE, stderr=PIPE) except OSError: print >> sys.stderr, "Can't find the hg executable!" sys.exit(1) hg_out, hg_err = hg_subprocess.communicate() if len(hg_err) > 0: raise MercurialRuntimeError(hg_err) return hg_out
96c0e229878b52d9443124eb62add70565baf4d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/96c0e229878b52d9443124eb62add70565baf4d4/check_whitespace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 6592, 1397, 649, 67, 3076, 12, 26981, 67, 3076, 4672, 775, 30, 22576, 67, 1717, 2567, 273, 14339, 12, 26981, 67, 3076, 67, 8052, 16, 3909, 33, 27602, 16, 4514, 33, 27602, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 6592, 1397, 649, 67, 3076, 12, 26981, 67, 3076, 4672, 775, 30, 22576, 67, 1717, 2567, 273, 14339, 12, 26981, 67, 3076, 67, 8052, 16, 3909, 33, 27602, 16, 4514, 33, 27602, 13,...
helpfile = open(os.path.join(directory, 'help.html'), 'w')
helpfile = open(os.path.join(directory, 'epydoc-help.html'), 'w')
def _write_help(self, directory): helpfile = open(os.path.join(directory, 'help.html'), 'w') navbar = self._navbar('help') helpfile.write(self._header('Help')+navbar+HELP+navbar+self._footer()) helpfile.close()
1b52b16120989cc834166571a9a1e9b8676d968f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1b52b16120989cc834166571a9a1e9b8676d968f/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 5201, 12, 2890, 16, 1867, 4672, 2809, 768, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 5149, 16, 296, 881, 93, 2434, 17, 5201, 18, 2620, 19899, 296, 91, 6134, 8775, 321...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 5201, 12, 2890, 16, 1867, 4672, 2809, 768, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 5149, 16, 296, 881, 93, 2434, 17, 5201, 18, 2620, 19899, 296, 91, 6134, 8775, 321...
for p in zdc:
for p in cache:
def uncache_zipdir(path): """Ensure that the zip directory cache doesn't have stale info for path""" from zipimport import _zip_directory_cache as zdc if path in zdc: del zdc[path] else: path = normalize_path(path) for p in zdc: if normalize_path(p)==path: del zdc[p] return
9ba52cf30de1f9e8c019481e615fd661e4533bd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/9ba52cf30de1f9e8c019481e615fd661e4533bd2/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6301, 807, 67, 4450, 1214, 12, 803, 4672, 3536, 12512, 716, 326, 3144, 1867, 1247, 3302, 1404, 1240, 14067, 1123, 364, 589, 8395, 628, 3144, 5666, 1930, 389, 4450, 67, 5149, 67, 2493, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6301, 807, 67, 4450, 1214, 12, 803, 4672, 3536, 12512, 716, 326, 3144, 1867, 1247, 3302, 1404, 1240, 14067, 1123, 364, 589, 8395, 628, 3144, 5666, 1930, 389, 4450, 67, 5149, 67, 2493, 48...
**py2exe_opts)
console=['hg'])
def finalize_options(self): self.set_undefined_options('install', ('install_lib', 'install_dir')) install_data.finalize_options(self)
a3b14c665e64e62272d84b1cdb65c97b4c755c1b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/a3b14c665e64e62272d84b1cdb65c97b4c755c1b/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 12, 2890, 4672, 365, 18, 542, 67, 5978, 67, 2116, 2668, 5425, 2187, 7707, 5425, 67, 2941, 2187, 296, 5425, 67, 1214, 26112, 3799, 67, 892, 18, 30343, 67, 2116, 12, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 12, 2890, 4672, 365, 18, 542, 67, 5978, 67, 2116, 2668, 5425, 2187, 7707, 5425, 67, 2941, 2187, 296, 5425, 67, 1214, 26112, 3799, 67, 892, 18, 30343, 67, 2116, 12, 289...
return NETLINKAddress(space.int_w(w_pid), space.int_w(w_groups))
return NETLINKAddress(space.uint_w(w_pid), space.uint_w(w_groups))
def from_object(space, w_address): try: w_pid, w_groups = space.unpackiterable(w_address, 2) except ValueError: raise TypeError("AF_NETLINK address must be a tuple of length 2") return NETLINKAddress(space.int_w(w_pid), space.int_w(w_groups))
7f755ae9d31b65dabb195f2aa365290d8a00ffd1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/7f755ae9d31b65dabb195f2aa365290d8a00ffd1/rsocket_rffi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 1612, 12, 2981, 16, 341, 67, 2867, 4672, 775, 30, 341, 67, 6610, 16, 341, 67, 4650, 273, 3476, 18, 17309, 15364, 12, 91, 67, 2867, 16, 576, 13, 1335, 2068, 30, 1002, 3580, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 1612, 12, 2981, 16, 341, 67, 2867, 4672, 775, 30, 341, 67, 6610, 16, 341, 67, 4650, 273, 3476, 18, 17309, 15364, 12, 91, 67, 2867, 16, 576, 13, 1335, 2068, 30, 1002, 3580, ...
self.assertEqual(p.stdout.read(), "appleorange")
output = p.stdout.read() stripped = remove_stderr_debug_decorations(output) self.assertEqual(stripped, "appleorange")
def test_stdout_stderr_pipe(self): # capture stdout and stderr to the same pipe p = subprocess.Popen([sys.executable, "-c", 'import sys;' \ 'sys.stdout.write("apple");' \ 'sys.stdout.flush();' \ 'sys.stderr.write("orange")'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) self.assertEqual(p.stdout.read(), "appleorange")
05a5f9b6bd5da2d785236574266f2d3a4e794e5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/05a5f9b6bd5da2d785236574266f2d3a4e794e5d/test_subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10283, 67, 11241, 67, 14772, 12, 2890, 4672, 468, 7477, 3909, 471, 4514, 358, 326, 1967, 6010, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 296, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10283, 67, 11241, 67, 14772, 12, 2890, 4672, 468, 7477, 3909, 471, 4514, 358, 326, 1967, 6010, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 296, 5...
"target=\"_blank\">has new bugs</a>!" % (pkg, ", ".join(pkgs[pkg]), pkg))
"target=\"_blank\">has new bugs</a>!" % (pkg, ", ".join(pkgs[pkg]), urllib.quote(pkg)))
def should_upgrade_src(self, src, suite): """Check if source package should be upgraded
177c8f5fc4a4babd57ce8f0e7b6e6203c847dd07 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2784/177c8f5fc4a4babd57ce8f0e7b6e6203c847dd07/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 67, 15097, 67, 4816, 12, 2890, 16, 1705, 16, 11371, 4672, 3536, 1564, 309, 1084, 2181, 1410, 506, 31049, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1410, 67, 15097, 67, 4816, 12, 2890, 16, 1705, 16, 11371, 4672, 3536, 1564, 309, 1084, 2181, 1410, 506, 31049, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return (0, int(str(start_date - today).split('.')[0]))
return (0, int(str(self.start_date - today).split('.')[0]))
def get_days_left(self): """ Returns the remaining days for the consultation or the number of days before it starts """
8836ace64f6176f551c524d9d93cafd9a2c1de8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/8836ace64f6176f551c524d9d93cafd9a2c1de8a/tbconsultation_item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9810, 67, 4482, 12, 2890, 4672, 3536, 2860, 326, 4463, 4681, 364, 326, 27710, 367, 578, 326, 1300, 434, 4681, 1865, 518, 2542, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9810, 67, 4482, 12, 2890, 4672, 3536, 2860, 326, 4463, 4681, 364, 326, 27710, 367, 578, 326, 1300, 434, 4681, 1865, 518, 2542, 3536, 2, -100, -100, -100, -100, -100, -100, -100,...
if (entry_type & S_IFLNK and not followlinks) \
if (entry_type == S_IFLNK and not followlinks) \
def minifind(path, type = None, perms = None, mindepth = 0, maxdepth = 99, exclude = [], followlinks = False, followmounts = False): """mimic the GNU find behaviour in python. returns an iterator. WARNING: recursive function !""" if mindepth > maxdepth: raise exceptions.BadArgumentError("mindepth must be <= maxdepth.") if maxdepth > 99: raise exceptions.BadArgumentError("please don't try to exhaust maxdepth.") logging.debug("starting minifind in %s, type=%s, mindepth=%s, maxdepth=%s, exclude=%s." \ % (path, type, mindepth, maxdepth, exclude)) paths_to_walk = [ path ] next_paths_to_walk = [] current_depth = 0 S_IFSTD = S_IFDIR | S_IFREG while True: if paths_to_walk != []: entry = paths_to_walk.pop(0) elif next_paths_to_walk != []: paths_to_walk = next_paths_to_walk next_paths_to_walk = [] entry = paths_to_walk.pop(0) current_depth += 1 else: break try: entry_stat = os.lstat(entry) entry_type = entry_stat.st_mode & 0170000 entry_mode = entry_stat.st_mode & 07777 if current_depth >= mindepth \ and ( (type is None and entry_type & S_IFSTD) or entry_type == type) \ and ( perms is None or (entry_mode & perms) ): yield entry if (entry_type & S_IFLNK and not followlinks) \ or (os.path.ismount(entry) and not followmounts): continue if entry_type & S_IFDIR and current_depth < maxdepth: for x in os.listdir(entry): if x not in exclude: next_paths_to_walk.append("%s/%s" % (entry, x)) except OSError, e: if e.errno == 2 or (e.errno == 13 and entry[-5:] == '.gvfs'): continue raise e
c91032f431c349aa6ddd0a881cd61cb775bf7522 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/c91032f431c349aa6ddd0a881cd61cb775bf7522/fsapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 430, 728, 12, 803, 16, 618, 273, 599, 16, 13793, 273, 599, 16, 1131, 5979, 273, 374, 16, 943, 5979, 273, 14605, 16, 4433, 273, 5378, 16, 2805, 7135, 273, 1083, 16, 2805, 4778, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 430, 728, 12, 803, 16, 618, 273, 599, 16, 13793, 273, 599, 16, 1131, 5979, 273, 374, 16, 943, 5979, 273, 14605, 16, 4433, 273, 5378, 16, 2805, 7135, 273, 1083, 16, 2805, 4778, ...
print "set_lock_correction " print new_password
def set_lock_correction(self, state, new_password = None): self.lock_correction = state print "set_lock_correction " print new_password if new_password is not None: salt = "" pop = string.hexdigits while len(salt) < 6: salt += random.choice(pop)
38fb1fdf1069268ef3fe787f494f532435969ef9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/38fb1fdf1069268ef3fe787f494f532435969ef9/exercise.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 739, 67, 20916, 12, 2890, 16, 919, 16, 394, 67, 3664, 273, 599, 4672, 365, 18, 739, 67, 20916, 273, 919, 309, 394, 67, 3664, 353, 486, 599, 30, 4286, 273, 1408, 1843, 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, 444, 67, 739, 67, 20916, 12, 2890, 16, 919, 16, 394, 67, 3664, 273, 599, 4672, 365, 18, 739, 67, 20916, 273, 919, 309, 394, 67, 3664, 353, 486, 599, 30, 4286, 273, 1408, 1843, 273, ...
save_stderr = sys.stderr sys.stderr = sys.stdout h = H() try:
with test_support.captured_output('stderr') as s: h = H()
def __del__(self_): self.assertEqual(self_.a, 1) self.assertEqual(self_.b, 2)
ee74da60c4104038c887d3f6ca003441b0006134 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/ee74da60c4104038c887d3f6ca003441b0006134/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 67, 4672, 365, 18, 11231, 5812, 12, 2890, 27799, 69, 16, 404, 13, 365, 18, 11231, 5812, 12, 2890, 27799, 70, 16, 576, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 67, 4672, 365, 18, 11231, 5812, 12, 2890, 27799, 69, 16, 404, 13, 365, 18, 11231, 5812, 12, 2890, 27799, 70, 16, 576, 13, 2, -100, -100, -100, -100, -100, ...
total_record_final.append((y[0:4]+'-'+y[4:6], int(y[6:8]), 0)) if result == '5': total_hour = range(1,now.day+1) elif result == '6': total_hour = range(1,last_day[start_date.month]) else: total_hour = range(0,24)
if month not in total_record.keys(): total_record[month] = {int(y[6:8]): 0} else: total_record[month][int(y[6:8])] = 0
def show_concurrent_calls(request): kwargs = {} graph_view = '1' result = '1' channel = '' if request.method == 'POST': channel = variable_value(request,'channel') result = variable_value(request,'result') if channel != '': kwargs[ 'channel' ] = channel if result == '': result = '1' now = datetime.now() last_day = {1:31, 2:28, 3:31, 4:30, 5:31, 6:30, 7:31, 8:31, 9:30, 10:31, 11:30, 12:31} if(result == '1'): start_date = datetime(now.year, now.month, now.day, 0, 0, 0, 0) end_date = datetime(now.year, now.month, now.day, 23, 59, 59, 0) elif(result == '2'): start_date = datetime(now.year, now.month, now.day, 0, 0, 0, 0) - relativedelta(days=1) end_date = datetime(now.year, now.month, now.day, 23, 59, 59, 0) - relativedelta(days=1) elif(result == '3'): start_date = datetime(now.year, now.month, now.day, 0, 0, 0, 0) - relativedelta(days=7) end_date = datetime(now.year, now.month, now.day, 23, 59, 59, 0) elif(result == '4'): start_date = datetime(now.year, now.month, now.day, 0, 0, 0, 0) - relativedelta(days=14) end_date = datetime(now.year, now.month, now.day, 23, 59, 59, 0) - relativedelta(days=7) elif(result == '5'): start_date = datetime(now.year, now.month, 1, 0, 0, 0, 0) end_date = datetime(now.year, now.month, now.day, 23, 59, 59, 0) elif(result == '6'): start_date = datetime(now.year, now.month, 1, 0, 0, 0, 0) - relativedelta(months=1) end_date = datetime(now.year, now.month, last_day[now.month], 23, 59, 59, 0) - relativedelta(months=1) kwargs[ 'calldate__range' ] = (start_date,end_date) form = ConcurrentCallForm(initial={'channel':channel,'result':result}) if kwargs: calls_in_day = CDR.objects.filter(**kwargs).values('calldate','duration').order_by('calldate') calls = {} # Populate the calls array for data in calls_in_day: start_call = int(data[ 'calldate' ].strftime("%Y%m%d%H%M%S")) end_call = int((data[ 'calldate' ] + timedelta(seconds=data['duration'])).strftime("%Y%m%d%H%M%S")) if start_call in calls.keys(): calls[start_call].append({'load': 1, 'calldate': data['calldate'], 'duration':data['duration']}) else: calls[start_call] = [{'load': 1, 'calldate': data['calldate'], 'duration':data['duration']}] if end_call in calls.keys(): calls[end_call].append({'load': -1, 'calldate': data['calldate'], 'duration':data['duration']}) else: calls[end_call] = [{'load': -1, 'calldate': data['calldate'], 'duration':data['duration']}] aux = {} # Sort the $calls array by its keys. for i in range(len(calls)): aux[sorted(calls.keys())[i]] = calls[sorted(calls.keys())[i]] calls = aux # Initialize some variables which will be used in processing the concurrent calls concurrent_calls = {} total_call_count = 0 #call_detail = [] calls_ok = [] calls = {} time_calls = {} last_time = 0 for data in calls_in_day: starttime = data['calldate'] int_starttime = int(starttime.strftime("%Y%m%d%H%M%S")) if int_starttime in time_calls.keys(): time_calls[int_starttime] += 1 else: time_calls[int_starttime] = 1 for data in calls_in_day: starttime = data['calldate'] endtime = starttime + timedelta(seconds=data['duration']) int_starttime = int(starttime.strftime("%Y%m%d%H%M%S")) int_endtime = int(endtime.strftime("%Y%m%d%H%M%S")) if int_starttime > last_time: for time in range(int_starttime, int_endtime): if int(result) < 5: if time in time_calls.keys(): if str(time)[0:10] in concurrent_calls.keys(): if time == int_starttime: concurrent_calls[str(time)[0:10]] += time_calls[time] - 1 else: concurrent_calls[str(time)[0:10]] += time_calls[time] else: if time == int_starttime: concurrent_calls[str(time)[0:10]] = time_calls[time] - 1 else: concurrent_calls[str(time)[0:10]] = time_calls[time] else: if time in time_calls.keys(): if str(time)[0:8] in concurrent_calls.keys(): if time == int_starttime: concurrent_calls[str(time)[0:8]] += time_calls[time] - 1 else: concurrent_calls[str(time)[0:8]] += time_calls[time] else: if time == int_starttime: concurrent_calls[str(time)[0:8]] = time_calls[time] - 1 else: concurrent_calls[str(time)[0:8]] = time_calls[time] last_time = int_endtime for data in concurrent_calls: total_call_count += concurrent_calls[data] call_count_range=range(0,total_call_count) call_count_range.reverse() dates = date_range(start_date,end_date) dateList = [] datelist_final = [] if result == '5': for i in range(1,now.day+1): if len(str(i)) <= 1: j = '0' + str(i) else: j = str(i) dateList.append(int(str(now.strftime("%Y%m") + j))) datelist_final.append(( now.strftime("%Y-%m") )) elif result == '6': for i in range(1,start_date.day+1): if len(str(i)) <= 1: j = '0' + str(i) else: j = str(i) dateList.append(int(str(start_date.strftime("%Y%m") + j))) datelist_final.append(( start_date.strftime("%Y-%m") )) else: for i in dates: for j in range(0,24): if len(str(j)) <= 1: j = '0' + str(j) else: j = str(j) dateList.append(int(i.strftime("%Y%m%d") + j)) datelist_final.append(( i.strftime("%Y-%m-%d") )) total_record_final = [] if int(result) < 5: for i in dateList: y = str(i)[0:10] if y in concurrent_calls.keys(): total_record_final.append((y[0:4]+'-'+y[4:6]+'-'+y[6:8], int(y[8:10]), concurrent_calls[y])) else: total_record_final.append((y[0:4]+'-'+y[4:6]+'-'+y[6:8], int(y[8:10]), 0)) else: for i in dateList: y = str(i)[0:8] if y in concurrent_calls.keys(): total_record_final.append((y[0:4]+'-'+y[4:6], int(y[6:8]), concurrent_calls[y])) else: total_record_final.append((y[0:4]+'-'+y[4:6], int(y[6:8]), 0)) if result == '5': total_hour = range(1,now.day+1) elif result == '6': total_hour = range(1,last_day[start_date.month]) else: total_hour = range(0,24) if int(result) < 5: graph_by = _('Hours') else: graph_by = _('Days') variables = RequestContext(request, {'form': form, 'result':'min', 'record_dates':datelist_final, 'total_hour':total_hour, 'graph_view':graph_view, 'call_count_range':call_count_range, 'total_record':sorted(total_record_final, key=lambda total: total[0]), 'calls_in_day':calls_in_day, 'graph_by':graph_by, }) return render_to_response('cdr/show_graph_concurrent_calls.html', variables, context_instance = RequestContext(request))
518e19a1983937f7437775e42d099ee7ddca8c3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/143/518e19a1983937f7437775e42d099ee7ddca8c3a/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 591, 2972, 67, 12550, 12, 2293, 4672, 225, 1205, 273, 2618, 2667, 67, 1945, 273, 296, 21, 11, 563, 273, 296, 21, 11, 1904, 273, 875, 225, 309, 590, 18, 2039, 422, 296, 3798...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 591, 2972, 67, 12550, 12, 2293, 4672, 225, 1205, 273, 2618, 2667, 67, 1945, 273, 296, 21, 11, 563, 273, 296, 21, 11, 1904, 273, 875, 225, 309, 590, 18, 2039, 422, 296, 3798...
ii = index_startswith(lines, 'Fermi Level')
ii = index_startswith(lines, 'Fermi Level:')
def index_startswith(lines, string): for i, line in enumerate(lines): if line.startswith(string): return i raise ValueError
875fddf8f8772ab5893949a8dc91a713a1242898 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/875fddf8f8772ab5893949a8dc91a713a1242898/gpawtext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 67, 17514, 1918, 12, 3548, 16, 533, 4672, 364, 277, 16, 980, 316, 4241, 12, 3548, 4672, 309, 980, 18, 17514, 1918, 12, 1080, 4672, 327, 277, 1002, 2068, 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, 770, 67, 17514, 1918, 12, 3548, 16, 533, 4672, 364, 277, 16, 980, 316, 4241, 12, 3548, 4672, 309, 980, 18, 17514, 1918, 12, 1080, 4672, 327, 277, 1002, 2068, 2, -100, -100, -100, -100,...
if os.path.lexists(Common.autostart_path):
if os.path.lexists(autostart_path):
def start_with_computer(enabled): """If enabled, create shortcut to start application with computer. If disabled, then delete the shortcut.""" if not enabled: if os.path.lexists(Common.autostart_path): FileUtilities.delete(Common.autostart_path) return if os.path.lexists(Common.autostart_path): return import shutil General.makedirs(os.path.dirname(Common.autostart_path)) shutil.copy(Common.launcher_path, Common.autostart_path) os.chmod(Common.autostart_path, 0755) if General.sudo_mode(): General.chownself(Common.autostart_path)
c4318fde00cab2d838365902c38e90ae135640d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7853/c4318fde00cab2d838365902c38e90ae135640d0/Unix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 1918, 67, 13406, 264, 12, 5745, 4672, 3536, 2047, 3696, 16, 752, 10995, 358, 787, 2521, 598, 26579, 18, 971, 5673, 16, 1508, 1430, 326, 10995, 12123, 309, 486, 3696, 30, 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, 787, 67, 1918, 67, 13406, 264, 12, 5745, 4672, 3536, 2047, 3696, 16, 752, 10995, 358, 787, 2521, 598, 26579, 18, 971, 5673, 16, 1508, 1430, 326, 10995, 12123, 309, 486, 3696, 30, 309, ...
self.description = ensure_unicode(_desc.text.strip())
d = WHITESPACE_REGEX.sub(' ', _desc.text.strip()) self.description = ensure_unicode(d) del d
def create_overlay_source(source_elem): _type = source_elem.attrib['type'] try: _class = OVERLAY_TYPES[_type] except KeyError: raise Exception('Unknown overlay type "%s"!' % _type) _location = ensure_unicode(source_elem.text.strip()) return _class(self, xml, config, _location, ignore, quiet)
6db71f043212980cd590ced1790c0c91b7b8a553 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7305/6db71f043212980cd590ced1790c0c91b7b8a553/overlay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 17312, 67, 3168, 12, 3168, 67, 10037, 4672, 389, 723, 273, 1084, 67, 10037, 18, 14588, 3292, 723, 3546, 775, 30, 389, 1106, 273, 22577, 7868, 67, 10564, 63, 67, 723, 65, 1335,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 17312, 67, 3168, 12, 3168, 67, 10037, 4672, 389, 723, 273, 1084, 67, 10037, 18, 14588, 3292, 723, 3546, 775, 30, 389, 1106, 273, 22577, 7868, 67, 10564, 63, 67, 723, 65, 1335,...
raise TypeError, "The bound input for a Resource allocation\ can ONLY be 'min' OR 'max' OR 'normal'"
raise TypeError,("The bound input for a Resource allocation"+ "can ONLY be 'min' OR 'max' OR 'normal'")
def createResourceAllocation(self, node, info, infoID=None, config=None, bound=None, ident=None): """ This method will create a resource allocation section.
1e366dda56653bbe1874c94abe9d80a9b34ba33a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9789/1e366dda56653bbe1874c94abe9d80a9b34ba33a/OvfFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24317, 17353, 12, 2890, 16, 756, 16, 1123, 16, 1123, 734, 33, 7036, 16, 642, 33, 7036, 16, 2489, 33, 7036, 16, 3390, 33, 7036, 4672, 3536, 1220, 707, 903, 752, 279, 1058, 13481, 2442, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24317, 17353, 12, 2890, 16, 756, 16, 1123, 16, 1123, 734, 33, 7036, 16, 642, 33, 7036, 16, 2489, 33, 7036, 16, 3390, 33, 7036, 4672, 3536, 1220, 707, 903, 752, 279, 1058, 13481, 2442, ...
if path is not None: return self._load(path)
if os.path.exists(path): return self._load(path)
def find_page(self): fmt = self.name + '.%s' + self.SUFFIX path = util.get_site_path(self.DIR, fmt % c.locale.language) if path is not None: return self._load(path) path = util.get_site_path(self.DIR, fmt % text.i18n.DEFAULT.language) if path is not None: return self._load(path) path = util.get_path(self.DIR, fmt % c.locale.language) if path is not None: return self._load(path) path = util.get_path(self.DIR, fmt % text.i18n.DEFAULT.language) if path is not None: return self._load(path)
e37ac491c9b0ce5f582f3a8acb086e16d458b917 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10360/e37ac491c9b0ce5f582f3a8acb086e16d458b917/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2433, 12, 2890, 4672, 1325, 273, 365, 18, 529, 397, 2418, 9, 87, 11, 397, 365, 18, 14964, 589, 273, 1709, 18, 588, 67, 4256, 67, 803, 12, 2890, 18, 4537, 16, 1325, 738, 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, 1104, 67, 2433, 12, 2890, 4672, 1325, 273, 365, 18, 529, 397, 2418, 9, 87, 11, 397, 365, 18, 14964, 589, 273, 1709, 18, 588, 67, 4256, 67, 803, 12, 2890, 18, 4537, 16, 1325, 738, 2...
CheckoutDirs(tempd, nspr_tag, cvsroot, nspr_files) CheckoutDirs(tempd, nss_tag, cvsroot, nss_files) CheckoutDirs(tempd, None, cvsroot, mozilla_files) for f in listdir(directory): if f != ".hg" and f != ".hgignore": rmfileortree("%s/%s" % (directory, f)) for f in listdir("%s/mozilla" % tempd): source = "%s/mozilla/%s" % (tempd, f) dest = "%s/%s" % (directory, f) print "Moving %s to %s" % (source, dest) rename(source, dest) check_call(['hg', '-q', 'add'], cwd=directory) check_call(['hg', '-q', 'remove', '--after'], cwd=directory) check_call(['hg', '-q', 'commit', '-m', 'Automated import from CVS.'], cwd=directory)
try: for cvsModuleName in importModules.keys(): cvsModule = importModules[cvsModuleName] CheckoutDirs(tempd, cvsroot, cvsModule['files'], cvsModule['date'], cvsModule['tag']) for f in listdir(directory): if f != ".hg" and f != ".hgignore": rmfileortree("%s/%s" % (directory, f)) for f in listdir("%s/mozilla" % tempd): source = "%s/mozilla/%s" % (tempd, f) dest = "%s/%s" % (directory, f) print "Moving %s to %s" % (source, dest) rename(source, dest) check_call(['hg', 'add'], cwd=directory) check_call(['hg', 'remove', '--after'], cwd=directory) commitMesg = "Automatic merge from CVS:\n" for cvsModuleName in importModules.keys(): cvsModule = importModules[cvsModuleName] if cvsModule['tag'] is None: cvsTagName = 'HEAD' else: cvsTagName = cvsModule['tag'] commitMesg = (commitMesg + "\tModule %s: tag %s at %s\n" % (cvsModuleName, cvsTagName, cvsModule['date'])) check_call(['hg', 'commit', '-m', commitMesg], cwd=directory) except Exception, e: print "ImportMozillaCVS: Exception hit: %s" % (str(e)) raise
def ImportMozillaCVS(directory, cvsroot=None, hg=None, tempdir=None): cvsroot = ensurevalue(cvsroot, "CVSROOT", ":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot") tempd = mkdtemp("cvsimport", dir=tempdir) try: CheckoutDirs(tempd, nspr_tag, cvsroot, nspr_files) CheckoutDirs(tempd, nss_tag, cvsroot, nss_files) CheckoutDirs(tempd, None, cvsroot, mozilla_files) # Remove everything in the hg repository except for the .hg directory for f in listdir(directory): if f != ".hg" and f != ".hgignore": rmfileortree("%s/%s" % (directory, f)) # Move everything from the mozilla/ directory to the hg repo for f in listdir("%s/mozilla" % tempd): source = "%s/mozilla/%s" % (tempd, f) dest = "%s/%s" % (directory, f) print "Moving %s to %s" % (source, dest) rename(source, dest) check_call(['hg', '-q', 'add'], cwd=directory) check_call(['hg', '-q', 'remove', '--after'], cwd=directory) check_call(['hg', '-q', 'commit', '-m', 'Automated import from CVS.'], cwd=directory) finally: rmtree(tempd)
761396e753954c9db2b0154e0e80366bdc29d8ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13067/761396e753954c9db2b0154e0e80366bdc29d8ff/cvs2hg-import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6164, 49, 11142, 10745, 39, 14640, 12, 5149, 16, 276, 6904, 3085, 33, 7036, 16, 22576, 33, 7036, 16, 23101, 33, 7036, 4672, 276, 6904, 3085, 273, 3387, 1132, 12, 71, 6904, 3085, 16, 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, 6164, 49, 11142, 10745, 39, 14640, 12, 5149, 16, 276, 6904, 3085, 33, 7036, 16, 22576, 33, 7036, 16, 23101, 33, 7036, 4672, 276, 6904, 3085, 273, 3387, 1132, 12, 71, 6904, 3085, 16, 31...
revision_user_id = d['user_id'])
revision_user_id = d['user_id']
def get_title_for_user(): # Oh dear. if title: if redundant_title and title != redundant_title: raise control.BadRequestError() return new_title elif redundant_title: if new_title: return new_title else: return redundant_title else: return '[unknown title]'
afd23d4eccbac154e236cdd3a2e2bd11daf1bed9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8158/afd23d4eccbac154e236cdd3a2e2bd11daf1bed9/gliki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2649, 67, 1884, 67, 1355, 13332, 468, 531, 76, 443, 297, 18, 309, 2077, 30, 309, 19530, 67, 2649, 471, 2077, 480, 19530, 67, 2649, 30, 1002, 3325, 18, 13403, 668, 1435, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2649, 67, 1884, 67, 1355, 13332, 468, 531, 76, 443, 297, 18, 309, 2077, 30, 309, 19530, 67, 2649, 471, 2077, 480, 19530, 67, 2649, 30, 1002, 3325, 18, 13403, 668, 1435, 327, ...
bodyrefs = self.bodypostreferences()
bodyrefs = cellset(sure=self.cond.references(), unsure=self.bodypostreferences().unsure)
def postreferences(self): bodyrefs = self.bodypostreferences() stride = self.stride() if bodyrefs and stride != 0: bodyrefs.add(None) return bodyrefs | self.cond.references()
71e0598bb7dc6d9b90f66161eeb283e8ddccc073 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/71e0598bb7dc6d9b90f66161eeb283e8ddccc073/esotope-bfc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 14353, 12, 2890, 4672, 1417, 9316, 273, 2484, 542, 12, 2055, 33, 2890, 18, 10013, 18, 14353, 9334, 640, 2055, 33, 2890, 18, 70, 369, 879, 669, 14353, 7675, 318, 2055, 13, 11084, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 14353, 12, 2890, 4672, 1417, 9316, 273, 2484, 542, 12, 2055, 33, 2890, 18, 10013, 18, 14353, 9334, 640, 2055, 33, 2890, 18, 70, 369, 879, 669, 14353, 7675, 318, 2055, 13, 11084, ...