rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
help=_('Export phone book to all specified locations'), callback=_cb_cmd_opt),
help=_('export phone book to all specified locations'), callback=_cb_cmd_opt, metavar='targets'),
def _get_cmd_function(self, arg): """Returns the function for `arg`""" if arg.startswith('--'): # strip of the first to shlashes name = '_cmd_%s' % arg[2:] # and replace remaining slashes with underscores name = name.replace('-', '_') function = getattr(self, name) return function
4a1b0e39c0e8f9263a36e8e53943e18224245734 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/4a1b0e39c0e8f9263a36e8e53943e18224245734/tel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4172, 67, 915, 12, 2890, 16, 1501, 4672, 3536, 1356, 326, 445, 364, 1375, 3175, 68, 8395, 309, 1501, 18, 17514, 1918, 2668, 413, 11, 4672, 468, 2569, 434, 326, 1122, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4172, 67, 915, 12, 2890, 16, 1501, 4672, 3536, 1356, 326, 445, 364, 1375, 3175, 68, 8395, 309, 1501, 18, 17514, 1918, 2668, 413, 11, 4672, 468, 2569, 434, 326, 1122, 358,...
raise ValueError('No induced copy of the graph exists') return self.subgraph(H) def subgraph_search(self, G): r""" Returns an of `G` included in self. INPUT: - ``G`` -- the graph whose copy we are looking for in ``self`` ALGORITHM: Brute-force EXAMPLES: A Petersen Graph contains a `P_5` :: sage: g = graphs.PetersenGraph() sage: h1 = g.subgraph_search(graphs.PathGraph(5)) sage: h1 Subgraph of (Petersen graph): Graph on 5 vertices sage: h1.vertices() [0, 1, 2, 3, 4] It also contains a Claw (`K_{1,3}`):: sage: h2 = g.subgraph_search(graphs.ClawGraph()) sage: h2 Subgraph of (Petersen graph): Graph on 4 vertices sage: h2.vertices() [0, 1, 4, 5] However, as it contains no subgraph isomorphic to `K_3`, an exception is raised in this case :: sage: g.subgraph_search(graphs.CompleteGraph(3)) Traceback (most recent call last): ... ValueError: No copy of the graph exists """ from sage.graphs.generic_graph_pyx import subgraph_search H = subgraph_search(self, G) if H == []: raise ValueError('No copy of the graph exists')
return None
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self.
ff7673c4297965681e16ef36d204d5f5d4c2273d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ff7673c4297965681e16ef36d204d5f5d4c2273d/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1547, 26372, 67, 1717, 4660, 67, 3072, 12, 2890, 16, 611, 4672, 436, 8395, 2860, 392, 1547, 26372, 1610, 434, 1375, 43, 68, 316, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 1547, 26372, 67, 1717, 4660, 67, 3072, 12, 2890, 16, 611, 4672, 436, 8395, 2860, 392, 1547, 26372, 1610, 434, 1375, 43, 68, 316, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
colspan += 2
def show_view(view, show_heading = False, show_buttons = True, show_footer = True): # Parse display options display_options = html.var("display_options", "") # assume all missing options as active (upper case) for c in "HTBFCEOZRSIX": if c not in display_options and c.lower() not in display_options: display_options += c html.display_options = display_options # [1] Datasource datasource = multisite_datasources[view["datasource"]] tablename = datasource["table"] # [2] Layout layout = multisite_layouts[view["layout"]] # User can override the layout settings via HTML variables (buttons) # which are safed persistently. This is known as "view options" vo = view_options(view["name"]) num_columns = vo.get("num_columns", view.get("num_columns", 1)) browser_reload = vo.get("refresh", view.get("browser_reload", None)) if browser_reload and 'R' in display_options: html.set_browser_reload(browser_reload) # [3] Filters show_filters = [ multisite_filters[fn] for fn in view["show_filters"] ] hide_filters = [ multisite_filters[fn] for fn in view["hide_filters"] ] hard_filters = [ multisite_filters[fn] for fn in view["hard_filters"] ] for varname, value in view["hard_filtervars"]: # shown filters are set, if form is fresh and variable not supplied in URL if not html.var("filled_in") and not html.has_var(varname): html.set_var(varname, value) filterheaders = "" only_sites = None for filt in show_filters + hide_filters + hard_filters: header = filt.filter(tablename) if header.startswith("Sites:"): only_sites = header.strip().split(" ")[1:] else: filterheaders += header query = filterheaders + view.get("add_headers", "") # [4] Sorting sorters = [ (multisite_sorters[sn], reverse) for sn, reverse in view["sorters"] ] # [5] Grouping group_painters = [ (multisite_painters[n], v) for n, v in view["group_painters"] ] # [6] Columns painters = [ (multisite_painters[n], v) for n, v in view["painters"] ] # Now compute this list of all columns we need to query via Livestatus. # Those are: (1) columns used by the sorters in use, (2) columns use by # column- and group-painters in use and - note - (3) columns used to # satisfy external references (filters) of views we link to. The last bit # is the trickiest. Also compute this list of view options use by the # painters columns = [] painter_options = [] for s, r in sorters: columns += s["columns"] for p, v in (group_painters + painters): columns += p["columns"] painter_options += p.get("options", []) if v: linkview = html.available_views.get(v) if linkview: for ef in linkview["hide_filters"]: f = multisite_filters[ef] columns += f.link_columns painter_options = list(set(painter_options)) painter_options.sort() # Add key columns, needed for executing commands columns += datasource["keys"] # Make column list unique and remove (implicit) site column colset = set(columns) if "site" in colset: colset.remove("site") columns = list(colset) # Fetch data. Some views show data only after pressing [Search] if (not view["mustsearch"]) or html.var("search"): # names for additional columns (through Stats: headers) add_columns = datasource.get("add_columns", []) columns, rows = query_data(datasource, columns, add_columns, query, only_sites, get_limit()) sort_data(rows, sorters) else: columns, rows = [], [] # html.write("<pre>%s</pre>" % pprint.pformat((columns, rows))) # Show heading (change between "preview" mode and full page mode) if show_heading: # Show/Hide the header with page title, MK logo, etc. if 'H' in display_options: html.body_start(view_title(view)) if 'T' in display_options: html.top_heading(view_title(view)) has_done_actions = False if show_buttons and 'B' in display_options: show_context_links(view, hide_filters) need_navi = show_buttons and ('F' in display_options or 'C' in display_options or 'O' in display_options or 'E' in display_options) if need_navi: html.write("<table class=navi><tr>\n") colspan = 0 # Filter-button if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): filter_isopen = html.var("search", "") == "" and view["mustsearch"] toggle_button("table_filter", filter_isopen, "Filter", ["filter"]) html.write("<td class=minigap></td>\n") colspan += 2 # Command-button if 'C' in display_options and len(rows) > 0 and config.may("act") and not html.do_actions(): toggle_button("table_actions", False, "Commands") html.write("<td class=minigap></td>\n") colspan += 2 # Painter-Options if len(painter_options) > 0 and config.may("painter_options"): toggle_button("painter_options", False, "Display") html.write("<td class=minigap></td>\n") colspan += 2 # Buttons for view options if 'O' in display_options: if config.user_may(config.user, "view_option_columns"): for col in config.view_option_columns: uri = html.makeuri([("num_columns", col)]) if col == num_columns: addclass = " selected" else: addclass = "" html.write('<td class="left w30%s"><a href="%s">%s</a></td>\n' % (addclass, uri, col)) html.write("<td class=minigap></td>\n") colspan += 2 if 'R' in display_options and config.user_may(config.user, "view_option_refresh"): for ref in config.view_option_refreshes: uri = html.makeuri([("refresh", ref)]) if ref == browser_reload or (not ref and not browser_reload): addclass = " selected" else: addclass = "" if ref: reftext = "%d s" % ref else: reftext = "&#8734;" html.write('<td class="left w40%s"><a href="%s">%s</a></td>\n' % (addclass, uri, reftext)) html.write("<td class=minigap></td>\n") colspan += 2 html.write("<td class=gap></td>\n") colspan += 1 # Customize/Edit view button if 'E' in display_options and config.may("edit_views"): backurl = htmllib.urlencode(html.makeuri([])) html.write('<td class="right" onmouseover="hover_tab(this);" onmouseout="unhover_tab(this);">') if view["owner"] == html.req.user: html.write('<a href="edit_view.py?load_view=%s&back=%s">Edit</a>\n' % (view["name"], backurl)) else: html.write('<a href="edit_view.py?clonefrom=%s&load_view=%s&back=%s">Edit</a>\n' % (view["owner"], view["name"], backurl)) html.write('</td>') colspan += 1 html.write("</tr>") # Filter form if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): show_filter_form(filter_isopen, show_filters, colspan) # Actions if 'C' in display_options and len(rows) > 0: if html.do_actions() and html.transaction_valid(): # submit button pressed, no reload try: html.write("<tr class=form><td class=whiteborder colspan=%d>" % colspan) # Create URI with all actions variables removed backurl = html.makeuri([]) has_done_actions = do_actions(datasource["infos"][0], rows, backurl) html.write("</td></tr>") except MKUserError, e: html.show_error(e.message) html.write("</td></tr>") html.add_user_error(e.varname, e.message) show_action_form(True, datasource, colspan) else: show_action_form(False, datasource, colspan) if 'O' in display_options and len(painter_options) > 0 and config.may("painter_options"): show_painter_options(painter_options, colspan) # Ende des Bereichs mit den Tabs html.write("</table>\n") # class=navi if not has_done_actions: # Limit exceeded? Show warning count = len(rows) limit = get_limit() if limit != None and count == limit + 1: text = "Your query produced more then %d results. " % limit if html.var("limit", "soft") == "soft" and config.may("ignore_soft_limit"): text += '<a href="%s">Repeat query and allow more results.</a>' % html.makeuri([("limit", "hard")]) elif html.var("limit") == "hard" and config.may("ignore_hard_limit"): text += '<a href="%s">Repeat query without limit.</a>' % html.makeuri([("limit", "none")]) html.show_warning(text) del rows[-1] layout["render"]((columns, rows), view, group_painters, painters, num_columns) # Play alarm sounds, if critical events have been displayed if 'S' in display_options and view.get("play_sounds"): play_alarm_sounds() # In multi site setups error messages of single sites do not block the # output and raise now exception. We simply print error messages here: if config.show_livestatus_errors: for sitename, info in html.live.deadsites.items(): html.show_error("<b>%s - Livestatus error</b><br>%s" % (info["site"]["alias"], info["exception"])) if show_footer: html.bottom_focuscode() if 'Z' in display_options: html.bottom_footer() if 'H' in display_options: html.body_end()
5988dc68b2c4439ac451c483e6643ca4800ad36f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/5988dc68b2c4439ac451c483e6643ca4800ad36f/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
libraries = ['gmp', 'm', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx'],
libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp'],
def is_older(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
f85b3c20d444daeecb1bac8b89bd81c099632242 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f85b3c20d444daeecb1bac8b89bd81c099632242/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1498, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16, 3712...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1498, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16, 3712...
bgQueue.task_done() except: log.error("bgThread.run", exc_info=True)
except: log.error("Error running function from queue", exc_info=True) bgQueue.task_done()
def run(self): global isSpeaking try: while True: func, args, kwargs = bgQueue.get() if not func: break func(*args, **kwargs) bgQueue.task_done() except: log.error("bgThread.run", exc_info=True)
8f1240fcc241e6f03d5ecbbb43334299398a61c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/8f1240fcc241e6f03d5ecbbb43334299398a61c6/_espeak.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2552, 11604, 347, 6159, 775, 30, 1323, 1053, 30, 1326, 16, 833, 16, 1205, 273, 7611, 3183, 18, 588, 1435, 309, 486, 1326, 30, 898, 1326, 30857, 1968, 16, 2826, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 2552, 11604, 347, 6159, 775, 30, 1323, 1053, 30, 1326, 16, 833, 16, 1205, 273, 7611, 3183, 18, 588, 1435, 309, 486, 1326, 30, 898, 1326, 30857, 1968, 16, 2826, 43...
if values['rate'] == round(1/values['factor'], 6) or \ values['factor'] == round(1/values['rate'], 6):
if values['rate'] == round(1.0/values['factor'], 6) or \ values['factor'] == round(1.0/values['rate'], 6):
def check_factor_and_rate(values): factor = None rate = None
4df7058a1bfea50026f1f02f1638f1b380528843 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/533/4df7058a1bfea50026f1f02f1638f1b380528843/uom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 6812, 67, 464, 67, 5141, 12, 2372, 4672, 5578, 273, 599, 4993, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 6812, 67, 464, 67, 5141, 12, 2372, 4672, 5578, 273, 599, 4993, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.output.write(' <PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>\n' % ';'.join(options.defines))
self.output.write(' <PrecompiledHeaderFile>%s</PrecompiledHeaderFile>\n' % opts.pchstop) self.output.write(' <PrecompiledHeader>Use</PrecompiledHeader>\n') self.output.write(' <PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>\n' % ';'.join(opts.defines))
def writeHeader(self, configs, platforms, options): self.filters.write('<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n') self.output.write('<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\n') self.output.write(' <ItemGroup Label="ProjectConfigurations">\n') for platform in platforms: for config in configs: self.output.write(' <ProjectConfiguration Include="%s|%s">\n' % (config, platform)) self.output.write(' <Configuration>%s</Configuration>\n' % config) self.output.write(' <Platform>%s</Platform>\n' % platform) self.output.write(' </ProjectConfiguration>\n') self.output.write(' </ItemGroup>\n') self.output.write(' <PropertyGroup Label="Globals">\n') self.output.write(' <ProjectGUID>%s</ProjectGUID>\n' % solution.generateGUID(self.targetName, self.name)) self.output.write(' <TargetFrameworkVersion>v%s</TargetFrameworkVersion>\n' % self.versionNumber) self.output.write(' <RootNamespace>%s</RootNamespace>\n' % self.name) self.output.write(' </PropertyGroup>\n') self.output.write(' <Import Project="$(VCTargetsPath)\\Microsoft.Cpp.Default.props" />\n') self.output.write(' <ImportGroup Label="PropertySheets">\n') self.output.write(' <Import Project="$(SolutionDir)\\mak\\msvc\\%s\\%s.props" />\n' % (self.versionName, self.type)) self.output.write(' </ImportGroup>\n') for platform in platforms: self.output.write(' <ImportGroup Label="PropertySheets" Condition="\'$(Platform)\'==\'%s\'">\n' % platform) self.output.write(' <Import Project="$(SolutionDir)\\mak\\msvc\\%s\\%s.props" />\n' % (self.versionName, platform)) self.output.write(' </ImportGroup>\n') for config in configs: self.output.write(' <ImportGroup Label="PropertySheets" Condition="\'$(Configuration)\'==\'%s\'">\n' % config) self.output.write(' <Import Project="$(SolutionDir)\\mak\\msvc\\%s\\%s.props" />\n' % (self.versionName, config)) self.output.write(' </ImportGroup>\n') for platform in platforms: for config in configs: self.output.write(' <PropertyGroup Condition="\'$(Configuration)|$(Platform)\'==\'%s|%s\'" Label="Configuration">\n' % (config,platform)) self.output.write(' <ConfigurationType>%s</ConfigurationType>\n' % self.projectType) self.output.write(' <TargetName>%s</TargetName>\n' % self.name) self.output.write(' </PropertyGroup>\n') self.output.write(' <Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props" />\n') for (platform, pname, options) in options: includedirs = ';'.join([os.path.join('$(SolutionDir)', i) for i in options.includedir]) libdirs = ';'.join([os.path.join('$(SolutionDir)', i) for i in options.libdir]) self.output.write(' <ItemDefinitionGroup Condition="\'$(Platform)\'==\'%s\'">\n' % (pname)) self.output.write(' <ClCompile>\n') self.output.write(' <PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>\n' % ';'.join(options.defines)) self.output.write(' <AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n' % includedirs) if self.category == '3rdparty': self.output.write(' <WarningLevel>Level1</WarningLevel>\n') self.output.write(' </ClCompile>\n') self.output.write(' <ResourceCompile>\n') self.output.write(' <AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n' % includedirs) self.output.write(' </ResourceCompile>\n') self.output.write(' <Link>\n') self.output.write(' <AdditionalDependencies>%s;%%(AdditionalDependencies)</AdditionalDependencies>\n' % libdirs) self.output.write(' <AdditionalLibraryDirectories>%s;%%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n' % ';'.join(options.libdir)) self.output.write(' </Link>\n') self.output.write(' </ItemDefinitionGroup>\n')
bcad441a1399bf9973c565f83071e8ffd1ca488d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7302/bcad441a1399bf9973c565f83071e8ffd1ca488d/vcxproj.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 1864, 12, 2890, 16, 6784, 16, 17422, 16, 702, 4672, 365, 18, 6348, 18, 2626, 2668, 32, 4109, 19089, 1444, 1546, 24, 18, 20, 6, 12302, 1546, 2505, 2207, 17928, 18, 27739, 18, 832,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1864, 12, 2890, 16, 6784, 16, 17422, 16, 702, 4672, 365, 18, 6348, 18, 2626, 2668, 32, 4109, 19089, 1444, 1546, 24, 18, 20, 6, 12302, 1546, 2505, 2207, 17928, 18, 27739, 18, 832,...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 909) else quickfix.StringField.__init__(self, 909, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 5908, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 5908, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
def getSiteSummary(self):
def getSiteSummary( self ):
def getSiteSummary(self): """ Get the summary of jobs in a given status on all the sites """
99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11021, 4733, 12, 365, 262, 30, 3536, 968, 326, 4916, 434, 6550, 316, 279, 864, 1267, 603, 777, 326, 9180, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11021, 4733, 12, 365, 262, 30, 3536, 968, 326, 4916, 434, 6550, 316, 279, 864, 1267, 603, 777, 326, 9180, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
dbg ('VSGConf: Profile requested is: "%s"'%profile) if not profile: profile = self.client.get_string (self._gt_dir + '/global/default_profile') dbg ('VSGConf: Profile bet on is: "%s"'%profile)
dbg ('VSGConf: Profile bet on is: "%s"'%profileName)
def __init__ (self, profile = None): self.type = "GConf" self.inactive = False
5e03ca7695dc4034e542618c10a640838ebb6cfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6502/5e03ca7695dc4034e542618c10a640838ebb6cfc/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 3042, 273, 599, 4672, 365, 18, 723, 273, 315, 43, 3976, 6, 365, 18, 27366, 273, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 261, 2890, 16, 3042, 273, 599, 4672, 365, 18, 723, 273, 315, 43, 3976, 6, 365, 18, 27366, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sage: magma.set_verbose("Groebner", 2) sage: magma.get_verbose("Groebner")
sage: magma.set_verbose("Groebner", 2) sage: magma.get_verbose("Groebner")
def get_verbose(self, type): """ Get the verbosity level of a given algorithm class etc. in Magma.
04917fdfb19c54d3ca3aa421b8fa4cc30257acef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/04917fdfb19c54d3ca3aa421b8fa4cc30257acef/magma.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11369, 12, 2890, 16, 618, 4672, 3536, 968, 326, 11561, 1801, 434, 279, 864, 4886, 667, 5527, 18, 316, 490, 9454, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11369, 12, 2890, 16, 618, 4672, 3536, 968, 326, 11561, 1801, 434, 279, 864, 4886, 667, 5527, 18, 316, 490, 9454, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
tokens = library.replace_placeholders(pd['tokens'][:],pd) str = re.escape(' '.join([token[0] for token in tokens]))
str = re.escape(' '.join([token[1] for token in pd]))
def analyze(pfile_pk, filename, agent_pk, model, db): pfile = -1 try: pfile = int(pfile_pk) except ValueError: print >> sys.stdout, 'ERROR: Provided pfile_pk is not a number: %r' % line return -1 path = libfosspython.repMkPath('files', filename) if (not os.path.exists(path)): print >> sys.stdout, 'ERROR: File not found. path=%s' % (path) return -1 offsets = library.label_file(path,model) text = open(path).read() if len(offsets) == 0: sql = """INSERT INTO copyright (agent_fk, pfile_fk, copy_startbyte, copy_endbyte, content, hash, type) VALUES (%d, %d, NULL, NULL, NULL, NULL, 'statement')""" % (agent_pk, pfile) result = db.access(sql) if result != 0: print >> sys.stdout, "ERROR: DB Access error, returned %d.\nERROR: DB STATUS: %s\nERROR: DB ERRMSG: %s\nERROR: sql=%s" % (result, db.status(), db.errmsg(), sql) return -1 else: for i in range(len(offsets)): str = text[offsets[i][0]:offsets[i][1]] if type(str) == type(u''): # we have a unicode object str = str.decode('ascii', 'ignore') pd = library.parsetext(str) tokens = library.replace_placeholders(pd['tokens'][:],pd) str = re.escape(' '.join([token[0] for token in tokens])) sql = """INSERT INTO copyright (agent_fk, pfile_fk, copy_startbyte, copy_endbyte, content, hash, type) VALUES (%d, %d, %d, %d, E'%s', E'%s', '%s')""" % (agent_pk, pfile, offsets[i][0], offsets[i][1], str, hex(abs(hash(str))), offsets[i][2]) result = db.access(sql) if result != 0: print >> sys.stdout, "ERROR: DB Access error, returned %d.\nERROR: DB STATUS: %s\nERROR: DB ERRMSG: %s\nERROR: sql=%s" % (result, db.status(), db.errmsg(), sql) return -1 return 0
eb0bd9e27421d1e1edced951a5b25aa6d61560f6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6959/eb0bd9e27421d1e1edced951a5b25aa6d61560f6/copyright.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 12, 84, 768, 67, 5465, 16, 1544, 16, 4040, 67, 5465, 16, 938, 16, 1319, 4672, 293, 768, 273, 300, 21, 775, 30, 293, 768, 273, 509, 12, 84, 768, 67, 5465, 13, 1335, 2068, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12375, 12, 84, 768, 67, 5465, 16, 1544, 16, 4040, 67, 5465, 16, 938, 16, 1319, 4672, 293, 768, 273, 300, 21, 775, 30, 293, 768, 273, 509, 12, 84, 768, 67, 5465, 13, 1335, 2068, 30,...
pref_dna_segment_resize_without_recreating_duplex()
def __init__(self, commandSequencer, struct = None): """ Constructor for DnaDuplex_EditCommand """
90d44b80bee2c8bc79011f1c677cd0e594345683 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/90d44b80bee2c8bc79011f1c677cd0e594345683/DnaSegment_EditCommand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1296, 1761, 372, 23568, 16, 1958, 273, 599, 4672, 3536, 11417, 364, 463, 6582, 40, 2268, 92, 67, 4666, 2189, 3536, 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, 1296, 1761, 372, 23568, 16, 1958, 273, 599, 4672, 3536, 11417, 364, 463, 6582, 40, 2268, 92, 67, 4666, 2189, 3536, 2, -100, -100, -100, -100, -100, -100, ...
print entry
def testConvertExampleXML(self): try: entry = atom.CreateClassFromXMLString(atom.Entry, test_data.GBASE_STRING_ENCODING_ENTRY) print entry except UnicodeDecodeError: self.fail('Error when converting XML')
f23cb3930b33fd0acfd33d7a36feecadf9c51c8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5609/f23cb3930b33fd0acfd33d7a36feecadf9c51c8a/atom_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2723, 10908, 4201, 12, 2890, 4672, 775, 30, 1241, 273, 3179, 18, 1684, 797, 1265, 4201, 780, 12, 7466, 18, 1622, 16, 1842, 67, 892, 18, 5887, 4429, 67, 5804, 67, 14672, 67, 19083...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2723, 10908, 4201, 12, 2890, 4672, 775, 30, 1241, 273, 3179, 18, 1684, 797, 1265, 4201, 780, 12, 7466, 18, 1622, 16, 1842, 67, 892, 18, 5887, 4429, 67, 5804, 67, 14672, 67, 19083...
self.tree.openElements.pop() self.parser.resetInsertionMode() else: assert self.parser.innerHTML
self.parser.resetInsertionMode() else: assert self.parser.innerHTML self.parser.parseError() def endTagIgnore(self, token): self.parser.parseError("unexpected-end-tag", {"name": token["name"]}) def endTagOther(self, token): self.parser.parseError("unexpected-end-tag-implies-table-voodoo", {"name": token["name"]}) self.tree.insertFromTable = True self.parser.phases["inBody"].processEndTag(token) self.tree.insertFromTable = False class InTableTextPhase(Phase): def __init__(self, parser, tree): Phase.__init__(self, parser, tree) self.originalPhase = None self.characterTokens = [] def flushCharacters(self): data = "".join([item["data"] for item in self.characterTokens]) if any([item not in spaceCharacters for item in data]): token = {"type":tokenTypes["Characters"], "data":data} self.originalPhase.processCharacters(token) elif data: self.tree.insertText(data) self.characterTokens = [] def processComment(self, token): self.flushCharacters() self.phase = self.originalPhase self.phase.processComment(token) def processEOF(self): self.flushCharacters() self.phase = self.originalPhase self.phase.processEOF() def processCharacters(self, token): self.characterTokens.append(token) def processSpaceCharacters(self, token): self.characterTokens.append(token) def processStartTag(self, token): self.flushCharacters() self.phase = self.originalPhase self.phase.processStartTag(token) def processEndTag(self, token): self.flushCharacters() self.phase = self.originalPhase self.phase.processEndTag(token) class InCaptionPhase(Phase): def __init__(self, parser, tree): Phase.__init__(self, parser, tree) self.startTagHandler = utils.MethodDispatcher([ ("html", self.startTagHtml), (("caption", "col", "colgroup", "tbody", "td", "tfoot", "th", "thead", "tr"), self.startTagTableElement) ]) self.startTagHandler.default = self.startTagOther self.endTagHandler = utils.MethodDispatcher([ ("caption", self.endTagCaption), ("table", self.endTagTable), (("body", "col", "colgroup", "html", "tbody", "td", "tfoot", "th", "thead", "tr"), self.endTagIgnore) ]) self.endTagHandler.default = self.endTagOther def ignoreEndTagCaption(self): return not self.tree.elementInScope("caption", variant="table") def processEOF(self): self.parser.phases["inBody"].processEOF() def processCharacters(self, token): self.parser.phases["inBody"].processCharacters(token) def startTagTableElement(self, token):
def endTagTable(self, token): if self.tree.elementInScope("table", variant="table"): self.tree.generateImpliedEndTags() if self.tree.openElements[-1].name != "table": self.parser.parseError("end-tag-too-early-named", {"gotName": "table", "expectedName": self.tree.openElements[-1].name}) while self.tree.openElements[-1].name != "table": self.tree.openElements.pop() self.tree.openElements.pop() self.parser.resetInsertionMode() else: # innerHTML case assert self.parser.innerHTML self.parser.parseError()
5cc56a5db432ce478d90ee0dd744811935854947 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10463/5cc56a5db432ce478d90ee0dd744811935854947/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 1388, 12, 2890, 16, 1147, 4672, 309, 365, 18, 3413, 18, 2956, 382, 3876, 2932, 2121, 3113, 5437, 1546, 2121, 6, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 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, 29765, 1388, 12, 2890, 16, 1147, 4672, 309, 365, 18, 3413, 18, 2956, 382, 3876, 2932, 2121, 3113, 5437, 1546, 2121, 6, 4672, 365, 18, 3413, 18, 7163, 2828, 2092, 1638, 3453, 1435, 309, ...
urwid.Text(title, align="center"),
urwid.Text(title, align="center"),
def esc(w, size, key): self.quit_event_loop = [False]
e032f4d4e7d00a05fe0f27b0ce4695345bb987e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12738/e032f4d4e7d00a05fe0f27b0ce4695345bb987e0/debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2904, 12, 91, 16, 963, 16, 498, 4672, 365, 18, 27176, 67, 2575, 67, 6498, 273, 306, 8381, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2904, 12, 91, 16, 963, 16, 498, 4672, 365, 18, 27176, 67, 2575, 67, 6498, 273, 306, 8381, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
st t1, seg, [scale, index, t2], disp
st t1, seg, [1, t2, t7], disp
def macroop BTC_P_I { rdip t7 limm t1, imm srai t2, t1, "(env.dataSize == 8) ? 3 : ((env.dataSize == 4) ? 2 : 1)" limm t3, 1 roli t3, t3, imm ldst t1, seg, [1, t2, t7] sexti t0, t1, imm, flags=(CF,) xor t1, t1, t3 st t1, seg, [scale, index, t2], disp
8f4a687e18326df8c573286cdb87bfe43e189138 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/8f4a687e18326df8c573286cdb87bfe43e189138/bit_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 605, 15988, 67, 52, 67, 45, 288, 9437, 625, 268, 27, 20167, 81, 268, 21, 16, 709, 81, 272, 354, 77, 268, 22, 16, 268, 21, 16, 7751, 3074, 18, 892, 1225, 422, 1725, 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, 11522, 556, 605, 15988, 67, 52, 67, 45, 288, 9437, 625, 268, 27, 20167, 81, 268, 21, 16, 709, 81, 272, 354, 77, 268, 22, 16, 268, 21, 16, 7751, 3074, 18, 892, 1225, 422, 1725, 13, ...
sql = "SELECT state_vec_major, state_vec_minor, segment_def_id "
sql = "SELECT ifos, state_vec_major, state_vec_minor, segment_def_id "
def __init__(self, dbname, dbuser = '', dbpasswd = '', debug = False): """ Open a connection to the state segment database.
eb63d763b5fcf46ab71e35ef5aa9504d58bf1d00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/eb63d763b5fcf46ab71e35ef5aa9504d58bf1d00/statedb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18448, 16, 1319, 1355, 273, 10226, 1319, 24002, 273, 10226, 1198, 273, 1083, 4672, 3536, 3502, 279, 1459, 358, 326, 919, 3267, 2063, 18, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 18448, 16, 1319, 1355, 273, 10226, 1319, 24002, 273, 10226, 1198, 273, 1083, 4672, 3536, 3502, 279, 1459, 358, 326, 919, 3267, 2063, 18, 2, -100, -100, -10...
if self.attributes[XMLSchemaComponent.xsd].has_key('memberTypes'): qnames = self.attributes[XMLSchemaComponent.xsd]['memberTypes']
for k in ['memberTypes']: if self.attributes.has_key(k): qnames = self.attributes[k] self.attributes[k] = [] for qname in qnames.split(): prefix, value = SplitQName(qname) self.attributes['memberTypes'].append(\ TypeDescriptionComponent(\ (self.getXMLNS(prefix), value)))
def setAttributes(self, node): """Sets up attribute dictionary, checks for required attributes and sets default attribute values. attr is for default attribute values determined at runtime.
e50368f02a007b522df43404acf761191b9356f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/e50368f02a007b522df43404acf761191b9356f0/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21175, 12, 2890, 16, 756, 4672, 3536, 2785, 731, 1566, 3880, 16, 4271, 364, 1931, 1677, 471, 1678, 805, 1566, 924, 18, 1604, 353, 364, 805, 1566, 924, 11383, 622, 3099, 18, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21175, 12, 2890, 16, 756, 4672, 3536, 2785, 731, 1566, 3880, 16, 4271, 364, 1931, 1677, 471, 1678, 805, 1566, 924, 18, 1604, 353, 364, 805, 1566, 924, 11383, 622, 3099, 18, 2, -100, -1...
PkgDisable("contrib")
PkgDisable("CONTRIB")
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override="] anything = 0 optimize = "" for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): optimize=value elif (option=="--installer"): INSTALLER=1 elif (option=="--verbose"): SetVerbose(True) elif (option=="--distributor"): DISTRIBUTOR=value elif (option=="--rtdist"): RTDIST=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--osxtarget"): OSXTARGET=value.strip() elif (option=="--nocolor"): DisableColors() elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" elif (option=="--override"): AddOverride(value.strip()) else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break anything = 1 except: usage(0) if (anything==0): usage(0) if (RTDIST and RUNTIME): usage("Options --runtime and --rtdist cannot be specified at the same time!") if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4" elif (optimize==""): optimize = "3" if (OSXTARGET != None and OSXTARGET.strip() == ""): OSXTARGET = None elif (OSXTARGET != None): OSXTARGET = OSXTARGET.strip() if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")): usage("Invalid setting for OSXTARGET") try: OSXTARGET = "10.%d" % int(OSXTARGET[-1]) except: usage("Invalid setting for OSXTARGET") try: SetOptimize(int(optimize)) assert GetOptimize() in [1, 2, 3, 4] except: usage("Invalid setting for OPTIMIZE")
e9fc4f7d3a1862753be5aa9e9fefbfea066ce2e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/e9fc4f7d3a1862753be5aa9e9fefbfea066ce2e5/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 2552, 8456, 16, 4208, 22526, 916, 16, 21730, 7240, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 22880, 4685, 654, 16, 12185, 2565, 882, 16, 54, 25375, 16, 16652, 9560, 16, 2565, 27424, 1693, 916, 2552, 8456, 16, 4208, 22526, 916, 16, 21730, 7240, 1...
def initialize(self):
def initialize( self ):
def initialize(self):
ff946fabd16f68b844021b4c5e84a27f3c288165 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/ff946fabd16f68b844021b4c5e84a27f3c288165/LFCvsSEAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if SCons.Util.is_Dict(d):
if is_Dict(d):
def _action(target, source, env): # prepare the line separator linesep = env['LINESEPARATOR'] if linesep is None: linesep = os.linesep elif is_String(linesep): pass elif isinstance(linesep, Value): linesep = linesep.get_text_contents() else: raise SCons.Errors.UserError( 'unexpected type/class for LINESEPARATOR: %s' % repr(linesep), None) # create a dictionary to use for the substitutions if not env.has_key('SUBST_DICT'): subs = None # no substitutions else: d = env['SUBST_DICT'] if SCons.Util.is_Dict(d): d = d.items() elif SCons.Util.is_Sequence(d): pass else: raise SCons.Errors.UserError('SUBST_DICT must be dict or sequence') subs = [] for (k,v) in d: if callable(v): v = v() if SCons.Util.is_String(v): v = env.subst(v) else: v = str(v) subs.append((k,v)) # write the file try: fd = open(target[0].get_path(), "w") except (OSError,IOError), e: raise SCons.Errors.UserError("Can't write target file %s" % target[0]) # separate lines by 'linesep' only if linesep is not empty lsep = None for s in source: if lsep: fd.write(lsep) fd.write(_do_subst(s, subs)) lsep = linesep fd.close()
bdbff6e7b39938e660b9afad2cb330055c8cb93a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/bdbff6e7b39938e660b9afad2cb330055c8cb93a/textfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1128, 12, 3299, 16, 1084, 16, 1550, 4672, 468, 2911, 326, 980, 4182, 24223, 273, 1550, 3292, 5997, 4550, 3546, 309, 24223, 353, 599, 30, 24223, 273, 1140, 18, 3548, 881, 1327, 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, 389, 1128, 12, 3299, 16, 1084, 16, 1550, 4672, 468, 2911, 326, 980, 4182, 24223, 273, 1550, 3292, 5997, 4550, 3546, 309, 24223, 353, 599, 30, 24223, 273, 1140, 18, 3548, 881, 1327, 353, ...
self.widget.pack(side=LEFT, expand=YES, fill=X)
self.widget.pack(side=tk.LEFT, expand=tk.YES, fill=tk.X)
def __init__(self, master=None, widget=None, label='Option', *args, **kwargs): """Create an Optional widget.
f057996c3a6de2d5fabf3ad7997bbd1f796a9e23 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/f057996c3a6de2d5fabf3ad7997bbd1f796a9e23/meta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 3604, 33, 7036, 16, 1433, 2218, 1895, 2187, 380, 1968, 16, 2826, 4333, 4672, 3536, 1684, 392, 4055, 3604, 18, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 3604, 33, 7036, 16, 1433, 2218, 1895, 2187, 380, 1968, 16, 2826, 4333, 4672, 3536, 1684, 392, 4055, 3604, 18, 2, -100, -100, -100, -1...
raise ValueError, "No such whiteboard %s in bug %s" %
raise ValueError, "No such whiteboard %s in bug %s" % \
def _updatewhiteboard(self,id,text,which,action): '''Update the whiteboard given by 'which' for the given bug. performs the given action (which may be 'append',' prepend', or 'overwrite') using the given text.
54632f64194e9d930c7d15ffddf25670e5fde5ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5050/54632f64194e9d930c7d15ffddf25670e5fde5ab/bugzilla3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 14739, 3752, 12, 2890, 16, 350, 16, 955, 16, 12784, 16, 1128, 4672, 9163, 1891, 326, 9578, 3752, 864, 635, 296, 12784, 11, 364, 326, 864, 7934, 18, 11199, 326, 864, 1301, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 14739, 3752, 12, 2890, 16, 350, 16, 955, 16, 12784, 16, 1128, 4672, 9163, 1891, 326, 9578, 3752, 864, 635, 296, 12784, 11, 364, 326, 864, 7934, 18, 11199, 326, 864, 1301, 26...
sys.stderr.write ('Processing %s...\n' % filename)
def __init__ (self, filename):
8238432ca3ff1f4ae45ff1052f07f23fc0bac7cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4747/8238432ca3ff1f4ae45ff1052f07f23fc0bac7cc/contents.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 1544, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 1544, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.extension_attributes = extension_attributes or {}
self.extension_attributes = extension_attributes or {}
def __init__(self, name=None, value=None, extension_elements=None, extension_attributes=None, text=None): self.name = name self.value = value self.text = text self.extension_elements = extension_elements or [] self.extension_attributes = extension_attributes or {}
220fb3846b34b52b462236a865acc3580b5bf99c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/220fb3846b34b52b462236a865acc3580b5bf99c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 7036, 16, 460, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 365, 18, 529, 273, 508, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 7036, 16, 460, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 365, 18, 529, 273, 508, 365, 1...
None,
# typedef void (*lc_callback)(uint32_t, uint32_t, uint32_t, void*);
252469d959d952d07c6c2b796be96c97a8628abc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3138/252469d959d952d07c6c2b796be96c97a8628abc/libconcord.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 618, 536, 918, 261, 14, 17704, 67, 3394, 21433, 11890, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 918, 14, 1769, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 468, 618, 536, 918, 261, 14, 17704, 67, 3394, 21433, 11890, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 2254, 1578, 67, 88, 16, 918, 14, 1769, 2, -100, -100, -100, -100, -100, -100, -100, -1...
..........
----------
def get_voxel_measures(label_image, raw_image, ROI=None): """ mat_image = mat_filter(label_image, raw_image, ROI=None) takes the ROI dictionary with the blob bounding boxes and gets the voxel measures from each ROI in the raw data. Parameters .......... label_image : {nd_array} an image with labeled regions from get_blobs() method raw_image : {nd_array} the original double image (raw voxels) from which voxel measures are made ROI : {dictionary} Region of Interest structure that has blob bounding boxes Returns .......... none """ if ROI==None: ROIList = NP.zeros(1, dtype=_objstruct) [rows, cols] = label_image.shape ROIList['L'] = 2 ROIList['R'] = cols-3 ROIList['B'] = 2 ROIList['T'] = rows-3 number_regions = ROI.size indices = range(0, number_regions) inflate = 1 for i in indices: left = ROI[i]['L'] right = ROI[i]['R'] bottom = ROI[i]['B'] top = ROI[i]['T'] Label = ROI[i]['Label'] rows = top-bottom-1 cols = right-left-1 section= NP.zeros(rows*cols, dtype=raw_image.dtype).reshape(rows, cols) section = raw_image[bottom:top, left:right] \ [label_image[bottom:top, left:right]==Label] mask = section[section>0] ROI[i]['voxelMean'] = mask.mean() ROI[i]['voxelVar'] = mask.std() return
2e15b86a5b91fd399ef0d981713b1fbce76051f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/2e15b86a5b91fd399ef0d981713b1fbce76051f1/_segmenter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 90, 2409, 292, 67, 21992, 1823, 12, 1925, 67, 2730, 16, 1831, 67, 2730, 16, 6525, 45, 33, 7036, 4672, 3536, 4834, 67, 2730, 273, 4834, 67, 2188, 12, 1925, 67, 2730, 16, 1831...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 90, 2409, 292, 67, 21992, 1823, 12, 1925, 67, 2730, 16, 1831, 67, 2730, 16, 6525, 45, 33, 7036, 4672, 3536, 4834, 67, 2730, 273, 4834, 67, 2188, 12, 1925, 67, 2730, 16, 1831...
def cl(self, input_arg_types=None):
def cl(self, input_arg_types=None, func=None):
def cl(self, input_arg_types=None): """cl(self[, input_arg_types][, func]) -> Common Lisp translation Returns Common Lisp translation. If input_arg_types is provided, returns type annotated translation. Subsequent calls are not affected by this. """ return self.generatecode(GenCL, input_arg_types, func)
5e16073c25973d06205af28db429a4d88d40ba2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/5e16073c25973d06205af28db429a4d88d40ba2e/translator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 12, 2890, 16, 810, 67, 3175, 67, 2352, 33, 7036, 16, 1326, 33, 7036, 4672, 3536, 830, 12, 2890, 63, 16, 810, 67, 3175, 67, 2352, 6362, 16, 1326, 5717, 317, 5658, 511, 23831, 479...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 12, 2890, 16, 810, 67, 3175, 67, 2352, 33, 7036, 16, 1326, 33, 7036, 4672, 3536, 830, 12, 2890, 63, 16, 810, 67, 3175, 67, 2352, 6362, 16, 1326, 5717, 317, 5658, 511, 23831, 479...
self.parser.parseError()
self.parser.parseError(_(u"Unexpected end tag (col). " u"col has no end tag."))
def endTagCol(self, name): self.parser.parseError()
0237414d07254fa2b0b5250e6dbdea2db8421b01 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4487/0237414d07254fa2b0b5250e6dbdea2db8421b01/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 914, 12, 2890, 16, 508, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 29765, 914, 12, 2890, 16, 508, 4672, 365, 18, 4288, 18, 2670, 668, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
cmdclass = {'build_py': install_scripts},
cmdclass = {'install_scripts': install_scripts},
def run(self): err = False for s in self.old_scripts: s = os.path.join(self.install_dir, s) if os.path.exists(s): print >> sys.stderr, "Error: old script", s, "still exists." err = True if err: print >>sys.stderr, "Do you want to delete these scripts? (y/n)" answer = raw_input("") if answer == "y": for s in self.old_scripts: s = os.path.join(self.install_dir, s) try: os.remove(s) print "Removed", s except OSError: pass return parent.run(self)
cb4b82dc4bc95dccaea43ae60e99769f5170d776 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/cb4b82dc4bc95dccaea43ae60e99769f5170d776/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 393, 273, 1083, 364, 272, 316, 365, 18, 1673, 67, 12827, 30, 272, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 5425, 67, 1214, 16, 272, 13, 309, 1140, 18, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 393, 273, 1083, 364, 272, 316, 365, 18, 1673, 67, 12827, 30, 272, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 5425, 67, 1214, 16, 272, 13, 309, 1140, 18, 803, ...
for i in xrange(300):
for i in xrange(100):
def mat_reciprocal(self,dim): # symbolic program # broadcastable=[False,False] means that the shape of matrix is two dimensional, # and none of the dimensions are constrained to have length 1. # Note that TensorType's constructor does not actually allocate any memory. # TODO: Make TensorType syntax more explicit, and maybe give shape or number of dimensions.
9e674cb6195c81f057dfe5210fb9c47f29be596b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/9e674cb6195c81f057dfe5210fb9c47f29be596b/test_basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4834, 67, 266, 3449, 30101, 12, 2890, 16, 3509, 4672, 468, 16754, 5402, 468, 8959, 429, 22850, 8381, 16, 8381, 65, 4696, 716, 326, 2179, 434, 3148, 353, 2795, 17469, 16, 468, 471, 6555, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4834, 67, 266, 3449, 30101, 12, 2890, 16, 3509, 4672, 468, 16754, 5402, 468, 8959, 429, 22850, 8381, 16, 8381, 65, 4696, 716, 326, 2179, 434, 3148, 353, 2795, 17469, 16, 468, 471, 6555, ...
logger.Error("could not activate cluster interface with command %s," " error: '%s'" % (result.cmd, result.output))
logging.error("could not activate cluster interface with command %s," " error: '%s'", result.cmd, result.output)
def StartMaster(): """Activate local node as master node. There are two needed steps for this: - run the master script - register the cron script """ result = utils.RunCmd([constants.MASTER_SCRIPT, "-d", "start"]) if result.failed: logger.Error("could not activate cluster interface with command %s," " error: '%s'" % (result.cmd, result.output)) return False return True
18682bca5711b7b492aeb3cd3a550087f1413e0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/18682bca5711b7b492aeb3cd3a550087f1413e0b/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 7786, 13332, 3536, 21370, 1191, 756, 487, 4171, 756, 18, 225, 6149, 854, 2795, 3577, 6075, 364, 333, 30, 300, 1086, 326, 4171, 2728, 300, 1744, 326, 9998, 2728, 225, 3536, 563, 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, 3603, 7786, 13332, 3536, 21370, 1191, 756, 487, 4171, 756, 18, 225, 6149, 854, 2795, 3577, 6075, 364, 333, 30, 300, 1086, 326, 4171, 2728, 300, 1744, 326, 9998, 2728, 225, 3536, 563, 273...
self.assertEqual('http://localhost/?q=foobar',
self.assertEqual(self._localhost_prefix + '?q=foobar',
def testAddSearchEngine(self): """Test searching using keyword of user-added search engine.""" self.AddSearchEngine(title='foo', keyword='foo.com', url='http://localhost/?q=%s') self.SetOmniboxText('foo.com foobar') self.OmniboxAcceptInput() self.assertEqual('http://localhost/?q=foobar', self.GetActiveTabURL().spec())
9ed91ed6de3ddcc52f609aa3ffe337b08fcbf298 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/9ed91ed6de3ddcc52f609aa3ffe337b08fcbf298/search_engines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 986, 2979, 4410, 12, 2890, 4672, 3536, 4709, 15300, 1450, 4932, 434, 729, 17, 9665, 1623, 4073, 12123, 365, 18, 986, 2979, 4410, 12, 2649, 2218, 11351, 2187, 4932, 2218, 11351, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 986, 2979, 4410, 12, 2890, 4672, 3536, 4709, 15300, 1450, 4932, 434, 729, 17, 9665, 1623, 4073, 12123, 365, 18, 986, 2979, 4410, 12, 2649, 2218, 11351, 2187, 4932, 2218, 11351, 18, ...
i += 1
def add_data_dir(self,data_path): """ Recursively add files under data_path to data_files list. Argument can be either - 2-sequence (<datadir suffix>,<path to data directory>) - path to data directory where python datadir suffix defaults to package dir.
dbb89ee8932e1f2b9f4a8940d90d6fd96c8c3f8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/dbb89ee8932e1f2b9f4a8940d90d6fd96c8c3f8e/misc_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 892, 67, 1214, 12, 2890, 16, 892, 67, 803, 4672, 3536, 31362, 527, 1390, 3613, 501, 67, 803, 358, 501, 67, 2354, 666, 18, 5067, 848, 506, 3344, 300, 576, 17, 6178, 261, 32, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 892, 67, 1214, 12, 2890, 16, 892, 67, 803, 4672, 3536, 31362, 527, 1390, 3613, 501, 67, 803, 358, 501, 67, 2354, 666, 18, 5067, 848, 506, 3344, 300, 576, 17, 6178, 261, 32, ...
self.ui.descriptionEdit.setText('<h1>Description</h1><p>%s</p>' % ('<i>Receiving...</i>' if contact.summary is NotLoaded else contact.summary.replace('\n', '<br />')))
if contact.summary is NotLoaded: self.ui.descriptionEdit.setText('<h1>Description</h1><p><i>Receiving...</i></p>') missing_fields.add('summary') else: self.ui.descriptionEdit.setText('<h1>Description</h1><p>%s</p>' % contact.summary.replace('\n', '<br />'))
def gotProfile(self, backend, contact): if not backend: return
8be616252166b349297db8cb82c5a76c6137e35c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/8be616252166b349297db8cb82c5a76c6137e35c/contacts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 4029, 12, 2890, 16, 4221, 16, 5388, 4672, 309, 486, 4221, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 2363, 4029, 12, 2890, 16, 4221, 16, 5388, 4672, 309, 486, 4221, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.started_playing = False
self.started_playing = STOPPED self._duration = None def do_schedule_update(self): if self.started_playing == PLAYING: ct = self.get_current_time() dur = self.get_duration() if ct and dur and (dur <= ct + 0.05): app.playback_manager.on_movie_finished() return gobject.timeout_add(500, self.do_schedule_update)
def __init__(self): logging.info("Initializing VLC") plugin_dir = os.path.join(resources.appRoot(), 'vlc-plugins') self.exc = VLCException()
2934e8b32a8c6a4773091ef2abaa54b3e4f5615d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/2934e8b32a8c6a4773091ef2abaa54b3e4f5615d/vlc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2907, 18, 1376, 2932, 29782, 776, 13394, 7923, 1909, 67, 1214, 273, 1140, 18, 803, 18, 5701, 12, 4683, 18, 2910, 2375, 9334, 296, 27362, 17, 8057, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2907, 18, 1376, 2932, 29782, 776, 13394, 7923, 1909, 67, 1214, 273, 1140, 18, 803, 18, 5701, 12, 4683, 18, 2910, 2375, 9334, 296, 27362, 17, 8057, 6134, ...
if data.has_key("file"): file = data["file"]
if data.has_key("file"): file = data["file"]
def log(self, data): level, file = log.LOG_LEVEL, log.LOG_FILE if data.has_key("level"): level = data["level"] if data.has_key("file"): file = data["file"] return {"level": level, "file": file}
14ec4120e7ce1b45c4524588761d8e288a6060a2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/14ec4120e7ce1b45c4524588761d8e288a6060a2/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 16, 501, 4672, 1801, 16, 585, 273, 613, 18, 4842, 67, 10398, 16, 613, 18, 4842, 67, 3776, 309, 501, 18, 5332, 67, 856, 2932, 2815, 6, 4672, 1801, 273, 501, 9614, 2815,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 12, 2890, 16, 501, 4672, 1801, 16, 585, 273, 613, 18, 4842, 67, 10398, 16, 613, 18, 4842, 67, 3776, 309, 501, 18, 5332, 67, 856, 2932, 2815, 6, 4672, 1801, 273, 501, 9614, 2815,...
pixxFM_left = event.area.x + x1 + 1 - pixxFADEMARKER_WIDTH pixyFM_left = event.area.y + int(event.area.height * (100-self.fadePoints[0]) / 100.0)
pixxFM_left = event.area.x + x1 + 1 - self._PIXX_FADEMARKER_WIDTH pixyFM_left = int(padded_height * (100-self.fadePoints[0]) / 100.0)
def OnDraw(self, widget, event): """ This function blits the waveform data onto the screen, and then draws the play cursor over it. """ c = self.cachedDrawArea e = event.area #check if the expose area is within the already cached rectangle if e.x < c.x or (e.x + e.width > c.x + c.width) or self.redrawWaveform: self.DrawWaveform(event.area) # Get a cairo surface for this drawing op context = widget.window.cairo_create()
e365371eaeb7fba1c7c274012de019f596548adb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e365371eaeb7fba1c7c274012de019f596548adb/EventViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 6493, 12, 2890, 16, 3604, 16, 871, 4672, 3536, 1220, 445, 2811, 1282, 326, 31511, 501, 10170, 326, 5518, 16, 471, 1508, 30013, 326, 6599, 3347, 1879, 518, 18, 3536, 276, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 6493, 12, 2890, 16, 3604, 16, 871, 4672, 3536, 1220, 445, 2811, 1282, 326, 31511, 501, 10170, 326, 5518, 16, 471, 1508, 30013, 326, 6599, 3347, 1879, 518, 18, 3536, 276, 273, 365, ...
float mysum = 0.0f;
def c_support_code_apply(self, node, nodename): sio = StringIO.StringIO() nd_in = len(self.reduce_mask) if all(i==1 for i in self.reduce_mask): #this kernel is ok for up to a few thousand elements, but # it only runs on ONE multiprocessor reducebuf = self._k_reduce_buf('Z[0]') print >> sio, """ static __global__ void kernel_reduce_sum_ccontig_%(nodename)s( const unsigned int d0, const float *A, float * Z) { const int threadCount = blockDim.x; const int threadNum = threadIdx.x; extern __shared__ float buf[]; float mysum = 0.0f;
b8e1f7601479abf91331d1347ded171d2497ae74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/b8e1f7601479abf91331d1347ded171d2497ae74/basic_ops.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 13261, 67, 710, 67, 9010, 12, 2890, 16, 756, 16, 14003, 1069, 4672, 272, 1594, 273, 15777, 18, 780, 4294, 1435, 5346, 67, 267, 273, 562, 12, 2890, 18, 12498, 67, 4455, 13, 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, 276, 67, 13261, 67, 710, 67, 9010, 12, 2890, 16, 756, 16, 14003, 1069, 4672, 272, 1594, 273, 15777, 18, 780, 4294, 1435, 5346, 67, 267, 273, 562, 12, 2890, 18, 12498, 67, 4455, 13, 3...
self._get_service_description(link.template, id))
self._get_service_description(link.template, webfinger_id))
def lookup(self, id): """Look up a webfinger resource by (email-like) id.
5f420d059590af8a2f5d4ad22c4edc765a63074e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4291/5f420d059590af8a2f5d4ad22c4edc765a63074e/webfinger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 12, 2890, 16, 612, 4672, 3536, 9794, 731, 279, 3311, 74, 6658, 1058, 635, 261, 3652, 17, 5625, 13, 612, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 12, 2890, 16, 612, 4672, 3536, 9794, 731, 279, 3311, 74, 6658, 1058, 635, 261, 3652, 17, 5625, 13, 612, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
startRoutineRe=re.compile(r" *(?:recursive +|pure +|elemental +)*(?P<kind>subroutine|function) +(?P<name>[a-zA-Z_][a-zA-Z_0-9]*) *(?:\((?P<arguments>[^()]*)\))? *(?:result *\( *(?P<result>[a-zA-Z_][a-zA-Z_0-9]*) *\))? *\n?",re.IGNORECASE)
startRoutineRe=re.compile(r" *(?:recursive +|pure +|elemental +)*(?P<kind>subroutine|function) +(?P<name>[a-zA-Z_][a-zA-Z_0-9]*) *(?:\((?P<arguments>[^()]*)\))? *(?:result *\( *(?P<result>[a-zA-Z_][a-zA-Z_0-9]*) *\))? *(?:bind *\([^()]+\))? *\n?",re.IGNORECASE)
def parseRoutine(inFile): """Parses a routine""" startRe=re.compile(r" *(?:recursive +|pure +|elemental +)*(?:subroutine|function)",re.IGNORECASE) endRe=re.compile(r" *end (?:subroutine|function)",re.IGNORECASE) startRoutineRe=re.compile(r" *(?:recursive +|pure +|elemental +)*(?P<kind>subroutine|function) +(?P<name>[a-zA-Z_][a-zA-Z_0-9]*) *(?:\((?P<arguments>[^()]*)\))? *(?:result *\( *(?P<result>[a-zA-Z_][a-zA-Z_0-9]*) *\))? *\n?",re.IGNORECASE)#$ typeBeginRe=re.compile(r" *(?P<type>integer(?: *\* *[0-9]+)?|logical|character(?: *\* *[0-9]+)?|real(?: *\* *[0-9]+)?|complex(?: *\* *[0-9]+)?|type)", re.IGNORECASE) typeRe=re.compile(r" *(?P<type>integer(?: *\* *[0-9]+)?|logical|character(?: *\* *[0-9]+)?|real(?: *\* *[0-9]+)?|complex(?: *\* *[0-9]+)?|type) *(?P<parameters>\((?:[^()]+|\([^()]*\))*\))? *(?P<attributes>(?: *, *[a-zA-Z_0-9]+(?: *\((?:[^()]+|\((?:[^()]+|\([^()]*\))*\))*\))?)+)? *(?P<dpnt>::)?(?P<vars>[^\n]+)\n?",re.IGNORECASE)#$ attributeRe=re.compile(r" *, *(?P<attribute>[a-zA-Z_0-9]+) *(?:\( *(?P<param>(?:[^()]+|\((?:[^()]+|\([^()]*\))*\))*)\))? *",re.IGNORECASE) ignoreRe=re.compile(r" *(?:|implicit +none *)$",re.IGNORECASE) interfaceStartRe=re.compile(r" *interface *$",re.IGNORECASE) interfaceEndRe=re.compile(r" *end +interface *$",re.IGNORECASE) routine={'preRoutine':[], 'core':[], 'strippedCore':[], 'begin':[], 'end':[], 'preDeclComments':[], 'declarations':[], 'declComments':[], 'parsedDeclarations':[], 'postRoutine':[], 'kind':None,'name':None,'arguments':None,'result':None, 'interfaceCount':0, 'use':[] } while 1: (jline,comments,lines)=readFortranLine(inFile) if len(lines)==0: break if startRe.match(jline):break routine['preRoutine'].extend(lines) if jline: routine['begin']=lines m=startRoutineRe.match(jline) if not m or m.span()[1]!=len(jline): raise SyntaxError("unexpected subroutine start format:"+repr(lines)) routine['name']=m.group('name') routine['kind']=m.group('kind') if (m.group('arguments') and m.group('arguments').strip()): routine['arguments']=map(lambda x: x.strip(), m.group('arguments').split(",")) if (m.group('result')): routine['result']=m.group('result') if (not routine['result'])and(routine['kind'].lower()=="function"): routine['result']=routine['name'] while 1: (jline,comments,lines)=readFortranLine(inFile) if len(lines)==0: break if not ignoreRe.match(jline): if typeBeginRe.match(jline): m=typeRe.match(jline) if (m.group('type').lower()=='type' and not m.group('parameters')): break if not m or m.span()[1]!=len(jline): raise SyntaxError("unexpected type format:"+repr(jline)) decl={'type':m.group("type"), 'parameters':None, 'attributes':[], 'vars':[]} if m.group('parameters'): decl['parameters']=(m.group("parameters").replace(" ",""). replace(",",", ")) str=m.group("attributes") while(str): m2=attributeRe.match(str) if not m2: raise SyntaxError("unexpected attribute format "+ repr(str)+" in "+repr(lines)) decl['attributes'].append(m2.group().replace(" ",""). replace(",",", ")[2:]) str=str[m2.span()[1]:] str=m.group("vars") while 1: m2=varRe.match(str) if not m2: raise SyntaxError("unexpected var format "+ repr(str)+" in "+repr(lines)) var=m2.group("var") if m2.group("param"):var+="("+m2.group("param")+")" if m2.group("value"): var+=" = " var+=m2.group("value") decl['vars'].append(var) str=str[m2.span()[1]:] if not m2.group("continue"): if str: raise SyntaxError("error parsing vars (leftover="+ repr(str)+") in "+repr(lines)) break routine['parsedDeclarations'].append(decl) elif interfaceStartRe.match(jline): istart=lines interfaceDeclFile=StringIO() while 1: (jline,comments,lines)=readFortranLine(inFile) if interfaceEndRe.match(jline): iend=lines break interfaceDeclFile.writelines(lines) interfaceDeclFile=StringIO(interfaceDeclFile.getvalue()) iroutines=[] while 1: iroutine=parseRoutine(interfaceDeclFile) if not iroutine['kind']: if len(iroutines)==0: interfaceDeclFile.seek(0) raise SyntaxError("error parsing interface:"+ repr(interfaceDeclFile.read())) iroutines[-1]['postRoutine'].extend(iroutine['preRoutine']) break iroutines.append(iroutine) for iroutine in iroutines: routine['interfaceCount']+=1 decl={'type':'z_interface%02d'%(routine['interfaceCount']), 'parameters':None, 'attributes':[], 'vars':[iroutine['name']], 'iroutine':iroutine, 'istart':istart, 'iend':iend } routine['parsedDeclarations'].append(decl) elif useParseRe.match(jline): routine['use'].append("".join(lines)) else: break routine['declarations'].append("".join(lines)) if (len(routine['parsedDeclarations'])==0 and len(routine['use'])==0 and not re.match(" *implicit +none *$",jline,re.IGNORECASE)): routine['preDeclComments'].append("".join(lines)) elif comments: routine['declComments'].append(comments) while len(lines)>0: if endRe.match(jline): routine['end']=lines break routine['strippedCore'].append(jline) routine['core'].append("".join(lines)) (jline,comments,lines)=readFortranLine(inFile) return routine
74a1cbee70ab49b288ac9d291afc60f24a6d433e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2834/74a1cbee70ab49b288ac9d291afc60f24a6d433e/normalizeFortranFile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4583, 558, 12, 267, 812, 4672, 3536, 6656, 279, 12245, 8395, 787, 426, 33, 266, 18, 11100, 12, 86, 6, 380, 6503, 10543, 397, 96, 84, 594, 397, 96, 2956, 287, 397, 17653, 6503, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4583, 558, 12, 267, 812, 4672, 3536, 6656, 279, 12245, 8395, 787, 426, 33, 266, 18, 11100, 12, 86, 6, 380, 6503, 10543, 397, 96, 84, 594, 397, 96, 2956, 287, 397, 17653, 6503, ...
(retarget_to, milestone.name))
(retarget_to, old_name))
def _do_save(self, req, db, milestone): if milestone.exists: req.perm.require('MILESTONE_MODIFY') else: req.perm.require('MILESTONE_CREATE')
3a35d53808dd38fcf7728e42581af168adb55d2e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/3a35d53808dd38fcf7728e42581af168adb55d2e/roadmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 5688, 12, 2890, 16, 1111, 16, 1319, 16, 28664, 4672, 309, 28664, 18, 1808, 30, 1111, 18, 12160, 18, 6528, 2668, 7492, 900, 882, 5998, 67, 6720, 12096, 6134, 469, 30, 111...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 5688, 12, 2890, 16, 1111, 16, 1319, 16, 28664, 4672, 309, 28664, 18, 1808, 30, 1111, 18, 12160, 18, 6528, 2668, 7492, 900, 882, 5998, 67, 6720, 12096, 6134, 469, 30, 111...
cmd = ['iwconfig', self.iface, 'essid', essid]
cmd = ['iwconfig', self.iface, 'essid', str(essid)]
def SetEssid(self, essid): """ Set the essid of the wireless interface.
12f2a32dfaf520f2e03aea1f1c07be0bd002e6be /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/353/12f2a32dfaf520f2e03aea1f1c07be0bd002e6be/wnettools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 41, 1049, 350, 12, 2890, 16, 18518, 350, 4672, 3536, 1000, 326, 18518, 350, 434, 326, 6636, 2656, 1560, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 41, 1049, 350, 12, 2890, 16, 18518, 350, 4672, 3536, 1000, 326, 18518, 350, 434, 326, 6636, 2656, 1560, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
str, "\\NSPACE", 'unicode-escape', 'strict'
str, b"\\NSPACE", 'unicode-escape', 'strict'
def test_strict_eror_handling(self): # bogus character name self.assertRaises( UnicodeError, str, "\\N{blah}", 'unicode-escape', 'strict' ) # long bogus character name self.assertRaises( UnicodeError, str, "\\N{%s}" % ("x" * 100000), 'unicode-escape', 'strict' ) # missing closing brace self.assertRaises( UnicodeError, str, "\\N{SPACE", 'unicode-escape', 'strict' ) # missing opening brace self.assertRaises( UnicodeError, str, "\\NSPACE", 'unicode-escape', 'strict' )
707e8061af537973977713681eab558b979fca31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/707e8061af537973977713681eab558b979fca31/test_ucn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13948, 67, 264, 280, 67, 26822, 12, 2890, 4672, 468, 324, 28774, 3351, 508, 365, 18, 11231, 12649, 6141, 12, 9633, 668, 16, 609, 16, 8422, 50, 95, 3083, 9795, 1532, 16, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13948, 67, 264, 280, 67, 26822, 12, 2890, 4672, 468, 324, 28774, 3351, 508, 365, 18, 11231, 12649, 6141, 12, 9633, 668, 16, 609, 16, 8422, 50, 95, 3083, 9795, 1532, 16, 296, ...
command, args = ('', '') else:
self.command = self.args = '' else:
def found_terminator(self): """Asynchat override.""" # Send the request to the server and read the reply. if self.request.strip().upper() == 'KILL': self.serverSocket.sendall('QUIT\r\n') self.send("+OK, dying.\r\n") self.shutdown(2) self.close() raise SystemExit self.serverSocket.sendall(self.request + '\r\n') if self.request.strip() == '': # Someone just hit the Enter key. command, args = ('', '') else: splitCommand = self.request.strip().split(None, 1) command = splitCommand[0].upper() args = splitCommand[1:] rawResponse, isClosing, timedOut = self.readResponse(command, args)
959f6c8f86abe1ad21eb4ad3e6c79f2ae1aaf183 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/959f6c8f86abe1ad21eb4ad3e6c79f2ae1aaf183/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 3536, 1463, 2515, 270, 3849, 12123, 468, 2479, 326, 590, 358, 326, 1438, 471, 855, 326, 4332, 18, 309, 365, 18, 2293, 18, 6406, 7675, 5797, 1435, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 3536, 1463, 2515, 270, 3849, 12123, 468, 2479, 326, 590, 358, 326, 1438, 471, 855, 326, 4332, 18, 309, 365, 18, 2293, 18, 6406, 7675, 5797, 1435, 4...
_fl_winminsize = cfuncproto(so_libforms, "fl_winminsize", None, [Window, FL_Coord, FL_Coord],
_fl_winminsize = cfuncproto(so_libforms, "fl_winminsize", None, [Window, FL_Coord, FL_Coord],
def fl_winposition(x, y): """ fl_winposition(x, y) """ _fl_winposition(x, y)
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, 8082, 3276, 12, 92, 16, 677, 4672, 3536, 1183, 67, 8082, 3276, 12, 92, 16, 677, 13, 3536, 225, 389, 2242, 67, 8082, 3276, 12, 92, 16, 677, 13, 282, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1183, 67, 8082, 3276, 12, 92, 16, 677, 4672, 3536, 1183, 67, 8082, 3276, 12, 92, 16, 677, 13, 3536, 225, 389, 2242, 67, 8082, 3276, 12, 92, 16, 677, 13, 282, 2, -100, -100, -100, -...
if not tag.img: values.append('')
values.append('')
def get_track(trackinfo, keys): tags = trackinfo.find_all('td', {'class':'cell'}) if not tags: return {} values = [] for tag in tags: if text(tag): values.append(text(tag)) else: if not tag.img: values.append('') try: track = int(values[0]) return dict([(key, value) for key, value in zip(['track'] + keys, values) if value]) except ValueError: return dict([(key, value) for key, value in zip(keys, values)])
34d080fca460820bcfff0c01f9f174a199bbced0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3907/34d080fca460820bcfff0c01f9f174a199bbced0/amg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4101, 12, 4101, 1376, 16, 1311, 4672, 2342, 273, 225, 3298, 1376, 18, 4720, 67, 454, 2668, 4465, 2187, 13666, 1106, 11, 2497, 3855, 11, 6792, 309, 486, 2342, 30, 327, 2618, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4101, 12, 4101, 1376, 16, 1311, 4672, 2342, 273, 225, 3298, 1376, 18, 4720, 67, 454, 2668, 4465, 2187, 13666, 1106, 11, 2497, 3855, 11, 6792, 309, 486, 2342, 30, 327, 2618, 92...
print i * " " + name + " (" +\ str(len(contents)) + ")"
if verbose: print i * " " + name + " (" +\ str(len(contents)) + ")"
def unpackdir(self, data, path, i = 0): """ Call this to unpack a campaign contained in a WML object to the filesystem. The data parameter is the WML object, path is the path under which it will be placed. """ try: os.mkdir(path) except: pass for f in data.get_all("file"): name = f.get_text_val("name", "?") contents = f.get_binary_val("contents") if contents: print i * " " + name + " (" +\ str(len(contents)) + ")" file(path + "/" + name, "wb").write(contents) for dir in data.get_all("dir"): name = dir.get_text_val("name", "?") shutil.rmtree(path + "/" + name, True) os.mkdir(path + "/" + name) print i * " " + name self.unpackdir(dir, path + "/" + name, i + 2)
cff58537521ede54f019fd3fa82bb710569a895a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/cff58537521ede54f019fd3fa82bb710569a895a/campaign_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 1214, 12, 2890, 16, 501, 16, 589, 16, 277, 273, 374, 4672, 3536, 3049, 333, 358, 6167, 279, 8965, 7542, 316, 279, 678, 1495, 733, 358, 326, 6496, 18, 1021, 501, 1569, 353, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 1214, 12, 2890, 16, 501, 16, 589, 16, 277, 273, 374, 4672, 3536, 3049, 333, 358, 6167, 279, 8965, 7542, 316, 279, 678, 1495, 733, 358, 326, 6496, 18, 1021, 501, 1569, 353, 326, ...
if self._optaddarg: code = [ 'if (%(parent_name)s_%(name)s_add(%(var)s, %(init)s) == NULL)', ' return (-1);' ] else: code = [ 'if (%(parent_name)s_%(name)s_add(%(var)s) == NULL)', ' return (-1);' ]
code = [ 'if (%(var)s->%(name)s_length >= %(var)s->%(name)s_num_allocated &&', ' %(parent_name)s_%(name)s_expand_to_hold_more(%(var)s) < 0) {', ' puts("HEY NOW");', ' return (-1);', '}']
def CodeUnmarshal(self, buf, tag_name, var_name, var_len): translate = self.GetTranslation({ 'var' : var_name, 'buf' : buf, 'tag' : tag_name, 'init' : self._entry.GetInitializer()}) if self._optaddarg: code = [ 'if (%(parent_name)s_%(name)s_add(%(var)s, %(init)s) == NULL)', ' return (-1);' ] else: code = [ 'if (%(parent_name)s_%(name)s_add(%(var)s) == NULL)', ' return (-1);' ]
f6ab2a2811477547347b395789c0340c38603944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13048/f6ab2a2811477547347b395789c0340c38603944/event_rpcgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3356, 9593, 12, 2890, 16, 1681, 16, 1047, 67, 529, 16, 569, 67, 529, 16, 569, 67, 1897, 4672, 4204, 273, 365, 18, 967, 6717, 12590, 296, 1401, 11, 294, 569, 67, 529, 16, 296, 4385, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3356, 9593, 12, 2890, 16, 1681, 16, 1047, 67, 529, 16, 569, 67, 529, 16, 569, 67, 1897, 4672, 4204, 273, 365, 18, 967, 6717, 12590, 296, 1401, 11, 294, 569, 67, 529, 16, 296, 4385, ...
/.
/\.
def test_getstatus(self): # This pattern should match 'ls -ld /.' on any posix # system, however perversely configured. pat = r'''d......... # It is a directory. \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. \s+\d+ # It has a size. [^/]* # Skip the date. /. # and end with the name of the file. '''
5f17d624034b88f5445852ff96fc793970f3dfe2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5f17d624034b88f5445852ff96fc793970f3dfe2/test_commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 2327, 12, 2890, 4672, 468, 1220, 1936, 1410, 845, 296, 3251, 300, 1236, 342, 1093, 603, 1281, 16366, 468, 2619, 16, 14025, 1534, 2496, 2357, 4351, 18, 9670, 273, 436, 2641...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 2327, 12, 2890, 4672, 468, 1220, 1936, 1410, 845, 296, 3251, 300, 1236, 342, 1093, 603, 1281, 16366, 468, 2619, 16, 14025, 1534, 2496, 2357, 4351, 18, 9670, 273, 436, 2641...
if self._inotify:
if _inotify:
def watch(self, watch = True): """ If argument is True (default), adds a watch to the config file and will reload the config if it changes. If INotify is available, use that, otherwise stat the file every 3 seconds.
329bd4028a1831e50d4ec63ae2ac459a31f6e667 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/329bd4028a1831e50d4ec63ae2ac459a31f6e667/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 12, 2890, 16, 4267, 273, 1053, 4672, 3536, 971, 1237, 353, 1053, 261, 1886, 3631, 4831, 279, 4267, 358, 326, 642, 585, 471, 903, 7749, 326, 642, 309, 518, 3478, 18, 225, 971, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 12, 2890, 16, 4267, 273, 1053, 4672, 3536, 971, 1237, 353, 1053, 261, 1886, 3631, 4831, 279, 4267, 358, 326, 642, 585, 471, 903, 7749, 326, 642, 309, 518, 3478, 18, 225, 971, 467...
self._context_change = True
self._context_change = True
def set_endcap(self, cap): self._context.cap = cap self._context_change = True
6e94758919df952442a2ca4fe4126b60b9d08ffe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7473/6e94758919df952442a2ca4fe4126b60b9d08ffe/draw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 409, 5909, 12, 2890, 16, 3523, 4672, 365, 6315, 2472, 18, 5909, 273, 3523, 365, 6315, 2472, 67, 3427, 273, 1053, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 409, 5909, 12, 2890, 16, 3523, 4672, 365, 6315, 2472, 18, 5909, 273, 3523, 365, 6315, 2472, 67, 3427, 273, 1053, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def newpages(number=10, onlyonce=False site=None, throttle=True):
def newpages(number=10, onlyonce=False, site=None, throttle=True):
def newpages(number=10, onlyonce=False site=None, throttle=True): """Generator which yields new articles subsequently. It starts with the article created 'number' articles ago (first argument). When these are all yielded (as PageLinks) it fetches NewPages again. If there is no new page, it blocks until there is one, sleeping between subsequent fetches of NewPages. NOT FINISHED """ raise NotImplementedError, "this function is not finished yet, do not use" if site is None: site = getSite() while True: returned_html = getPage(site, site.newpagesname(number), do_quote=False, get_edit_page=False, throttle=throttle) start = "<ol start='1' class='special'>" end = "</ol>" startpos = returned_html.index(start) + len(start) endpos = startpos + returned_html[startpos:].index(end) relevant = returned_html[startpos:endpos] lines = [line.strip() for line in relevant.strip().split('\n')][::-1] for line in lines: # get date, pagelink, size, user, comment print line if onlyonce: break # get new batch: make sure they overlap and start with the newest # if they don't overlap, refetch with more articles # if the overlay = 100%: wait a while and try again return
96bfdb2c027a2e0a1da4c4dad2ef8a5ae1f2b950 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/96bfdb2c027a2e0a1da4c4dad2ef8a5ae1f2b950/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 7267, 12, 2696, 33, 2163, 16, 1338, 8243, 33, 8381, 16, 2834, 33, 7036, 16, 18304, 33, 5510, 4672, 3536, 3908, 1492, 16932, 394, 15828, 10815, 715, 18, 2597, 2542, 598, 326, 7559, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 7267, 12, 2696, 33, 2163, 16, 1338, 8243, 33, 8381, 16, 2834, 33, 7036, 16, 18304, 33, 5510, 4672, 3536, 3908, 1492, 16932, 394, 15828, 10815, 715, 18, 2597, 2542, 598, 326, 7559, ...
notify(AfterCallEvent(orig, request))
notify(AfterExceptionCallEvent(orig, request))
def handleException(self, object, request, exc_info, retry_allowed=True): orig = removeAllProxies(object) oldHandleException(self, object, request, exc_info, retry_allowed=retry_allowed) if type(orig) is MethodType: notify(AfterCallEvent(orig.im_self, request)) else: notify(AfterCallEvent(orig, request))
292e3e64b93e452d2f3a5e921935aaaafaa690cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12538/292e3e64b93e452d2f3a5e921935aaaafaa690cc/publication.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20879, 12, 2890, 16, 733, 16, 590, 16, 3533, 67, 1376, 16, 3300, 67, 8151, 33, 5510, 4672, 1647, 273, 12787, 21488, 12, 1612, 13, 1592, 3259, 503, 12, 2890, 16, 733, 16, 590, 16, 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, 20879, 12, 2890, 16, 733, 16, 590, 16, 3533, 67, 1376, 16, 3300, 67, 8151, 33, 5510, 4672, 1647, 273, 12787, 21488, 12, 1612, 13, 1592, 3259, 503, 12, 2890, 16, 733, 16, 590, 16, 353...
libgraph_tool_centrality.\ get_eigentrust(g._Graph__graph, _prop("e", g, trust_map), _prop("v", g, vprop), epslon, max_iter) return vprop def absolute_trust(g, trust_map, vprop=None, epslon=0.1, max_iter=0, seed=0):
i = libgraph_tool_centrality.\ get_eigentrust(g._Graph__graph, _prop("e", g, trust_map), _prop("v", g, vprop), epslon, max_iter) if norm: vprop.get_array()[:] /= sum(vprop.get_array()) if ret_iter: return vprop, i else: return vprop def absolute_trust(g, trust_map, vprop=None, epslon=0.1, max_iter=None, seed=None, ret_iter=False) r""" Samples the absolute trust centrality of each vertex in the graph. Parameters ---------- g : Graphs Graph to be used. trust_map : ProperyMap Edge property map with the values of trust associated with each edge. The values must lie in the range [0,1]. vprop : PropertyMap, optional (default: None) Vertex property map where the values of eigentrust must be stored. epslon : float, optional (default: 0.1) Convergence condition. The iteration will stop if the total delta of all vertices are below this value. max_iter : int, optional (default: None) If supplied, this will limit the total number of iterations. seed : int, optional (default: None) The initializing seed for the random number generator. If not supplied a different random value will be chosen each time. ret_iter : bool, optional (default: False) If true, the total number of iterations is also returned. Returns ------- A vertex property map containing the absolute trust vector from the corresponding vertex to the rest of the network. Each element i of the vector is the trust value of the vertex with index i, from the given vertex. See Also -------- eigentrust: eigentrust centrality betweenness: betweenness centrality pagerank: PageRank centrality Notes ----- The absolute trust between vertices i and j is defined as .. math: t_{ij} = \frac{1}{|\{i\to j\}|}\sum_{\{i\to j\}} \prod_{e\in \{i\to j\}} \frac{c_e^2}{\sum_{w\in\Gamma^+(s(e))}c_{s(e),w}}} where the sum is taken over all paths from i to j (without loops), and :math:`c_e` is the direct trust value associated with edge e. The algorithm progressively samples all possible paths, until the trust values converge, and has a topology-dependent complexity. If enabled during compilation, this algorithm runs in parallel. Examples -------- >>> from numpy.random import poisson, random, seed >>> seed(42) >>> g = gt.random_graph(100, lambda: (poisson(3), poisson(3)), seed=42) >>> trust = g.new_edge_property("double") >>> trust.get_array()[:] = random(g.num_edges()) >>> t = absolute_trust(g, trust) >>> print array(t[g.vertex(10)]) [ 0.00452395 0.00358993 0.00520913 0.00151395 0.09479413 0.00431631 0.09957709 0.00722076 0.02488298 0.02720262 0. 0.02958085 0.05583483 0.00525581 0.02112018 0.00157646 0.02070552 0.01317581 0.01565533 0.00568109 0.04568674 0.00202402 0.0024926 0.14040174 0.0093484 0.00124116 0.009818 0.039403 0.00787983 0.0130681 0.02046159 0.02044219 0.00625258 0.00253353 0.00992648 0.00658357 0.00328796 0.05730617 0.00752433 0.00289023 0. 0.01610246 0.03151005 0.05449376 0.0195204 0.00296101 0.0187164 0.19553864 0.01089019 0.01516855 0.01621888 0.29711525 0.00164373 0.02045437 0.01388174 0.00109321 0.03034565 0.00289681 0.06903929 0.02392237 0.01491933 0.02128263 0.03091464 0.03457097 0.14454613 0.01821371 0.00943718 0.0247563 0.00495901 0.03532278 0.00053465 0. 0.00142457 0.03393286 0.0058909 0.01881276 0.00156345 0.00878983 0.00832669 0.08389869 0.43991565 0.04075081 0.00323008 0.02823037 0.03224312 0.00430044 0.0331929 0.00268128 0.01462425 0.00720545 0.06730403 0.02771813 0.03289217 0.01326689 0.06876157 0.02382899 0.1502834 0.00980331 0.0086688 0.00495706] """
def eigentrust(g, trust_map, vprop=None, epslon=1e-6, max_iter=0, ret_iter=False): if vprop == None: vprop = g.new_vertex_property("double") libgraph_tool_centrality.\ get_eigentrust(g._Graph__graph, _prop("e", g, trust_map), _prop("v", g, vprop), epslon, max_iter) return vprop
07a2d09967a55814c48f00b6d9e912cb929bf5c4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3516/07a2d09967a55814c48f00b6d9e912cb929bf5c4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11043, 8230, 641, 12, 75, 16, 10267, 67, 1458, 16, 331, 5986, 33, 7036, 16, 7785, 9379, 33, 21, 73, 17, 26, 16, 943, 67, 2165, 33, 20, 16, 325, 67, 2165, 33, 8381, 4672, 309, 331, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11043, 8230, 641, 12, 75, 16, 10267, 67, 1458, 16, 331, 5986, 33, 7036, 16, 7785, 9379, 33, 21, 73, 17, 26, 16, 943, 67, 2165, 33, 20, 16, 325, 67, 2165, 33, 8381, 4672, 309, 331, ...
self.trans = transaction
self.cls = cls
def __init__(self, columns=None, transaction=None, searcher=None, **kwargs): """ @param columns: A list of Columns. Only the C{read} attribute needs to be set.
41cb05d3c0bc79154577310cba5e527648e6d7cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2219/41cb05d3c0bc79154577310cba5e527648e6d7cb/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2168, 33, 7036, 16, 2492, 33, 7036, 16, 27349, 33, 7036, 16, 2826, 4333, 4672, 3536, 632, 891, 2168, 30, 432, 666, 434, 14962, 18, 5098, 326, 385, 95, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2168, 33, 7036, 16, 2492, 33, 7036, 16, 27349, 33, 7036, 16, 2826, 4333, 4672, 3536, 632, 891, 2168, 30, 432, 666, 434, 14962, 18, 5098, 326, 385, 95, ...
["""\
] class SpecialIncludeTestCase(DocutilsTestSupport.ParserTestCase): def test_parser(self): if self.run_in_debugger: pdb.set_trace() document = DocutilsTestSupport.utils.new_document( 'test data', self.settings) DocutilsTestSupport.roles._roles = {} self.parser.parse(self.input, document) output = document.pformat() self.assert_(re.match(self.expected_regex, output), "Real output:\n" + output + "\nExpected output:\n" + self.expected_regex) input = """\
def suite(): s = DocutilsTestSupport.ParserTestSuite() s.generateTests(totest) return s
890fa949b55831d0ea7841106527db8a18f4fdd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/890fa949b55831d0ea7841106527db8a18f4fdd7/test_include.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 2678, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 327, 272, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 2678, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 327, 272, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
y = self.__submodule(x) else: y = x return self.ambient_hecke_module()(y)
if not z.element() in self.__submodule: raise TypeError, "x does not coerce to an element of this Hecke module" return z
def __call__(self, x, check=False): """ Coerce x into the ambient module and checks that x is in this submodule. """ if check: y = self.__submodule(x) else: y = x return self.ambient_hecke_module()(y)
39a32529aad813e5305ce38a617aa7fb040ff1a9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/39a32529aad813e5305ce38a617aa7fb040ff1a9/submodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 866, 33, 8381, 4672, 3536, 7695, 2765, 619, 1368, 326, 13232, 1979, 1605, 471, 4271, 716, 619, 353, 316, 333, 27314, 18, 3536, 309, 866, 30, 677...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 619, 16, 866, 33, 8381, 4672, 3536, 7695, 2765, 619, 1368, 326, 13232, 1979, 1605, 471, 4271, 716, 619, 353, 316, 333, 27314, 18, 3536, 309, 866, 30, 677...
p, n = map(float, f.readline().split())
p, n = map(float, line.split())
def suck(f): fns = [] fps = [] while 1: line = f.readline() if line.startswith('total'): break if not line.startswith('Training'): # A line with an f-p rate and an f-n rate. p, n = map(float, f.readline().split()) fps.append(p) fns.append(n) # "total false pos 8 0.04" # "total false neg 249 1.81090909091" fptot = int(line.split()[-2]) fntot = int(f.readline().split()[-2]) return fps, fns, fptot, fntot
b0c0ec25bc767a42cb36f0bf2a1eabbfae63cbde /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/b0c0ec25bc767a42cb36f0bf2a1eabbfae63cbde/cmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1597, 363, 12, 74, 4672, 21930, 273, 5378, 26067, 273, 5378, 1323, 404, 30, 980, 273, 284, 18, 896, 1369, 1435, 309, 980, 18, 17514, 1918, 2668, 4963, 11, 4672, 898, 309, 486, 980, 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, 1597, 363, 12, 74, 4672, 21930, 273, 5378, 26067, 273, 5378, 1323, 404, 30, 980, 273, 284, 18, 896, 1369, 1435, 309, 980, 18, 17514, 1918, 2668, 4963, 11, 4672, 898, 309, 486, 980, 18,...
with io.open(support.TESTFN, self.write_mode, buffering=0) as raw:
with self.open(support.TESTFN, self.write_mode, buffering=0) as raw:
def test_threads(self): try: # Write out many bytes from many threads and test they were # all flushed. N = 1000 contents = bytes(range(256)) * N sizes = cycle([1, 19]) n = 0 queue = deque() while n < len(contents): size = next(sizes) queue.append(contents[n:n+size]) n += size del contents # We use a real file object because it allows us to # exercise situations where the GIL is released before # writing the buffer to the raw streams. This is in addition # to concurrency issues due to switching threads in the middle # of Python code. with io.open(support.TESTFN, self.write_mode, buffering=0) as raw: bufio = self.tp(raw, 8) errors = [] def f(): try: while True: try: s = queue.popleft() except IndexError: return bufio.write(s) except Exception as e: errors.append(e) raise threads = [threading.Thread(target=f) for x in range(20)] for t in threads: t.start() time.sleep(0.02) # yield for t in threads: t.join() self.assertFalse(errors, "the following exceptions were caught: %r" % errors) bufio.close() with io.open(support.TESTFN, "rb") as f: s = f.read() for i in range(256): self.assertEquals(s.count(bytes([i])), N) finally: support.unlink(support.TESTFN)
1eb8e6fd9a20dd970536c19c924ca697ad648652 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/1eb8e6fd9a20dd970536c19c924ca697ad648652/test_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12495, 12, 2890, 4672, 775, 30, 468, 2598, 596, 4906, 1731, 628, 4906, 7403, 471, 1842, 2898, 4591, 468, 777, 22604, 18, 423, 273, 4336, 2939, 273, 1731, 12, 3676, 12, 5034, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12495, 12, 2890, 4672, 775, 30, 468, 2598, 596, 4906, 1731, 628, 4906, 7403, 471, 1842, 2898, 4591, 468, 777, 22604, 18, 423, 273, 4336, 2939, 273, 1731, 12, 3676, 12, 5034, ...
zLOG.LOG('PloneLocalFolderNG', zLOG.INFO , "validFolder() :: path = %s" %destfolder )
def validFolder(self, REQUEST=None): """ dtermine if the requested folder path is legal and exists """
97f1e6006a3369cff34a5a0b62b63bacecca7475 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/97f1e6006a3369cff34a5a0b62b63bacecca7475/PloneLocalFolderNG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 3899, 12, 2890, 16, 225, 12492, 33, 7036, 4672, 3536, 302, 387, 3081, 309, 326, 3764, 3009, 589, 353, 19286, 471, 1704, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 923, 3899, 12, 2890, 16, 225, 12492, 33, 7036, 4672, 3536, 302, 387, 3081, 309, 326, 3764, 3009, 589, 353, 19286, 471, 1704, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
clause.append("%s LIKE '%%%s%%'" % (col, util.sql_escape(v[0]))) else: clause.append("%s = '%s'" % (col, util.sql_escape(v[0]))) if not k in Ticket.std_fields: clauses.append("(name='%s' AND (" % k + " OR ".join(clause) + "))") else: clauses.append(" OR ".join(clause))
clauses.append("%s LIKE '%%%s%%'" % (k, util.sql_escape(v[0]))) else: clauses.append("%s='%s'" % (k, util.sql_escape(v[0])))
def _render_results(self, constraints, order, desc): self.req.hdf.setValue('title', 'Custom Query') self.req.hdf.setValue('query.edit_href', self.env.href.query(constraints, order, desc, action='edit'))
a3a62640366abf5edeb894dec067a0e76c4eaec1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/a3a62640366abf5edeb894dec067a0e76c4eaec1/Query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4717, 12, 2890, 16, 6237, 16, 1353, 16, 3044, 4672, 365, 18, 3658, 18, 26428, 18, 542, 620, 2668, 2649, 2187, 296, 3802, 2770, 6134, 365, 18, 3658, 18, 26428, 18, 542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 4717, 12, 2890, 16, 6237, 16, 1353, 16, 3044, 4672, 365, 18, 3658, 18, 26428, 18, 542, 620, 2668, 2649, 2187, 296, 3802, 2770, 6134, 365, 18, 3658, 18, 26428, 18, 542, ...
return self.db.cincrefstmt(v.name, T)
return self.db.cincrefstmt(LOCALVAR % v.name, T)
def cincref(self, v): T = self.lltypemap(v) return self.db.cincrefstmt(v.name, T)
a489248c71cf1c040180bf5a68654706a1cd4aa2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/a489248c71cf1c040180bf5a68654706a1cd4aa2/funcgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 9523, 1734, 12, 2890, 16, 331, 4672, 399, 273, 365, 18, 2906, 723, 1458, 12, 90, 13, 327, 365, 18, 1966, 18, 71, 9523, 1734, 10589, 12, 90, 18, 529, 16, 399, 13, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 276, 9523, 1734, 12, 2890, 16, 331, 4672, 399, 273, 365, 18, 2906, 723, 1458, 12, 90, 13, 327, 365, 18, 1966, 18, 71, 9523, 1734, 10589, 12, 90, 18, 529, 16, 399, 13, 2, -100, -100...
os.rename(tmp_file.name, dest)
try: if hasattr(os, 'link'): os.link(tmp_file.name, dest) os.remove(tmp_file.name) else: os.rename(tmp_file.name, dest) except OSError, e: os.remove(tmp_file.name) if e.errno == errno.EEXIST: raise ExternalClashError('Name clash with existing message: %s' % dest) else: raise
def add(self, message): """Add message and return assigned key.""" tmp_file = self._create_tmp() try: self._dump_message(message, tmp_file) finally: _sync_close(tmp_file) if isinstance(message, MaildirMessage): subdir = message.get_subdir() suffix = self.colon + message.get_info() if suffix == self.colon: suffix = '' else: subdir = 'new' suffix = '' uniq = os.path.basename(tmp_file.name).split(self.colon)[0] dest = os.path.join(self._path, subdir, uniq + suffix) os.rename(tmp_file.name, dest) if isinstance(message, MaildirMessage): os.utime(dest, (os.path.getatime(dest), message.get_date())) return uniq
1e38e4aa850ebcff4408bd7131342d5b020ff1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1e38e4aa850ebcff4408bd7131342d5b020ff1f0/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 883, 4672, 3536, 986, 883, 471, 327, 6958, 498, 12123, 1853, 67, 768, 273, 365, 6315, 2640, 67, 5645, 1435, 775, 30, 365, 6315, 8481, 67, 2150, 12, 2150, 16, 1853, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 883, 4672, 3536, 986, 883, 471, 327, 6958, 498, 12123, 1853, 67, 768, 273, 365, 6315, 2640, 67, 5645, 1435, 775, 30, 365, 6315, 8481, 67, 2150, 12, 2150, 16, 1853, ...
"""LabelFrame - Labelled Frame container.
"""LabelFrame - Labelled Frame container. Packages a frame widget and a label into one mega widget. To create widgets inside a LabelFrame widget, one creates the new widgets relative to the frame subwidget and manage them inside the frame subwidget.
def __init__ (self,master=None,cnf={}, **kw): TixWidget.__init__(self, master, 'tixLabelEntry', ['labelside','options'], cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5d050d1e124f0e400f34e9a2a31237ae6ccf7e1/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 7525, 33, 7036, 16, 10305, 74, 28793, 2826, 9987, 4672, 399, 697, 4609, 16186, 2738, 972, 12, 2890, 16, 4171, 16, 296, 88, 697, 2224, 1622, 2187, 10228, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 7525, 33, 7036, 16, 10305, 74, 28793, 2826, 9987, 4672, 399, 697, 4609, 16186, 2738, 972, 12, 2890, 16, 4171, 16, 296, 88, 697, 2224, 1622, 2187, 10228, ...
(fx+fy**fz,(fx,fy,fz),(fxv,fyv,fzv),1,fxv+fyv**fzv,'float32'), (fx+fy+theano.tensor.exp(fz),(fx,fy,fz),(fxv,fyv,fzv),1,fxv+fyv+numpy.exp(fzv),'float32'),
(fx+fy**fz,(fx,fy,fz),(fxv,fyv,fzv),1,fxv+fyv**fzv,'float32'), (fx+fy+theano.tensor.exp(fz),(fx,fy,fz),(fxv,fyv,fzv),1,fxv+fyv+numpy.exp(fzv),'float32'),
def my_init(shp, dtype='float64', num=0): #ret = theano._asarray(numpy.random.rand(*shp),dtype=dtype) ret = numpy.zeros(shp, dtype=dtype)+num return ret
2ad632716275d2ff65c4d7210a480fc8166f0ecd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/2ad632716275d2ff65c4d7210a480fc8166f0ecd/test_opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 2738, 12, 674, 84, 16, 3182, 2218, 5659, 1105, 2187, 818, 33, 20, 4672, 468, 1349, 273, 326, 31922, 6315, 345, 1126, 12, 15974, 18, 9188, 18, 7884, 30857, 674, 84, 3631, 8972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 2738, 12, 674, 84, 16, 3182, 2218, 5659, 1105, 2187, 818, 33, 20, 4672, 468, 1349, 273, 326, 31922, 6315, 345, 1126, 12, 15974, 18, 9188, 18, 7884, 30857, 674, 84, 3631, 8972...
regex = re.compile(r'^%s$' % (os.path.basename(get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'([A-Za-z0-9]+)'))))
regex = re.compile(r'^%s$' % (get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'([A-Za-z0-9]+)')))
def get_version_from_file(path, filename): regex = re.compile(r'^%s$' % (os.path.basename(get_output_filename(settings.COMPRESS_VERSION_PLACEHOLDER.join([re.escape(part) for part in filename.split(settings.COMPRESS_VERSION_PLACEHOLDER)]), r'([A-Za-z0-9]+)')))) for f in os.listdir(path): result = regex.match(f) if result and result.groups(): return result.groups()[0]
6df3ec50b99585a24c0a8e949194856fd08d6e64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12688/6df3ec50b99585a24c0a8e949194856fd08d6e64/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 67, 2080, 67, 768, 12, 803, 16, 1544, 4672, 3936, 273, 283, 18, 11100, 12, 86, 19856, 9, 87, 9227, 738, 261, 588, 67, 2844, 67, 3459, 12, 4272, 18, 4208, 22526, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 67, 2080, 67, 768, 12, 803, 16, 1544, 4672, 3936, 273, 283, 18, 11100, 12, 86, 19856, 9, 87, 9227, 738, 261, 588, 67, 2844, 67, 3459, 12, 4272, 18, 4208, 22526, 67, ...
self.interact1(a1, a2, d, r, p1, ksi[Z2])
if self.fix_alloys: p2 = self.par[Z2] else: p2 = p1 self.interact1(a1, a2, d, r, p1, p2, ksi[Z2])
def calculate(self, atoms): self.positions = atoms.get_positions().copy() self.cell = atoms.get_cell().copy() self.pbc = atoms.get_pbc().copy() icell = np.linalg.inv(self.cell) scaled = np.dot(self.positions, icell) N = [] for i in range(3): if self.pbc[i]: scaled[:, i] %= 1.0 v = icell[:, i] h = 1 / sqrt(np.dot(v, v)) N.append(int(self.rc / h) + 1) else: N.append(0)
6af1e9c00d78b96376a7df21c9092978e916cdfa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/6af1e9c00d78b96376a7df21c9092978e916cdfa/emt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 12, 2890, 16, 9006, 4672, 365, 18, 12388, 273, 9006, 18, 588, 67, 12388, 7675, 3530, 1435, 365, 18, 3855, 273, 9006, 18, 588, 67, 3855, 7675, 3530, 1435, 365, 18, 5733, 71, 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, 4604, 12, 2890, 16, 9006, 4672, 365, 18, 12388, 273, 9006, 18, 588, 67, 12388, 7675, 3530, 1435, 365, 18, 3855, 273, 9006, 18, 588, 67, 3855, 7675, 3530, 1435, 365, 18, 5733, 71, 273, ...
def popen2(cmd, mode='t', bufsize=-1):
del Popen3, Popen4, _active, _cleanup def popen2(cmd, bufsize=-1, mode='t'):
def popen2(cmd, mode='t', bufsize=-1): """Execute the shell command 'cmd' in a sub-process. If 'bufsize' is specified, it sets the buffer size for the I/O pipes. The file objects (child_stdout, child_stdin) are returned.""" w, r = os.popen2(cmd, mode, bufsize) return r, w
228f40112d91f0f8d66cea99b2dc25f1c3f16038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/228f40112d91f0f8d66cea99b2dc25f1c3f16038/popen2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1464, 14339, 23, 16, 14339, 24, 16, 389, 3535, 16, 389, 16732, 225, 1652, 30925, 22, 12, 4172, 16, 1681, 1467, 29711, 21, 16, 1965, 2218, 88, 11, 4672, 3536, 5289, 326, 5972, 1296, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1464, 14339, 23, 16, 14339, 24, 16, 389, 3535, 16, 389, 16732, 225, 1652, 30925, 22, 12, 4172, 16, 1681, 1467, 29711, 21, 16, 1965, 2218, 88, 11, 4672, 3536, 5289, 326, 5972, 1296, 296,...
return SymbolicComposition(self, SR(x))
return SymbolicComposition(self, SR(x_original))
def __call__(self, x, maximum_bits=20000): try: return x.floor() except AttributeError: if isinstance(x, (float, int, long, complex)): return Integer(int(math.floor(x)))
7b468d09779af301ae165e1db8410165ea110ab2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b468d09779af301ae165e1db8410165ea110ab2/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 4207, 67, 6789, 33, 22, 2787, 4672, 775, 30, 327, 619, 18, 74, 5807, 1435, 1335, 6394, 30, 309, 1549, 12, 92, 16, 261, 5659, 16, 509, 16, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 16, 4207, 67, 6789, 33, 22, 2787, 4672, 775, 30, 327, 619, 18, 74, 5807, 1435, 1335, 6394, 30, 309, 1549, 12, 92, 16, 261, 5659, 16, 509, 16, 15...
print "instantiating ", subject
def __instancemaker(cls, params, instance_data): """ Construct resource from `instance_data`, return it. """
887643110b037190f61a83583c0e9bf7c0f3695c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13812/887643110b037190f61a83583c0e9bf7c0f3695c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1336, 29261, 12, 6429, 16, 859, 16, 791, 67, 892, 4672, 3536, 14291, 1058, 628, 1375, 1336, 67, 892, 9191, 327, 518, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1336, 29261, 12, 6429, 16, 859, 16, 791, 67, 892, 4672, 3536, 14291, 1058, 628, 1375, 1336, 67, 892, 9191, 327, 518, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
def det_GF(n=400, p=16411 ,min=1, max=100, system='sage'):
def det_GF(n=400, p=16411 , system='sage'):
def det_GF(n=400, p=16411 ,min=1, max=100, system='sage'): """ Dense integer determinant over GF. Given an n x n (with n=400) matrix A over GF with random entries between min=1 and max=100, inclusive, compute det(A). """ if system == 'sage': A = random_matrix(GF(p), n, n, x=min, y=max+1) t = cputime() d = A.determinant() return cputime(t) elif system == 'magma': code = """
00eb7f0c5b9b27579ece399304377f66b6fe249f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/00eb7f0c5b9b27579ece399304377f66b6fe249f/benchmark.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3023, 67, 43, 42, 12, 82, 33, 16010, 16, 293, 33, 23147, 2499, 269, 2619, 2218, 87, 410, 11, 4672, 3536, 23607, 3571, 6328, 970, 1879, 611, 42, 18, 16803, 392, 290, 619, 290, 261, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3023, 67, 43, 42, 12, 82, 33, 16010, 16, 293, 33, 23147, 2499, 269, 2619, 2218, 87, 410, 11, 4672, 3536, 23607, 3571, 6328, 970, 1879, 611, 42, 18, 16803, 392, 290, 619, 290, 261, 19...
if (err[0] == socket.SSL_ERROR_WANT_READ or err[0] == socket.SSL_ERROR_WANT_WRITE):
err_type = err.message if (err_type == socket.SSL_ERROR_WANT_READ or err_type == socket.SSL_ERROR_WANT_WRITE):
def _read(self): buf = '' # put in a loop so that we retry on transient errors while True: try: buf = self._ssl.read(self._bufsize) except socket.sslerror as err: if (err[0] == socket.SSL_ERROR_WANT_READ or err[0] == socket.SSL_ERROR_WANT_WRITE): continue if (err[0] == socket.SSL_ERROR_ZERO_RETURN or err[0] == socket.SSL_ERROR_EOF): break raise except socket.error as err: if err[0] == errno.EINTR: continue if err[0] == errno.EBADF: # XXX socket was closed? break raise else: break return buf
80a93034fe2b56c4178335fafeb9141619e29d63 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/80a93034fe2b56c4178335fafeb9141619e29d63/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 12, 2890, 4672, 1681, 273, 875, 468, 1378, 316, 279, 2798, 1427, 716, 732, 3300, 603, 12315, 1334, 1323, 1053, 30, 775, 30, 1681, 273, 365, 6315, 8157, 18, 896, 12, 2890, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 896, 12, 2890, 4672, 1681, 273, 875, 468, 1378, 316, 279, 2798, 1427, 716, 732, 3300, 603, 12315, 1334, 1323, 1053, 30, 775, 30, 1681, 273, 365, 6315, 8157, 18, 896, 12, 2890, 631...
if len(string.lstrip(data)) < (len(data) - 4): nextnode.data = "\n\n\n" + string.lstrip(data)
s = data.lstrip() if len(s) < (len(data) - 4): nextnode.data = "\n\n\n" + s
def create_module_info(doc, section): # Heavy. node = extract_first_element(section, "modulesynopsis") if node is None: return set_tagName(node, "synopsis") lastchild = node.childNodes[-1] if lastchild.nodeType == TEXT \ and lastchild.data[-1:] == ".": lastchild.data = lastchild.data[:-1] modauthor = extract_first_element(section, "moduleauthor") if modauthor: set_tagName(modauthor, "author") modauthor.appendChild(doc.createTextNode( modauthor.getAttribute("name"))) modauthor.removeAttribute("name") platform = extract_first_element(section, "platform") if section.tagName == "section": modinfo_pos = 2 modinfo = doc.createElement("moduleinfo") moddecl = extract_first_element(section, "declaremodule") name = None if moddecl: modinfo.appendChild(doc.createTextNode("\n ")) name = moddecl.attributes["name"].value namenode = doc.createElement("name") namenode.appendChild(doc.createTextNode(name)) modinfo.appendChild(namenode) type = moddecl.attributes.get("type") if type: type = type.value modinfo.appendChild(doc.createTextNode("\n ")) typenode = doc.createElement("type") typenode.appendChild(doc.createTextNode(type)) modinfo.appendChild(typenode) versionadded = extract_first_element(section, "versionadded") if versionadded: modinfo.setAttribute("added", versionadded.getAttribute("version")) title = get_first_element(section, "title") if title: children = title.childNodes if len(children) >= 2 \ and children[0].nodeName == "module" \ and children[0].childNodes[0].data == name: # this is it; morph the <title> into <short-synopsis> first_data = children[1] if first_data.data[:4] == " ---": first_data.data = string.lstrip(first_data.data[4:]) set_tagName(title, "short-synopsis") if children[-1].nodeType == TEXT \ and children[-1].data[-1:] == ".": children[-1].data = children[-1].data[:-1] section.removeChild(title) section.removeChild(section.childNodes[0]) title.removeChild(children[0]) modinfo_pos = 0 else: ewrite("module name in title doesn't match" " <declaremodule/>; no <short-synopsis/>\n") else: ewrite("Unexpected condition: <section/> without <title/>\n") modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(node) if title and not contents_match(title, node): # The short synopsis is actually different, # and needs to be stored: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(title) if modauthor: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(modauthor) if platform: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(platform) modinfo.appendChild(doc.createTextNode("\n ")) section.insertBefore(modinfo, section.childNodes[modinfo_pos]) section.insertBefore(doc.createTextNode("\n "), modinfo) # # The rest of this removes extra newlines from where we cut out # a lot of elements. A lot of code for minimal value, but keeps # keeps the generated *ML from being too funny looking. # section.normalize() children = section.childNodes for i in range(len(children)): node = children[i] if node.nodeName == "moduleinfo": nextnode = children[i+1] if nextnode.nodeType == TEXT: data = nextnode.data if len(string.lstrip(data)) < (len(data) - 4): nextnode.data = "\n\n\n" + string.lstrip(data)
e1e96851d480a7d1acf8fd96abaeb00c195ae7b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e1e96851d480a7d1acf8fd96abaeb00c195ae7b1/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2978, 67, 1376, 12, 2434, 16, 2442, 4672, 468, 8264, 23935, 18, 756, 273, 2608, 67, 3645, 67, 2956, 12, 3464, 16, 315, 6400, 878, 29522, 7923, 309, 756, 353, 599, 30, 327, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2978, 67, 1376, 12, 2434, 16, 2442, 4672, 468, 8264, 23935, 18, 756, 273, 2608, 67, 3645, 67, 2956, 12, 3464, 16, 315, 6400, 878, 29522, 7923, 309, 756, 353, 599, 30, 327, 4...
self.disableAnnounceAndDelete()
self.disable() self.delete() self._destroyDO()
def releaseDelayDelete(self, token): name = self._token2delayDeleteName.pop(token) assert self.notify.debug("releasing delayDelete '%s'" % name) if len(self._token2delayDeleteName) == 0: assert self.notify.debug( "delayDelete count for doId %s now 0" % (self.doId)) self.cr._removeDelayDeletedDO(self) if self.deleteImminent: assert self.notify.debug( "delayDelete count for doId %s -- deleteImminent" % (self.doId)) self.disableAnnounceAndDelete()
9a0cfd2725967aa54e8c519381ed45171911dc65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/9a0cfd2725967aa54e8c519381ed45171911dc65/DistributedObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3992, 6763, 2613, 12, 2890, 16, 1147, 4672, 508, 273, 365, 6315, 2316, 22, 10790, 2613, 461, 18, 5120, 12, 2316, 13, 1815, 365, 18, 12336, 18, 4148, 2932, 16599, 11730, 4624, 2613, 1995,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3992, 6763, 2613, 12, 2890, 16, 1147, 4672, 508, 273, 365, 6315, 2316, 22, 10790, 2613, 461, 18, 5120, 12, 2316, 13, 1815, 365, 18, 12336, 18, 4148, 2932, 16599, 11730, 4624, 2613, 1995,...
view.conf = self.conf view.__bases__ = bases + view.__bases__
self.conf.urls = urls self.conf.display_to_user = self.kwargs['display_to_user'] and isinstance(urls, tuple)
def get(self): if self.conf: return self.conf
ff50f63c8da23d162dfb3f3418847e3fb2802385 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/ff50f63c8da23d162dfb3f3418847e3fb2802385/settings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 309, 365, 18, 3923, 30, 327, 365, 18, 3923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 309, 365, 18, 3923, 30, 327, 365, 18, 3923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
terms.append('%d <= %s <= %d' % (min, expr, max))
terms.append('(%d <= %s && %s <= %d)' % (min, expr, expr, max))
def generatecond(self, cond): if isinstance(cond, Always): return '1' elif isinstance(cond, Never): return '0' elif isinstance(cond, Equal): if cond.value == 0: return '!' + self.generateexpr(cond.expr) else: return '%s == %d' % (self.generateexpr(cond.expr), cond.value) elif isinstance(cond, NotEqual): if cond.value == 0: return self.generateexpr(cond.expr) else: return '%s != %d' % (self.generateexpr(cond.expr), cond.value) elif isinstance(cond, Range): expr = self.generateexpr(cond.expr) terms = [] for min, max in cond.ranges: if min is None: terms.append('%s <= %d' % (expr, max)) elif max is None: terms.append('%d <= %s' % (min, expr)) else: terms.append('%d <= %s <= %d' % (min, expr, max)) if len(terms) == 1: return terms[0] else: return '(%s)' % ' || '.join(terms) elif isinstance(cond, Conjunction): return '(%s)' % ' && '.join(map(self.generateexpr, cond)) elif isinstance(cond, Disjunction): return '(%s)' % ' || '.join(map(self.generateexpr, cond)) else: assert False
0f4992cce44f3fbf1046ec1c6c981bc4fad023f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/0f4992cce44f3fbf1046ec1c6c981bc4fad023f7/c.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 10013, 12, 2890, 16, 6941, 4672, 309, 1549, 12, 10013, 16, 14178, 4672, 327, 296, 21, 11, 1327, 1549, 12, 10013, 16, 24496, 4672, 327, 296, 20, 11, 1327, 1549, 12, 10013, 16, 905...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 10013, 12, 2890, 16, 6941, 4672, 309, 1549, 12, 10013, 16, 14178, 4672, 327, 296, 21, 11, 1327, 1549, 12, 10013, 16, 24496, 4672, 327, 296, 20, 11, 1327, 1549, 12, 10013, 16, 905...
raise IOError('No color database file found')
usage(1, 'No color database file found, see the -d option.')
def main(): try: opts, args = getopt.getopt( sys.argv[1:], 'hd:', ['database=', 'help']) except getopt.error, msg: usage(1, msg) if len(args) == 0: initialcolor = 'grey50' elif len(args) == 1: initialcolor = args[0] else: usage(1) for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-d', '--database'): RGB_TXT.insert(0, arg) # create the windows and go for f in RGB_TXT: try: colordb = ColorDB.get_colordb(f) break except IOError: pass else: raise IOError('No color database file found') # get triplet for initial color try: red, green, blue = colordb.find_byname(initialcolor) except ColorDB.BadColor: # must be a #rrggbb style color try: red, green, blue = ColorDB.rrggbb_to_triplet(initialcolor) except ColorDB.BadColor: print 'Bad initial color, using default: %s' % initialcolor initialcolor = 'grey50' try: red, green, blue = ColorDB.rrggbb_to_triplet(initialcolor) except ColorDB.BadColor: usage(1, 'Cannot find an initial color to use') # create all output widgets s = Switchboard(colordb) # create the application window decorations app = PyncheWidget(__version__, s) parent = app.parent() s.add_view(StripViewer(s, parent)) s.add_view(ChipViewer(s, parent)) s.add_view(TypeinViewer(s, parent)) s.update_views(red, green, blue) try: app.start() except KeyboardInterrupt: pass
1ee02ac8d14d271ef84b6fc6d1242e8698834b8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1ee02ac8d14d271ef84b6fc6d1242e8698834b8f/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 22057, 30, 2187, 10228, 6231, 33, 2187, 296, 5201, 19486, 1335, 336, 383...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 2589, 18, 19485, 63, 21, 30, 6487, 296, 22057, 30, 2187, 10228, 6231, 33, 2187, 296, 5201, 19486, 1335, 336, 383...
self.bgmodel = BgModelInN(ystart=ys, tstart=self.tstart, tend=self.tend,
self.bgmodel = MalikBg(ystart=ys, tstart=self.tstart, tend=self.tend,
def runbg(self): """Run bg model after setting initial conditions.""" #Check ystart is in right form (1-d array of three values) if self.ystart.ndim == 1: ys = self.ystart[0:3] elif self.ystart.ndim == 2: ys = self.ystart[0:3,0] self.bgmodel = BgModelInN(ystart=ys, tstart=self.tstart, tend=self.tend, tstep_wanted=self.tstep_wanted, tstep_min=self.tstep_min, solver=self.solver, mass=self.mass) #Start background run print("Running background model...\n") try: self.bgmodel.run(saveresults=False) except ModelError, er: print "Error in background run, aborting! Message: " + er.message #Find end of inflation self.fotend, self.fotendindex = self.bgmodel.findinflend() print("Background run complete, inflation ended " + str(self.fotend) + " efoldings after start.") return
ca17172d92c4324f9a926be66d6f3d796980810a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/ca17172d92c4324f9a926be66d6f3d796980810a/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12370, 12, 2890, 4672, 3536, 1997, 7611, 938, 1839, 3637, 2172, 4636, 12123, 468, 1564, 677, 1937, 353, 316, 2145, 646, 261, 21, 17, 72, 526, 434, 8925, 924, 13, 309, 365, 18, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12370, 12, 2890, 4672, 3536, 1997, 7611, 938, 1839, 3637, 2172, 4636, 12123, 468, 1564, 677, 1937, 353, 316, 2145, 646, 261, 21, 17, 72, 526, 434, 8925, 924, 13, 309, 365, 18, 10...
output('<TD%s%s VALIGN="TOP" ALLIGN="LEFT">' %
output('<TD%s%s VALIGN="TOP" ALIGN="LEFT">' %
def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data, colspan, section, md, treeData, level=0, args=None, simple_type={type(''):0, type(1):0, type(1.0):0}.has_key, ): "Render a tree as a table" have_arg=args.has_key exp=0 if level >= 0: urlattr=args['url'] if urlattr and hasattr(self, urlattr): tpUrl=getattr(self, urlattr) if not simple_type(type(tpUrl)): tpUrl=tpUrl() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl root_url = root_url or tpUrl treeData['tree-item-url']=url treeData['tree-level']=level treeData['tree-item-expanded']=0 idattr=args['id'] output=data.append items=None if (have_arg('assume_children') and args['assume_children'] and substate is not state): # We should not compute children unless we have to. # See if we've been asked to expand our children. for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if not exp: items=1 if items is None: validate=md.validate if have_arg('branches') and hasattr(self, args['branches']): if validate is None or not hasattr(self, 'aq_acquire'): items=getattr(self, args['branches']) else: items=self.aq_acquire(args['branches'],validate,md) items=items() elif have_arg('branches_expr'): items=args['branches_expr'](md) if not items and have_arg('leaves'): items=1 if items and items != 1: if validate is not None: unauth=[] index=0 for i in items: try: v=validate(items,items,index,i,md) except: v=0 if not v: unauth.append(index) index=index+1 if unauth: if have_arg('skip_unauthorized') and args['skip_unauthorized']: items=list(items) unauth.reverse() for i in unauth: del items[i] else: raise ValidationError, unauth if have_arg('sort'): # Faster/less mem in-place sort if type(items)==type(()): items=list(items) sort=args['sort'] size=range(len(items)) for i in size: v=items[i] k=getattr(v,sort) try: k=k() except: pass items[i]=(k,v) items.sort() for i in size: items[i]=items[i][1] diff.append(id) sub=None if substate is state: output('<TABLE CELLSPACING="0">\n') sub=substate[0] exp=items else: # Add prefix output('<TR>\n') # Add +/- icon if items: if level: if level > 3: output( '<TD COLSPAN="%s"></TD>' % (level-1)) elif level > 1: output('<TD></TD>' * (level-1)) output('<TD WIDTH="16"></TD>\n') output('<TD WIDTH="16" VALIGN="TOP">') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break #################################### # Mostly inline encode_seq for speed s=compress(str(diff)) if len(s) > 57: s=encode_str(s) else: s=b2a_base64(s)[:-1] l=find(s,'=') if l >= 0: s=s[:l] s=translate(s, tplus) #################################### script=md['SCRIPT_NAME'] if exp: treeData['tree-item-expanded']=1 output('<A NAME="%s">' '<A HREF="%s?tree-c=%s#%s">' '<IMG SRC="%s/p_/mi" BORDER=0></A>' % (id, root_url, s, id, script)) else: output('<A NAME="%s">' '<A HREF="%s?tree-e=%s#%s">' '<IMG SRC="%s/p_/pl" BORDER=0></A>' % (id, root_url, s, id, script)) output('</TD>\n') else: if level > 2: output('<TD COLSPAN="%s"></TD>' % level) elif level > 0: output('<TD></TD>' * level) output('<TD WIDTH="16"></TD>\n') # add item text dataspan=colspan-level output('<TD%s%s VALIGN="TOP" ALLIGN="LEFT">' % ((dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''), (have_arg('nowrap') and args['nowrap'] and ' NOWRAP' or '')) ) output(render_blocks(section, md)) output('</TD>\n</TR>\n') if exp: level=level+1 dataspan=colspan-level if level > 3: h='<TD COLSPAN="%s"></TD>' % (level-1) elif level > 1: h='<TD></TD>' * (level-1) else: h='' if have_arg('header'): doc=args['header'] if md.has_key(doc): doc=md.getitem(doc,0) else: doc=None if doc is not None: output(doc( None, md, standard_html_header=( '<TR>%s<TD WIDTH="16"></TD>' '<TD%s VALIGN="TOP">' % (h, (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''))), standard_html_footer='</TD></TR>', )) if items==1: # leaves if have_arg('leaves'): doc=args['leaves'] if md.has_key(doc): doc=md.getitem(doc,0) else: doc=None if doc is not None: treeData['-tree-substate-']=sub treeData['tree-level']=level md._push(treeData) try: output(doc( None,md, standard_html_header=( '<TR>%s<TD WIDTH="16"></TD>' '<TD%s VALIGN="TOP">' % (h, (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''))), standard_html_footer='</TD></TR>', )) finally: md._pop(1) elif have_arg('expand'): doc=args['expand'] if md.has_key(doc): doc=md.getitem(doc,0) else: doc=None if doc is not None: treeData['-tree-substate-']=sub treeData['tree-level']=level md._push(treeData) try: output(doc( None,md, standard_html_header=( '<TR>%s<TD WIDTH="16"></TD>' '<TD%s VALIGN="TOP">' % (h, (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''))), standard_html_footer='</TD></TR>', )) finally: md._pop(1) else: __traceback_info__=sub, args, state, substate ids={} for item in items: if hasattr(item, idattr): id=getattr(item, idattr) if not simple_type(type(id)): id=id() elif hasattr(item, '_p_oid'): id=item._p_oid else: id=pyid(item) if len(sub)==1: sub.append([]) substate=sub[1] ids[id]=1 md._push(InstanceDict(item,md)) try: data=tpRenderTABLE( item,id,root_url,url,state,substate,diff,data, colspan, section, md, treeData, level, args) finally: md._pop() if not sub[1]: del sub[1] ids=ids.has_key for i in range(len(substate)-1,-1): if not ids(substate[i][0]): del substate[i] if have_arg('footer'): doc=args['footer'] if md.has_key(doc): doc=md.getitem(doc,0) else: doc=None if doc is not None: output(doc( None, md, standard_html_header=( '<TR>%s<TD WIDTH="16"></TD>' '<TD%s VALIGN="TOP">' % (h, (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''))), standard_html_footer='</TD></TR>', )) del diff[-1] if not diff: output('</TABLE>\n') return data
db085b65e7fa2aaf240d0b708a68b5a52095e5b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/db085b65e7fa2aaf240d0b708a68b5a52095e5b3/TreeTag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8071, 3420, 7775, 12, 2890, 16, 612, 16, 1365, 67, 718, 16, 880, 16, 919, 16, 720, 2019, 16, 3122, 16, 501, 16, 20856, 16, 2442, 16, 3481, 16, 2151, 751, 16, 1801, 33, 20, 16, 833,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8071, 3420, 7775, 12, 2890, 16, 612, 16, 1365, 67, 718, 16, 880, 16, 919, 16, 720, 2019, 16, 3122, 16, 501, 16, 20856, 16, 2442, 16, 3481, 16, 2151, 751, 16, 1801, 33, 20, 16, 833,...
has1 = hasattr(do1, 'getPos') has2 = hasattr(do2, 'getPos') if not has1 and not has2:
dist1 = self._getDistanceFromLA(do1) dist2 = self._getDistanceFromLA(do2) if dist1 is None and dist2 is None:
def _compareDistance(self, do1, do2): has1 = hasattr(do1, 'getPos') has2 = hasattr(do2, 'getPos') if not has1 and not has2: return 0 if not has1: return 1 if not has2: return -1 dist1 = do1.getPos(localAvatar).length() dist2 = do2.getPos(localAvatar).length() if (dist1 < dist2): return -1 return 1
3e67228f14d2d1c674566e8d419062f5a416048a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/3e67228f14d2d1c674566e8d419062f5a416048a/DoCollectionManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9877, 7200, 12, 2890, 16, 741, 21, 16, 741, 22, 4672, 2411, 21, 273, 365, 6315, 588, 7200, 1265, 2534, 12, 2896, 21, 13, 2411, 22, 273, 365, 6315, 588, 7200, 1265, 2534, 12, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9877, 7200, 12, 2890, 16, 741, 21, 16, 741, 22, 4672, 2411, 21, 273, 365, 6315, 588, 7200, 1265, 2534, 12, 2896, 21, 13, 2411, 22, 273, 365, 6315, 588, 7200, 1265, 2534, 12, 289...
return S_OK(value) else: return S_ERROR(lfc.sstrerror(lfc.cvar.serrno)) def __closeDirectory(self,oDirectory): value = lfc.lfc_closedir(oDirectory)
return S_OK( value ) else: return S_ERROR( lfc.sstrerror( lfc.cvar.serrno ) ) def __closeDirectory( self, oDirectory ): value = lfc.lfc_closedir( oDirectory )
def __openDirectory(self,path): lfcPath = "%s%s" % (self.prefix,path) value = lfc.lfc_opendirg(lfcPath,'') if value: return S_OK(value) else: return S_ERROR(lfc.sstrerror(lfc.cvar.serrno))
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3190, 2853, 12, 2890, 16, 803, 4672, 328, 7142, 743, 273, 2213, 87, 9, 87, 6, 738, 261, 2890, 18, 3239, 16, 803, 13, 460, 273, 328, 7142, 18, 80, 7142, 67, 556, 28739, 75, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3190, 2853, 12, 2890, 16, 803, 4672, 328, 7142, 743, 273, 2213, 87, 9, 87, 6, 738, 261, 2890, 18, 3239, 16, 803, 13, 460, 273, 328, 7142, 18, 80, 7142, 67, 556, 28739, 75, 12...
f.close()
if f: f.close()
def copy_scripts (self): """Copy each script listed in 'self.scripts'; if it's marked as a Python script in the Unix way (first line matches 'first_line_re', ie. starts with "\#!" and contains "python"), then adjust the first line to refer to the current Python interpreter as we copy. """ self.mkpath(self.build_dir) outfiles = [] for script in self.scripts: adjust = 0 script = convert_path(script) outfile = os.path.join(self.build_dir, os.path.basename(script)) outfiles.append(outfile)
5b8df6145f7fcf2e122656eade450d10f934440e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/5b8df6145f7fcf2e122656eade450d10f934440e/build_scripts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 12827, 261, 2890, 4672, 3536, 2951, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 13506, 309, 518, 1807, 9350, 487, 279, 6600, 2728, 316, 326, 9480, 4031, 261, 3645, 980, 1885, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 12827, 261, 2890, 4672, 3536, 2951, 1517, 2728, 12889, 316, 296, 2890, 18, 12827, 13506, 309, 518, 1807, 9350, 487, 279, 6600, 2728, 316, 326, 9480, 4031, 261, 3645, 980, 1885, ...
if self.a1() != 0 or self.a2() != 0 or self.a3() != 0: raise NotImplementedError, \ "Elliptic curve must be given in the form y^2 = x^3 + ax + b" if self.discriminant().valuation(p) != 0: raise NotImplementedError, \ "Elliptic curve equation must be in minimal form at p"
X = self.weierstrass_model() assert X.discriminant().valuation(p) == 0, "Something's gone wrong. " \ "The discriminant of the weierstrass model should be a unit " \ " at p."
def padic_E2(self, p, prec=20, check=False): r""" Returns the value of the $p$-adic modular form $E2$ for $(E, \omega)$ where $\omega$ is the usual invariant differential $dx/(2y + a_1 x + a_3)$.
fbba8699cf3ecefb0db470639d4626a2591837dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/fbba8699cf3ecefb0db470639d4626a2591837dc/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 41, 22, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 866, 33, 8381, 4672, 436, 8395, 2860, 326, 460, 434, 326, 271, 84, 8, 17, 20333, 681, 2490, 646, 271, 41, 22, 8, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 335, 67, 41, 22, 12, 2890, 16, 293, 16, 13382, 33, 3462, 16, 866, 33, 8381, 4672, 436, 8395, 2860, 326, 460, 434, 326, 271, 84, 8, 17, 20333, 681, 2490, 646, 271, 41, 22, 8, ...
purge(args[0], options.size, options.skip, options.dry_run)
purge(args, options.size, options.skip, options.dry_run)
def purge(base_dir, gigs, ignore, dry_run=False): """Delete directories under `base_dir` until `gigs` GB are free Will not delete directories listed in the ignore list.""" gigs *= 1024 * 1024 * 1024 if freespace(base_dir) >= gigs: return dirs = [os.path.join(base_dir, d) for d in os.listdir(base_dir) if os.path.isdir(os.path.join(base_dir, d)) and d not in ignore] dirs.sort(mtime_sort) while dirs and freespace(base_dir) < gigs: d = dirs.pop(0) print "Deleting", d if not dry_run: try: clobber_path=d+clobber_suffix if os.path.exists(clobber_path): rmdirRecursive(clobber_path) # Prevent repeated moving. if d.endswith(clobber_suffix): rmdirRecursive(d) else: shutil.move(d, clobber_path) rmdirRecursive(clobber_path) except: print >>sys.stderr, "Couldn't purge %s properly. Skipping." % d
c12b0ed3642211354e16f3ad24c1b0c1d06b35bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6206/c12b0ed3642211354e16f3ad24c1b0c1d06b35bc/purge_builds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12, 1969, 67, 1214, 16, 314, 360, 87, 16, 2305, 16, 10299, 67, 2681, 33, 8381, 4672, 3536, 2613, 6402, 3613, 1375, 1969, 67, 1214, 68, 3180, 1375, 75, 360, 87, 68, 25069, 854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12, 1969, 67, 1214, 16, 314, 360, 87, 16, 2305, 16, 10299, 67, 2681, 33, 8381, 4672, 3536, 2613, 6402, 3613, 1375, 1969, 67, 1214, 68, 3180, 1375, 75, 360, 87, 68, 25069, 854, ...
value = self.form['@dispname'].value self.dispname = value.decode(self.client.charset)
self.dispname = self.form['@dispname'].value else: self.dispname = None
def _post_init(self): ''' Set attributes based on self.form ''' # extract the index display information from the form self.columns = [] for name in ':columns @columns'.split(): if self.form.has_key(name): self.special_char = name[0] self.columns = handleListCGIValue(self.form[name]) break self.show = support.TruthDict(self.columns)
24452e4ed554aa8c3faf5f32818c6e6fa7d553d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/24452e4ed554aa8c3faf5f32818c6e6fa7d553d8/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2767, 67, 2738, 12, 2890, 4672, 9163, 1000, 1677, 2511, 603, 365, 18, 687, 9163, 468, 2608, 326, 770, 2562, 1779, 628, 326, 646, 365, 18, 5112, 273, 5378, 364, 508, 316, 4290, 511...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2767, 67, 2738, 12, 2890, 4672, 9163, 1000, 1677, 2511, 603, 365, 18, 687, 9163, 468, 2608, 326, 770, 2562, 1779, 628, 326, 646, 365, 18, 5112, 273, 5378, 364, 508, 316, 4290, 511...
else: portstr = '' extra = '%s%s' % (self.addr[0], portstr)
extra += '%s%s' % (self.addr[0], portstr)
def __repr__ (self): """object description""" if self.addr[1] != 80: portstr = ':%d' % self.addr[1] else: portstr = '' extra = '%s%s' % (self.addr[0], portstr) if self.socket: extra += " (%s)" % self.socket.state_string() if not self.connected: extra += " (unconnected)" #if len(extra) > 46: extra = extra[:43] + '...' return '<%s:%-8s %s>' % ('sslserver', self.state, extra)
bf76799da96a6df02ff60d023f221a0711d08765 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/bf76799da96a6df02ff60d023f221a0711d08765/SslServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 3536, 1612, 2477, 8395, 309, 365, 18, 4793, 63, 21, 65, 480, 8958, 30, 1756, 701, 273, 4290, 9, 72, 11, 738, 365, 18, 4793, 63, 21, 65, 2870, 1011,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 3536, 1612, 2477, 8395, 309, 365, 18, 4793, 63, 21, 65, 480, 8958, 30, 1756, 701, 273, 4290, 9, 72, 11, 738, 365, 18, 4793, 63, 21, 65, 2870, 1011,...
ns = namespace(self, error_type=errname, error_value=einfo[1],
ns = namespace(self, error_type=errname, error_value=v,
def render(self, md): # first we try to render the first block try: return render_blocks(self.section, md) except: # but an error occurs.. save the info. einfo = sys.exc_info() if type(einfo[0])==type(''): errname = einfo[0] else: errname = einfo[0].__name__
e5fa056505edfb80e052e4d5b196c1c09b21fa20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e5fa056505edfb80e052e4d5b196c1c09b21fa20/DT_Try.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 3481, 4672, 468, 1122, 732, 775, 358, 1743, 326, 1122, 1203, 775, 30, 327, 1743, 67, 7996, 12, 2890, 18, 3464, 16, 3481, 13, 1335, 30, 468, 1496, 392, 555, 9938, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 3481, 4672, 468, 1122, 732, 775, 358, 1743, 326, 1122, 1203, 775, 30, 327, 1743, 67, 7996, 12, 2890, 18, 3464, 16, 3481, 13, 1335, 30, 468, 1496, 392, 555, 9938, ...
self.assertRaises(Exception, self.CheckTree())
self.CheckTree()
def reparent(parent_id=False): record_ids = self.mptt.search([ ('parent', '=', parent_id), ], CONTEXT) if not record_ids: return for record_id in record_ids: for record2_id in record_ids: if record_id != record2_id: self.mptt.write(record_id, { 'parent': record2_id, }, CONTEXT) self.assertRaises(Exception, self.CheckTree()) self.mptt.write(record_id, { 'parent': parent_id, }, CONTEXT) self.assertRaises(Exception, self.CheckTree()) for record_id in record_ids: reparent(record_id)
4eb41eb13692d42bf9b2de715e54289debf04e4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/4eb41eb13692d42bf9b2de715e54289debf04e4c/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2071, 817, 12, 2938, 67, 350, 33, 8381, 4672, 1409, 67, 2232, 273, 365, 18, 81, 337, 88, 18, 3072, 3816, 7707, 2938, 2187, 15196, 2187, 982, 67, 350, 3631, 308, 16, 13862, 13, 309, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2071, 817, 12, 2938, 67, 350, 33, 8381, 4672, 1409, 67, 2232, 273, 365, 18, 81, 337, 88, 18, 3072, 3816, 7707, 2938, 2187, 15196, 2187, 982, 67, 350, 3631, 308, 16, 13862, 13, 309, 4...
print >> sys.stderr, name, rd, pythoncom.VT_UNKNOWN
s = linePrefix + 'def ' + name + '(self' + BuildCallList(fdesc, names, defNamedOptArg, defNamedNotOptArg, defUnnamedArg, defOutArg) + '):'
cb1004856658fba6b14829615dff31d9e0752b0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/cb1004856658fba6b14829615dff31d9e0752b0c/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 273, 980, 2244, 397, 296, 536, 296, 397, 508, 397, 7747, 2890, 11, 397, 3998, 1477, 682, 12, 74, 5569, 16, 1257, 16, 1652, 7604, 6179, 4117, 16, 1652, 7604, 1248, 6179, 4117, 16, 1652, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 273, 980, 2244, 397, 296, 536, 296, 397, 508, 397, 7747, 2890, 11, 397, 3998, 1477, 682, 12, 74, 5569, 16, 1257, 16, 1652, 7604, 6179, 4117, 16, 1652, 7604, 1248, 6179, 4117, 16, 1652, ...
logger.info('Email successfully send to: %s', address)
logger.info('Email successfully sent to: %s', address)
def run(self, cr, uid, ids, context=None): logger = logging.getLogger(self._name) if context is None: context = {} for action in self.browse(cr, uid, ids, context): obj_pool = self.pool.get(action.model_id.model) obj = obj_pool.browse(cr, uid, context['active_id'], context=context) cxt = { 'context': dict(context), # copy context to prevent side-effects of eval 'object': obj, 'time':time, 'cr': cr, 'pool' : self.pool, 'uid' : uid } expr = eval(str(action.condition), cxt) if not expr: continue
c2ab08af4dec3dc76492ca17348ee85dc1bcc4a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/c2ab08af4dec3dc76492ca17348ee85dc1bcc4a1/ir_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1194, 273, 2907, 18, 588, 3328, 12, 2890, 6315, 529, 13, 309, 819, 353, 599, 30, 819, 273, 2618, 364, 1301, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1194, 273, 2907, 18, 588, 3328, 12, 2890, 6315, 529, 13, 309, 819, 353, 599, 30, 819, 273, 2618, 364, 1301, 316...
self.text.append('\n')
self.text.append(self.new_line)
def process_br(self, node): self.text.append('\n') # without this, std multi-line text below some heading misses a whitespace # when it gets merged to float text, like word word wordword word word
4b03df1cf340caeb2a0e882fb5c853890be75c31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/4b03df1cf340caeb2a0e882fb5c853890be75c31/text_html_text_x_moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2848, 12, 2890, 16, 756, 4672, 365, 18, 955, 18, 6923, 2668, 64, 82, 6134, 468, 2887, 333, 16, 2044, 3309, 17, 1369, 977, 5712, 2690, 11053, 12543, 281, 279, 7983, 468, 1347,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2848, 12, 2890, 16, 756, 4672, 365, 18, 955, 18, 6923, 2668, 64, 82, 6134, 468, 2887, 333, 16, 2044, 3309, 17, 1369, 977, 5712, 2690, 11053, 12543, 281, 279, 7983, 468, 1347,...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 360) else quickfix.IntField.__init__(self, 360, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 12360, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, 972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 12360, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, 972, ...
[(-0.0588115223184495, 1), (1.36050567903502 + 1.51880872209965*I, 1), (-1.33109991787579 + 1.52241655183732*I, 1), (1.36050567903502 - 1.51880872209965*I, 1), (-1.33109991787580 - 1.52241655183732*I, 1)]
[(-0.0588115223184495, 1), (1.36050567903502 + 1.51880872209965*I, 1), (-1.331099917875... + 1.52241655183732*I, 1), (1.36050567903502 - 1.51880872209965*I, 1), (-1.33109991787580 - 1.52241655183732*I, 1)]
def roots(self, x=None, explicit_solutions=True, multiplicities=True, ring=None): r""" Returns roots of \code{self} that can be found exactly, possibly with multiplicities. Not all roots are guaranteed to be found.
03c36eb86f62c86234a23ffa02cd24f2b7da8f08 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/03c36eb86f62c86234a23ffa02cd24f2b7da8f08/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12876, 12, 2890, 16, 619, 33, 7036, 16, 5515, 67, 18281, 6170, 33, 5510, 16, 3309, 1780, 1961, 33, 5510, 16, 9221, 33, 7036, 4672, 436, 8395, 2860, 12876, 434, 521, 710, 95, 2890, 97, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12876, 12, 2890, 16, 619, 33, 7036, 16, 5515, 67, 18281, 6170, 33, 5510, 16, 3309, 1780, 1961, 33, 5510, 16, 9221, 33, 7036, 4672, 436, 8395, 2860, 12876, 434, 521, 710, 95, 2890, 97, ...
publication_item.inheritedAttribute("__setstate__") (self, state) if 'id' in self.__dict__: self.__name__ = self.__dict__['id'] del self.__dict__['id']
NyFSFile.inheritedAttribute("__setstate__") (self, state) if not hasattr(self, '__name__'): self.__name__ = self.id if not hasattr(self, '_ext_file'): self._ext_file = ExtFile(self.id, self.title) if not hasattr(self, 'content_type'): self.content_type = self.getContentType()
def __setstate__(self, state): """ Updates """ publication_item.inheritedAttribute("__setstate__") (self, state) if 'id' in self.__dict__: self.__name__ = self.__dict__['id'] del self.__dict__['id']
76827e0b30454fd7fd1a7612e51ff205fdf60611 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/76827e0b30454fd7fd1a7612e51ff205fdf60611/publication_item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 2019, 972, 12, 2890, 16, 919, 4672, 3536, 15419, 3536, 20574, 67, 1726, 18, 6018, 329, 1499, 2932, 972, 542, 2019, 972, 7923, 261, 2890, 16, 919, 13, 309, 296, 350, 11, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 2019, 972, 12, 2890, 16, 919, 4672, 3536, 15419, 3536, 20574, 67, 1726, 18, 6018, 329, 1499, 2932, 972, 542, 2019, 972, 7923, 261, 2890, 16, 919, 13, 309, 296, 350, 11, 316,...
], CONTEXT)
], 0, None, None, CONTEXT)
def test0060text(self): ''' Test Text. ''' text1_id = self.text.create({ 'text': 'Test', }, CONTEXT) self.assert_(text1_id)
52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 4848, 955, 12, 2890, 4672, 9163, 7766, 3867, 18, 9163, 977, 21, 67, 350, 273, 365, 18, 955, 18, 2640, 12590, 296, 955, 4278, 296, 4709, 2187, 19879, 13862, 13, 365, 18, 1123...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 4848, 955, 12, 2890, 4672, 9163, 7766, 3867, 18, 9163, 977, 21, 67, 350, 273, 365, 18, 955, 18, 2640, 12590, 296, 955, 4278, 296, 4709, 2187, 19879, 13862, 13, 365, 18, 1123...
r""" Number of prime divisors of $n$ (counted with multiplicity). Also called bigomega(n) or $\Omega(n)$. Maximal number of terms in any factorization of $n$. Number of prime powers that divide $n$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001222; a Number of prime divisors of n (counted with multiplicity). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 0 sage: a(8) 3 sage: a(41) 1 sage: a(84792) 5 sage: a.list(12) [0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3] AUTHOR: - Jaap Spies (2007-01-19) """ def __init__(self):
def __init__(self): r""" Number of prime divisors of $n$ (counted with multiplicity). Also called bigomega(n) or $\Omega(n)$. Maximal number of terms in any factorization of $n$. Number of prime powers that divide $n$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001222; a Number of prime divisors of n (counted with multiplicity). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 0 sage: a(8) 3 sage: a(41) 1 sage: a(84792) 5 sage: a.list(12) [0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3] AUTHOR: - Jaap Spies (2007-01-19) """
def _eval(self, n): return len(arith.prime_divisors(n)) # there is a PARI function omega
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 562, 12, 297, 483, 18, 16382, 67, 2892, 291, 1383, 12, 82, 3719, 468, 1915, 353, 279, 3939, 45, 445, 17220, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 562, 12, 297, 483, 18, 16382, 67, 2892, 291, 1383, 12, 82, 3719, 468, 1915, 353, 279, 3939, 45, 445, 17220, 2, -100, -100, -100, -100, -100, ...
except UnicodeEncodeError, exc:
except (UnicodeDecodeError, UnicodeEncodeError), exc:
def pconfig(option, raw=False): return self.config.get(self.name, option, raw=raw)
5dad6c65555a98c4456402834fc78f586995faa0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/5dad6c65555a98c4456402834fc78f586995faa0/tailor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31392, 12, 3482, 16, 1831, 33, 8381, 4672, 327, 365, 18, 1425, 18, 588, 12, 2890, 18, 529, 16, 1456, 16, 1831, 33, 1899, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31392, 12, 3482, 16, 1831, 33, 8381, 4672, 327, 365, 18, 1425, 18, 588, 12, 2890, 18, 529, 16, 1456, 16, 1831, 33, 1899, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
link = page.link_to(self.request, text, querystr='action=%s' % action)
link = page.link_to(self.request, text, querystr='action=%s&%s' % (action, args))
def renderInText(self): """ Render macro in text context
878fa797f0311dd2d0f240414a0e3c7cbfc7b8c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/878fa797f0311dd2d0f240414a0e3c7cbfc7b8c0/Action.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 382, 1528, 12, 2890, 4672, 3536, 6987, 11522, 316, 977, 819, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 382, 1528, 12, 2890, 4672, 3536, 6987, 11522, 316, 977, 819, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...