rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
connection_callable = uowtransaction.mapper_flush_opts['connection_callable'] for state in _sort_states(states): m = _state_mapper(state) tups.append( ( state, m, connection_callable(self, state.obj()), _state_has_identity(state), state.key or m._identity_key_from_state(state) ) )
connection_callable = \ uowtransaction.mapper_flush_opts['connection_callable']
def _save_obj(self, states, uowtransaction, postupdate=False, post_update_cols=None, single=False): """Issue ``INSERT`` and/or ``UPDATE`` statements for a list of objects.
dfab13e9ae147a7112a23db5abc4e4b7addc00fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/dfab13e9ae147a7112a23db5abc4e4b7addc00fa/mapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 2603, 12, 2890, 16, 5493, 16, 18215, 7958, 16, 1603, 2725, 33, 8381, 16, 1603, 67, 2725, 67, 6842, 33, 7036, 16, 2202, 33, 8381, 4672, 3536, 12956, 12176, 11356, 10335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 2603, 12, 2890, 16, 5493, 16, 18215, 7958, 16, 1603, 2725, 33, 8381, 16, 1603, 67, 2725, 67, 6842, 33, 7036, 16, 2202, 33, 8381, 4672, 3536, 12956, 12176, 11356, 10335, ...
res['quantity']='___________________' res['price_unit']='______________________' res['discount']='____________________________________' res['tax_types']='_____________________'
res['quantity']='_______________' res['price_unit']='______________' res['discount']='____________' res['tax_types']='____________________'
def invoice_lines(self,invoice): result =[] sub_total={} info=[] invoice_list=[] res={} list_in_seq={} ids = self.pool.get('account.invoice.line').search(self.cr, self.uid, [('invoice_id', '=', invoice.id)]) ids.sort() for id in range(0,len(ids)): info = self.pool.get('account.invoice.line').browse(self.cr, self.uid,ids[id], self.context.copy()) list_in_seq[info]=info.sequence i=1 j=0 final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1])) invoice_list=[x[0] for x in final] sum_flag={} sum_flag[j]=-1 for entry in invoice_list: res={}
9c806c8d58c33356c2a2009569871b585a2ae0e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/9c806c8d58c33356c2a2009569871b585a2ae0e8/special_message_invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9179, 67, 3548, 12, 2890, 16, 16119, 4672, 563, 273, 8526, 720, 67, 4963, 12938, 1123, 33, 8526, 9179, 67, 1098, 33, 8526, 400, 12938, 666, 67, 267, 67, 5436, 12938, 3258, 273, 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, 9179, 67, 3548, 12, 2890, 16, 16119, 4672, 563, 273, 8526, 720, 67, 4963, 12938, 1123, 33, 8526, 9179, 67, 1098, 33, 8526, 400, 12938, 666, 67, 267, 67, 5436, 12938, 3258, 273, 365, 18...
def __init__(self, job, dag, cache, vetoes, veto_name, prefix, id, effsnrfac=250.0, p_node=[], replace=False):
def __init__(self, job, dag, cache, vetoes, veto_name, prefix, id, effsnrfac=250.0, p_node=[]):
def __init__(self, job, dag, cache, vetoes, veto_name, prefix, id, effsnrfac=250.0, p_node=[], replace=False):
1da6c4e85aaa08b723e95573cc2b7224faaad799 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/1da6c4e85aaa08b723e95573cc2b7224faaad799/highmass_post_process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 16, 22940, 16, 1247, 16, 331, 11453, 281, 16, 331, 11453, 67, 529, 16, 1633, 16, 612, 16, 16419, 8134, 86, 11639, 33, 26520, 18, 20, 16, 293, 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, 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, 1719, 16, 22940, 16, 1247, 16, 331, 11453, 281, 16, 331, 11453, 67, 529, 16, 1633, 16, 612, 16, 16419, 8134, 86, 11639, 33, 26520, 18, 20, 16, 293, 67,...
log.debug('Checking child dead child=%s, stdin=%s, stdout=%s, stderr=%s', self._child, self._stdin.alive, self._stdout.alive, self._stderr.alive)
log.debug('Checking child dead child=%s, state=%d, weakref=%s, stdin=%s, stdout=%s, stderr=%s', self._child, self._state, self._cleanup_weakref, self._stdin.alive, self._stdout.alive, self._stderr.alive)
def _check_dead(self, expected=None): """ Checks to see if the child process has died.
3292640f2214a5ba526f771f9b52a1c9b90a275d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/3292640f2214a5ba526f771f9b52a1c9b90a275d/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 22097, 12, 2890, 16, 2665, 33, 7036, 4672, 3536, 13074, 358, 2621, 309, 326, 1151, 1207, 711, 302, 2092, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 22097, 12, 2890, 16, 2665, 33, 7036, 4672, 3536, 13074, 358, 2621, 309, 326, 1151, 1207, 711, 302, 2092, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
hig.warn(pt, st, title='Service Not Found')
hig.warning(pt, st, title='Service Not Found')
def show_exception(self, exctype, value, tb): if exctype is errors.ServiceNotFoundError: svcname = value.args[0] pt = 'Tried to access non-existing service "%s"' % svcname st = ('PIDA tried to find a service that is not loaded' '. Most likely this is due to a missing dependency' '. Please check the file:\n\n' '<tt>~/.pida/logs/pida.log</tt>') if svcname in ['window', 'buffermanager', 'contexts', 'editormanager']: st = ('%s\n\n<span color="#c03030">' 'The service "%s" is critical.</span>\n\n' '<b>PIDA will not run without it</b>' % (st, svcname)) hig.error(pt, st, title='Service Not Found') else: hig.warn(pt, st, title='Service Not Found') return True else: self.unhandled_exception(exctype, value, tb)
086ea95a521cb3e6c3336ac16b09dd26e40225a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/086ea95a521cb3e6c3336ac16b09dd26e40225a1/debugwindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4064, 12, 2890, 16, 431, 12387, 16, 460, 16, 8739, 4672, 309, 431, 12387, 353, 1334, 18, 1179, 13276, 30, 7538, 529, 273, 460, 18, 1968, 63, 20, 65, 5818, 273, 296, 29847, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4064, 12, 2890, 16, 431, 12387, 16, 460, 16, 8739, 4672, 309, 431, 12387, 353, 1334, 18, 1179, 13276, 30, 7538, 529, 273, 460, 18, 1968, 63, 20, 65, 5818, 273, 296, 29847, ...
self.current_page = page
def display_page(self, page, icons=None): if isinstance(page, type): self.current_page = page() if self.current_page.reuse: logger.info('Storing reusable page %s in cache.', self.current_page.name) self.available_pages[self.current_page.name] = \ self.current_page else: logger.info('Reusing already instanciated page %s from cache.', self.current_page.name) self.current_page = page self._build_iconbar(icons) self.current_page.panel.set_parent(self) self.current_page.panel.lower_bottom() self.current_page.panel.show()
c70d42a321a90d7e15488c7f0ff37b1c4296110a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5280/c70d42a321a90d7e15488c7f0ff37b1c4296110a/canvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 2433, 12, 2890, 16, 1363, 16, 17455, 33, 7036, 4672, 309, 1549, 12, 2433, 16, 618, 4672, 365, 18, 2972, 67, 2433, 273, 1363, 1435, 309, 365, 18, 2972, 67, 2433, 18, 266, 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, 2562, 67, 2433, 12, 2890, 16, 1363, 16, 17455, 33, 7036, 4672, 309, 1549, 12, 2433, 16, 618, 4672, 365, 18, 2972, 67, 2433, 273, 1363, 1435, 309, 365, 18, 2972, 67, 2433, 18, 266, 12...
date_formatted = strptime(date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
date_formatted = time.strptime(date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
def _get_and_change_date_format_for_swiss (self,date_to_format): date_formatted='' print date_to_format if date_to_format: date_formatted = strptime(date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y') return date_formatted
2777e022aa3487d0d5fb436df80ed7a522eb3554 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2777e022aa3487d0d5fb436df80ed7a522eb3554/bvr_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 464, 67, 3427, 67, 712, 67, 2139, 67, 1884, 67, 5328, 1054, 261, 2890, 16, 712, 67, 869, 67, 2139, 4672, 1509, 67, 14897, 2218, 11, 1172, 1509, 67, 869, 67, 2139, 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, 389, 588, 67, 464, 67, 3427, 67, 712, 67, 2139, 67, 1884, 67, 5328, 1054, 261, 2890, 16, 712, 67, 869, 67, 2139, 4672, 1509, 67, 14897, 2218, 11, 1172, 1509, 67, 869, 67, 2139, 309, ...
Repo.shortname=='F-11-i386')))
Repo.shortname=='F-11-i386'))).distinct()
def sqlitebuildtags(self, repo): '''Return a sqlite database of packagebuilds and tags.
62f01ae6c742a259594e48714b1afdc05f580ff3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9953/62f01ae6c742a259594e48714b1afdc05f580ff3/listqueries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16184, 3510, 4156, 12, 2890, 16, 3538, 4672, 9163, 990, 279, 16184, 2063, 434, 2181, 27324, 471, 2342, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 16184, 3510, 4156, 12, 2890, 16, 3538, 4672, 9163, 990, 279, 16184, 2063, 434, 2181, 27324, 471, 2342, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
statinfo = os.stat(fullPath) file_age_days = (time.time() - statinfo.st_ctime) / (60 * 60 * 24)
def _setupYumCache(self): self._addHook("preyum", self._yumCachePreYumHook) self._addHook("postyum", self._yumCachePostYumHook) self.yumSharedCachePath = os.path.join(self.cachedir, "yum_cache") mock.util.mkdirIfAbsent(os.path.join(self.rootdir, 'var/cache/yum')) mock.util.mkdirIfAbsent(self.yumSharedCachePath) self.umountCmds.append('umount -n %s/var/cache/yum' % self.rootdir) self.mountCmds.append('mount -n --bind %s %s/var/cache/yum' % (self.yumSharedCachePath, self.rootdir))
34942bebb19e611289e2d13a3567c60e1104192c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/34942bebb19e611289e2d13a3567c60e1104192c/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 61, 379, 1649, 12, 2890, 4672, 365, 6315, 1289, 5394, 2932, 1484, 93, 379, 3113, 365, 6315, 93, 379, 1649, 1386, 61, 379, 5394, 13, 365, 6315, 1289, 5394, 2932, 2767, 93, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8401, 61, 379, 1649, 12, 2890, 4672, 365, 6315, 1289, 5394, 2932, 1484, 93, 379, 3113, 365, 6315, 93, 379, 1649, 1386, 61, 379, 5394, 13, 365, 6315, 1289, 5394, 2932, 2767, 93, 37...
title = _('Tryton connect'),
title = _('Tryton Connection'),
def request_server(server_widget, parent): result = False dialog = gtk.Dialog( title = _('Tryton connect'), parent = parent, flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT | gtk.WIN_POS_CENTER_ON_PARENT | gtk.gdk.WINDOW_TYPE_HINT_DIALOG,) vbox = gtk.VBox() table = gtk.Table(2, 2, False) table.set_border_width(12) table.set_row_spacings(6) vbox.pack_start(table, False, True, 0) label_server = gtk.Label(_("Server:")) label_server.set_alignment(1, 0) label_server.set_padding(3, 0) table.attach(label_server, 0, 1, 0, 1, yoptions=False, xoptions=gtk.FILL) entry_port = gtk.Entry() entry_port.set_max_length(5) entry_port.set_text("8070") entry_port.set_activates_default(True) entry_port.set_width_chars(16) table.attach(entry_port, 1, 2, 1, 2, yoptions=False, xoptions=gtk.FILL) entry_server = gtk.Entry() entry_server.set_text("localhost") entry_server.set_activates_default(True) entry_server.set_width_chars(16) table.attach(entry_server, 1, 2, 0, 1,yoptions=False, xoptions=gtk.FILL | gtk.EXPAND) label_port = gtk.Label(_("Port:")) label_port.set_alignment(1, 0.5) label_port.set_padding(3, 3) table.attach(label_port, 0, 1, 1, 2, yoptions=False, xoptions=False) dialog.add_button("gtk-cancel", gtk.RESPONSE_CANCEL | gtk.CAN_DEFAULT) dialog.add_button("gtk-ok", gtk.RESPONSE_OK) dialog.vbox.pack_start(vbox) dialog.set_icon(TRYTON_ICON) dialog.show_all() dialog.set_default_response(gtk.RESPONSE_OK) url_m = re.match('^([\w.-]+):(\d{1,5})', server_widget.get_text()) if url_m: entry_server.set_text(url_m.group(1)) entry_port.set_text(url_m.group(2)) res = dialog.run() if res == gtk.RESPONSE_OK: host = entry_server.get_text() port = int(entry_port.get_text()) url = '%s:%d' % (host, port) server_widget.set_text(url) result = (host, port) parent.present() dialog.destroy() return result
b1c5db99aae47927d1641bfb83beba3f4f8e9918 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/b1c5db99aae47927d1641bfb83beba3f4f8e9918/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 67, 3567, 12, 3567, 67, 6587, 16, 982, 4672, 563, 273, 1083, 6176, 273, 22718, 18, 6353, 12, 2077, 273, 225, 389, 2668, 7833, 1917, 4050, 19899, 982, 273, 982, 16, 2943, 273, 2271...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 590, 67, 3567, 12, 3567, 67, 6587, 16, 982, 4672, 563, 273, 1083, 6176, 273, 22718, 18, 6353, 12, 2077, 273, 225, 389, 2668, 7833, 1917, 4050, 19899, 982, 273, 982, 16, 2943, 273, 2271...
del n_som3
def run(config, tim=None): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: (OPTIONAL) Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ import common_lib import dr_lib import DST if tim is not None: tim.getTime(False) old_time = tim.getOldTime() if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") # Read in geometry if one is provided if config.inst_geom is not None: if config.verbose: print "Reading in instrument geometry file" inst_geom_dst = DST.getInstance("application/x-NxsGeom", config.inst_geom) else: inst_geom_dst = None config.so_axis = "time_of_flight" # Steps 1-3: Produce a scaled summed dark current dataset dc_som = dr_lib.scaled_summed_data(config.dkcur, config, dataset_type="dark_current", timer=tim) # Perform Steps 3-6 on black can data if config.bcan is not None: b_som1 = dr_lib.calibrate_dgs_data(config.bcan, config, dc_som, dataset_type="black_can", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: b_som1 = None # Perform Steps 3-6 on empty can data if config.ecan is not None: e_som1 = dr_lib.calibrate_dgs_data(config.ecan, config, dc_som, dataset_type="empty_can", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) else: e_som1 = None # Perform Steps 3-6 on normalization data n_som1 = dr_lib.calibrate_dgs_data(config.data, config, dc_som, dataset_type="normalization", inst_geom_dst=inst_geom_dst, tib_const=config.tib_const, timer=tim) # Perform Steps 7-16 on normalization data if config.norm_trans_coeff is None: norm_trans_coeff = None else: norm_trans_coeff = config.norm_trans_coeff.toValErrTuple() n_som2 = dr_lib.process_dgs_data(n_som1, config, b_som1, e_som1, norm_trans_coeff, dataset_type="normalization", timer=tim) del n_som1, b_som1, e_som1 # Step 17: Integrate normalization spectra if config.verbose: print "Integrating normalization spectra" if tim is not None: tim.getTime(False) if config.norm_int_range is None: start_val = float("inf") end_val = float("inf") else: start_val = common_lib.energy_to_wavelength(\ (config.norm_int_range[1], 0.0))[0] end_val = common_lib.energy_to_wavelength(\ (config.norm_int_range[0], 0.0))[0] n_som3 = dr_lib.integrate_spectra(n_som2, start=start_val, end=end_val, width=True) del n_som2 if tim is not None: tim.getTime(msg="After integrating normalization spectra ") if config.dump_norm: file_comment = "Normalization Integration range: %0.3fA, %0.3fA" \ % (start_val, end_val) hlr_utils.write_file(config.output, "text/num-info", n_som3, output_ext="norm", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="normalization values", comments=[file_comment], tag="Integral", units="counts") del n_som3 # Write out RMD file d_som5.attr_list["config"] = config hlr_utils.write_file(config.output, "text/rmd", d_som5, output_ext="rmd", data_ext=config.ext_replacement, path_replacement=config.path_replacement, verbose=config.verbose, message="metadata") if tim is not None: tim.setOldTime(old_time) tim.getTime(msg="Total Running Time")
5e030bba142c576033a4c514af8f30ab9a17804d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/763/5e030bba142c576033a4c514af8f30ab9a17804d/dgs_norm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 1425, 16, 1658, 33, 7036, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1425, 16, 1658, 33, 7036, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 7...
char.socket.clilocmessage(500971)
char.socket.clilocmessage(500970)
def validCorpseTarget( char, target ): if not target: return 0 if not char.gm and not char.canreach( target, 2 ): char.socket.clilocmessage(500313) return 0 if target.id != 0x2006: char.socket.clilocmessage(500971) return 0 # Check Owner if not target.owner or not target.owner.dead: char.socket.clilocmessage(500971) return 0 return 1
f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f21c62a48bcce26f0bc5f78e0fc183b7bb65d5be/bandages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 6217, 84, 307, 2326, 12, 1149, 16, 1018, 262, 30, 309, 486, 1018, 30, 327, 374, 225, 309, 486, 1149, 18, 23336, 471, 486, 1149, 18, 4169, 12974, 12, 1018, 16, 576, 262, 30, 1149...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 6217, 84, 307, 2326, 12, 1149, 16, 1018, 262, 30, 309, 486, 1018, 30, 327, 374, 225, 309, 486, 1149, 18, 23336, 471, 486, 1149, 18, 4169, 12974, 12, 1018, 16, 576, 262, 30, 1149...
'Si 0.00000000 0.00000000 0.00000000 14 F\n',
'Si 0.00000000 0.00000000 0.00000000 14 T\n',
def setUp(self): self.at = supercell(diamond(5.44,14), 2,2,2) self.at.add_property('log', False) self.at.params['real'] = 1.0 self.at.params['int'] = 2 self.at.params['neg_int'] = -3 self.at.params['bad_neg'] = '3-4' self.at.params['int_a'] = [1,2,3] self.at.params['real_a'] = [1.0,2.0,3.0] self.at.params['int_a2'] = farray([1,2,3,4,5,6,7,8,9]).reshape(3,3) self.at.params['real_a2'] = farray([1.0,2,3,4,5,6,7,8,9]).reshape(3,3) self.at.params['log_param'] = True self.at.params['log_a'] = [True, True, False] self.at.params['string'] = 'string' self.at.params['string2'] = 'string with spaces' self.al = AtomsList([ supercell(diamond(5.44+0.01*x,14),2,2,2) for x in range(5) ]) for at in self.al: at.params.update(self.at.params)
a85b26756f78a0e2b61c24fe6503f6aab9f6d25a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/a85b26756f78a0e2b61c24fe6503f6aab9f6d25a/test_xyz_netcdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 270, 273, 2240, 3855, 12, 3211, 301, 1434, 12, 25, 18, 6334, 16, 3461, 3631, 576, 16, 22, 16, 22, 13, 365, 18, 270, 18, 1289, 67, 4468, 2668, 1330, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 365, 18, 270, 273, 2240, 3855, 12, 3211, 301, 1434, 12, 25, 18, 6334, 16, 3461, 3631, 576, 16, 22, 16, 22, 13, 365, 18, 270, 18, 1289, 67, 4468, 2668, 1330, ...
option_parser.add_option('-t', '--archive_name', default='layout-test-results', help='Layout test result archive name.')
def main(): """Main function to produce new baselines.""" option_parser = optparse.OptionParser() option_parser.add_option('-v', '--verbose', action='store_true', default=False, help='include debug-level logging.') option_parser.add_option('-p', '--platforms', default='mac,win,win-xp,win-vista,linux', help=('Comma delimited list of platforms that need ' 'rebaselining.')) option_parser.add_option('-u', '--archive_url', default=('http://build.chromium.org/buildbot/' 'layout_test_results'), help=('Url to find the layout test result archive ' 'file.')) option_parser.add_option('-t', '--archive_name', default='layout-test-results', help='Layout test result archive name.') option_parser.add_option('-w', '--webkit_canary', action='store_true', default=False, help=('If True, pull baselines from webkit.org ' 'canary bot.')) option_parser.add_option('-b', '--backup', action='store_true', default=False, help=('Whether or not to backup the original test ' 'expectations file after rebaseline.')) option_parser.add_option('-o', '--no_html_results', action='store_true', default=False, help=('If specified, do not generate html that ' 'compares the rebaselining results.')) option_parser.add_option('-d', '--html_directory', default='', help=('The directory that stores the results for ' 'rebaselining comparison.')) option_parser.add_option('-c', '--clean_html_directory', action='store_true', default=False, help=('If specified, delete all existing files in ' 'the html directory before rebaselining.')) option_parser.add_option('-e', '--browser_path', default='', help=('The browser path that you would like to ' 'use to launch the rebaselining result ' 'comparison html')) options = option_parser.parse_args()[0] # Set up our logging format. log_level = logging.INFO if options.verbose: log_level = logging.DEBUG logging.basicConfig(level=log_level, format=('%(asctime)s %(filename)s:%(lineno)-3d ' '%(levelname)s %(message)s'), datefmt='%y%m%d %H:%M:%S') # Verify 'platforms' option is valid if not options.platforms: logging.error('Invalid "platforms" option. --platforms must be specified ' 'in order to rebaseline.') sys.exit(1) platforms = [p.strip().lower() for p in options.platforms.split(',')] for platform in platforms: if not platform in REBASELINE_PLATFORM_ORDER: logging.error('Invalid platform: "%s"' % (platform)) sys.exit(1) # Adjust the platform order so rebaseline tool is running at the order of # 'mac', 'win' and 'linux'. This is in same order with layout test baseline # search paths. It simplifies how the rebaseline tool detects duplicate # baselines. Check _IsDupBaseline method for details. rebaseline_platforms = [] for platform in REBASELINE_PLATFORM_ORDER: if platform in platforms: rebaseline_platforms.append(platform) if not options.no_html_results: options.html_directory = SetupHtmlDirectory(options.html_directory, options.clean_html_directory) rebaselining_tests = set() backup = options.backup for platform in rebaseline_platforms: rebaseliner = Rebaseliner(platform, options) logging.info('') LogDashedString('Rebaseline started', platform) if rebaseliner.Run(backup): # Only need to backup one original copy of test expectation file. backup = False LogDashedString('Rebaseline done', platform) else: LogDashedString('Rebaseline failed', platform, logging.ERROR) rebaselining_tests |= set(rebaseliner.GetRebaseliningTests()) if not options.no_html_results: logging.info('') LogDashedString('Rebaselining result comparison started', None) html_generator = HtmlGenerator(options, rebaseline_platforms, rebaselining_tests) html_generator.GenerateHtml() html_generator.ShowHtml() LogDashedString('Rebaselining result comparison done', None) sys.exit(0)
f9620c624d6a219abe2fb4af51598b253f2c7501 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/f9620c624d6a219abe2fb4af51598b253f2c7501/rebaseline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 445, 358, 11402, 394, 2580, 14567, 12123, 225, 1456, 67, 4288, 273, 2153, 2670, 18, 1895, 2678, 1435, 1456, 67, 4288, 18, 1289, 67, 3482, 2668, 17, 90, 2187, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6376, 445, 358, 11402, 394, 2580, 14567, 12123, 225, 1456, 67, 4288, 273, 2153, 2670, 18, 1895, 2678, 1435, 1456, 67, 4288, 18, 1289, 67, 3482, 2668, 17, 90, 2187, 353...
self.schedulePeriodicUpdates()
def success_cb(result): if not result: # This will trigger the err_cb below. raise ValueError("Empty Config Reply")
b7e806c8df6aa8917f92b211ffa66cad58e78392 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11503/b7e806c8df6aa8917f92b211ffa66cad58e78392/pull_dconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2216, 67, 7358, 12, 2088, 4672, 309, 486, 563, 30, 468, 1220, 903, 3080, 326, 393, 67, 7358, 5712, 18, 1002, 2068, 2932, 1921, 1903, 16202, 7923, 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, 0, 0, 0, 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, 2216, 67, 7358, 12, 2088, 4672, 309, 486, 563, 30, 468, 1220, 903, 3080, 326, 393, 67, 7358, 5712, 18, 1002, 2068, 2932, 1921, 1903, 16202, 7923, 2, -100, -100, -100, -100, -100, -100, ...
with the first transaction whos identifier is greater than or
with the first transaction whose identifier is greater than or
def iterator(start=None, stop=None): """Return an IStorageTransactionInformation iterator.
82d17ef419969f91185b0145c47944447a76397d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10048/82d17ef419969f91185b0145c47944447a76397d/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2775, 12, 1937, 33, 7036, 16, 2132, 33, 7036, 4672, 3536, 990, 392, 467, 3245, 3342, 5369, 2775, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2775, 12, 1937, 33, 7036, 16, 2132, 33, 7036, 4672, 3536, 990, 392, 467, 3245, 3342, 5369, 2775, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if buildenv['outputdir']: if not os.path.exists(buildenv['outputdir']): os.mkdir(buildenv['outputdir']) if os.path.exists(buildenv['outputdir']+os.sep+compFile1): os.remove(buildenv['outputdir']+os.sep+compFile1) os.rename(compFile1, buildenv['outputdir']+os.sep+compFile1) if os.path.exists(buildenv['outputdir']+os.sep+compFile2): os.remove(buildenv['outputdir']+os.sep+compFile2) os.rename(compFile2, buildenv['outputdir']+os.sep+compFile2) if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir)
def distribute(buildenv): _createVersionFile(buildenv) buildVersionShort = \ hardhatutil.RemovePunctuation(buildenv['buildVersion']) # When the build version string is based on one of our CVS tags # (which usually begin with "CHANDLER_") let's remove the "CHANDLER_" # prefix from the string so it doesn't end up in the generated filenames # (so we can avoid getting a distro file named: # "Chandler_linux_CHANDLER_M1.tar.gz", and instead get: # "Chandler_linux_M1.tar.gz") buildVersionShort = buildVersionShort.replace("CHANDLER_", "") if buildenv['version'] == 'debug': if buildenv['os'] == 'posix': distName = 'Chandler_linux_debug_' + buildVersionShort distDir = buildenv['root'] + os.sep + distName buildenv['distdir'] = distDir if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir) os.mkdir(distDir) manifestFile = "distrib/linux/manifest.debug.linux" hardhatlib.handleManifest(buildenv, manifestFile) os.chdir(buildenv['root']) compFile1 = hardhatlib.compressDirectory(buildenv, [distName], distName) os.chdir(buildenv['root']) compFile2 = hardhatlib.compressDirectory(buildenv, ["debug"], "Chandler_linux_dev_debug_" + buildVersionShort) os.chdir(buildenv['root']) if buildenv['os'] == 'osx': distName = 'Chandler_osx_debug_' + buildVersionShort # when we make an osx distribution, we actually need to put it # in a subdirectory (which has a .app extension). So we set # 'distdir' temporarily to that .app dir so that handleManifest() # puts things in the right place. Then we set 'distdir' to its # parent so that it gets cleaned up further down. distDirParent = buildenv['root'] + os.sep + distName distDir = distDirParent + os.sep + distName + ".app" buildenv['distdir'] = distDir if os.access(distDirParent, os.F_OK): hardhatlib.rmdir_recursive(distDirParent) os.mkdir(distDirParent) os.mkdir(distDir) manifestFile = "distrib/osx/manifest.debug.osx" hardhatlib.handleManifest(buildenv, manifestFile) makeDiskImage = buildenv['hardhatroot'] + os.sep + \ "makediskimage.sh" os.chdir(buildenv['root']) hardhatlib.executeCommand(buildenv, "HardHat", [makeDiskImage, distName], "Creating disk image from " + distName) compFile1 = distName + ".dmg" # reset 'distdir' up a level so that it gets removed below. buildenv['distdir'] = distDirParent distDir = distDirParent os.chdir(buildenv['root']) compFile2 = hardhatlib.compressDirectory(buildenv, ["debug"], "Chandler_osx_dev_debug_" + buildVersionShort) if buildenv['os'] == 'win': distName = 'Chandler_win_debug_' + buildVersionShort distDir = buildenv['root'] + os.sep + distName buildenv['distdir'] = distDir if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir) os.mkdir(distDir) manifestFile = "distrib" + os.sep + "win" + os.sep + \ "manifest.debug.win" hardhatlib.handleManifest(buildenv, manifestFile) os.chdir(buildenv['root']) compFile1 = hardhatlib.compressDirectory(buildenv, [distName], distName) os.chdir(buildenv['root']) compFile2 = hardhatlib.compressDirectory(buildenv, ["debug"], "Chandler_win_dev_debug_" + buildVersionShort) # put the compressed file in the right place if specified 'outputdir' if buildenv['outputdir']: if not os.path.exists(buildenv['outputdir']): os.mkdir(buildenv['outputdir']) if os.path.exists(buildenv['outputdir']+os.sep+compFile1): os.remove(buildenv['outputdir']+os.sep+compFile1) os.rename(compFile1, buildenv['outputdir']+os.sep+compFile1) if os.path.exists(buildenv['outputdir']+os.sep+compFile2): os.remove(buildenv['outputdir']+os.sep+compFile2) os.rename(compFile2, buildenv['outputdir']+os.sep+compFile2) # remove the distribution directory, since we have a tarball/zip if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir) if buildenv['version'] == 'release': if buildenv['os'] == 'posix': distName = 'Chandler_linux_' + buildVersionShort distDir = buildenv['root'] + os.sep + distName buildenv['distdir'] = distDir if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir) os.mkdir(distDir) manifestFile = "distrib/linux/manifest.linux" hardhatlib.handleManifest(buildenv, manifestFile) os.chdir(buildenv['root']) compFile1 = hardhatlib.compressDirectory(buildenv, [distName], distName) os.chdir(buildenv['root']) compFile2 = hardhatlib.compressDirectory(buildenv, ["release"], "Chandler_linux_dev_release_" + buildVersionShort) os.chdir(buildenv['root']) if buildenv['os'] == 'osx': distName = 'Chandler_osx_' + buildVersionShort # when we make an osx distribution, we actually need to put it # in a subdirectory (which has a .app extension). So we set # 'distdir' temporarily to that .app dir so that handleManifest() # puts things in the right place. Then we set 'distdir' to its # parent so that it gets cleaned up further down. distDirParent = buildenv['root'] + os.sep + distName distDir = distDirParent + os.sep + distName + ".app" buildenv['distdir'] = distDir if os.access(distDirParent, os.F_OK): hardhatlib.rmdir_recursive(distDirParent) os.mkdir(distDirParent) os.mkdir(distDir) manifestFile = "distrib/osx/manifest.osx" hardhatlib.handleManifest(buildenv, manifestFile) makeDiskImage = buildenv['hardhatroot'] + os.sep + \ "makediskimage.sh" os.chdir(buildenv['root']) hardhatlib.executeCommand(buildenv, "HardHat", [makeDiskImage, distName], "Creating disk image from " + distName) compFile1 = distName + ".dmg" # reset 'distdir' up a level so that it gets removed below. buildenv['distdir'] = distDirParent distDir = distDirParent os.chdir(buildenv['root']) compFile2 = hardhatlib.compressDirectory(buildenv, ["release"], "Chandler_osx_dev_release_" + buildVersionShort) if buildenv['os'] == 'win': distName = 'Chandler_win_' + buildVersionShort distDir = buildenv['root'] + os.sep + distName buildenv['distdir'] = distDir if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir) os.mkdir(distDir) manifestFile = "distrib" + os.sep + "win" + os.sep + "manifest.win" hardhatlib.handleManifest(buildenv, manifestFile) os.chdir(buildenv['root']) compFile1 = hardhatlib.compressDirectory(buildenv, [distName], distName) os.chdir(buildenv['root']) compFile2 = hardhatlib.compressDirectory(buildenv, ["release"], "Chandler_win_dev_release_" + buildVersionShort) # put the compressed files in the right place if specified 'outputdir' if buildenv['outputdir']: if not os.path.exists(buildenv['outputdir']): os.mkdir(buildenv['outputdir']) if os.path.exists(buildenv['outputdir'] + os.sep + compFile1): os.remove(buildenv['outputdir'] + os.sep + compFile1) os.rename( compFile1, buildenv['outputdir'] + os.sep + compFile1) if os.path.exists(buildenv['outputdir'] + os.sep + compFile2): os.remove(buildenv['outputdir'] + os.sep + compFile2) os.rename( compFile2, buildenv['outputdir'] + os.sep + compFile2) # remove the distribution directory, since we have a tarball/zip if os.access(distDir, os.F_OK): hardhatlib.rmdir_recursive(distDir)
71ca5cd8da1d61b7287b9bf809fbcf000075c427 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/71ca5cd8da1d61b7287b9bf809fbcf000075c427/__hardhat__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25722, 12, 3510, 3074, 4672, 225, 389, 2640, 1444, 812, 12, 3510, 3074, 13, 225, 1361, 1444, 4897, 273, 521, 7877, 11304, 1367, 18, 3288, 52, 15726, 12, 3510, 3074, 3292, 3510, 1444, 194...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25722, 12, 3510, 3074, 4672, 225, 389, 2640, 1444, 812, 12, 3510, 3074, 13, 225, 1361, 1444, 4897, 273, 521, 7877, 11304, 1367, 18, 3288, 52, 15726, 12, 3510, 3074, 3292, 3510, 1444, 194...
f = os.path.basename(f)
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
1564007ee5b707947c1e98f0ef3d697234da9225 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3589/1564007ee5b707947c1e98f0ef3d697234da9225/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 17801, 67, 30204, 12, 2890, 4672, 3536, 2598, 777, 326, 2199, 316, 326, 6095, 358, 326, 463, 2501, 585, 18, 3536, 309, 486, 365, 16186, 72, 651, 67, 768, 67, 803, 30, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 17801, 67, 30204, 12, 2890, 4672, 3536, 2598, 777, 326, 2199, 316, 326, 6095, 358, 326, 463, 2501, 585, 18, 3536, 309, 486, 365, 16186, 72, 651, 67, 768, 67, 803, 30, 468, ...
print kwargs
def plot(self, bonds=False, **kwargs): import pylab
2d9f13bdf629ef7d61f37eda14a5157439319c65 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/2d9f13bdf629ef7d61f37eda14a5157439319c65/extras.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 15692, 33, 8381, 16, 2826, 4333, 4672, 1930, 2395, 7411, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 12, 2890, 16, 15692, 33, 8381, 16, 2826, 4333, 4672, 1930, 2395, 7411, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
tid = self.task_ts.get_value(itera,0)
tid = self.task_ts.get_value(itera,0)
def restore_expand(self,treeview,path,data) : itera = self.task_ts.get_iter(path) tid = self.task_ts.get_value(itera,0) if tid not in self.expanded_tid : treeview.collapse_row(path)
37a96454e5e3b5f52cd1b13f074a5eb20568cd86 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/37a96454e5e3b5f52cd1b13f074a5eb20568cd86/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 12320, 12, 2890, 16, 3413, 1945, 16, 803, 16, 892, 13, 294, 1400, 69, 273, 365, 18, 4146, 67, 3428, 18, 588, 67, 2165, 12, 803, 13, 11594, 282, 273, 365, 18, 4146, 67, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 12320, 12, 2890, 16, 3413, 1945, 16, 803, 16, 892, 13, 294, 1400, 69, 273, 365, 18, 4146, 67, 3428, 18, 588, 67, 2165, 12, 803, 13, 11594, 282, 273, 365, 18, 4146, 67, 34...
if total == 0: self.progressbar.set_text("")
if (total==0) or (done_so_far==0): self.progressbar.set_text(" ")
def set_progress(self, done_so_far, total, current_file=""): if total == 0: self.progressbar.set_text("") self.progressbar.set_fraction(0.0) return if done_so_far == 0: return fraction = float(done_so_far) / total self.progressbar.set_fraction(fraction) t = time.time() - self.converter.run_start_time - self.converter.paused_time r = (t / fraction - t) s = r%60 m = r/60 remaining = "%d:%02d left" % (m,s) self.display_progress(remaining) self.progressfile.set_markup("<i><small>%s</small></i>" % current_file)
83ff6220d0110fde282199d97e9efbe923e49a9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/83ff6220d0110fde282199d97e9efbe923e49a9f/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8298, 12, 2890, 16, 2731, 67, 2048, 67, 31246, 16, 2078, 16, 783, 67, 768, 1546, 6, 4672, 309, 261, 4963, 631, 20, 13, 578, 261, 8734, 67, 2048, 67, 31246, 631, 20, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8298, 12, 2890, 16, 2731, 67, 2048, 67, 31246, 16, 2078, 16, 783, 67, 768, 1546, 6, 4672, 309, 261, 4963, 631, 20, 13, 578, 261, 8734, 67, 2048, 67, 31246, 631, 20, 4672, ...
if address[0] == '<' and address[-1] == '>' and address != '<>':
if not address: pass elif address[0] == '<' and address[-1] == '>' and address != '<>':
def __getaddr(self, keyword, arg): address = None keylen = len(keyword) if arg[:keylen].upper() == keyword: address = arg[keylen:].strip() if address[0] == '<' and address[-1] == '>' and address != '<>': # Addresses can be in the form <person@dom.com> but watch out # for null address, e.g. <> address = address[1:-1] return address
80fdb76f6150dfe027d00c4c08549090e7a9da4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/80fdb76f6150dfe027d00c4c08549090e7a9da4b/smtpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 4793, 12, 2890, 16, 4932, 16, 1501, 4672, 1758, 273, 599, 498, 1897, 273, 562, 12, 11041, 13, 309, 1501, 10531, 856, 1897, 8009, 5797, 1435, 422, 4932, 30, 1758, 273, 1501, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 4793, 12, 2890, 16, 4932, 16, 1501, 4672, 1758, 273, 599, 498, 1897, 273, 562, 12, 11041, 13, 309, 1501, 10531, 856, 1897, 8009, 5797, 1435, 422, 4932, 30, 1758, 273, 1501, ...
r""" Perfect numbers: equal to sum of proper divisors. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000396;a
def __init__(self): r"""
def _eval(self, n): return Integer(2**sloane.A000043(n) - 1)
7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 22, 636, 87, 383, 8806, 18, 37, 2787, 8942, 12, 82, 13, 300, 404, 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, 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, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 22, 636, 87, 383, 8806, 18, 37, 2787, 8942, 12, 82, 13, 300, 404, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
con:cached
con:cached con:new_tags
def __init__(self, wfile): super(RenderWeblibEdit, self).__init__(wfile, 'weblibEdit.html')
e49b534e611c5a0c38bfe6d7f08d0ecc27a3cf96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2355/e49b534e611c5a0c38bfe6d7f08d0ecc27a3cf96/weblib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 341, 768, 4672, 2240, 12, 3420, 4079, 2941, 4666, 16, 365, 2934, 972, 2738, 972, 12, 91, 768, 16, 296, 4875, 2941, 4666, 18, 2620, 6134, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 341, 768, 4672, 2240, 12, 3420, 4079, 2941, 4666, 16, 365, 2934, 972, 2738, 972, 12, 91, 768, 16, 296, 4875, 2941, 4666, 18, 2620, 6134, 2, -100, -100, ...
requestId, data = struct.unpack('!L', data[:4])[0], data[4:]
requestId, = struct.unpack('!L', data[:4]) data = data[4:]
def packet_STAT(self, data, followLinks = 1): requestId, data = struct.unpack('!L', data[:4])[0], data[4:] path, data = getNS(data) assert data == '', 'still have data in STAT/LSTAT: %s' % repr(data) d = defer.maybeDeferred(self.client.getAttrs, path, followLinks) d.addCallback(self._cbStat, requestId) d.addErrback(self._ebStatus, requestId, 'stat/lstat failed')
aef8d7424b2a725faf6ca18b071ce67e27dc3850 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aef8d7424b2a725faf6ca18b071ce67e27dc3850/filetransfer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4414, 67, 28549, 12, 2890, 16, 501, 16, 2805, 7100, 273, 404, 4672, 14459, 16, 273, 1958, 18, 17309, 2668, 5, 48, 2187, 501, 10531, 24, 5717, 501, 273, 501, 63, 24, 26894, 589, 16, 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, 4414, 67, 28549, 12, 2890, 16, 501, 16, 2805, 7100, 273, 404, 4672, 14459, 16, 273, 1958, 18, 17309, 2668, 5, 48, 2187, 501, 10531, 24, 5717, 501, 273, 501, 63, 24, 26894, 589, 16, 5...
print '%i suitable solutions found:' % len(lines)
msg = '%i suitable solutions found:' % len(lines) appendTextview(self.textviewStdOut, msg)
def doFocmec(self): f = open(self.focmecPhasefile, 'w') f.write("\n") #first line is ignored! #Fortran style! 1: Station 2: Azimuth 3: Incident 4: Polarity #fmt = "ONTN 349.00 96.00C" fmt = "%4s %6.2f %6.2f%1s\n" count = 0 for d in self.dicts: if 'PAzim' not in d or 'PInci' not in d or 'PPol' not in d: continue sta = d['Station'][:4] #focmec has only 4 chars azim = d['PAzim'] inci = d['PInci'] if d['PPol'] == 'up': pol = 'U' elif d['PPol'] == 'poorup': pol = '+' elif d['PPol'] == 'down': pol = 'D' elif d['PPol'] == 'poordown': pol = '-' else: continue count += 1 f.write(fmt % (sta, azim, inci, pol)) f.close() print 'Phases for focmec: %i' % count self.catFile(self.focmecPhasefile) exitcode = subprocess.call(self.focmecCall, shell=True) if exitcode == 1: print "Error: focmec did not find a suitable solution" return print '--> focmec finished' lines = open(self.focmecSummary, "r").readlines() print '%i suitable solutions found:' % len(lines) self.focMechList = [] for line in lines: line = line.split() tempdict = {} tempdict['Program'] = "focmec" tempdict['Dip'] = float(line[0]) tempdict['Strike'] = float(line[1]) tempdict['Rake'] = float(line[2]) tempdict['Errors'] = int(float(line[3])) # not used in xml tempdict['Station Polarity Count'] = count print "Dip: %6.2f Strike: %6.2f Rake: %6.2f Errors: %i/%i" % \ (tempdict['Dip'], tempdict['Strike'], tempdict['Rake'], tempdict['Errors'], tempdict['Station Polarity Count']) self.focMechList.append(tempdict) self.focMechCount = len(self.focMechList) self.focMechCurrent = 0 print "selecting Focal Mechanism No. 1 of %2i:" % self.focMechCount self.dictFocalMechanism = self.focMechList[0] print "Dip: %6.2f Strike: %6.2f Rake: %6.2f Errors: %i/%i" % \ (self.dictFocalMechanism['Dip'], self.dictFocalMechanism['Strike'], self.dictFocalMechanism['Rake'], self.dictFocalMechanism['Errors'], self.dictFocalMechanism['Station Polarity Count'])
4e8f536428831ce605c623aa5fc17a6b33b5b712 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/4e8f536428831ce605c623aa5fc17a6b33b5b712/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 42, 504, 81, 557, 12, 2890, 4672, 284, 273, 1696, 12, 2890, 18, 74, 504, 81, 557, 11406, 768, 16, 296, 91, 6134, 284, 18, 2626, 31458, 82, 7923, 468, 3645, 980, 353, 5455, 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, 741, 42, 504, 81, 557, 12, 2890, 4672, 284, 273, 1696, 12, 2890, 18, 74, 504, 81, 557, 11406, 768, 16, 296, 91, 6134, 284, 18, 2626, 31458, 82, 7923, 468, 3645, 980, 353, 5455, 5, ...
filename = os.path.join(self.__cw.get_cwd(self.__srv), filename)
filename = os.path.join(cwd, filename)
def vim_bufferchange(self, index, filename): #for fcall, args in self.__bufferevents: # fcall(*args) #self.__bufferevents = [] #self.manager.emit_event('file-opened', filename=filename) if os.path.abspath(filename) != filename: filename = os.path.join(self.__cw.get_cwd(self.__srv), filename) self.log.debug('vim buffer change "%s"', filename) if filename != self.__currentfile: self.__currentfile = filename self.boss.call_command('buffermanager', 'open_file', filename=filename)
155882c80f5c4377b93de9ea8190a61f2a9eed93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/155882c80f5c4377b93de9ea8190a61f2a9eed93/vimedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18727, 67, 4106, 3427, 12, 2890, 16, 770, 16, 1544, 4672, 468, 1884, 284, 1991, 16, 833, 316, 365, 16186, 4106, 5989, 30, 468, 565, 284, 1991, 30857, 1968, 13, 468, 2890, 16186, 4106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18727, 67, 4106, 3427, 12, 2890, 16, 770, 16, 1544, 4672, 468, 1884, 284, 1991, 16, 833, 316, 365, 16186, 4106, 5989, 30, 468, 565, 284, 1991, 30857, 1968, 13, 468, 2890, 16186, 4106, ...
if ( self.getTag( pxl_tags_dict['real32_array'] ) ):
new_tag = unpack('B', self.data[self.index])[0] if ( new_tag == pxl_tags_dict['real32_array'] ): self.index = self.index + 1
def Tag_real32_array(self): if ( self.getTag( pxl_tags_dict['real32_array'] ) ): self.unpack_string = 'f' self.size_of_element = 4 print "real32_array [", return 1 return 0
56f3b40c49b4c8c2c1bf30f153b578ada70886f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/56f3b40c49b4c8c2c1bf30f153b578ada70886f5/pxldis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 7688, 1578, 67, 1126, 12, 2890, 4672, 394, 67, 2692, 273, 6167, 2668, 38, 2187, 365, 18, 892, 63, 2890, 18, 1615, 5717, 63, 20, 65, 225, 309, 261, 394, 67, 2692, 422, 10318...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 7688, 1578, 67, 1126, 12, 2890, 4672, 394, 67, 2692, 273, 6167, 2668, 38, 2187, 365, 18, 892, 63, 2890, 18, 1615, 5717, 63, 20, 65, 225, 309, 261, 394, 67, 2692, 422, 10318...
res[line.id]['price_subtotal_incl'] = cur_obj.round(cr, uid, cur, res_init[line.id])
res[line.id]['price_subtotal_incl'] = cur and cur_obj.round(cr, uid, cur, res_init[line.id]) or res_init[line.id]
def _amount_line2(self, cr, uid, ids, name, args, context=None): """ Return the subtotal excluding taxes with respect to price_type. """ res = {} tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') for line in self.browse(cr, uid, ids): cur = line.invoice_id.currency_id res_init = super(account_invoice_line, self)._amount_line(cr, uid, [line.id], name, args, context) res[line.id] = { 'price_subtotal': 0.0, 'price_subtotal_incl': 0.0, 'data': [] } if not line.quantity: continue if line.invoice_id: product_taxes = [] if line.product_id: if line.invoice_id.type in ('out_invoice', 'out_refund'): product_taxes = filter(lambda x: x.price_include, line.product_id.taxes_id) else: product_taxes = filter(lambda x: x.price_include, line.product_id.supplier_taxes_id)
ee8cf455ba23bc3ac238ea6a25dab5aef9ab746e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/ee8cf455ba23bc3ac238ea6a25dab5aef9ab746e/invoice_tax_incl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8949, 67, 1369, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 3536, 2000, 326, 720, 4963, 19560, 5320, 281, 598, 8762, 358, 6205, 67, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8949, 67, 1369, 22, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 3536, 2000, 326, 720, 4963, 19560, 5320, 281, 598, 8762, 358, 6205, 67, 72...
resp['variants'].append({'pk': v.pk, 'variant_name': v.name, 'item_id': item_id, 'auto_generated':auto_generated, 'media_type': media_type, 'work_in_progress':work_in_progress})
resp['variants'].append({'pk': v.pk, 'variant_name': v.name, 'item_id': item_id, 'auto_generated':auto_generated, 'media_type': media_type, 'work_in_progress':work_in_progress})
def get_variants(request): workspace = request.session['workspace'] item_id = request.POST.get('items') logger.debug('item_id %s'%item_id) item = Item.objects.get(pk = item_id) logger.debug('before comps') user = User.objects.get(pk=request.session['_auth_user_id']) item_variants = Variant.objects.filter(Q(workspace = workspace) | Q(workspace__isnull = True), media_type = item.type, hidden = False).distinct() logger.debug('item_variants %s'%item_variants) now = time.time() resp = {'variants':[]} for v in item_variants: auto_generated = v.auto_generated try: logger.debug('variant %s'%v) comp = Component.objects.get(item = item, workspace = workspace, variant = v) work_in_progress = Machine.objects.filter(current_state__action__component = comp).count() > 0 resource_url = SERVER_PUBLIC_ADDRESS + "/resources/%s/%s/"% (comp.id, workspace.pk)
b3063dae85b997d5b434ac105df3eca126112db6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4589/b3063dae85b997d5b434ac105df3eca126112db6/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15886, 12, 2293, 4672, 225, 6003, 273, 590, 18, 3184, 3292, 14915, 3546, 761, 67, 350, 273, 590, 18, 3798, 18, 588, 2668, 3319, 6134, 1194, 18, 4148, 2668, 1726, 67, 350, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15886, 12, 2293, 4672, 225, 6003, 273, 590, 18, 3184, 3292, 14915, 3546, 761, 67, 350, 273, 590, 18, 3798, 18, 588, 2668, 3319, 6134, 1194, 18, 4148, 2668, 1726, 67, 350, 738,...
def __init__(self, user, id, api_key, api_secret, session_key):
def __init__(self, user, id, api_key, api_secret, session_key=""):
def __init__(self, user, id, api_key, api_secret, session_key): _BaseObject.__init__(self, api_key, api_secret, session_key) if isinstance(user, User): self.user = user else: self.user = User(user, *self.auth_data) self.id = unicode(id)
8d8063afe8067477accae5bef5e470a4a3cbfa5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9926/8d8063afe8067477accae5bef5e470a4a3cbfa5d/pylast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 729, 16, 612, 16, 1536, 67, 856, 16, 1536, 67, 5875, 16, 1339, 67, 856, 1546, 6, 4672, 389, 2171, 921, 16186, 2738, 972, 12, 2890, 16, 1536, 67, 856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 729, 16, 612, 16, 1536, 67, 856, 16, 1536, 67, 5875, 16, 1339, 67, 856, 1546, 6, 4672, 389, 2171, 921, 16186, 2738, 972, 12, 2890, 16, 1536, 67, 856, ...
print bold_green("[S]ET LANGUAGE <language name>")
print bold_green("[s]et language <language name>")
def e17_languages(): try: import pyetun_lang all=pyetun_lang.get_lang_list() current=pyetun_lang.current_lang() print "> Available Languages: " for i in all: print bold_yellow("=> "), print i print bold_yellow("=> "), print "Current System Language: ", if current=='""': print "None (Default)" else: current=current.split('"')[1] print current print bold_red("> Options: ") print bold_green("[S]ET LANGUAGE <language name>") print "> CTRL+C - Main Menu" valu=raw_input("Option: ") while 1: try: t=valu.split(" ") opt=t[0] value=t[1] except: print bold ("> Error: m00, wrong move! Try again..") e17_languages() if opt=="s": if value in all: pyetun_lang.set_lang(value) e17_languages() else: print bold("[error]: This language is not present. Check the list..") e17_languages() else: print bold("[error] m000 wrong option!") e17_languages() except KeyboardInterrupt: print "\nOops! exiting ;)" console()
2dc56bf12f43e29753088b6cfaeea43096646f6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2281/2dc56bf12f43e29753088b6cfaeea43096646f6a/pyetun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 4033, 67, 14045, 13332, 775, 30, 1930, 2395, 278, 318, 67, 4936, 777, 33, 2074, 278, 318, 67, 4936, 18, 588, 67, 4936, 67, 1098, 1435, 783, 33, 2074, 278, 318, 67, 4936, 18, 297...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 4033, 67, 14045, 13332, 775, 30, 1930, 2395, 278, 318, 67, 4936, 777, 33, 2074, 278, 318, 67, 4936, 18, 588, 67, 4936, 67, 1098, 1435, 783, 33, 2074, 278, 318, 67, 4936, 18, 297...
for filename in files: self.saveChecksum(filename, output)
self.saveChecksum(filename, output)
def checksums(self, files): """Run checksums for a set of output files, and append to the list.""" output = file(self.publicPath("md5sums.txt"), "a") for filename in files: self.saveChecksum(filename, output) output.close()
40a23c5e6ea079738b9c939453207d50ac224e26 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9870/40a23c5e6ea079738b9c939453207d50ac224e26/worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26829, 12, 2890, 16, 1390, 4672, 3536, 1997, 26829, 364, 279, 444, 434, 876, 1390, 16, 471, 714, 358, 326, 666, 12123, 876, 273, 585, 12, 2890, 18, 482, 743, 2932, 1264, 25, 1364, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26829, 12, 2890, 16, 1390, 4672, 3536, 1997, 26829, 364, 279, 444, 434, 876, 1390, 16, 471, 714, 358, 326, 666, 12123, 876, 273, 585, 12, 2890, 18, 482, 743, 2932, 1264, 25, 1364, 87, ...
if(0):
if(self.stop_cm_motion):
def verlet_leapfrog_integration(self): # start verlet_leapfrog_integration loop for cycle in range(1,self.n_steps+1,1): residuals = self.residuals() print_flag = 0 switch = math.modf(float(cycle)/self.n_print)[0] if((switch==0 or cycle==1 or cycle==self.n_steps) and self.verbose >= 1): print_flag = 1 if(print_flag == 1): text = "integration step number = %5d"%cycle self.center_of_mass_info() kt = dynamics.kinetic_energy_and_temperature(self.vxyz, self.weights) self.current_temperature = kt.temperature() self.ekin = kt.kinetic_energy() print_dynamics_stat(self.log,self.temperature,self.current_temperature, self.time_step,self.n_steps,self.rcm,self.vcm, self.ekcm,self.acm,self.ekin, text) if(0): self.center_of_mass_info() self.stop_global_motion() # calculate velocities at t+dt/2 grad = residuals#.gradients dynamics.vxyz_at_t_plus_dt_over_2(self.vxyz, self.weights, grad, self.tstep) # calculate the temperature and kinetic energy from new velocities kt = dynamics.kinetic_energy_and_temperature(self.vxyz, self.weights) self.current_temperature = kt.temperature() self.ekin = kt.kinetic_energy() self.velocity_rescaling() if(print_flag == 1 and 0): self.center_of_mass_info() print_dynamics_stat(self.log,self.temperature,self.current_temperature, self.time_step,self.n_steps,self.rcm,self.vcm, self.ekcm,self.acm,self.ekin, text) # do the verlet_leapfrog_integration to get coordinates at t+dt self.structure.set_sites_cart( sites_cart=self.structure.sites_cart() + self.vxyz * self.tstep) self.structure.apply_symmetry_sites() if (self.interleaved_minimization_flag): self.interleaved_minimization() kt = dynamics.kinetic_energy_and_temperature(self.vxyz, self.weights) self.current_temperature = kt.temperature() self.ekin = kt.kinetic_energy() if(print_flag == 1 and 0): self.center_of_mass_info() print_dynamics_stat(self.log,self.temperature,self.current_temperature, self.time_step,self.n_steps,self.rcm,self.vcm, self.ekcm,self.acm,self.ekin, text) self.residuals()
d67d3dee35c2f714b4905ad5e65b4ad47d344407 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/d67d3dee35c2f714b4905ad5e65b4ad47d344407/cartesian_dynamics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1924, 1810, 67, 298, 438, 74, 303, 75, 67, 27667, 12, 2890, 4672, 468, 787, 1924, 1810, 67, 298, 438, 74, 303, 75, 67, 27667, 2798, 364, 8589, 316, 1048, 12, 21, 16, 2890, 18, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1924, 1810, 67, 298, 438, 74, 303, 75, 67, 27667, 12, 2890, 4672, 468, 787, 1924, 1810, 67, 298, 438, 74, 303, 75, 67, 27667, 2798, 364, 8589, 316, 1048, 12, 21, 16, 2890, 18, 82, ...
result = regex.search(filename.lower())
result = regex.search(uri.lower())
def get_hashfile_format(self, filename): try: f = open(filename, "r") for format in formats: # search in al our recognized formats regex = format.filename_regex result = regex.search(filename.lower()) if result: # this can be a valid filename, now look inside f.seek(0) if format.detect_file(f): # yes, this is a valid hashfile \o/ f.close() return format f.close() except IOError: pass return None
bbf831aedbd676fd6385faae182b6e52b4dcd5db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2200/bbf831aedbd676fd6385faae182b6e52b4dcd5db/parano.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2816, 768, 67, 2139, 12, 2890, 16, 1544, 4672, 225, 775, 30, 284, 273, 1696, 12, 3459, 16, 315, 86, 7923, 225, 364, 740, 316, 6449, 30, 468, 1623, 316, 524, 3134, 16332, 644...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2816, 768, 67, 2139, 12, 2890, 16, 1544, 4672, 225, 775, 30, 284, 273, 1696, 12, 3459, 16, 315, 86, 7923, 225, 364, 740, 316, 6449, 30, 468, 1623, 316, 524, 3134, 16332, 644...
for rev in t.get_branch().log(from_rev=cur.rev, exclude_revs=set([old.rev])):
for rev in t.get_branch().log(from_rev=cur.revision, exclude_revs=set([old.revision])):
def check_and_send_mails(tree, host, compiler, cur, old): t = buildfarm.trees[tree] (cur_rev, cur_rev_timestamp) = cur.revision_details() cur_status = cur.status() (old_rev, old_rev_timestamp) = old.revision_details() old_status = old.status() if not cur_status.regressed_since(old_status): if opts.verbose >= 3: print "... hasn't regressed since %s: %s" % (old_rev, old_status) return recipients = set() change_log = "" for rev in t.get_branch().log(from_rev=cur.rev, exclude_revs=set([old.rev])): recipients.add(rev.author) recipients.add(rev.committer) change_log += """
90150b8b7b08904b4ec880822f3208a34c2467ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7314/90150b8b7b08904b4ec880822f3208a34c2467ec/import-and-analyse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 464, 67, 4661, 67, 4408, 87, 12, 3413, 16, 1479, 16, 5274, 16, 662, 16, 1592, 4672, 268, 273, 1361, 74, 4610, 18, 17204, 63, 3413, 65, 225, 261, 1397, 67, 9083, 16, 662, 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, 866, 67, 464, 67, 4661, 67, 4408, 87, 12, 3413, 16, 1479, 16, 5274, 16, 662, 16, 1592, 4672, 268, 273, 1361, 74, 4610, 18, 17204, 63, 3413, 65, 225, 261, 1397, 67, 9083, 16, 662, 6...
def make_no_init(self, mode=default_mode):
def make_no_init(self, mode=None):
def make_no_init(self, mode=default_mode): """ Allocates the necessary containers using allocate() and uses build() with the provided mode to make an instance which will be returned. The initialize() method of the instance will not be called. """ memo = {} self.allocate(memo) rval = self.build(mode, memo) return rval
d024e8d129f8f0058f83c7cb189e7bb047174c2f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/d024e8d129f8f0058f83c7cb189e7bb047174c2f/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2135, 67, 2738, 12, 2890, 16, 1965, 33, 7036, 4672, 3536, 12830, 815, 326, 4573, 8475, 1450, 10101, 1435, 471, 4692, 1361, 1435, 598, 326, 2112, 1965, 358, 1221, 392, 791, 1492...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2135, 67, 2738, 12, 2890, 16, 1965, 33, 7036, 4672, 3536, 12830, 815, 326, 4573, 8475, 1450, 10101, 1435, 471, 4692, 1361, 1435, 598, 326, 2112, 1965, 358, 1221, 392, 791, 1492...
label_text, labelFont) glEnable(GL_LIGHTING)
label_text, labelFont) glEnable(GL_LIGHTING)
def get_screen_position_of_strand_atom(strand_atom): """ For a given strand atom, find its on-screen position. """ axis_atom = strand_atom.axis_neighbor() if axis_atom: mol = axis_atom.molecule axis_atoms = mol.ladder.axis_rail.baseatoms n_bases = len(axis_atoms) pos = axis_atoms.index(axis_atom) atom0 = axis_atom if pos<n_bases-1: atom1 = axis_atoms[pos+1] dpos = atom1.posn()-atom0.posn() else: atom1 = axis_atoms[pos-1] atom2 = axis_atoms[pos] dpos = atom2.posn()-atom1.posn() last_dpos = dpos dvec = norm(cross(dpos,glpane.out)) pos0 = axis_atom.posn()#-mol.center pos1 = pos0+7.0*dvec pos2 = pos0-7.0*dvec if mol.ladder.strand_rails[0].baseatoms[pos]==strand_atom: return pos1 elif mol.ladder.strand_rails[1].baseatoms[pos]==strand_atom: return pos2
cbc143d808cf827d03bc69ee526e2fca8459d46d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/cbc143d808cf827d03bc69ee526e2fca8459d46d/DnaCylinderChunks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9252, 67, 3276, 67, 792, 67, 701, 464, 67, 7466, 12, 701, 464, 67, 7466, 4672, 3536, 2457, 279, 864, 16706, 3179, 16, 1104, 2097, 603, 17, 9252, 1754, 18, 3536, 2654, 67, 74...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9252, 67, 3276, 67, 792, 67, 701, 464, 67, 7466, 12, 701, 464, 67, 7466, 4672, 3536, 2457, 279, 864, 16706, 3179, 16, 1104, 2097, 603, 17, 9252, 1754, 18, 3536, 2654, 67, 74...
self.interact = input[len('%__sage_interact__')+1]
self.interact = input[len('%__sage_interact__')+1:]
def set_input_text(self, input): # Stuff to deal with interact if input.startswith('%__sage_interact__'): self.interact = input[len('%__sage_interact__')+1] self.__version = 1+self.version() return elif self.is_interacting(): try: del self.interact del self._interact_output except AttributeError: pass
1ca229bf2d02e6579ddb89eb210879341bcb648f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1ca229bf2d02e6579ddb89eb210879341bcb648f/cell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2630, 67, 955, 12, 2890, 16, 810, 4672, 468, 934, 3809, 358, 10490, 598, 16592, 309, 810, 18, 17514, 1918, 29909, 972, 87, 410, 67, 2761, 621, 7250, 4672, 365, 18, 2761, 621, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2630, 67, 955, 12, 2890, 16, 810, 4672, 468, 934, 3809, 358, 10490, 598, 16592, 309, 810, 18, 17514, 1918, 29909, 972, 87, 410, 67, 2761, 621, 7250, 4672, 365, 18, 2761, 621, ...
class DocumentListAclTest(unittest.TestCase): def setUp(self): client_login() self.doclist = client
class DocumentListAclTest(DocumentsListServiceTest): def setUp(self): DocumentsListServiceTest.setUp(self)
def testGetDocumentsListAclFeed(self): uri = ('http://docs.google.com/feeds/documents/private/full/' '-/mine?max-results=1') feed = self.doclist.GetDocumentListFeed(uri) feed_link = feed.entry[0].GetAclLink().href acl_feed = self.doclist.GetDocumentListAclFeed(feed_link) self.assert_(isinstance(acl_feed, gdata.docs.DocumentListAclFeed)) self.assert_(isinstance(acl_feed.entry[0], gdata.docs.DocumentListAclEntry)) self.assert_(acl_feed.entry[0].scope is not None) self.assert_(acl_feed.entry[0].role is not None)
6a1d41e0ebd05471e1aa915fdf0a98f4af4bce69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5609/6a1d41e0ebd05471e1aa915fdf0a98f4af4bce69/service_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 967, 12922, 682, 13538, 8141, 12, 2890, 4672, 2003, 273, 7707, 2505, 2207, 8532, 18, 9536, 18, 832, 19, 7848, 87, 19, 24795, 19, 1152, 19, 2854, 2473, 2400, 19, 3081, 35, 1896, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 967, 12922, 682, 13538, 8141, 12, 2890, 4672, 2003, 273, 7707, 2505, 2207, 8532, 18, 9536, 18, 832, 19, 7848, 87, 19, 24795, 19, 1152, 19, 2854, 2473, 2400, 19, 3081, 35, 1896, 1...
def fl_get_xyplot_xbounds(obj, xmin, xmax): """ fl_get_xyplot_xbounds(obj, xmin, xmax) """ _fl_get_xyplot_xbounds(obj, xmin, xmax)
def fl_get_xyplot_xbounds(pObject, min_bound, max_bound): """ fl_get_xyplot_xbounds(pObject, min_bound, max_bound) """ _fl_get_xyplot_xbounds(pObject, min_bound, max_bound)
def fl_get_xyplot_xbounds(obj, xmin, xmax): """ fl_get_xyplot_xbounds(obj, xmin, xmax) """ _fl_get_xyplot_xbounds(obj, xmin, xmax)
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, 588, 67, 1698, 4032, 67, 92, 10576, 12, 84, 921, 16, 1131, 67, 3653, 16, 943, 67, 3653, 4672, 3536, 1183, 67, 588, 67, 1698, 4032, 67, 92, 10576, 12, 84, 921, 16, 1131, 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, 1183, 67, 588, 67, 1698, 4032, 67, 92, 10576, 12, 84, 921, 16, 1131, 67, 3653, 16, 943, 67, 3653, 4672, 3536, 1183, 67, 588, 67, 1698, 4032, 67, 92, 10576, 12, 84, 921, 16, 1131, 6...
"base_url": "http://www.example.com" }
"base_url": "http://www.example.com/" }
def _build_request(self, cfg=None, http=None, data=None, inputstream=""): """ process_path_info uses: - req.pyhttp["PATH_INFO"] - string
e6963eba87da6659553267fd6fe6d5df7f058852 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11836/e6963eba87da6659553267fd6fe6d5df7f058852/helpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 2293, 12, 2890, 16, 2776, 33, 7036, 16, 1062, 33, 7036, 16, 501, 33, 7036, 16, 810, 3256, 1546, 6, 4672, 3536, 1207, 67, 803, 67, 1376, 4692, 30, 300, 1111, 18, 2074, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 2293, 12, 2890, 16, 2776, 33, 7036, 16, 1062, 33, 7036, 16, 501, 33, 7036, 16, 810, 3256, 1546, 6, 4672, 3536, 1207, 67, 803, 67, 1376, 4692, 30, 300, 1111, 18, 2074, ...
toff &= MASK tend = toff + (tlen & MASK)
tend = toff + tlen
def _parse(self, fp): """Override this method to support alternative .mo formats.""" # We need to & all 32 bit unsigned integers with 0xffffffff for # portability to 64 bit machines. MASK = 0xffffffff unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() buflen = len(buf) # Are we big endian or little endian? magic = unpack('<i', buf[:4])[0] & MASK if magic == self.LE_MAGIC: version, msgcount, masteridx, transidx = unpack('<4i', buf[4:20]) ii = '<ii' elif magic == self.BE_MAGIC: version, msgcount, masteridx, transidx = unpack('>4i', buf[4:20]) ii = '>ii' else: raise IOError(0, 'Bad magic number', filename) # more unsigned ints msgcount &= MASK masteridx &= MASK transidx &= MASK # Now put all messages from the .mo file buffer into the catalog # dictionary. for i in xrange(0, msgcount): mlen, moff = unpack(ii, buf[masteridx:masteridx+8]) moff &= MASK mend = moff + (mlen & MASK) tlen, toff = unpack(ii, buf[transidx:transidx+8]) toff &= MASK tend = toff + (tlen & MASK) if mend < buflen and tend < buflen: tmsg = buf[toff:tend] catalog[buf[moff:mend]] = tmsg else: raise IOError(0, 'File is corrupt', filename) # See if we're looking at GNU .mo conventions for metadata if mlen == 0 and tmsg.lower().startswith('project-id-version:'): # Catalog description for item in tmsg.split('\n'): item = item.strip() if not item: continue k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v if k == 'content-type': self._charset = v.split('charset=')[1] # advance to next entry in the seek tables masteridx += 8 transidx += 8
3f5e2f11ac43eaefcf057cddfc65684bdfa0ec5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3f5e2f11ac43eaefcf057cddfc65684bdfa0ec5e/gettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 12, 2890, 16, 4253, 4672, 3536, 6618, 333, 707, 358, 2865, 10355, 263, 8683, 6449, 12123, 468, 1660, 1608, 358, 473, 777, 3847, 2831, 9088, 12321, 598, 374, 28857, 364, 468, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 12, 2890, 16, 4253, 4672, 3536, 6618, 333, 707, 358, 2865, 10355, 263, 8683, 6449, 12123, 468, 1660, 1608, 358, 473, 777, 3847, 2831, 9088, 12321, 598, 374, 28857, 364, 468, 1...
def __init__(self, about=None, meta=None, valueOf_=None, mixedclass_=None, content_=None): super(Annotated, self).__init__(valueOf_, mixedclass_, content_, )
def __init__(self, about=None, meta=None): super(Annotated, self).__init__()
def __init__(self, about=None, meta=None, valueOf_=None, mixedclass_=None, content_=None): super(Annotated, self).__init__(valueOf_, mixedclass_, content_, ) self.about = _cast(None, about) if meta is None: self.meta = [] else: self.meta = meta self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2973, 33, 7036, 16, 2191, 33, 7036, 4672, 2240, 12, 17985, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 21071, 273, 389, 4155, 12, 7036, 16, 2973, 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, 1001, 2738, 972, 12, 2890, 16, 2973, 33, 7036, 16, 2191, 33, 7036, 4672, 2240, 12, 17985, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 21071, 273, 389, 4155, 12, 7036, 16, 2973, 13, ...
callbacks = {'Prox':draw_prox_cb,'Stream':stream_link,'Data':p2p_link},
callbacks = {'Prox':draw_prox_cb,'Data':p2p_link},
def p2p_link(value): tmp = result.__class__(result) if value.startswith("p2p file:"): (key,p2p_inode)=value.split(":") #We must be of the form p2p file:Itest|S137/138|CMSN8573970-684504 #Make a link to the inode #print "p2p:%s" % p2p_inode tmp.link(value, FlagFramework.query_type((), family="Disk Forensics", case=query['case'], report='View File Contents', inode=p2p_inode, __target__=p2p_inode, mode="Statistics")) return tmp else: #Not a p2p file return value
80596cb4e5bd83259bd52b61bb7dd6a3b3b8d784 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/80596cb4e5bd83259bd52b61bb7dd6a3b3b8d784/MSN.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 22, 84, 67, 1232, 12, 1132, 4672, 1853, 273, 563, 16186, 1106, 972, 12, 2088, 13, 225, 309, 460, 18, 17514, 1918, 2932, 84, 22, 84, 585, 2773, 4672, 261, 856, 16, 84, 22, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 22, 84, 67, 1232, 12, 1132, 4672, 1853, 273, 563, 16186, 1106, 972, 12, 2088, 13, 225, 309, 460, 18, 17514, 1918, 2932, 84, 22, 84, 585, 2773, 4672, 261, 856, 16, 84, 22, 84, ...
"t": self.ui.get_object("t").get_active_text(),
"t": self.time_ranges[self.ui.get_object("t").get_active()],
def on_refresh_chart(self, from_timer=False): tickers = self.ui.get_object("s").get_text() if tickers.strip() == "": return True # FIXME: We don't just do US stocks, so we can't be this # simplistic about it, but it is a good idea. #if from_timer and not ustime.hour_between(9, 16): # return True tickers = [ticker.strip().upper() for ticker in tickers.split(' ') if ticker != ""] # Update Window Title ------------------------------------------------------ win = self.ui.get_object("window") title = _("Financial Chart - %s") titletail = "" for ticker in tickers: titletail += "%s / " % ticker title = title % titletail win.set_title(title[:-3])
a68d1b669f2f76595f6f7e259ec5b181d8cea641 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11078/a68d1b669f2f76595f6f7e259ec5b181d8cea641/chart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 9144, 67, 11563, 12, 2890, 16, 628, 67, 12542, 33, 8381, 4672, 4024, 414, 273, 365, 18, 4881, 18, 588, 67, 1612, 2932, 87, 20387, 588, 67, 955, 1435, 225, 309, 4024, 414, 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, 603, 67, 9144, 67, 11563, 12, 2890, 16, 628, 67, 12542, 33, 8381, 4672, 4024, 414, 273, 365, 18, 4881, 18, 588, 67, 1612, 2932, 87, 20387, 588, 67, 955, 1435, 225, 309, 4024, 414, 18...
if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] if not pdflatex and not have_latex():
if engine is None: engine = _Latex_prefs._option["engine"] if not engine and not have_latex():
def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't convert the dvi file to png (because of postscript specials or other issues), then dvips is called, and the PS file is converted to a png file. INPUT: - ``filename`` - string: file to process, including full path - ``debug`` - bool (optional, default False): whether to print verbose debugging output - ``density`` - integer (optional, default 150): how big output image is. - ``pdflatex`` - bool (optional, default False): whether to use pdflatex. - ``png`` - bool (optional, default False): whether to produce a png file. - ``do_in_background`` - bool (optional, default False): whether to run in the background. OUTPUT: string, which could be a string starting with 'Error' (if there was a problem), or it could be 'pdf' or 'dvi'. If ``pdflatex`` is False, then a dvi file is created, but if there appear to be problems with it (because of PS special commands, for example), then a pdf file is created instead. The function returns 'dvi' or 'pdf' to indicate which type of file is created. (Detecting problems requires that dvipng be installed; if it is not, then the dvi file is not checked for problems and 'dvi' is returned.) If ``pdflatex`` is True and there are no errors, then 'pdf' is returned. .. warning:: If ``png`` is True, then when using latex (the default), you must have 'dvipng' (or 'dvips' and 'convert') installed on your operating system, or this command won't work. When using pdflatex, you must have 'convert' installed. EXAMPLES:: sage: from sage.misc.latex import _run_latex_, _latex_file_ sage: file = os.path.join(SAGE_TMP, "temp.tex") sage: O = open(file, 'w') sage: O.write(_latex_file_([ZZ[x], RR])); O.close() sage: _run_latex_(file) # random - depends on whether latex is installed 'dvi' """ if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] if not pdflatex and not have_latex(): print "Error: LaTeX does not seem to be installed. Download it from" print "ctan.org and try again." return "Error" if pdflatex and not have_pdflatex(): print "Error: PDFLaTeX does not seem to be installed. Download it from" print "ctan.org and try again." return "Error" # if png output + latex, check to see if dvipng or convert is installed. if png: if not pdflatex and not (have_dvipng() or have_convert()): print "" print "Error: neither dvipng nor convert (from the ImageMagick suite)" print "appear to be installed. Displaying LaTeX or PDFLaTeX output" print "requires at least one of these programs, so please install" print "and try again." print "" print "Go to http://sourceforge.net/projects/dvipng/ and" print "http://www.imagemagick.org to download these programs." return "Error" # if png output + pdflatex, check to see if convert is installed. elif pdflatex and not have_convert(): print "" print "Error: convert (from the ImageMagick suite) does not" print "appear to be installed. Displaying PDFLaTeX output" print "requires this program, so please install and try again." print "" print "Go to http://www.imagemagick.org to download it." return "Error" # check_validity: check to see if the dvi file is okay by trying # to convert to a png file. if this fails, return_suffix will be # set to "pdf". return_suffix is the return value for this # function. # # thus if not png output, check validity of dvi output if dvipng # or convert is installed. else: check_validity = have_dvipng() # set up filenames, other strings: base, filename = os.path.split(filename) filename = os.path.splitext(filename)[0] # get rid of extension if len(filename.split()) > 1: raise ValueError, "filename must contain no spaces" if not debug: redirect=' 2>/dev/null 1>/dev/null ' else: redirect='' if do_in_background: background = ' &' else: background = '' if pdflatex: command = "pdflatex" # 'suffix' is used in the string 'convert' ... suffix = "pdf" return_suffix = "pdf" else: command = "latex" suffix = "ps" return_suffix = "dvi" # Define the commands to be used: lt = 'cd "%s"&& sage-native-execute %s \\\\nonstopmode \\\\input{%s.tex} %s'%(base, command, filename, redirect) # dvipng is run with the 'picky' option: this means that if # there are warnings, no png file is created. dvipng = 'cd "%s"&& sage-native-execute dvipng --picky -q -T tight -D %s %s.dvi -o %s.png'%(base, density, filename, filename) dvips = 'sage-native-execute dvips %s.dvi %s'%(filename, redirect) ps2pdf = 'sage-native-execute ps2pdf %s.ps %s'%(filename, redirect) # We seem to need a larger size when using convert compared to # when using dvipng: density = int(1.4 * density / 1.3) convert = 'sage-native-execute convert -density %sx%s -trim %s.%s %s.png %s '%\ (density,density, filename, suffix, filename, redirect) e = 1 # it is possible to get through the following commands # without running a program, so in that case we force error if pdflatex: if png: cmd = ' && '.join([lt, convert]) else: cmd = lt if debug: print cmd e = os.system(cmd + ' ' + redirect + background) else: # latex, not pdflatex if (png or check_validity): if have_dvipng(): cmd = ' && '.join([lt, dvipng]) if debug: print cmd e = os.system(cmd + ' ' + redirect) dvipng_error = not os.path.exists(base + '/' + filename + '.png') # If there is no png file, then either the latex # process failed or dvipng failed. Assume that dvipng # failed, and try running dvips and convert. (If the # latex process failed, then dvips and convert will # fail also, so we'll still catch the error.) if dvipng_error: if png: if have_convert(): cmd = ' && '.join(['cd "%s"'%(base,), dvips, convert]) if debug: print "'dvipng' failed; trying 'convert' instead..." print cmd e = os.system(cmd + ' ' + redirect + background) else: print "Error: 'dvipng' failed and 'convert' is not installed." return "Error: dvipng failed." else: # not png, i.e., check_validity return_suffix = "pdf" cmd = ' && '.join(['cd "%s"'%(base,), dvips, ps2pdf]) if debug: print "bad dvi file; running dvips and ps2pdf instead..." print cmd e = os.system(cmd) if e: # error running dvips and/or ps2pdf command = "pdflatex" lt = 'cd "%s"&& sage-native-execute %s \\\\nonstopmode \\\\input{%s.tex} %s'%(base, command, filename, redirect) if debug: print "error running dvips and ps2pdf; trying pdflatex instead..." print cmd e = os.system(cmd + background) else: # don't have dvipng, so must have convert. run latex, dvips, convert. cmd = ' && '.join([lt, dvips, convert]) if debug: print cmd e = os.system(cmd + ' ' + redirect + background) if e: print "An error occurred." try: print open(base + '/' + filename + '.log').read() except IOError: pass return "Error latexing slide." return return_suffix
f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 26264, 67, 12, 3459, 16, 1198, 33, 8381, 16, 12142, 33, 23014, 16, 8169, 26264, 33, 7036, 16, 14476, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 4672, 3536, 1220, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 26264, 67, 12, 3459, 16, 1198, 33, 8381, 16, 12142, 33, 23014, 16, 8169, 26264, 33, 7036, 16, 14476, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 4672, 3536, 1220, ...
self.exit = Item(container, frame_rate, "salir", "assets/icons/icon_quit.png", CLOSE_MENU, [], self, font, True)
self.exit = Item(container, frame_rate, "salir", "assets/icons/icon_quit.png", CLOSE_MENU, [], self, font, None, None, True)
def __init__(self, frame_rate, container, windows_controller, item_list, center, radius, game_manager, font): rect = pygame.Rect((0, 0), SIZE) rect.center = center self.windows_controller = windows_controller self.game_manager = game_manager Window.__init__(self, container, rect, frame_rate, windows_controller, "menu_window")
408713152991ab52a8677b494c3959a97ba2391f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3492/408713152991ab52a8677b494c3959a97ba2391f/menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2623, 67, 5141, 16, 1478, 16, 9965, 67, 5723, 16, 761, 67, 1098, 16, 4617, 16, 5725, 16, 7920, 67, 4181, 16, 3512, 4672, 225, 4917, 273, 2395, 13957, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2623, 67, 5141, 16, 1478, 16, 9965, 67, 5723, 16, 761, 67, 1098, 16, 4617, 16, 5725, 16, 7920, 67, 4181, 16, 3512, 4672, 225, 4917, 273, 2395, 13957, 1...
return textile(s)
return textile(s.encode('utf-8')).decode('utf-8')
def do_textile(s): """ Prase the string using textile. requires the `PyTextile`_ library. .. _PyTextile: http://dealmeida.net/projects/textile/ """ from textile import textile return textile(s)
8712dad9a2f4e1963f2e23a4f83c16d00a3d47de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14446/8712dad9a2f4e1963f2e23a4f83c16d00a3d47de/filters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 955, 398, 12, 87, 4672, 3536, 453, 5648, 326, 533, 1450, 977, 398, 18, 225, 4991, 326, 1375, 9413, 1528, 398, 68, 67, 5313, 18, 225, 6116, 389, 9413, 1528, 398, 30, 1062, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 955, 398, 12, 87, 4672, 3536, 453, 5648, 326, 533, 1450, 977, 398, 18, 225, 4991, 326, 1375, 9413, 1528, 398, 68, 67, 5313, 18, 225, 6116, 389, 9413, 1528, 398, 30, 1062, 22...
subject = self.ts.translate(_('mail_new_comment_subject'), context=self.context) mail_to = self.findRecipient() msg_template = self.ts.translate(_('mail_new_comment_body'), context=self.context)
mail_to, pref_lang = self.findRecipient() subject = self.ts.translate(_('mail_new_comment_subject'), target_language=pref_lang) msg_template = self.ts.translate(_('mail_new_comment_body'), target_language=pref_lang)
def __call__(self): root = getToolByName(self.context, 'portal_url').getPortalObject() mail_info = IMailSchema(root) mail_from = '%s <%s>' % (mail_info.email_from_name, mail_info.email_from_address)
bf24e656edadbf8ae1822a6d6171ec4569a6ebed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10562/bf24e656edadbf8ae1822a6d6171ec4569a6ebed/email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1365, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 296, 24386, 67, 718, 16063, 588, 24395, 921, 1435, 4791, 67, 1376, 273, 6246, 671, 3078, 12, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1365, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 296, 24386, 67, 718, 16063, 588, 24395, 921, 1435, 4791, 67, 1376, 273, 6246, 671, 3078, 12, 3085, ...
elif sys.platform.startswith("netbsd"):
elif sys.platform.startswith("netbsd") or sys.platform.startswith("openbsd"):
def test_load(self): if os.name == "nt": name = "msvcrt" elif os.name == "ce": name = "coredll" elif sys.platform == "darwin": name = "libc.dylib" elif sys.platform.startswith("freebsd"): name = "libc.so" elif sys.platform == "sunos5": name = "libc.so" elif sys.platform.startswith("netbsd"): name = "libc.so" else: name = "libc.so.6"
65f353dd849c255b0e0b60b9d69ec330df1182ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/65f353dd849c255b0e0b60b9d69ec330df1182ec/test_loading.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 945, 12, 2890, 4672, 309, 1140, 18, 529, 422, 315, 496, 6877, 508, 273, 315, 959, 90, 3353, 88, 6, 1327, 1140, 18, 529, 422, 315, 311, 6877, 508, 273, 315, 3644, 27670, 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, 1842, 67, 945, 12, 2890, 4672, 309, 1140, 18, 529, 422, 315, 496, 6877, 508, 273, 315, 959, 90, 3353, 88, 6, 1327, 1140, 18, 529, 422, 315, 311, 6877, 508, 273, 315, 3644, 27670, 6, ...
processed_data[(move.from_location.id, move.product.id)],
processed_data.get( (move.from_location.id, move.product.id), []),
def assign_try(self, cursor, user, id, context=None): location_obj = self.pool.get('stock.location') move_obj = self.pool.get('stock.move') product_obj = self.pool.get('product.product') uom_obj = self.pool.get('product.uom') packing = self.browse(cursor, user, id, context=context) parent_to_locations = {} inventory_moves = [] uom_ids = uom_obj.search(cursor, user, [], context=context) uom_index = dict( (uom.id, uom) for uom in \ uom_obj.browse(cursor, user, uom_ids, context=context))
d6ed2a7d0df26f63f5fd0e90bd844cb7ecc408f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/d6ed2a7d0df26f63f5fd0e90bd844cb7ecc408f3/packing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2683, 67, 698, 12, 2890, 16, 3347, 16, 729, 16, 612, 16, 819, 33, 7036, 4672, 2117, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 15381, 18, 3562, 6134, 3635, 67, 2603, 273, 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, 2683, 67, 698, 12, 2890, 16, 3347, 16, 729, 16, 612, 16, 819, 33, 7036, 4672, 2117, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 15381, 18, 3562, 6134, 3635, 67, 2603, 273, 365, 18, ...
if sdaddy == "ROOT": return
if sdaddy == "ROOT": return
def dropEvent(self, event): above = False pnt = event.pos() - QPoint(0,24) # mark comments [04-12-10] # We need to check where we are dropping the selected item. We cannot allow it # to be dropped into the Data group. This is what we are checking for here. # mmtop = 5 top nodes * ( # treeStepSize (space b/w parent and child nodes = 20 pixels) + # 5 pixels (space b/w nodes )) mttop = 5 * (self.treeStepSize() + 5) # Y pos past top 5 nodes of MT (after last datum plane node).
48878960c33c730d922dd77dc1e410ffa44f4802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/48878960c33c730d922dd77dc1e410ffa44f4802/modelTree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 1133, 12, 2890, 16, 871, 4672, 5721, 273, 1083, 293, 496, 273, 871, 18, 917, 1435, 300, 2238, 2148, 12, 20, 16, 3247, 13, 468, 2267, 5678, 306, 3028, 17, 2138, 17, 2163, 65, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 1133, 12, 2890, 16, 871, 4672, 5721, 273, 1083, 293, 496, 273, 871, 18, 917, 1435, 300, 2238, 2148, 12, 20, 16, 3247, 13, 468, 2267, 5678, 306, 3028, 17, 2138, 17, 2163, 65, 46...
if isinstance(right, basestring): ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, limit=None)] else: ids2 = list(right) if not ids2: self.__exp[i] = ('id', '=', '0') else: self.__exp[i] = ('id', 'in', self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', ids2))
call_null = True if right: if isinstance(right, basestring): ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, limit=None)] operator = 'in' else: if not isinstance(right,list): ids2 = [right] else: ids2 = right if not ids2: call_null = True operator = 'in' else: call_null = False o2m_op = 'in' if operator in ['not like','not ilike','not in','<>','!=']: o2m_op = 'not in' self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', ids2, operator, field._type)) if call_null: o2m_op = 'not in' if operator in ['not like','not ilike','not in','<>','!=']: o2m_op = 'in' self.__exp[i] = ('id', o2m_op, self.__execute_recursive_in(cr, field._fields_id, field_obj._table, 'id', [], operator, field._type) or [0])
def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent)
90d81da72bf57b7ed2acfb750ddc32cf27c76afb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/90d81da72bf57b7ed2acfb750ddc32cf27c76afb/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14524, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 4555, 16, 306, 12, 2938, 16, 296, 267, 2187, 3258, 13, 6487, 819...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14524, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 4555, 16, 306, 12, 2938, 16, 296, 267, 2187, 3258, 13, 6487, 819...
orphans = [] unknown = []
def process(file, list): print "-"*70 if not list: sys.stderr.write("no division warnings for %s\n" % file) return try: fp = open(file) except IOError, msg: sys.stderr.write("can't open: %s\n" % msg) return print "Processing:", file f = FileContext(fp) list.sort() index = 0 # list[:index] has been processed, list[index:] is still to do orphans = [] # subset of list for which no / operator was found unknown = [] # lines with / operators for which no warnings were seen g = tokenize.generate_tokens(f.readline) while 1: startlineno, endlineno, slashes = lineinfo = scanline(g) if startlineno is None: break assert startlineno <= endlineno is not None while index < len(list) and list[index][0] < startlineno: orphans.append(list[index]) index += 1 warnings = [] while index < len(list) and list[index][0] <= endlineno: warnings.append(list[index]) index += 1 if not slashes and not warnings: pass elif slashes and not warnings: report(slashes, "Unexecuted code") elif warnings and not slashes: reportphantomwarnings(warnings, f) else: if len(slashes) > 1: report(slashes, "More than one / operator") else: (row, col), line = slashes[0] line = chop(line) if line[col:col+1] != "/": print "*** Can't find the / operator in line %d:" % row print "*", line continue intlong = [] floatcomplex = [] bad = [] for lineno, what in warnings: if what in ("int", "long"): intlong.append(what) elif what in ("float", "complex"): floatcomplex.append(what) else: bad.append(what) if bad: print "*** Bad warning for line %d:" % row, bad print "*", line elif intlong and not floatcomplex: print "%dc%d" % (row, row) print "<", line print "---" print ">", line[:col] + "/" + line[col:] elif floatcomplex and not intlong: print "True division / operator at line %d:" % row print "=", line fp.close()
1411e89cd48fda4dab58a672e67677772c9670ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1411e89cd48fda4dab58a672e67677772c9670ec/fixdiv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 768, 16, 666, 4672, 1172, 7514, 14, 7301, 309, 486, 666, 30, 2589, 18, 11241, 18, 2626, 2932, 2135, 16536, 5599, 364, 738, 87, 64, 82, 6, 738, 585, 13, 327, 775, 30, 4253, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 768, 16, 666, 4672, 1172, 7514, 14, 7301, 309, 486, 666, 30, 2589, 18, 11241, 18, 2626, 2932, 2135, 16536, 5599, 364, 738, 87, 64, 82, 6, 738, 585, 13, 327, 775, 30, 4253, ...
_playback_info_db = VideoPlaybackInfoDBHandler.get_instance() _playback_event_db = VideoPlaybackEventDBHandler.get_instance()
def pop_completed(self): completed = {}
577a73d1e0b6744507a02b28b8e09496810af7a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9686/577a73d1e0b6744507a02b28b8e09496810af7a8/VideoOnDemand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 67, 13615, 12, 2890, 4672, 5951, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 67, 13615, 12, 2890, 4672, 5951, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.AutoSize()
self.SetReadOnly(location, 0, isReadOnly = True) self.SetReadOnly(location, 1, isReadOnly = True) self.AutoSizeColumn(0) self.AutoSizeColumn(1)
def _handler(self, event): if self._eventRateTable.has_key(event.type): data = self._eventRateTable.get(event.type) if data.active is True: timeDifference = event.timeStamp - data.timeStamp data.filter.append(timeDifference) data.timeStamp = event.timeStamp data.active = True else: # If the event hasn't been seen before, create it in the table location = len(self._eventRateTable)
19af023fe7fec2ee05ae8f35f8dabda1251d1728 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10608/19af023fe7fec2ee05ae8f35f8dabda1251d1728/panels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4176, 12, 2890, 16, 871, 4672, 309, 365, 6315, 2575, 4727, 1388, 18, 5332, 67, 856, 12, 2575, 18, 723, 4672, 501, 273, 365, 6315, 2575, 4727, 1388, 18, 588, 12, 2575, 18, 723, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4176, 12, 2890, 16, 871, 4672, 309, 365, 6315, 2575, 4727, 1388, 18, 5332, 67, 856, 12, 2575, 18, 723, 4672, 501, 273, 365, 6315, 2575, 4727, 1388, 18, 588, 12, 2575, 18, 723, 1...
if (node.type == COMMA && !node.parenthesized)
if (node.type == COMMA and !node.parenthesized)
def ParenExpression(tokenizer, compilerContext) { tokenizer.mustMatch(LEFT_PAREN)
58afad4d3cade0a037f53f0a04cb23589df417b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/58afad4d3cade0a037f53f0a04cb23589df417b1/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 453, 7892, 2300, 12, 2316, 1824, 16, 5274, 1042, 13, 288, 10123, 18, 11926, 2060, 12, 10066, 67, 15111, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 453, 7892, 2300, 12, 2316, 1824, 16, 5274, 1042, 13, 288, 10123, 18, 11926, 2060, 12, 10066, 67, 15111, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
a = self.wTree.get_widget("show_as_bars_beats_ticks") b = self.wTree.get_widget("show_as_hours_minutes_seconds") t = self.project.transport a.set_active(t.mode == t.MODE_BARS_BEATS) b.set_active(t.mode == t.MODE_HOURS_MINS_SECS)
modeBars = self.wTree.get_widget("show_as_bars_beats_ticks") modeHours = self.wTree.get_widget("show_as_hours_minutes_seconds") transport = self.project.transport modeBars.set_active(transport.mode == transport.MODE_BARS_BEATS) modeHours.set_active(transport.mode == transport.MODE_HOURS_MINS_SECS)
def OnStateChanged(self, obj=None, change=None, *extra): #for when undo and redo history change
d98c0166f58a20c11dd843ed644fda9b8e03dc8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/d98c0166f58a20c11dd843ed644fda9b8e03dc8b/JokosherApp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1119, 5033, 12, 2890, 16, 1081, 33, 7036, 16, 2549, 33, 7036, 16, 380, 7763, 4672, 468, 1884, 1347, 15436, 471, 24524, 4927, 2549, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1119, 5033, 12, 2890, 16, 1081, 33, 7036, 16, 2549, 33, 7036, 16, 380, 7763, 4672, 468, 1884, 1347, 15436, 471, 24524, 4927, 2549, 2, -100, -100, -100, -100, -100, -100, -100, -100...
def clean_pathname(self, pathname):
def clean_pathname(self, pathname, operation):
def clean_pathname(self, pathname): """Clean a single pathname""" try: size_bytes = FileUtilities.getsize(pathname) except: self.print_exception(operation)
6b58dd32782a1f1b549871f1f088bd54d6c6c552 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/6b58dd32782a1f1b549871f1f088bd54d6c6c552/Worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 28336, 12, 2890, 16, 9806, 16, 1674, 4672, 3536, 7605, 279, 2202, 9806, 8395, 775, 30, 963, 67, 3890, 273, 1387, 11864, 18, 588, 1467, 12, 28336, 13, 1335, 30, 365, 18, 1188,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 28336, 12, 2890, 16, 9806, 16, 1674, 4672, 3536, 7605, 279, 2202, 9806, 8395, 775, 30, 963, 67, 3890, 273, 1387, 11864, 18, 588, 1467, 12, 28336, 13, 1335, 30, 365, 18, 1188,...
def evaluateBoolean(self, expr): return not not self.evaluate(expr)
evaluateBoolean = evaluate
def evaluate(self, expression, isinstance=isinstance, StringType=StringType): if isinstance(expression, StringType): expression = self._engine.compile(expression) __traceback_supplement__ = ( TALESTracebackSupplement, self, expression) return expression(self)
52b72a695593671624fc9e235ee2204f3eeee5fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/52b72a695593671624fc9e235ee2204f3eeee5fc/TALES.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 12, 2890, 16, 2652, 16, 1549, 33, 291, 1336, 16, 31570, 33, 780, 559, 4672, 309, 1549, 12, 8692, 16, 31570, 4672, 2652, 273, 365, 6315, 8944, 18, 11100, 12, 8692, 13, 1001, 21696...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 12, 2890, 16, 2652, 16, 1549, 33, 291, 1336, 16, 31570, 33, 780, 559, 4672, 309, 1549, 12, 8692, 16, 31570, 4672, 2652, 273, 365, 6315, 8944, 18, 11100, 12, 8692, 13, 1001, 21696...
tc_session.clear()
def reset_all(): # Need to keep routers around.. #for r in Router.query.all(): # r.bw_history = [] # XXX: Is this sufficient/correct/necessary? # r.circuits = [] # r.streams = [] # r.stats = None # tc_session.add(r) BwHistory.table.drop() # Will drop subclasses Extension.table.drop() Stream.table.drop() Circuit.table.drop() RouterStats.table.drop() RouterStats.table.create() BwHistory.table.create() Extension.table.create() Stream.table.create() Circuit.table.create() tc_session.clear() tc_session.commit()
ec4105d02abad3d8a13ce0ed7041d17dbc909485 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3224/ec4105d02abad3d8a13ce0ed7041d17dbc909485/SQLSupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 454, 13332, 468, 12324, 358, 3455, 28944, 6740, 838, 468, 1884, 436, 316, 9703, 18, 2271, 18, 454, 13332, 468, 225, 436, 18, 70, 91, 67, 8189, 273, 5378, 468, 11329, 30, 2585...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 454, 13332, 468, 12324, 358, 3455, 28944, 6740, 838, 468, 1884, 436, 316, 9703, 18, 2271, 18, 454, 13332, 468, 225, 436, 18, 70, 91, 67, 8189, 273, 5378, 468, 11329, 30, 2585...
words += map(str, object.fields_desc)
words += [x.name for x in object.fields_desc]
def attr_matches(self, text): m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text) if not m: return expr, attr = m.group(1, 3) try: object = eval(expr) except: object = eval(expr, session) if isinstance(object, Packet) or isinstance(object, Packet_metaclass): words = filter(lambda x: x[0]!="_",dir(object)) words += map(str, object.fields_desc) else: words = dir(object) if hasattr( object,"__class__" ): words = words + rlcompleter.get_class_members(object.__class__) matches = [] n = len(attr) for word in words: if word[:n] == attr and word != "__builtins__": matches.append("%s.%s" % (expr, word)) return matches
2a2c2accb91694cf9d6ca69c81c74f9ec393ba8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7311/2a2c2accb91694cf9d6ca69c81c74f9ec393ba8d/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 67, 8436, 12, 2890, 16, 977, 4672, 312, 273, 283, 18, 1916, 12, 86, 6, 4713, 91, 26113, 8403, 91, 6975, 14, 5153, 18, 4713, 91, 14, 2225, 16, 977, 13, 309, 486, 312, 30, 327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 67, 8436, 12, 2890, 16, 977, 4672, 312, 273, 283, 18, 1916, 12, 86, 6, 4713, 91, 26113, 8403, 91, 6975, 14, 5153, 18, 4713, 91, 14, 2225, 16, 977, 13, 309, 486, 312, 30, 327,...
def doDoctest(): import doctest doctest.testmod()
import doctest doctest.testmod()
def doDoctest(): import doctest doctest.testmod()
90817d6c04b2ff5746473ce2e5d7bccc717cf328 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2720/90817d6c04b2ff5746473ce2e5d7bccc717cf328/ast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3244, 299, 395, 13332, 1930, 31263, 395, 31263, 395, 18, 3813, 1711, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 3244, 299, 395, 13332, 1930, 31263, 395, 31263, 395, 18, 3813, 1711, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
stoptime = (totalAvg - cpulimit) * totaltime * 2
stoptime = max(((totalAvg * totaltime) / cpulimit) - totaltime , 0)
def enforce_cpu_quota(readfobj, cpulimit, frequency, childpid): global totaltime, totalcpu elapsedtime, percentused = get_time_and_cpu_percent(readfobj) # They get a free pass (likely their first or last time) if elapsedtime == 0.0: #print "Time, Rolling, Average, Instant" return #if totaltime > 120: # linux_killme() # return # Used to calculate real average #rawcpu += percentused*elapsedtime # Only calculate if Hybrid Throttle is enabled if HYBRID_THROTTLE: # Increment total time totaltime += elapsedtime # Increment CPU use if ((totalcpu/totaltime) >= cpulimit): totalcpu += percentused*elapsedtime # Don't apply max function, allow the average to drop else: # Set a minimum for percentused, enfore a use it or lose it policy totalcpu += max(percentused, cpulimit)*elapsedtime totalAvg = (totalcpu/totaltime) # Update rolling info if len(rollingCPU) == ROLLING_PERIOD: rollingCPU.pop(0) rollingIntervals.pop(0) rollingCPU.append(percentused*elapsedtime) rollingIntervals.append(elapsedtime) # Caclulate Averages add = lambda x, y: x+y rollingTotalCPU = reduce(add, rollingCPU) rollingTotalTime = reduce(add, rollingIntervals) rollingAvg = rollingTotalCPU/rollingTotalTime # Determine which average to use if HYBRID_THROTTLE and totalAvg > rollingAvg: punishableAvg = totalAvg stoptime = (totalAvg - cpulimit) * totaltime * 2 else: punishableAvg = rollingAvg stoptime = (rollingTotalTime / frequency) * (rollingAvg - cpulimit) * 2 #print (totalcpu/totaltime), percentused, elapsedtime, totaltime, totalcpu #print totaltime, ",", (totalcpu/totaltime), "," , rollingAvg, ",", percentused #print totaltime , "," ,rollingAvg, ",", (rawcpu/totaltime) , "," ,percentused # If average CPU use is fine, then continue #if (totalcpu/totaltime) <= cpulimit: if punishableAvg <= cpulimit: time.sleep(frequency) # If we don't sleep, this process burns cpu doing nothing return # They must be punished by stopping os.kill(childpid, signal.SIGSTOP) # we'll stop them for at least long enough to even out the damage # why does this formula work? Where does *2 come from? # I checked and sleep is sleeping the full time... # I've verified the os.times() data tracks perfectly... # I've tried it will different publishing frequencies and it works... # this formula works for different cpulimits as well # for very low sleep rates, this doesn't work. The time is way over. # for high sleep rates, this works fine. # Old Stop Time #stoptime = (((percentused-cpulimit) / cpulimit)-1) * elapsedtime * 2 # New stoptime # Determine how far over the limit the average, and punish progressively # Also, unsure about the *2 but it does seem to work.... #stoptime = ((totalcpu/totaltime) - cpulimit) * totaltime * 2 #stoptime = (punishableAvg - cpulimit) * totaltime * 2 # Sanity Check # There is no reason to punish a process for more than # frequency / cpulimit # BECAUSE that means that if a process uses 100% during a sampling interval, # the resulting stop+use interval should average to the CPU limit # stoptime = min(frequency/cpulimit, stoptime) #print "Stopping: ", stoptime time.sleep(stoptime) # And now they can start back up! os.kill(childpid, signal.SIGCONT) # If stoptime < frequency, then we would over-sample if we don't sleep if (stoptime < frequency): time.sleep(frequency-stoptime)
9c068e66a2f2960d74be16e013719be1c081ac9e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7995/9c068e66a2f2960d74be16e013719be1c081ac9e/nonportable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12980, 67, 11447, 67, 23205, 12, 896, 27936, 16, 3283, 332, 1038, 16, 8670, 16, 1151, 6610, 4672, 2552, 2078, 957, 16, 2078, 11447, 225, 9613, 957, 16, 5551, 3668, 273, 336, 67, 957, 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, 12980, 67, 11447, 67, 23205, 12, 896, 27936, 16, 3283, 332, 1038, 16, 8670, 16, 1151, 6610, 4672, 2552, 2078, 957, 16, 2078, 11447, 225, 9613, 957, 16, 5551, 3668, 273, 336, 67, 957, 6...
base_ring = self
raise ValueError, "The size of the finite field must not be prime."
def __init__(self, q, name, modulus=None): """ Create finite field of order q with variable printed as name.
cbe57c11be667c31c9e2fb8315814fb7dd16a087 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/cbe57c11be667c31c9e2fb8315814fb7dd16a087/finite_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1043, 16, 508, 16, 24770, 33, 7036, 4672, 3536, 1788, 25922, 652, 434, 1353, 1043, 598, 2190, 14099, 487, 508, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1043, 16, 508, 16, 24770, 33, 7036, 4672, 3536, 1788, 25922, 652, 434, 1353, 1043, 598, 2190, 14099, 487, 508, 18, 2, -100, -100, -100, -100, -100, -100, ...
end = len(q.applied) if not end: return
end = q.series_end(True)
def applied(ui, repo, patch=None, **opts): """print the patches already applied""" q = repo.mq if patch: if patch not in q.series: raise util.Abort(_("patch %s is not in series file") % patch) end = q.series.index(patch) + 1 else: end = len(q.applied) if not end: return return q.qseries(repo, length=end, status='A', summary=opts.get('summary'))
519294f93b8bc6bc0ba09afe34334f9f97a6da6a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/519294f93b8bc6bc0ba09afe34334f9f97a6da6a/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6754, 12, 4881, 16, 3538, 16, 4729, 33, 7036, 16, 2826, 4952, 4672, 3536, 1188, 326, 16482, 1818, 6754, 8395, 1043, 273, 3538, 18, 11636, 309, 4729, 30, 309, 4729, 486, 316, 1043, 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, 6754, 12, 4881, 16, 3538, 16, 4729, 33, 7036, 16, 2826, 4952, 4672, 3536, 1188, 326, 16482, 1818, 6754, 8395, 1043, 273, 3538, 18, 11636, 309, 4729, 30, 309, 4729, 486, 316, 1043, 18, ...
""" try: return x.real() except AttributeError: return CDF(x).real()
sage: real(5/3) 5/3 sage: a = 2.5 sage: real(a) 2.50000000000000 sage: type(real(a)) <type 'sage.rings.real_mpfr.RealNumber'> """ try: return x.real() except AttributeError: pass try: rdf_x = RDF(x) return x except TypeError: pass return CDF(x).real()
def real(x): """ Return the real part of x. EXAMPLES: sage: z = 1+2*I sage: real(z) 1 """ try: return x.real() except AttributeError: return CDF(x).real()
908ee5440d7a0209401d7e91b5ec13e4ac120a49 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/908ee5440d7a0209401d7e91b5ec13e4ac120a49/functional.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 92, 4672, 3536, 2000, 326, 2863, 1087, 434, 619, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 998, 273, 404, 15, 22, 14, 45, 272, 410, 30, 2863, 12, 94, 13, 404, 272, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 92, 4672, 3536, 2000, 326, 2863, 1087, 434, 619, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 998, 273, 404, 15, 22, 14, 45, 272, 410, 30, 2863, 12, 94, 13, 404, 272, 41...
earlierDate = samplings[-25].getValidAfter().split(" ")[0] if lastDate == earlierDate: samplings = samplings[:-25]
cropStart = -25 while samplings[cropStart].getValidAfter().split(" ")[0] != lastDate: cropStart += 1 samplings = samplings[:cropStart]
def monitorConsensus(): gmailAccount, gmailPassword = DEFAULT_GMAIL_ACCOUNT, "" toAddress = DEFAULT_TO_ADDRESS seenFingerprintsPath = DEFAULT_FINGERPRINTS nsOutputPath = DEFAULT_NS_OUTPUT isQuiet = False # parses user input, noting any issues try: opts, args = getopt.getopt(sys.argv[1:], OPT, OPT_EXPANDED) except getopt.GetoptError, exc: print str(exc) + " (for usage provide --help)" sys.exit() for opt, arg in opts: if opt in ("-g", "--gmail"): gmailAccount = arg elif opt in ("-t", "--to"): toAddress = arg elif opt in ("-f", "--fingerprints"): seenFingerprintsPath = arg elif opt in ("-n", "--nsOutput"): nsOutputPath = arg elif opt in ("-q", "--quiet"): isQuiet = True elif opt in ("-h", "--help"): # notes default values if they exist gmailAcctLabel = " (%s)" % gmailAccount if gmailAccount else "" toAddrLabel = " (%s)" % toAddress if toAddress else "" seenFpLabel = " (%s)" % seenFingerprintsPath if seenFingerprintsPath else "" nsOutputLabel = " (%s)" % nsOutputPath if nsOutputPath else "" print HELP_MSG % (gmailAcctLabel, toAddrLabel, seenFpLabel, nsOutputLabel) sys.exit() # ns output path is a directory, and later expected to end with a slash if nsOutputPath and not nsOutputPath.endswith("/"): nsOutputPath += "/" # fetches gmail password if we're sending email alerts isEmailUsed = gmailAccount and toAddress if isEmailUsed: gmailPassword = getpass.getpass("GMail Password: ") if not gmailAccount or not gmailPassword or not toAddress: print "Email notifications disabled" # get a control port connection conn = util.torTools.connect() if conn == None: print "Unable to connect to control port" sys.exit(1) # prepopulate seenFingerprints with past entries if available seenFingerprints = set() if seenFingerprintsPath and os.path.exists(seenFingerprintsPath): try: seenFingerprintsFile = open(seenFingerprintsPath, "r") for entry in seenFingerprintsFile: seenFingerprints.add(entry.upper().strip()) seenFingerprintsFile.close() except IOError: print "Unable to prepopulate fingerprints from %s" % seenFingerprintsPath seenFingerprintsFile = None if seenFingerprintsPath: try: seenFingerprintsFile = open(seenFingerprintsPath, "a") except IOError: print FP_WRITE_FAIL_MSG % seenFingerprintsPath tick = 0 # number of consensuses processed samplings = [] validAfterDate = None # the 'valid-after' time of the last consensus we've processed # fingerprint => (observedBandwidth, exitPolicy) for all relays descInfo = {} for nsEntry in conn.get_network_status(): try: descLookupCmd = "desc/id/%s" % nsEntry.idhex router = TorCtl.Router.build_from_desc(conn.get_info(descLookupCmd)[descLookupCmd].split("\n"), nsEntry) descInfo[router.idhex] = (router.desc_bw, router.exitpolicy) except TorCtl.ErrorReply: descInfo[nsEntry.idhex] = (0, "") except TorCtl.TorCtlClosed: print "Connection to tor is closed" sys.exit() while True: tick += 1 # fetches the consensus, blocking until a new one's available newConsensus, validAfterDate = getNextConsensus(conn, validAfterDate) nsEntries = TorCtl.parse_ns_body(newConsensus) # determines which entries are new newEntries = [] for nsEntry in nsEntries: # adds entry to descInfo hash if not nsEntry.idhex in descInfo: try: descLookupCmd = "desc/id/%s" % nsEntry.idhex router = TorCtl.Router.build_from_desc(conn.get_info(descLookupCmd)[descLookupCmd].split("\n"), nsEntry) descInfo[router.idhex] = (router.desc_bw, router.exitpolicy) except TorCtl.ErrorReply: descInfo[nsEntry.idhex] = (0, "") except TorCtl.TorCtlClosed: print "Connection to tor is closed" sys.exit() if not nsEntry.idhex in seenFingerprints: newEntries.append(nsEntry) seenFingerprints.add(nsEntry.idhex) # records the seen fingerprint if seenFingerprintsFile: try: seenFingerprintsFile.write(nsEntry.idhex + "\n") except IOError: print FP_WRITE_FAIL_MSG % seenFingerprintsPath seenFingerprintsFile = None newSampling = Sampling(conn, validAfterDate, nsEntries, newEntries) # check if we broke any thresholds (currently just checking hourly exit stats) countAlert = newSampling.getCount(RELAY_EXIT, True) > HOURLY_COUNT_THRESHOLD bwAlert = newSampling.getBandwidth(descInfo, RELAY_EXIT, True) > HOURLY_BW_THRESHOLD samplings.insert(0, newSampling) if len(samplings) > 168: # only remove entries if we have a full day's worth of data to discard lastDate = samplings[-1].getValidAfter().split(" ")[0] earlierDate = samplings[-25].getValidAfter().split(" ")[0] if lastDate == earlierDate: samplings = samplings[:-25] # writes new ns entries if nsOutputPath: nsContents = "" entryDir = nsOutputPath + newSampling.getValidAfter().split(" ")[0] + "/" entryFilename = newSampling.getValidAfter().split(" ")[1] + ".txt" for label, relayType in (("Exits:", RELAY_EXIT), ("Middle:", RELAY_MIDDLE), ("Guards:", RELAY_GUARD)): nsContents += label + "\n" nsContents += "-" * 40 + "\n" for nsEntry in newSampling.newRelays[relayType]: # TODO: the str call of the following produces a deprecation warning, as discussed on: # https://trac.torproject.org/projects/tor/ticket/1777 exitPolicy = [str(policyLine) for policyLine in descInfo[nsEntry.idhex][1]] nsContents += "%s (%s:%s)\n" % (nsEntry.idhex, nsEntry.ip, nsEntry.orport) nsContents += " nickname: %s\n" % nsEntry.nickname nsContents += " bandwidth: %s\n" % getSizeLabel(descInfo[nsEntry.idhex][0], 2) nsContents += " flags: %s\n" % ", ".join(nsEntry.flags) nsContents += " exit policy: %s\n\n" % ", ".join(exitPolicy) try: # make ns entries directory if it doesn't already exist if not os.path.exists(entryDir): os.makedirs(entryDir) # creates subdirectory for each date, then file named after the time nsFile = open(entryDir + entryFilename, "w") nsFile.write(nsContents) nsFile.close() except IOError: print "Unable to access '%s', network status summaries won't be persisted" % (entryDir + entryFilename) nsOutputPath = None # prints results to terminal, ex: # 7. 2010-07-18 10:00:00 - 941/1732/821 relays (8/12/4 are new, 153 MB / 215 MB / 48 MB added bandwidth) if not isQuiet: print "%i. %s" % (tick, newSampling.getSummary(descInfo)) if countAlert: print " *count threshold broken*" if bwAlert: print " *bandwidth threshold broken*" if countAlert or bwAlert or (tick % 24 == 0): currentTime = time.strftime("%H:%M", time.localtime(time.time())) currentDate = time.strftime("%m/%d/%Y", time.localtime(time.time())) if countAlert: subject = "Alert: Relay Count Threshold Broken" noticeBody = "The relay count threshold was broken today at %s (%s) with the addition of %i new exits (the current threshold is set at %i)." noticeMsg = noticeBody % (currentTime, currentDate, newSampling.getCount(RELAY_EXIT), HOURLY_COUNT_THRESHOLD) elif bwAlert: subject = "Alert: Relay Bandwidth Threshold Broken" noticeBody = "The relay bandwidth threshold was broken today at %s (%s) with the addition of %s of new exit capacity (the current threshold is set at %i)." noticeMsg = noticeBody % (currentTime, currentDate, getSizeLabel(newSampling.getBandwidth(descInfo, RELAY_EXIT)), getSizeLabel(HOURLY_BW_THRESHOLD)) else: subject = "Daily Consensus Report for %s" % currentDate noticeMsg = "At present there's no breaches to report. See below for a summary of consensus additions." greetingMsg = "Greetings from your friendly consensus monitoring daemon. %s" % noticeMsg # constructs the plain text message msgText = greetingMsg + "\n" msgText += "-" * 80 + "\n\n" for sampling in samplings: msgText += sampling.getSummary(descInfo) + "\n" # constructs the html message msgHtml = """<html> <head></head> <body> <p>%s</p> <hr /> <table style="border-collapse:collapse;"> <tr> <td></td> <td colspan="3" bgcolor="green"><b>&nbsp;Guards</b></td> <td colspan="3" bgcolor="yellow"><b>&nbsp;Middle</b></td> <td colspan="3" bgcolor="red"><b>&nbsp;Exits</b></td> <td bgcolor="blue"><b>&nbsp;Total</b></td> </tr> <tr> <td bgcolor="#444444"><b>&nbsp;Date:</b></td> <td bgcolor="green"><b>&nbsp;Count:&nbsp;</b></td> <td bgcolor="green"><b>New:&nbsp;</b></td> <td bgcolor="green"><b>Bandwidth:&nbsp;</b></td> <td bgcolor="yellow"><b>&nbsp;Count:&nbsp;</b></td> <td bgcolor="yellow"><b>New:&nbsp;</b></td> <td bgcolor="yellow"><b>Bandwidth:&nbsp;</b></td> <td bgcolor="red"><b>&nbsp;Count:&nbsp;</b></td> <td bgcolor="red"><b>New:&nbsp;</b></td> <td bgcolor="red"><b>Bandwidth:&nbsp;</b></td> <td bgcolor="blue"><b>&nbsp;Bandwidth:&nbsp;</b></td> </tr>
22da42af41f7b69227eb4a16ec1028b853c9b023 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13459/22da42af41f7b69227eb4a16ec1028b853c9b023/consensusTracker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6438, 9054, 9781, 13332, 314, 4408, 3032, 16, 314, 4408, 3913, 273, 3331, 67, 43, 18191, 67, 21690, 16, 1408, 358, 1887, 273, 3331, 67, 4296, 67, 15140, 5881, 17678, 87, 743, 273, 3331, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6438, 9054, 9781, 13332, 314, 4408, 3032, 16, 314, 4408, 3913, 273, 3331, 67, 43, 18191, 67, 21690, 16, 1408, 358, 1887, 273, 3331, 67, 4296, 67, 15140, 5881, 17678, 87, 743, 273, 3331, ...
pthisval = 'tvr.addr()'
pthisval = 'tvr.jsval_addr()'
def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False): """ Write a single quick stub (a custom SpiderMonkey getter/setter/method) for the specified XPCOM interface-member. """ isAttr = (member.kind == 'attribute') isMethod = (member.kind == 'method') assert isAttr or isMethod isGetter = isAttr and not isSetter signature = "static JSBool\n" if isAttr: # JSPropertyOp signature. signature += "%s(JSContext *cx, JSObject *obj, jsval id,%s jsval *vp)\n" else: # JSFastNative. signature += "%s(JSContext *cx, uintN argc,%s jsval *vp)\n" customMethodCall = customMethodCalls.get(stubName, None) if customMethodCall is None: customMethodCall = customMethodCalls.get(member.iface.name + '_', None) if customMethodCall is not None: if isMethod: code = customMethodCall.get('code', None) elif isGetter: code = customMethodCall.get('getter_code', None) else: code = customMethodCall.get('setter_code', None) else: code = None if code is not None: templateName = member.iface.name if isGetter: templateName += '_Get' elif isSetter: templateName += '_Set' # Generate the code for the stub, calling the template function # that's shared between the stubs. The stubs can't have additional # arguments, only the template function can. callTemplate = signature % (stubName, '') callTemplate += "{\n" nativeName = (member.binaryname is not None and member.binaryname or header.firstCap(member.name)) argumentValues = (customMethodCall['additionalArgumentValues'] % nativeName) if isAttr: callTemplate += (" return %s(cx, obj, id, %s, vp);\n" % (templateName, argumentValues)) else: callTemplate += (" return %s(cx, argc, %s, vp);\n" % (templateName, argumentValues)) callTemplate += "}\n\n" # Fall through and create the template function stub called from the # real stubs, but only generate the stub once. Otherwise, just write # out the call to the template function and return. templateGenerated = templateName + '_generated' if templateGenerated in customMethodCall: f.write(callTemplate) return customMethodCall[templateGenerated] = True stubName = templateName else: callTemplate = "" else: callTemplate = "" code = customMethodCall.get('code', None) # Function prolog. # Only template functions can have additional arguments. if customMethodCall is None or not 'additionalArguments' in customMethodCall: additionalArguments = '' else: additionalArguments = " %s," % customMethodCall['additionalArguments'] f.write(signature % (stubName, additionalArguments)) f.write("{\n") f.write(" XPC_QS_ASSERT_CONTEXT_OK(cx);\n") # For methods, compute "this". if isMethod: f.write(" JSObject *obj = JS_THIS_OBJECT(cx, vp);\n" " if (!obj)\n" " return JS_FALSE;\n") # Create ccx if needed. haveCcx = memberNeedsCcx(member) if haveCcx: f.write(" XPCCallContext ccx(JS_CALLER, cx, obj, " "JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));\n") if isInterfaceType(member.realtype): f.write(" XPCLazyCallContext lccx(ccx);\n") elif isInterfaceType(member.realtype): if isMethod: f.write(" JSObject *callee = " "JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));\n") elif isGetter: f.write(" JSObject *callee = nsnull;\n") # Get the 'self' pointer. if customMethodCall is None or not 'thisType' in customMethodCall: f.write(" %s *self;\n" % member.iface.name) else: f.write(" %s *self;\n" % customMethodCall['thisType']) f.write(" xpc_qsSelfRef selfref;\n") # Don't use FromCcx for getters or setters; the way we construct the ccx in # a getter/setter causes it to find the wrong wrapper in some cases. if haveCcx: # Undocumented, but the interpreter puts 'this' at argv[-1], # which is vp[1]; and it's ok to overwrite it. f.write(" if (!xpc_qsUnwrapThisFromCcx(ccx, &self, &selfref.ptr, " "&vp[1]))\n") f.write(" return JS_FALSE;\n") else: if isGetter: pthisval = 'vp' elif isSetter: f.write(" js::AutoValueRooter tvr(cx);\n") pthisval = 'tvr.addr()' else: pthisval = '&vp[1]' # as above, ok to overwrite vp[1] if not isSetter and isInterfaceType(member.realtype): f.write(" XPCLazyCallContext lccx(JS_CALLER, cx, obj);\n") f.write(" if (!xpc_qsUnwrapThis(cx, obj, callee, &self, " "&selfref.ptr, %s, &lccx))\n" % pthisval) else: f.write(" if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, " "&selfref.ptr, %s, nsnull))\n" % pthisval) f.write(" return JS_FALSE;\n") if isMethod: # If there are any required arguments, check argc. requiredArgs = len(member.params) while requiredArgs and member.params[requiredArgs-1].optional: requiredArgs -= 1 if requiredArgs: f.write(" if (argc < %d)\n" % requiredArgs) f.write(" return xpc_qsThrow(cx, " "NS_ERROR_XPC_NOT_ENOUGH_ARGS);\n") # Convert in-parameters. rvdeclared = False if isMethod: if len(member.params) > 0: f.write(" jsval *argv = JS_ARGV(cx, vp);\n") for i, param in enumerate(member.params): argName = 'arg%d' % i argTypeKey = argName + 'Type' if customMethodCall is None or not argTypeKey in customMethodCall: validateParam(member, param) realtype = param.realtype else: realtype = xpidl.Forward(name=customMethodCall[argTypeKey], location='', doccomments='') # Emit code to convert this argument from jsval. rvdeclared = writeArgumentUnboxing( f, i, argName, realtype, haveCcx=haveCcx, optional=param.optional, rvdeclared=rvdeclared, nullBehavior=param.null, undefinedBehavior=param.undefined) elif isSetter: rvdeclared = writeArgumentUnboxing(f, None, 'arg0', member.realtype, haveCcx=False, optional=False, rvdeclared=rvdeclared, nullBehavior=member.null, undefinedBehavior=member.undefined) canFail = customMethodCall is None or customMethodCall.get('canFail', True) if canFail and not rvdeclared: f.write(" nsresult rv;\n") rvdeclared = True if code is not None: f.write("%s\n" % code) if code is None or (isGetter and callTemplate is ""): debugGetter = code is not None if debugGetter: f.write("#ifdef DEBUG\n") f.write(" nsresult debug_rv;\n") f.write(" nsCOMPtr<%s> debug_self;\n" " CallQueryInterface(self, getter_AddRefs(debug_self));\n" % member.iface.name); prefix = 'debug_' else: prefix = '' resultname = prefix + 'result' selfname = prefix + 'self' nsresultname = prefix + 'rv' # Prepare out-parameter. if isMethod or isGetter: writeResultDecl(f, member.realtype, resultname) # Call the method. if isMethod: comName = header.methodNativeName(member) argv = ['arg' + str(i) for i, p in enumerate(member.params)] if member.implicit_jscontext: argv.append('cx') if member.optional_argc: argv.append('argc - %d' % requiredArgs) if not isVoidType(member.realtype): argv.append(outParamForm(resultname, member.realtype)) args = ', '.join(argv) else: comName = header.attributeNativeName(member, isGetter) if isGetter: args = outParamForm(resultname, member.realtype) else: args = "arg0" if member.implicit_jscontext: args = "cx, " + args f.write(" ") if canFail or debugGetter: f.write("%s = " % nsresultname) f.write("%s->%s(%s);\n" % (selfname, comName, args)) if debugGetter: checkSuccess = "NS_SUCCEEDED(debug_rv)" if canFail: checkSuccess += " == NS_SUCCEEDED(rv)" f.write(" NS_ASSERTION(%s && " "xpc_qsSameResult(debug_result, result),\n" " \"Got the wrong answer from the custom " "method call!\");\n" % checkSuccess) f.write("#endif\n") if canFail: # Check for errors. f.write(" if (NS_FAILED(rv))\n") if isMethod: if haveCcx: f.write(" return xpc_qsThrowMethodFailedWithCcx(" "ccx, rv);\n") else: f.write(" return xpc_qsThrowMethodFailed(" "cx, rv, vp);\n") else: if isGetter: thisval = '*vp' else: thisval = '*tvr.addr()' f.write(" return xpc_qsThrowGetterSetterFailed(cx, rv, " + "JSVAL_TO_OBJECT(%s), id);\n" % thisval) # Convert the return value. if isMethod or isGetter: writeResultConv(f, member.realtype, 'vp', '*vp') else: f.write(" return JS_TRUE;\n") # Epilog. f.write("}\n\n") # Now write out the call to the template function. if customMethodCall is not None: f.write(callTemplate)
2fa0c6b4d6c84eedf3bba5ad940113fd4dff1584 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/2fa0c6b4d6c84eedf3bba5ad940113fd4dff1584/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 13663, 11974, 12, 74, 16, 1679, 1305, 10125, 16, 3140, 16, 7168, 461, 16, 353, 8465, 33, 8381, 4672, 3536, 2598, 279, 2202, 9549, 7168, 261, 69, 1679, 5878, 3585, 11415, 856, 7060,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 13663, 11974, 12, 74, 16, 1679, 1305, 10125, 16, 3140, 16, 7168, 461, 16, 353, 8465, 33, 8381, 4672, 3536, 2598, 279, 2202, 9549, 7168, 261, 69, 1679, 5878, 3585, 11415, 856, 7060,...
'.js',
def FilterOut(self, **kw): """Removes values from existing construction variables in an Environment. The values to remove should be a list. For example: self.FilterOut(CPPDEFINES=['REMOVE_ME', 'ME_TOO']) Args: self: Environment to alter. kw: (Any other named arguments are values to remove). """ kw = SCons.Environment.copy_non_reserved_keywords(kw) for key, val in kw.items(): envval = self.get(key, None) if envval is None: # No existing variable in the environment, so nothing to delete. continue for vremove in val: # Use while not if, so we can handle duplicates. while vremove in envval: envval.remove(vremove) self[key] = envval # TODO(sgk): SCons.Environment.Append() has much more logic to deal # with various types of values. We should handle all those cases in here # too. (If variable is a dict, etc.)
9ff50386a36e7628441a8a68484bb0a6bcdadf55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/9ff50386a36e7628441a8a68484bb0a6bcdadf55/chromium_builders.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4008, 1182, 12, 2890, 16, 2826, 9987, 4672, 3536, 6220, 924, 628, 2062, 16171, 3152, 316, 392, 7518, 18, 225, 1021, 924, 358, 1206, 1410, 506, 279, 666, 18, 225, 2457, 3454, 30, 225, 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, 4008, 1182, 12, 2890, 16, 2826, 9987, 4672, 3536, 6220, 924, 628, 2062, 16171, 3152, 316, 392, 7518, 18, 225, 1021, 924, 358, 1206, 1410, 506, 279, 666, 18, 225, 2457, 3454, 30, 225, 3...
self.address = ('', port)
self.address = (host, port)
def __init__(self, port, callback): host = 'localhost' self.address = ('', port) self.url = 'http://%s:%d/' % (host, port) self.callback = callback self.base.__init__(self, self.address, self.handler)
9f71fc6813ae23e96590aad1b8660368a879e8a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/9f71fc6813ae23e96590aad1b8660368a879e8a9/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 16, 1348, 4672, 1479, 273, 296, 13014, 11, 365, 18, 2867, 273, 261, 2564, 16, 1756, 13, 365, 18, 718, 273, 296, 2505, 23155, 87, 5319, 72, 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, 1001, 2738, 972, 12, 2890, 16, 1756, 16, 1348, 4672, 1479, 273, 296, 13014, 11, 365, 18, 2867, 273, 261, 2564, 16, 1756, 13, 365, 18, 718, 273, 296, 2505, 23155, 87, 5319, 72, 2473, ...
index_links[term].sort() for link in index_links[term]: str += ('<i><a href="%s
_write_if_nonempty(public, private, links, str) for link in links: str = ('<i><a href="%s
def _write_indices(self, public, private): """ Write the index to the given file-like object. I write directly to the file (unlike most other pages, which are converted to strings, and then written) because the index page can be quite large. For example, for the Python standard library, the index page is over 1.5mb. @param out: The stream to which the index should be written. @type out: C{stream} @rtype: C{None} """ # Header and navigation bar. header = self._header('Index') public.write(header); private.write(header) self._write_navbar(public, private, 'indices', top=1) public.write('<br />\n'); private.write('<br />\n')
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 6836, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 2598, 326, 770, 358, 326, 864, 585, 17, 5625, 733, 18, 225, 467, 1045, 5122, 358, 326, 585, 261, 318, 5625, 4486, 1308, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6836, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 2598, 326, 770, 358, 326, 864, 585, 17, 5625, 733, 18, 225, 467, 1045, 5122, 358, 326, 585, 261, 318, 5625, 4486, 1308, ...
smtp = smtplib.SMTP("localhost", 9091)
smtp = smtplib.SMTP(HOST, PORT)
def testTimeoutDefault(self): # default smtp = smtplib.SMTP("localhost", 9091) self.assertTrue(smtp.sock.gettimeout() is None) smtp.sock.close()
9847a71715dd728b74739fb8399a4650195f789d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/9847a71715dd728b74739fb8399a4650195f789d/test_smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2694, 1868, 12, 2890, 4672, 468, 805, 17660, 273, 272, 1010, 6673, 18, 55, 14636, 12, 8908, 16, 20987, 13, 365, 18, 11231, 5510, 12, 20278, 18, 15031, 18, 588, 4538, 1435, 353, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2694, 1868, 12, 2890, 4672, 468, 805, 17660, 273, 272, 1010, 6673, 18, 55, 14636, 12, 8908, 16, 20987, 13, 365, 18, 11231, 5510, 12, 20278, 18, 15031, 18, 588, 4538, 1435, 353, 5...
vals['parent.currency'], context=context)
vals['_parent_invoice.currency'], context=context)
def on_change_with_amount(self, cursor, user, ids, vals, context=None): currency_obj = self.pool.get('currency.currency') if vals.get('type') == 'line': if isinstance(vals.get('parent.currency'), (int, long)): currency = currency_obj.browse(cursor, user, vals['parent.currency'], context=context) else: currency = vals['parent.currency'] return currency_obj.round(cursor, user, currency, Decimal(str(vals.get('quantity') or '0.0')) * \ (vals.get('unit_price') or Decimal('0.0'))) return Decimal('0.0')
539479e0405abbee5564053fa837d5346bb3c202 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9267/539479e0405abbee5564053fa837d5346bb3c202/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 1918, 67, 8949, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 5462, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 7095, 18, 7095, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 1918, 67, 8949, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 5462, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 7095, 18, 7095, 6134, ...
add_link(req, 'up', ctx.parent.resource_href(), ctx.parent.name())
def process_request(self, req): parent_realm = req.args.get('realm') path = req.args.get('path') if not parent_realm or not path: raise HTTPBadRequest('Bad request')
7073d9bcb420d6c470cca300738e4781c41123b6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/7073d9bcb420d6c470cca300738e4781c41123b6/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 982, 67, 24056, 273, 1111, 18, 1968, 18, 588, 2668, 24056, 6134, 589, 273, 1111, 18, 1968, 18, 588, 2668, 803, 6134, 225, 309, 486, 982, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 982, 67, 24056, 273, 1111, 18, 1968, 18, 588, 2668, 24056, 6134, 589, 273, 1111, 18, 1968, 18, 588, 2668, 803, 6134, 225, 309, 486, 982, 67, ...
return 0.001 * reduce(operator_add,map(width,text)) * size
return 0.001 * reduce(operator_add,map(width,text), 0) * size
def stringWidth(self, text, size, encoding='utf-8'): "Calculate text width" if type(text) is not UnicodeType: text = unicode(text, encoding or 'utf-8') # encoding defaults to utf-8 width = lambda x,f=self.face.getCharWidth: f(ord(x)) return 0.001 * reduce(operator_add,map(width,text)) * size
e36e48185012933373809dda873076504e766e40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/e36e48185012933373809dda873076504e766e40/ttfonts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 2384, 12, 2890, 16, 977, 16, 963, 16, 2688, 2218, 3158, 17, 28, 11, 4672, 315, 8695, 977, 1835, 6, 309, 618, 12, 955, 13, 353, 486, 9633, 559, 30, 977, 273, 5252, 12, 955, 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, 533, 2384, 12, 2890, 16, 977, 16, 963, 16, 2688, 2218, 3158, 17, 28, 11, 4672, 315, 8695, 977, 1835, 6, 309, 618, 12, 955, 13, 353, 486, 9633, 559, 30, 977, 273, 5252, 12, 955, 16,...
try: process = configCreator( self.inputDataset.name(), self.runNumber, self.globalTag, *self.inputFiles) except Exception, ex: msg = "Error creating harvesting configuration\n" msg += str(ex) print msg raise RuntimeError, "Harvesting Config Failure"
def __call__(self): """ _operator()_
4f94ae9fd38060ba158b141dfa6fc533344c56e8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8887/4f94ae9fd38060ba158b141dfa6fc533344c56e8/RuntimeOfflineDQMSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 3536, 389, 9497, 1435, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4672, 3536, 389, 9497, 1435, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if DEBUG: print 'Entry: >%s<' % text
def DrawMenu_Selection(self, menuw, settings, x0, y0, width, height): val = settings menu = menuw.menustack[-1]
36486eb675bd71f34f0bc633ac672c9bb25397f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/36486eb675bd71f34f0bc633ac672c9bb25397f5/skin_main1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 4599, 67, 6233, 12, 2890, 16, 3824, 91, 16, 1947, 16, 619, 20, 16, 677, 20, 16, 1835, 16, 2072, 4672, 1244, 273, 1947, 3824, 273, 3824, 91, 18, 27617, 641, 484, 18919, 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, 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, 10184, 4599, 67, 6233, 12, 2890, 16, 3824, 91, 16, 1947, 16, 619, 20, 16, 677, 20, 16, 1835, 16, 2072, 4672, 1244, 273, 1947, 3824, 273, 3824, 91, 18, 27617, 641, 484, 18919, 21, 65,...
data = cPickle.dumps(value, self.binary)
data = _dumps(value, self.protocol)
def __append(self, value, txn=None): data = cPickle.dumps(value, self.binary) return self.db.append(data, txn)
05cf33361140b3644eb30c58a1a0d669441bd7ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/05cf33361140b3644eb30c58a1a0d669441bd7ec/dbshelve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6923, 12, 2890, 16, 460, 16, 7827, 33, 7036, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 327, 365, 18, 1966, 18, 6923, 12, 892, 16, 7827, 13, 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, 1001, 6923, 12, 2890, 16, 460, 16, 7827, 33, 7036, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 327, 365, 18, 1966, 18, 6923, 12, 892, 16, 7827, 13, 2, -100, ...
if options['cwd']: os.chdir(options['cwd']) u.updateopts(options["verbose"], options["debug"], options["quiet"], not options["noninteractive"], options["traceback"], parseconfig(options["config"])) path = u.expandpath(options["repository"]) or "" repo = path and hg.repository(u, path=path) or None if repo and not repo.local(): raise util.Abort(_("repository '%s' is not local") % path) if options['help']: return help_(u, cmd, options['version']) elif options['version']: return version_(u) elif not cmd: return help_(u, 'shortlist') if cmd not in norepo.split(): try: if not repo: repo = hg.repository(u, path=path) u = repo.ui except hg.RepoError: if cmd not in optionalrepo.split(): raise d = lambda: func(u, repo, *args, **cmdoptions) else: d = lambda: func(u, *args, **cmdoptions)
def print_time(): t = get_times() u.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n") % (t[4]-s[4], t[0]-s[0], t[2]-s[2], t[1]-s[1], t[3]-s[3]))
90d49caca34d584e4f92f222b9a46f698e3a3a43 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/90d49caca34d584e4f92f222b9a46f698e3a3a43/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 957, 13332, 268, 273, 336, 67, 8293, 1435, 582, 18, 8935, 24899, 2932, 950, 30, 2863, 12639, 23, 74, 18043, 261, 1355, 12639, 23, 74, 15, 9, 18, 23, 74, 2589, 12639, 23, 74...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 957, 13332, 268, 273, 336, 67, 8293, 1435, 582, 18, 8935, 24899, 2932, 950, 30, 2863, 12639, 23, 74, 18043, 261, 1355, 12639, 23, 74, 15, 9, 18, 23, 74, 2589, 12639, 23, 74...
result +=map(lambda x: node_class(self.cr, self.uid, self.path+'/'+x.name, x, False, context=self.context, type='file', root=self.root), res)
result +=map(lambda x: node_class(self.cr, self.uid, self.path+'/'+eval('x.'+fobj._rec_name), x, False, context=self.context, type='file', root=self.root), res)
def _child_get(self, nodename=False): if self.type not in ('collection','database'): return [] res = self.directory_list_for_child(nodename) result= map(lambda x: node_class(self.cr, self.uid, self.path+'/'+x.name, x, x.type=='directory' and self.object2 or False, context=self.context, root=self.root), res) if self.type=='database': pool = pooler.get_pool(self.cr.dbname) fobj = pool.get('ir.attachment') vargs = [('parent_id','=',False),('res_id','=',False)] if nodename: vargs.append(('name','=',nodename)) file_ids=fobj.search(self.cr,self.uid,vargs)
d05bfafb5145c24561f9040bb39dba1d10318ea6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d05bfafb5145c24561f9040bb39dba1d10318ea6/document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2890, 16, 14003, 1069, 33, 8381, 4672, 309, 365, 18, 723, 486, 316, 7707, 5548, 17023, 6231, 11, 4672, 327, 5378, 400, 273, 365, 18, 5149, 67, 1098, 67, 1884, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3624, 67, 588, 12, 2890, 16, 14003, 1069, 33, 8381, 4672, 309, 365, 18, 723, 486, 316, 7707, 5548, 17023, 6231, 11, 4672, 327, 5378, 400, 273, 365, 18, 5149, 67, 1098, 67, 1884, ...
factory.protocol = wire.Echo
factory.protocol = TestEcho TestEcho.d = defer.Deferred()
def testTCP(self): s = service.MultiService() s.startService() factory = protocol.ServerFactory() factory.protocol = wire.Echo t = internet.TCPServer(0, factory) t.setServiceParent(s) num = t._port.getHost().port class Foo(basic.LineReceiver): def connectionMade(self): self.transport.write('lalala\r\n') def lineReceived(self, line): self.factory.line = line factory = protocol.ClientFactory() factory.protocol = Foo factory.line = None internet.TCPClient('localhost', num, factory).setServiceParent(s) util.spinWhile(lambda :factory.line is None) self.assertEqual(factory.line, 'lalala')
a4c16eda12d2a3a160a03099e1d1503f9bb4eb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a4c16eda12d2a3a160a03099e1d1503f9bb4eb02/test_application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13891, 12, 2890, 4672, 272, 273, 1156, 18, 5002, 1179, 1435, 272, 18, 1937, 1179, 1435, 3272, 273, 1771, 18, 2081, 1733, 1435, 3272, 18, 8373, 273, 7766, 19704, 7766, 19704, 18, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13891, 12, 2890, 4672, 272, 273, 1156, 18, 5002, 1179, 1435, 272, 18, 1937, 1179, 1435, 3272, 273, 1771, 18, 2081, 1733, 1435, 3272, 18, 8373, 273, 7766, 19704, 7766, 19704, 18, 72...
class BadException:
class BadException(Exception):
def ckmsg(src, msg): try: compile(src, '<fragment>', 'exec') except SyntaxError, e: print e.msg if e.msg == msg: print "ok" else: print "expected:", msg else: print "failed to get expected SyntaxError"
b0849a82787fc9149349388c351ec2f25de2aacb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0849a82787fc9149349388c351ec2f25de2aacb/test_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12622, 3576, 12, 4816, 16, 1234, 4672, 775, 30, 4074, 12, 4816, 16, 2368, 11956, 1870, 16, 296, 4177, 6134, 1335, 18453, 16, 425, 30, 1172, 425, 18, 3576, 309, 425, 18, 3576, 422, 1234...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12622, 3576, 12, 4816, 16, 1234, 4672, 775, 30, 4074, 12, 4816, 16, 2368, 11956, 1870, 16, 296, 4177, 6134, 1335, 18453, 16, 425, 30, 1172, 425, 18, 3576, 309, 425, 18, 3576, 422, 1234...
warn_on_default=True):
warn_on_default=True, raw=False):
def GetOption(self, configType, section, option, default=None, type=None, warn_on_default=True): """ Get an option value for given config type and given general configuration section/option or return a default. If type is specified, return as type. Firstly the user configuration is checked, with a fallback to the default configuration, and a final 'catch all' fallback to a useable passed-in default if the option isn't present in either the user or the default configuration. configType must be one of ('main','extensions','highlight','keys') If a default is returned, and warn_on_default is True, a warning is printed to stderr.
90f84922ee0de633ab9d552b2021789290573185 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/90f84922ee0de633ab9d552b2021789290573185/configHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1895, 12, 2890, 16, 642, 559, 16, 2442, 16, 1456, 16, 805, 33, 7036, 16, 618, 33, 7036, 16, 1894, 67, 265, 67, 1886, 33, 5510, 16, 1831, 33, 8381, 4672, 3536, 968, 392, 1456, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1895, 12, 2890, 16, 642, 559, 16, 2442, 16, 1456, 16, 805, 33, 7036, 16, 618, 33, 7036, 16, 1894, 67, 265, 67, 1886, 33, 5510, 16, 1831, 33, 8381, 4672, 3536, 968, 392, 1456, ...
pass
pass
def skip(self): pass
431abce81b1b7efa73d05b4568d2c66331697ab9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/431abce81b1b7efa73d05b4568d2c66331697ab9/modifyMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2488, 12, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2488, 12, 2890, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def __init__(self, allow_none, encoding):
def __init__(self, allow_none=False, encoding=None):
def __init__(self, allow_none, encoding): self.funcs = {} self.instance = None self.allow_none = allow_none self.encoding = encoding
e73ad950b32e1b0212c8e10fe64c89d8d394c898 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/e73ad950b32e1b0212c8e10fe64c89d8d394c898/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1699, 67, 6102, 33, 8381, 16, 2688, 33, 7036, 4672, 365, 18, 17728, 273, 2618, 365, 18, 1336, 273, 599, 365, 18, 5965, 67, 6102, 273, 1699, 67, 6102, 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, 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, 1699, 67, 6102, 33, 8381, 16, 2688, 33, 7036, 4672, 365, 18, 17728, 273, 2618, 365, 18, 1336, 273, 599, 365, 18, 5965, 67, 6102, 273, 1699, 67, 6102, 3...
self.setName(name)
self.setName(name)
def __init__(self, obj=None, name=None): """ Be aware that 1-st param is an obj not a name!!!! obj can me a string with XML representation or with filename also obj can be a Workflow or ParameterCollections """ AttributeCollection.__init__(self) if (obj == None) or isinstance(obj, ParameterCollection): self.setName('notgiven') self.setType('') self.setDescrShort('') self.setDescription('') self.setOrigin('') self.setVersion(0.0) self.parameters = ParameterCollection(obj) self.step_instances = InstancesPool(self) self.step_definitions = DefinitionsPool(self) self.module_definitions = DefinitionsPool(self)
82368aebf4e370eb056f43fc7b64e66001999526 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/82368aebf4e370eb056f43fc7b64e66001999526/Workflow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1081, 33, 7036, 16, 508, 33, 7036, 4672, 3536, 4823, 18999, 716, 404, 17, 334, 579, 353, 392, 1081, 486, 279, 508, 23045, 1081, 848, 1791, 279, 533, 598,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1081, 33, 7036, 16, 508, 33, 7036, 4672, 3536, 4823, 18999, 716, 404, 17, 334, 579, 353, 392, 1081, 486, 279, 508, 23045, 1081, 848, 1791, 279, 533, 598,...
g.add_vertex( "%s-%s-hw-%s"%(agency_namespace,stop_id, trip_id) ) g.add_edge( "%s-%s-hw-%s"%(agency_namespace,stop_id, trip_id), stop_id, ha )
g.add_vertex( "hwv-%s-%s-%s"%(agency_namespace,stop_id, trip_id) ) g.add_edge( "hwv-%s-%s-%s"%(agency_namespace,stop_id, trip_id), "sta-%s"%stop_id, ha )
def load_gtfsdb_to_boardalight_graph(g, agency_namespace, gtfsdb, agency_id, service_ids, reporter=sys.stdout): # get graphserver.core.Timezone and graphserver.core.ServiceCalendars from gtfsdb for agency with given agency_id tz = Timezone.generate(gtfsdb.agency_timezone_name( agency_id )) sc = gtfsdb_to_service_calendar(gtfsdb, agency_id ) # enter station vertices for stop_id, stop_name, stop_lat, stop_lon in gtfsdb.stops(): g.add_vertex( stop_id ) # compile trip bundles from gtfsdb if reporter: reporter.write( "Compiling trip bundles...\n" ) bundles = gtfsdb.compile_trip_bundles(reporter=reporter) # load bundles to graph if reporter: reporter.write( "Loading trip bundles into graph...\n" ) n_bundles = len(bundles) for i, bundle in enumerate(bundles): if reporter and i%((n_bundles//100)+1)==0: reporter.write( "%d/%d trip bundles loaded\n"%(i, n_bundles) ) for service_id in service_ids: load_bundle_to_boardalight_graph(g, agency_namespace, bundle, service_id, sc, tz) # load headways if reporter: reporter.write( "Loading headways trips to graph...\n" ) for trip_id, start_time, end_time, headway_secs in gtfsdb.execute( "SELECT * FROM frequencies" ): service_id = list(gtfsdb.execute( "SELECT service_id FROM trips WHERE trip_id=?", (trip_id,) ))[0][0] service_id = service_id.encode('utf-8') hb = HeadwayBoard( service_id, sc, tz, 0, trip_id.encode('utf-8'), start_time, end_time, headway_secs ) ha = HeadwayAlight( service_id, sc, tz, 0, trip_id.encode('utf-8'), start_time, end_time, headway_secs ) stoptimes = list(gtfsdb.execute( "SELECT * FROM stop_times WHERE trip_id=? ORDER BY stop_sequence", (trip_id,)) ) #add board edges for trip_id, arrival_time, departure_time, stop_id, stop_sequence, stop_dist_traveled in stoptimes[:-1]: g.add_vertex( "%s-%s-hw-%s"%(agency_namespace,stop_id, trip_id) ) g.add_edge( stop_id, "%s-%s-hw-%s"%(agency_namespace,stop_id, trip_id), hb ) #add alight edges for trip_id, arrival_time, departure_time, stop_id, stop_sequence, stop_dist_traveled in stoptimes[1:]: g.add_vertex( "%s-%s-hw-%s"%(agency_namespace,stop_id, trip_id) ) g.add_edge( "%s-%s-hw-%s"%(agency_namespace,stop_id, trip_id), stop_id, ha ) print ha #add crossing edges for (trip_id1, arrival_time1, departure_time1, stop_id1, stop_sequence1, stop_dist_traveled1), (trip_id2, arrival_time2, departure_time2, stop_id2, stop_sequence2,stop_dist_traveled2) in cons(stoptimes): g.add_edge( "%s-%s-hw-%s"%(agency_namespace,stop_id1, trip_id1), "%s-hw-%s"%(stop_id2, trip_id2), Crossing(arrival_time2-departure_time1) ) # load connections if reporter: reporter.write( "Loading connections to graph...\n" ) for stop_id1, stop_id2, conn_type, distance in gtfsdb.execute( "SELECT * FROM connections" ): g.add_edge( stop_id1, stop_id2, Street( conn_type, distance ) ) g.add_edge( stop_id2, stop_id1, Street( conn_type, distance ) )
06c546e70e25fa3067e1a5638a10976c8034901b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10974/06c546e70e25fa3067e1a5638a10976c8034901b/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 4521, 2556, 1966, 67, 869, 67, 3752, 287, 750, 67, 4660, 12, 75, 16, 1737, 2075, 67, 4937, 16, 9879, 2556, 1966, 16, 1737, 2075, 67, 350, 16, 1156, 67, 2232, 16, 11528, 33,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 4521, 2556, 1966, 67, 869, 67, 3752, 287, 750, 67, 4660, 12, 75, 16, 1737, 2075, 67, 4937, 16, 9879, 2556, 1966, 16, 1737, 2075, 67, 350, 16, 1156, 67, 2232, 16, 11528, 33,...
cty.c_double, cty.c_int],
cty.c_double, cty.c_int],
def fl_set_xyplot_fixed_yaxis(obj, bm, tm): """ fl_set_xyplot_fixed_yaxis(obj, bm, tm) """ _fl_set_xyplot_fixed_yaxis(obj, bm, tm)
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, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 2603, 16, 18829, 16, 6118, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 2603, 16, 18829, 16, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 2603, 16, 18829, 16, 6118, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 12429, 67, 93, 4890, 12, 2603, 16, 18829, 16, 61...
dnaStrand = c.parent_node_of_class(self.win.assy.DnaStrand) if dnaStrand: chunkList.append(dnaStrand)
dnaStrandOrSegment = c.parent_node_of_class( self.win.assy.DnaStrandOrSegment) if dnaStrandOrSegment: chunkList.append(dnaStrandOrSegment)
def _get_objects_to_highlight(self, selobj, hiColor1, hiColor2): """ Returns a python dictionary with objects to be drawn highlighted as its keys and highlight color as their corresponding values. The object to be highlighted is determined based the current graphics mode using the glpane.selobj. The subclasses can override this method to return objects to be highlighted in that particular graphics mode. @param selobj: GLPane.selobj (object under cursoe which can be registered as a GLPane.selobj @param hiColor1 : highlight color 1 @paramhiColor2: alternative highlight color. Example: If there are two chunks that need to be highlighted, one chunk gets hiColor1 and other gets hiColor2. @TODO: - may be hiColors should be in a list to make it more general @return: dictionary of objects to be highlighted. @rtype: dict @see: self._is_dnaGroup_highlighting_enabled() @see: self.drawHighlightedChunk() @see : self.drawHighlightedObjectUnderMouse()
9b62a45032a66e2bb994ed6192351ad80ddd1d98 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/9b62a45032a66e2bb994ed6192351ad80ddd1d98/SelectChunks_GraphicsMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 6911, 67, 869, 67, 15978, 12, 2890, 16, 357, 2603, 16, 10118, 2957, 21, 16, 10118, 2957, 22, 4672, 3536, 2860, 279, 5790, 3880, 598, 2184, 358, 506, 19377, 24375, 487, 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, 389, 588, 67, 6911, 67, 869, 67, 15978, 12, 2890, 16, 357, 2603, 16, 10118, 2957, 21, 16, 10118, 2957, 22, 4672, 3536, 2860, 279, 5790, 3880, 598, 2184, 358, 506, 19377, 24375, 487, 20...
selector = '--patches' revtag = escape(changeset.revision)
selector = '--match' revtag = 'date "%s" && author "%s" && exact "%s"' % ( changeset.date.strftime("%a %b %d %H:%M:%S UTC %Y"), changeset.author, changeset.revision)
def _applyChangeset(self, root, changeset, logger=None): """ Do the actual work of applying the changeset to the working copy. """
8a696f6b93c00827992825ff9b3cd7897b83bfa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/8a696f6b93c00827992825ff9b3cd7897b83bfa9/darcs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 29743, 12, 2890, 16, 1365, 16, 22463, 16, 1194, 33, 7036, 4672, 3536, 2256, 326, 3214, 1440, 434, 13650, 326, 22463, 358, 326, 5960, 1610, 18, 3536, 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, 9010, 29743, 12, 2890, 16, 1365, 16, 22463, 16, 1194, 33, 7036, 4672, 3536, 2256, 326, 3214, 1440, 434, 13650, 326, 22463, 358, 326, 5960, 1610, 18, 3536, 2, -100, -100, -100, -100,...
os.system("cd " + prefix + "/seattle_repy/ && ./install.sh")
os.system("cd " + prefix + "/seattle/ && ./install.sh")
def download_and_install(): """ <Purpose> Downloads and installs Seattle <Arguments> None. <Exceptions> None. <Side Effects> Downloads a .tgz file. Unpacks it and installs Seattle (this modifies the user's crontab). <Returns> None. """ integrationtestlib.log("downloading distro for seattle_install_tester...") os.system("wget --no-check-certificate " + seattle_linux_url) integrationtestlib.log("unpacking...") os.system("tar -xzvf " + prefix + "/seattle_linux.tgz") integrationtestlib.log("installing...") os.system("cd " + prefix + "/seattle_repy/ && ./install.sh") return
80377a2a300302b324d15370a38fff27c5c22d28 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/80377a2a300302b324d15370a38fff27c5c22d28/downloadandinstallseattle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 464, 67, 5425, 13332, 3536, 411, 10262, 4150, 34, 13059, 87, 471, 31011, 3265, 4558, 298, 225, 411, 4628, 34, 599, 18, 225, 411, 11416, 34, 599, 18, 225, 411, 8895, 30755, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 67, 464, 67, 5425, 13332, 3536, 411, 10262, 4150, 34, 13059, 87, 471, 31011, 3265, 4558, 298, 225, 411, 4628, 34, 599, 18, 225, 411, 11416, 34, 599, 18, 225, 411, 8895, 30755, 87...
cont.cy = (c1.compute_y(1) + c2.compute_y(0)) / 2.0
cont.cy = (c0.compute_y(0) + c2.compute_y(0)) / 2.0
def tmpfn(): cont = GlyphContext() # Saved data from gui.py c0 = StraightLine(cont, 519, 622, 519, 399) c1 = StraightLine(cont, 519, 399, 442, 418) c2 = StraightLine(cont, 442, 318, 442, 539) c3 = StraightLine(cont, 442, 539, 519, 520) c0.weld_to(1, c1, 0, 1) c2.weld_to(1, c3, 0, 1) # End saved data cont.default_nib = (8, pi/2, 16, 16) cont.cy = (c1.compute_y(1) + c2.compute_y(0)) / 2.0 return cont
92d2b854da4856402a48d44f27cfdd84a45bc81d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7420/92d2b854da4856402a48d44f27cfdd84a45bc81d/glyphs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1853, 4293, 13332, 466, 273, 31572, 1042, 1435, 468, 348, 8158, 501, 628, 13238, 18, 2074, 276, 20, 273, 348, 2033, 750, 1670, 12, 1213, 16, 1381, 3657, 16, 1666, 3787, 16, 1381, 3657, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1853, 4293, 13332, 466, 273, 31572, 1042, 1435, 468, 348, 8158, 501, 628, 13238, 18, 2074, 276, 20, 273, 348, 2033, 750, 1670, 12, 1213, 16, 1381, 3657, 16, 1666, 3787, 16, 1381, 3657, ...
except SSL.WantWriteError:
except SSL.WantWriteError, err: wc.log.debug(wc.LOG_NET, '%s want write error %s', self, err)
def handle_read (self): """read data from SSL connection, put it into recv_buffer and call process_read""" assert self.connected wc.log.debug(wc.LOG_PROXY, '%s SslConnection.handle_read', self) if len(self.recv_buffer) > wc.proxy.Connection.MAX_BUFSIZE: wc.log.warn(wc.LOG_PROXY, '%s read buffer full', self) return try: data = self.socket.read(wc.proxy.Connection.RECV_BUFSIZE) except SSL.WantReadError: # you _are_ already reading, stupid return except SSL.WantWriteError: # you want to write? here you go self.handle_write() return except SSL.WantX509LookupError, err: wc.log.exception(wc.LOG_PROXY, "%s ssl read message", self) return except SSL.ZeroReturnError, err: wc.log.debug(wc.LOG_PROXY, "%s ssl finished successfully", self) self.delayed_close() return except SSL.Error, err: wc.log.exception(wc.LOG_PROXY, "read error %s", err) self.handle_error('read error') return if not data: # It's been closed, and handle_close has been called wc.log.debug(wc.LOG_PROXY, "%s closed, got empty data", self) return wc.log.debug(wc.LOG_NET, '%s <= read %d', self, len(data)) wc.log.debug(wc.LOG_NET, 'data %r', data) self.recv_buffer += data self.process_read()
2c6283b225556a48147643da0a0cb5f0a3536753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/2c6283b225556a48147643da0a0cb5f0a3536753/SslConnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 896, 261, 2890, 4672, 3536, 896, 501, 628, 7419, 1459, 16, 1378, 518, 1368, 10665, 67, 4106, 471, 745, 1207, 67, 896, 8395, 1815, 365, 18, 8537, 14310, 18, 1330, 18, 4148, 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, 1640, 67, 896, 261, 2890, 4672, 3536, 896, 501, 628, 7419, 1459, 16, 1378, 518, 1368, 10665, 67, 4106, 471, 745, 1207, 67, 896, 8395, 1815, 365, 18, 8537, 14310, 18, 1330, 18, 4148, 12...
if 'Host' in (headers or [k for k in headers.iterkeys() if k.lower() == "host"]):
if 'host' in [k.lower() for k in headers]:
def _send_request(self, method, url, body, headers): # If headers already contains a host header, then define the # optional skip_host argument to putrequest(). The check is # harder because field names are case insensitive. if 'Host' in (headers or [k for k in headers.iterkeys() if k.lower() == "host"]): self.putrequest(method, url, skip_host=1) else: self.putrequest(method, url)
2e7ba0cd42c70667cdcdf9a5b39e833ab2bfaa9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2e7ba0cd42c70667cdcdf9a5b39e833ab2bfaa9f/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 67, 2293, 12, 2890, 16, 707, 16, 880, 16, 1417, 16, 1607, 4672, 468, 971, 1607, 1818, 1914, 279, 1479, 1446, 16, 1508, 4426, 326, 468, 3129, 2488, 67, 2564, 1237, 358, 1378,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4661, 67, 2293, 12, 2890, 16, 707, 16, 880, 16, 1417, 16, 1607, 4672, 468, 971, 1607, 1818, 1914, 279, 1479, 1446, 16, 1508, 4426, 326, 468, 3129, 2488, 67, 2564, 1237, 358, 1378,...
fd, file_path = tempfile.mkstemp(suffix='.zip', prefix='file-')
fd, file_path = tempfile.mkstemp(suffix='.zip', prefix='file-downloads-')
def _MakeFile(self, size): """Make a file on-the-fly with the given size. Returns the path to the file. """ fd, file_path = tempfile.mkstemp(suffix='.zip', prefix='file-') os.lseek(fd, size, 0) os.write(fd, 'a') os.close(fd) return file_path
84e6824ab0c0b979c7f9eee493f1057cef419fa7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/84e6824ab0c0b979c7f9eee493f1057cef419fa7/downloads.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6464, 812, 12, 2890, 16, 963, 4672, 3536, 6464, 279, 585, 603, 17, 5787, 17, 29670, 598, 326, 864, 963, 18, 2860, 326, 589, 358, 326, 585, 18, 3536, 5194, 16, 585, 67, 803, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6464, 812, 12, 2890, 16, 963, 4672, 3536, 6464, 279, 585, 603, 17, 5787, 17, 29670, 598, 326, 864, 963, 18, 2860, 326, 589, 358, 326, 585, 18, 3536, 5194, 16, 585, 67, 803, 273,...
wikiInput = codecs.open(path, "r", "utf-8").read()
wikiInput = codecs.open(path, "rU", "utf-8").read()
def transform(path): wikiInput = codecs.open(path, "r", "utf-8").read() rstString = wikiMarkup.transformString(wikiInput) if len(rstString)>0: codecs.open(txtEnd.sub(".rst", path), "w", "utf-8").write(rstString)
11b85c52f7ad6cdd11fa20b560124b5af4df648c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/11b85c52f7ad6cdd11fa20b560124b5af4df648c/wiki2rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 12, 803, 4672, 9050, 1210, 273, 17437, 18, 3190, 12, 803, 16, 315, 86, 57, 3113, 315, 3158, 17, 28, 20387, 896, 1435, 13978, 780, 273, 9050, 13111, 18, 6547, 780, 12, 13044, 1210...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 12, 803, 4672, 9050, 1210, 273, 17437, 18, 3190, 12, 803, 16, 315, 86, 57, 3113, 315, 3158, 17, 28, 20387, 896, 1435, 13978, 780, 273, 9050, 13111, 18, 6547, 780, 12, 13044, 1210...
pygame.draw.rect(_screen(), color, rect2, width)
pygame.draw.rect(_screen(), color, rect2, width)
def rectangle(color, rect, width=0, **kwargs): '''\ Draws a rectangle. The optional width specifies the outline width. The rectangle is filled if this is 0. The keyword args may contain "center", which is a boolean that instructs pypixel to use the coordinate specified for the rectangle to be the center instead of the top left corner. The rect itself is a pair of pairs, specifiying a location and dimensions. ''' rect2 = pygame.Rect(*rect) if kwargs.get("center", False): rect2.center = rect[0] pygame.draw.rect(_screen(), color, rect2, width)
5c67d360ac7bf615d7ad656f3f9f968171d38294 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13059/5c67d360ac7bf615d7ad656f3f9f968171d38294/pypixel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11845, 12, 3266, 16, 4917, 16, 1835, 33, 20, 16, 2826, 4333, 4672, 875, 8314, 10184, 87, 279, 11845, 18, 1021, 3129, 1835, 11470, 326, 16363, 1835, 18, 1021, 11845, 353, 6300, 309, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11845, 12, 3266, 16, 4917, 16, 1835, 33, 20, 16, 2826, 4333, 4672, 875, 8314, 10184, 87, 279, 11845, 18, 1021, 3129, 1835, 11470, 326, 16363, 1835, 18, 1021, 11845, 353, 6300, 309, 333, ...
self.parent = None
self.parent = None
def save(self, outstream, format=SAVE_CPICKLE, proto=-1): """Save the state of this object and its children to the given output stream. Pure Python classes generally won't need to override this because the base class version will suffice, but Python extension classes will have to override. The format can be supplied in case something other than cPickle is needed.""" parent = self.parent self.parent = None # Don't want to save stuff above us. try: openmdao.util.save_load.save(self, outstream, format, proto, self._logger) except Exception, exc: self.raise_exception(str(exc), type(exc)) finally: self.parent = parent
8586d67f5d42158f614b7fc3ff6c91066cfdb680 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12610/8586d67f5d42158f614b7fc3ff6c91066cfdb680/container.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 596, 3256, 16, 740, 33, 25242, 67, 39, 1102, 3507, 900, 16, 3760, 29711, 21, 4672, 3536, 4755, 326, 919, 434, 333, 733, 471, 2097, 2325, 358, 326, 864, 876, 1407, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 596, 3256, 16, 740, 33, 25242, 67, 39, 1102, 3507, 900, 16, 3760, 29711, 21, 4672, 3536, 4755, 326, 919, 434, 333, 733, 471, 2097, 2325, 358, 326, 864, 876, 1407, ...