rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
def on_window_configure(self, _widget, _event): width, height = self.window.get_size() | def on_window_configure(self, window, _event): if not window.props.visible: return width, height = window.get_size() | def on_window_configure(self, _widget, _event): width, height = self.window.get_size() if self.config.expanded: self.config.w, self.config.h = width, height else: self.config.w = width self.config.x, self.config.y = self.window.get_position() self.expander_ellipse_workaround() | b0b99b35bdaefb7821c419f18bec9f004375125d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/b0b99b35bdaefb7821c419f18bec9f004375125d/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
5668,
67,
14895,
12,
2890,
16,
2742,
16,
389,
2575,
4672,
377,
309,
486,
2742,
18,
9693,
18,
8613,
30,
327,
225,
1835,
16,
2072,
273,
2742,
18,
588,
67,
1467,
1435,
309,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
5668,
67,
14895,
12,
2890,
16,
2742,
16,
389,
2575,
4672,
377,
309,
486,
2742,
18,
9693,
18,
8613,
30,
327,
225,
1835,
16,
2072,
273,
2742,
18,
588,
67,
1467,
1435,
309,
365... |
panelUp = pyPanelUp(splitter) | panel_up = upper_panel(splitter) | def __init__(self, parent, id, title="pyLoad"): wx.Frame.__init__(self,parent,id,title, size=(800,500)) appPath = dirname(abspath(__file__)) + sep | 94c1c737c5455762bbea312f891856b5c0deb497 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/94c1c737c5455762bbea312f891856b5c0deb497/pyMainGui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
612,
16,
2077,
1546,
2074,
2563,
6,
4672,
225,
7075,
18,
3219,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
350,
16,
2649,
16,
963,
28657,
17374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
612,
16,
2077,
1546,
2074,
2563,
6,
4672,
225,
7075,
18,
3219,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
350,
16,
2649,
16,
963,
28657,
17374,
... |
def _cfg_string(self, prefix, print_descr=True): | def _cfg_string(self, prefix, print_desc=True): | def _cfg_string(self, prefix, print_descr=True): if not prefix.endswith(']'): prefix = prefix + self.name if hasattr(self.value, '_cfg_string'): return self.value._cfg_string(prefix, print_descr) descr = newline = '' if print_descr: descr = '# %s\n' % self.descr.encode(ENCODING, 'replace').\ replace('\n', '\n# ') newline = '\n' value = self.value if isinstance(self.value, unicode): # convert unicode to string value = self.value.encode(ENCODING, 'replace') if self.value == self.default: return '%s# %s = %s%s' % (descr, prefix, value, newline) return '%s%s = %s%s' % (descr, prefix, value, newline) | 513f97ca83b44ea792b8e169cb28ed0b3e8c402e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/513f97ca83b44ea792b8e169cb28ed0b3e8c402e/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7066,
67,
1080,
12,
2890,
16,
1633,
16,
1172,
67,
5569,
33,
5510,
4672,
309,
486,
1633,
18,
5839,
1918,
2668,
3864,
4672,
1633,
273,
1633,
397,
365,
18,
529,
309,
3859,
12,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7066,
67,
1080,
12,
2890,
16,
1633,
16,
1172,
67,
5569,
33,
5510,
4672,
309,
486,
1633,
18,
5839,
1918,
2668,
3864,
4672,
1633,
273,
1633,
397,
365,
18,
529,
309,
3859,
12,
2890,
... |
excName = str(excClass) | excName = str(exception) | def assertRaisesMessage(self, exception, callable, message, *args, **kwargs): """An extension of assertRaises, which also checks the exception message. We need this because we rely on exception messages when redirecting. """ try: callable(*args, **kwargs) except exception, msg: self.assertEqual(str(msg), message) else: if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) raise self.failureException, excName | 615ded3cb3db77c1ec25db75234fa0bd24d2e052 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/615ded3cb3db77c1ec25db75234fa0bd24d2e052/test_actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
12649,
6141,
1079,
12,
2890,
16,
1520,
16,
4140,
16,
883,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
979,
2710,
434,
1815,
12649,
6141,
16,
1492,
2546,
4271,
326,
1520,
883,
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,
1815,
12649,
6141,
1079,
12,
2890,
16,
1520,
16,
4140,
16,
883,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
979,
2710,
434,
1815,
12649,
6141,
16,
1492,
2546,
4271,
326,
1520,
883,
18,
... |
self.trace += " +++++ %s added to %s\n" %(nid,str(p)) | if DEBUG: self.trace += " +++++ %s added to %s\n" %(nid,str(p)) | def __add_node(self,nid,paths=None): error = "Adding node %s to paths %s\n" %(nid,paths) self.trace += " "+error #we only add node that really need it. curdis = self.is_displayed(nid) newdis = self.__is_displayed(nid) #it should not be displayed, don't add it. if not newdis: return False if not paths: paths = self.__get_paths_for_node(nid) error += "%s got the paths %s\n" %(nid,paths) #We remove the paths that are already displayed if curdis: for pp in self.get_paths_for_node(nid): if pp in paths: paths.remove(pp) error += "path %s is already displayed. Not to add\n"%str(pp) self.trace += " we wont add path %s for %s\n" %(str(pp),nid) node_dic = self.cache_nodes[nid] else: #Not displayed, creating the node node_dic = {} node_dic['paths'] = [] node_dic['parents'] = [] node_dic['children'] = [] # childrens will add themselves afterward if self.cache_nodes.has_key(nid): raise Exception('%s was already a visible node when added' %nid) self.cache_nodes[nid] = node_dic #Now we add each path separately for p in paths: #check that the path is free other = self.get_node_for_path(p) to_readd = [] if other and other != nid: self.trace += " adding %s to path %s but occupied by %s\n"\ %(nid,str(p),other) to_readd = self.__next_nodes(other,p) to_readd.append([other,p]) for t in to_readd: self.__delete_node(t[0],[t[1]]) if p not in node_dic['paths']: #We do all the work only if the node doesn't already #has that path ! node_dic['paths'].append(p) if len(p) > 1: parent = self.get_node_for_path(p[:-1]) if not self.is_displayed(parent): #We should add a node to a non-existing parent break p_child = self.cache_nodes[parent]['children'] if parent not in node_dic['parents']: node_dic['parents'].append(parent) if nid not in p_child: p_child.append(nid) | 3ea21cb81161e3d09b3e56c7f94d1f9b5e0adf83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/3ea21cb81161e3d09b3e56c7f94d1f9b5e0adf83/filteredtree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
67,
2159,
12,
2890,
16,
31030,
16,
4481,
33,
7036,
4672,
555,
273,
315,
13962,
756,
738,
87,
358,
2953,
738,
87,
64,
82,
6,
8975,
31030,
16,
4481,
13,
365,
18,
5129,
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,
1289,
67,
2159,
12,
2890,
16,
31030,
16,
4481,
33,
7036,
4672,
555,
273,
315,
13962,
756,
738,
87,
358,
2953,
738,
87,
64,
82,
6,
8975,
31030,
16,
4481,
13,
365,
18,
5129,
1011... |
return self.Header, self.Name, self.Comment, self.Exec, self.Icon, self.Type | return self.Header, self.Name, self.GenName, self.Exec, self.Icon, self.Type | def getDesktopFile(self): return self.Header, self.Name, self.Comment, self.Exec, self.Icon, self.Type | 4fcbfbed60e511f85c58e074305411c99aa75ad7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7161/4fcbfbed60e511f85c58e074305411c99aa75ad7/genmenu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
281,
11869,
812,
12,
2890,
4672,
327,
365,
18,
1864,
16,
365,
18,
461,
16,
365,
18,
4469,
16,
365,
18,
1905,
16,
365,
18,
5554,
16,
365,
18,
559,
2,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
281,
11869,
812,
12,
2890,
4672,
327,
365,
18,
1864,
16,
365,
18,
461,
16,
365,
18,
4469,
16,
365,
18,
1905,
16,
365,
18,
5554,
16,
365,
18,
559,
2,
-100,
-100,
-100,
-100,
-... |
(succeeded, send) = self.RemoveBouncingAddress(addr) | succeeded, send = self.RemoveBouncingAddress(addr) did = _('removed') | def HandleBouncingAddress(self, addr, msg): """Disable or remove addr according to bounce_action setting.""" if self.automatic_bounce_action == 0: return elif self.automatic_bounce_action == 1: # Only send if call works ok. (succeeded, send) = self.DisableBouncingAddress(addr) did = "disabled" elif self.automatic_bounce_action == 2: (succeeded, send) = self.DisableBouncingAddress(addr) did = "disabled" # Never send. send = 0 elif self.automatic_bounce_action == 3: (succeeded, send) = self.RemoveBouncingAddress(addr) # Always send. send = 1 did = "removed" if send: if succeeded != 1: negative=_("not ") else: negative="" recipient = self.GetAdminEmail() if addr in self.owner + [recipient]: # Whoops! This is a bounce of a bounce notice - do not # perpetuate the bounce loop! Log it prominently and be # satisfied with that. syslog("error", "%s: Bounce recipient loop" " encountered!\n\t%s\n\tBad admin recipient: %s" % (self.internal_name(), "(Ie, bounce notification addr, itself, bounces.)", addr)) return import mimetools boundary = mimetools.choose_boundary() # report about success but = '' if succeeded <> 1: but = 'BUT: %s' % succeeded # disabled? if did == 'disabled' and succeeded == 1: reenable = Utils.maketext( 'reenable.txt', {'admin_url': self.GetScriptURL('admin', absolute=1), }, lang=self.preferred_language) else: reenable = '' # the mail message text text = Utils.maketext( 'bounce.txt', {'boundary' : boundary, 'listname' : self.real_name, 'addr' : addr, 'negative' : negative, 'did' : did, 'but' : but, 'reenable' : reenable, 'owneraddr': mm_cfg.MAILMAN_OWNER, }, lang=self.preferred_language) # add this here so it doesn't get wrapped/filled # FIXME text = text + '\n\n--' + boundary + \ '\nContent-type: text/plain; charset=' + Utils.GetCharSet() | ddb4d86d1b32100ca8fe220c020da7ceda7a02c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/ddb4d86d1b32100ca8fe220c020da7ceda7a02c9/Bouncer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
38,
465,
2822,
1887,
12,
2890,
16,
3091,
16,
1234,
4672,
3536,
11879,
578,
1206,
3091,
4888,
358,
324,
8386,
67,
1128,
3637,
12123,
309,
365,
18,
5854,
4941,
67,
70,
8386,
67,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5004,
38,
465,
2822,
1887,
12,
2890,
16,
3091,
16,
1234,
4672,
3536,
11879,
578,
1206,
3091,
4888,
358,
324,
8386,
67,
1128,
3637,
12123,
309,
365,
18,
5854,
4941,
67,
70,
8386,
67,
11... |
memoryUnits[0] = '1' | memoryUnits[0] = '2**-10' | def getOvfMemory(virtualHardware, configId=None): """ Retrieves the maximum amount of memory (kB) to be allocated for the virtual machine from the Ovf file. @note: DSP0004 v2.5.0 outlines the Programmatic Unit forms for OVF. This pertains specifically to rasd:AllocationUnits, which accepts both the current and deprecated forms. New implementations should not use Unit Qualifiers as this form is deprecated. - PUnit form, as in "byte * 2^20" - PUnit form w/ Units Qualifier(deprecated), as in "MegaBytes" @param virtualHardware: Ovf VirtualSystem Node @type virtualHardware: DOM Element @param configId: configuration name @type configId: String @return: memory in kB @rtype: String """ memory = '' # TODO: needs to use bound:max, if it exists rasd = Ovf.getDict(virtualHardware, configId)['children'] for resource in rasd: if(resource.has_key('rasd:ResourceType') and resource['rasd:ResourceType'] == '4'): memoryQuantity = resource['rasd:VirtualQuantity'] memoryUnits = resource['rasd:AllocationUnits'] if(memoryUnits.startswith('byte') or memoryUnits.startswith('bit')): # Calculate PUnit numerical factor memoryUnits = memoryUnits.replace('^','**') # Determine PUnit Quantifier DMTF DSP0004, {byte, bit} memoryUnits = memoryUnits.split(' ', 1) quantifier = memoryUnits[0] if quantifier == 'byte': memoryUnits[0] = '1' elif quantifier == 'bit': memoryUnits[0] = '0.125' else: raise ValueError("Incompatible PUnit quantifier for memory.") memoryUnits = ' '.join(memoryUnits) memoryFactor = eval(memoryUnits) else: if memoryUnits.startswith('Kilo'): memoryFactor = 1024**0 elif memoryUnits.startswith('Mega'): memoryFactor = 1024**1 elif memoryUnits.startswith('Giga'): memoryFactor = 1024**2 else: raise ValueError("Incompatible PUnit quantifier for memory.") if memoryUnits.endswith('Bytes'): memoryFactor *= 1 elif memoryUnits.endswith('Bits'): memoryFactor *= 0.125 else: raise ValueError("Incompatible PUnit quantifier for memory.") warnings.warn("DSP0004 v2.5.0: use PUnit Qualifiers", DeprecationWarning) memory = str(int(memoryQuantity) * memoryFactor) return memory | 9a3dfb5d70a0718a21504db41a86aad7ec160a32 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9789/9a3dfb5d70a0718a21504db41a86aad7ec160a32/OvfLibvirt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
6031,
12,
12384,
44,
14519,
16,
642,
548,
33,
7036,
4672,
3536,
20507,
326,
4207,
3844,
434,
3778,
261,
79,
38,
13,
358,
506,
11977,
364,
326,
5024,
5228,
628,
326,
531,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17971,
90,
74,
6031,
12,
12384,
44,
14519,
16,
642,
548,
33,
7036,
4672,
3536,
20507,
326,
4207,
3844,
434,
3778,
261,
79,
38,
13,
358,
506,
11977,
364,
326,
5024,
5228,
628,
326,
531,... |
- Unknown files: files marked with "?" by "hg status" - Empty directories: in fact Mercurial ignores directories unless they contain files under source control management | - Unknown files: files marked with "?" by "hg status" - Empty directories: in fact Mercurial ignores directories unless they contain files under source control management | def purge(ui, repo, *dirs, **opts): '''removes files not tracked by Mercurial Delete files not known to Mercurial. This is useful to test local and uncommitted changes in an otherwise-clean source tree. This means that purge will delete: - Unknown files: files marked with "?" by "hg status" - Empty directories: in fact Mercurial ignores directories unless they contain files under source control management But it will leave untouched: - Modified and unmodified tracked files - Ignored files (unless --all is specified) - New files added to the repository (with "hg add") If directories are given on the command line, only files in these directories are considered. Be careful with purge, as you could irreversibly delete some files you forgot to add to the repository. If you only want to print the list of files that this program would delete, use the --print option. ''' act = not opts['print'] eol = '\n' if opts['print0']: eol = '\0' act = False # --print0 implies --print def remove(remove_func, name): if act: try: remove_func(repo.wjoin(name)) except OSError: m = _('%s cannot be removed') % name if opts['abort_on_err']: raise util.Abort(m) ui.warn(_('warning: %s\n') % m) else: ui.write('%s%s' % (name, eol)) def removefile(path): try: os.remove(path) except OSError: # read-only files cannot be unlinked under Windows s = os.stat(path) if (s.st_mode & stat.S_IWRITE) != 0: raise os.chmod(path, stat.S_IMODE(s.st_mode) | stat.S_IWRITE) os.remove(path) directories = [] match = cmdutil.match(repo, dirs, opts) match.dir = directories.append status = repo.status(match=match, ignored=opts['all'], unknown=True) for f in sorted(status[4] + status[5]): ui.note(_('Removing file %s\n') % f) remove(removefile, f) for f in sorted(directories, reverse=True): if match(f) and not os.listdir(repo.wjoin(f)): ui.note(_('Removing directory %s\n') % f) remove(os.rmdir, f) | e5c4a8391cb9c899a8d4340e7c1b71e53aae86d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/e5c4a8391cb9c899a8d4340e7c1b71e53aae86d4/purge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
12,
4881,
16,
3538,
16,
380,
8291,
16,
2826,
4952,
4672,
9163,
2764,
10829,
1390,
486,
15200,
635,
14940,
1397,
649,
225,
2504,
1390,
486,
4846,
358,
14940,
1397,
649,
18,
1220,
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,
11668,
12,
4881,
16,
3538,
16,
380,
8291,
16,
2826,
4952,
4672,
9163,
2764,
10829,
1390,
486,
15200,
635,
14940,
1397,
649,
225,
2504,
1390,
486,
4846,
358,
14940,
1397,
649,
18,
1220,
3... |
logging.getLogger().debug("New command on host are created, its id is : %s" % myCommandOnHost.getId()) | logger.debug("New command on host are created, its id is : %s" % myCommandOnHost.getId()) | def dispatch(self, ctx): """ Inject as many lines in CommandsOnHost as required (i.e. one per target) """ | 4a59db1e070b2a71766a4543367b2f6c8f8b5247 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/4a59db1e070b2a71766a4543367b2f6c8f8b5247/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3435,
12,
2890,
16,
1103,
4672,
3536,
20085,
487,
4906,
2362,
316,
18034,
1398,
2594,
487,
1931,
261,
77,
18,
73,
18,
1245,
1534,
1018,
13,
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,
3435,
12,
2890,
16,
1103,
4672,
3536,
20085,
487,
4906,
2362,
316,
18034,
1398,
2594,
487,
1931,
261,
77,
18,
73,
18,
1245,
1534,
1018,
13,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) | self.set.append(obj_) | def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'row': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <row> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'row', obj_) self.content_.append(obj_) if hasattr(self, 'add_row'): self.add_row(obj_.value) elif hasattr(self, 'set_row'): self.set_row(obj_.value) elif nodeName_ == 'set': obj_ = RowSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractSeqMatrix, self).buildChildren(child_, nodeName_, True) | 9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4212,
12,
2890,
16,
1151,
67,
16,
7553,
67,
16,
628,
67,
10678,
33,
8381,
4672,
309,
7553,
67,
422,
296,
492,
4278,
618,
67,
529,
67,
273,
1151,
27799,
14588,
18,
588,
2668,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4212,
12,
2890,
16,
1151,
67,
16,
7553,
67,
16,
628,
67,
10678,
33,
8381,
4672,
309,
7553,
67,
422,
296,
492,
4278,
618,
67,
529,
67,
273,
1151,
27799,
14588,
18,
588,
2668,
95... |
return item.getAttributeValue(self._translationDict[match.group(0)]) | return item.getAttributeValue(self._translationDict[match.group(0)], default='') | def translate(match): return item.getAttributeValue(self._translationDict[match.group(0)]) | a791f931f5eb734a2f1e53cd8e648ca5b9ba42fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a791f931f5eb734a2f1e53cd8e648ca5b9ba42fe/ZaoBaoUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4204,
12,
1916,
4672,
327,
761,
18,
588,
14942,
12,
2890,
6315,
10173,
5014,
63,
1916,
18,
1655,
12,
20,
13,
6487,
805,
2218,
6134,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4204,
12,
1916,
4672,
327,
761,
18,
588,
14942,
12,
2890,
6315,
10173,
5014,
63,
1916,
18,
1655,
12,
20,
13,
6487,
805,
2218,
6134,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
encoded = simplejson.dumps(data) | encoded = JSONEncoder().encode(data) | def wishlist_remove_ajax(request, template="shop/json.html"): success, msg = _wishlist_remove(request) data = { 'success' : success, 'wishlist_message' : msg } encoded = simplejson.dumps(data) encoded = mark_safe(encoded) return render_to_response(template, {'json' : encoded}) | 8c5c95df6ac5e9459dc7e0c3ed9d8b505270e9c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13656/8c5c95df6ac5e9459dc7e0c3ed9d8b505270e9c7/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14302,
1098,
67,
4479,
67,
12813,
12,
2293,
16,
1542,
1546,
5020,
19,
1977,
18,
2620,
6,
4672,
2216,
16,
1234,
273,
389,
91,
1468,
1098,
67,
4479,
12,
2293,
13,
225,
501,
273,
288,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14302,
1098,
67,
4479,
67,
12813,
12,
2293,
16,
1542,
1546,
5020,
19,
1977,
18,
2620,
6,
4672,
2216,
16,
1234,
273,
389,
91,
1468,
1098,
67,
4479,
12,
2293,
13,
225,
501,
273,
288,
2... |
return str(self.func) | return repr(self.func) | def __repr__(self): return str(self.func) | 4fb61b9fde2c5f2910ac0efa15a69697c2e2498f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10078/4fb61b9fde2c5f2910ac0efa15a69697c2e2498f/proc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
609,
12,
2890,
18,
644,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1001,
12715,
972,
12,
2890,
4672,
327,
609,
12,
2890,
18,
644,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.upload(args, filename) except HTTPError, e: | (headers, data) = self.upload(args, filename) print 'Status code: ', headers.get("Dqm-Status-Code", "None") print 'Message: ', headers.get("Dqm-Status-Message", "None") print 'Detail: ', headers.get("Dqm-Status-Detail", "None") print data except urllib2.HTTPError, e: | def httpPost(self, analysisFile): """ _httpPost_ | 8aa0379b7ff693cb5ae777625af3f75853af35f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/8aa0379b7ff693cb5ae777625af3f75853af35f9/RuntimeOfflineDQM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
27678,
12,
2890,
16,
6285,
812,
4672,
3536,
389,
2505,
3349,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
27678,
12,
2890,
16,
6285,
812,
4672,
3536,
389,
2505,
3349,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
mixer.setPcmVolume(100) mixer.setLineinVolume(0) mixer.setMicVolume(0) | if config.CONTROL_ALL_AUDIO: mixer.setLineinVolume( 0 ) mixer.setMicVolume( 0 ) if( config.MAJOR_AUDIO_CTRL == 'VOL' ): mixer.setPcmVolume( 100 ) elif( config.MAJOR_AUDIO_CTRL == 'PCM' ): mixer.setMainVolume( 100 ) mixer.setIgainVolume( 0 ) | def play(self, mode, filename, playlist, repeat=0, mplayer_options=""): | 8c475a8f7aaeaffa9df31a85353b09d008613999 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/8c475a8f7aaeaffa9df31a85353b09d008613999/mplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
1965,
16,
1544,
16,
16428,
16,
7666,
33,
20,
16,
312,
14872,
67,
2116,
1546,
6,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6599,
12,
2890,
16,
1965,
16,
1544,
16,
16428,
16,
7666,
33,
20,
16,
312,
14872,
67,
2116,
1546,
6,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
sendtradepacket( player2.socket, 0, player1.serial, box2.serial, box1.serial, player1.name ) | if box2new: sendtradepacket( player2.socket, 0, player1.serial, box2.serial, box1.serial, player1.name ) | def onTradeStart( player1, player2, firstitem ): # If we are trading with someone else right now, # trading should be denied if player2.hastag('trade_partner'): partner = wolfpack.findchar(int(player2.gettag('trade_partner'))) if partner and partner != player1: player1.socket.sysmessage('Your trading partner is currently busy.') if not wolfpack.utilities.tobackpack(firstitem, player1): firstitem.update() return False if player1.hastag('trade_partner'): partner = wolfpack.findchar(int(player1.gettag('trade_partner'))) if partner and partner != player2: player1.socket.sysmessage('You are trading with someone else right now.') if not wolfpack.utilities.tobackpack(firstitem, player1): firstitem.update() return False #player1 : I am #player2 : Partner # Creating trade container for me box1 = player1.itemonlayer( LAYER_TRADING ) if not box1: box1 = wolfpack.additem( "e75" ) box1.owner = player1 player1.additem( LAYER_TRADING, box1 ) box1.update() # Same operation for partner box2 = player2.itemonlayer( LAYER_TRADING ) if not box2: box2 = wolfpack.additem("e75") box2.owner = player2 player2.additem( LAYER_TRADING, box2 ) box2.update() # Unable to create trade containers if not box1 or not box2: if not wolfpack.utilities.tobackpack(firstitem, player1): firstitem.update() return False #onLogout event should be executed for tradewindow disposing player1.addscript( 'system.trading' ) player2.addscript( 'system.trading' ) #We want to know serial of partner in future player1.settag( 'trade_partner', player2.serial ) player2.settag( 'trade_partner', player1.serial ) #We need to store button state of each player player1.settag( 'trade_button', 0 ) player2.settag( 'trade_button', 0 ) #Send trade window to both players #To me sendtradepacket( player1.socket, 0, player2.serial, box1.serial, box2.serial, player2.name ) #To partner sendtradepacket( player2.socket, 0, player1.serial, box2.serial, box1.serial, player1.name ) #Send buttons state #To me sendtradepacket( player1.socket, 2, box1.serial, 0, 0, "" ) #To partner sendtradepacket( player2.socket, 2, box2.serial, 0, 0, "" ) box1.additem( firstitem ) firstitem.update() return True | cea1c0798722ca2dfc98f409a8bc0cf75df8584a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/cea1c0798722ca2dfc98f409a8bc0cf75df8584a/trading.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
22583,
1685,
12,
7291,
21,
16,
7291,
22,
16,
1122,
1726,
262,
30,
468,
971,
732,
854,
1284,
7459,
598,
18626,
469,
2145,
2037,
16,
468,
1284,
7459,
1410,
506,
15338,
309,
7291,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
22583,
1685,
12,
7291,
21,
16,
7291,
22,
16,
1122,
1726,
262,
30,
468,
971,
732,
854,
1284,
7459,
598,
18626,
469,
2145,
2037,
16,
468,
1284,
7459,
1410,
506,
15338,
309,
7291,
22... |
return zip(*map(_alb_line2coords, [start_line, end_line])) | return zip(*map(_alb_line2coords, [start_line, end_line])) def _any(seq, pred=bool): "Returns True if pred(x) is True at least one element in the iterable" return True in itertools.imap(pred, seq) | def _get_coords(filename): alb = file(filename) start_line = None end_line = None for line in alb: if line.startswith("["): if not start_line: start_line = line # rstrip not needed else: end_line = line return zip(*map(_alb_line2coords, [start_line, end_line])) | f212eb623e2a184cb189d483d087724d9b5a42c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/f212eb623e2a184cb189d483d087724d9b5a42c0/dnal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
9076,
12,
3459,
4672,
524,
70,
273,
585,
12,
3459,
13,
225,
787,
67,
1369,
273,
599,
679,
67,
1369,
273,
599,
225,
364,
980,
316,
524,
70,
30,
309,
980,
18,
17514,
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,
389,
588,
67,
9076,
12,
3459,
4672,
524,
70,
273,
585,
12,
3459,
13,
225,
787,
67,
1369,
273,
599,
679,
67,
1369,
273,
599,
225,
364,
980,
316,
524,
70,
30,
309,
980,
18,
17514,
19... |
if len(args) < 1: | if len(args) != 2: | def main(): usage = """%prog release_version next_dev_version | 9dbb4cd44b3b61b6dea3181b24c1359b0a15d84e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12991/9dbb4cd44b3b61b6dea3181b24c1359b0a15d84e/makerelease.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
4084,
273,
3536,
9,
14654,
3992,
67,
1589,
1024,
67,
5206,
67,
1589,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
4084,
273,
3536,
9,
14654,
3992,
67,
1589,
1024,
67,
5206,
67,
1589,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
message is printed.] | message is printed [this is now implemented by a debug_pref, 060720].] | def _print_msg(self, msg): """Format and print one message (a string, usually not starting or ending with newline). Precede it with a timestamp. Most printing should go though this method. Client code should call a higher-level method which uses this one. [Someday we might also #e: - compress redundant messages which would otherwise be too verbose. - add html or xml formatting, differently for different kinds of messages, as indicated by optional args (not yet designed). - when debugging, print info about the call stack at the time the message is printed.] """ ###e in debug_stack mode, walk stack and compare to stored stack and print exit of old frames and enter of (some) new ones m1 = message(msg, hist = self) msg = m1.widget_html() # widget_text() or widget_html() self._append(msg) ##e need to pass the message object, since also puts it into the file, but text might be different! ###@@@ if 0 and platform.atom_debug: # this is redundant with __stderr__ in _append, so we no longer do it. print "(history:)", msg return | 4922aa850a453a07fa9026da08adfd7a14634dcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/4922aa850a453a07fa9026da08adfd7a14634dcb/HistoryWidget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1188,
67,
3576,
12,
2890,
16,
1234,
4672,
3536,
1630,
471,
1172,
1245,
883,
261,
69,
533,
16,
11234,
486,
5023,
578,
11463,
598,
9472,
2934,
2962,
311,
323,
518,
598,
279,
2858,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1188,
67,
3576,
12,
2890,
16,
1234,
4672,
3536,
1630,
471,
1172,
1245,
883,
261,
69,
533,
16,
11234,
486,
5023,
578,
11463,
598,
9472,
2934,
2962,
311,
323,
518,
598,
279,
2858,
1... |
if role: reg+="/Role=%s"%role | if role: reg+="/Role=%s"%role | def checkAttribute( self, proxy=None, vo='cms', group=None, role=None): """ """ valid = True if proxy == None: proxy=self.getUserProxy() | 321d0a2a330216db34ecb2beb7fb7be6fff38226 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/321d0a2a330216db34ecb2beb7fb7be6fff38226/Proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1499,
12,
365,
16,
2889,
33,
7036,
16,
19993,
2218,
6851,
2187,
1041,
33,
7036,
16,
2478,
33,
7036,
4672,
3536,
3536,
923,
273,
1053,
309,
2889,
422,
599,
30,
2889,
33,
2890,
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,
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,
1499,
12,
365,
16,
2889,
33,
7036,
16,
19993,
2218,
6851,
2187,
1041,
33,
7036,
16,
2478,
33,
7036,
4672,
3536,
3536,
923,
273,
1053,
309,
2889,
422,
599,
30,
2889,
33,
2890,
18,
... |
self.vo = self.am_getOption("/DIRAC/VirtualOrganization") if not self.vo: gLogger.fatal("No /DIRAC/VirtualOrganization option defined") return S_ERROR() | def initialize( self ): self.vo = self.am_getOption("/DIRAC/VirtualOrganization") if not self.vo: gLogger.fatal("No /DIRAC/VirtualOrganization option defined") return S_ERROR() | 42aa4ddd05805da2e761607504a993c4416c58b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/42aa4ddd05805da2e761607504a993c4416c58b0/CE2CSAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
365,
262,
30,
365,
18,
12307,
273,
365,
18,
301,
67,
588,
1895,
2932,
19,
4537,
2226,
19,
6466,
8113,
7923,
309,
486,
365,
18,
12307,
30,
314,
3328,
18,
30709,
2932,
2279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4046,
12,
365,
262,
30,
365,
18,
12307,
273,
365,
18,
301,
67,
588,
1895,
2932,
19,
4537,
2226,
19,
6466,
8113,
7923,
309,
486,
365,
18,
12307,
30,
314,
3328,
18,
30709,
2932,
2279,
... | |
wrapped.func_name = func.func_name | wrapped.func_name = "wrap_prim_" + name | def wrapped(interp, argument_count): frame = interp.w_active_context assert argument_count == len_unwrap_spec if len(frame.stack) < len_unwrap_spec: raise PrimitiveFailedError() args = () for i, spec in unrolling_unwrap_spec: index = -len_unwrap_spec + i arg = frame.stack[index] if spec is int: args += (unwrap_int(arg), ) elif spec is float: args += (unwrap_float(arg), ) elif spec is object: args += (arg, ) else: assert 0, "this should never happen" res = func(interp, *args) frame.pop_n(len_unwrap_spec) # only if no exception occurs! return res | bac0d10c89c44228391f421400b82bc0fe4bbafa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/bac0d10c89c44228391f421400b82bc0fe4bbafa/primitives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5805,
12,
24940,
16,
1237,
67,
1883,
4672,
2623,
273,
8174,
18,
91,
67,
3535,
67,
2472,
1815,
1237,
67,
1883,
422,
562,
67,
318,
4113,
67,
2793,
309,
562,
12,
3789,
18,
3772,
13,
411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5805,
12,
24940,
16,
1237,
67,
1883,
4672,
2623,
273,
8174,
18,
91,
67,
3535,
67,
2472,
1815,
1237,
67,
1883,
422,
562,
67,
318,
4113,
67,
2793,
309,
562,
12,
3789,
18,
3772,
13,
411... |
self.db.analyze("Prefixes") | self.db.analyze("Prefixes") | def migrate2(self): # fix the dirnames and basenames column types for postgresql cu = self.db.cursor() if self.db.driver == 'postgresql': logMe(2, "fixing column types for pathfields") cu.execute("create table saveDirnames as select dirnameId, dirname from Dirnames") cu.execute("create table saveBasenames as select basenameId, basename from Basenames") cu.execute("create table savePrefixes as select dirnameId, prefixId from Prefixes") self.db.dropForeignKey("FilePaths", "dirnameId") self.db.dropForeignKey("FilePaths", "basenameId") cu.execute("drop table Prefixes") cu.execute("drop table Dirnames") cu.execute("drop table Basenames") self.db.loadSchema() schema.createTroves(self.db, createIndex = False) cu.execute("select dirnameId, dirname from saveDirnames") self.db.bulkload("Dirnames", ( (x[0], cu.binary(x[1])) for x in cu.fetchall() ), ["dirnameId", "dirname"]) cu.execute("select basenameId, basename from saveBasenames") self.db.bulkload("Basenames", ( (x[0], cu.binary(x[1])) for x in cu.fetchall() ), ["basenameId", "basename"]) cu.execute("insert into Prefixes(dirnameId, prefixId) " "select dirnameId, prefixId from savePrefixes") schema.createTroves(self.db, createIndex = True) self.db.addForeignKey("FilePaths", "dirnameId", "Dirnames", "dirnameId") self.db.addForeignKey("FilePaths", "basenameId", "Basenames", "basenameId") cu.execute("drop table saveDirnames") cu.execute("drop table saveBasenames") cu.execute("drop table savePrefixes") self.db.analyze("Dirnames") self.db.analyze("Basenames") self.db.setAutoIncrement("Dirnames", "dirnameId") self.db.setAutoIncrement("Basenames", "basenameId") # fix the missing dirnames/prefixes links schema.setupTempTables(self.db) logMe(2, "looking for missing dirnames/prefixes links") cu = self.db.cursor() cu.execute("""select d.dirnameId, d.dirname from Dirnames as d join ( select distinct fp.dirnameId as dirnameId from FilePaths as fp left join Prefixes as p using(dirnameId) where p.dirnameId is null ) as dq using(dirnameId) """) ret = cu.fetchall() if ret: logMe(2, "fixing missing dirnames/prefixes links in %d dirnames" % (len(ret),)) trovestore.addPrefixesFromList(self.db, ret) self.db.analyze("Prefixes") return True | 3b13aa77709d644c3f7d31b6159a5c0a19727423 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8747/3b13aa77709d644c3f7d31b6159a5c0a19727423/migrate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13187,
22,
12,
2890,
4672,
468,
2917,
326,
1577,
1973,
471,
2580,
6809,
1057,
1953,
364,
1603,
24330,
15985,
273,
365,
18,
1966,
18,
9216,
1435,
309,
365,
18,
1966,
18,
7407,
422,
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,
13187,
22,
12,
2890,
4672,
468,
2917,
326,
1577,
1973,
471,
2580,
6809,
1057,
1953,
364,
1603,
24330,
15985,
273,
365,
18,
1966,
18,
9216,
1435,
309,
365,
18,
1966,
18,
7407,
422,
296,
... |
res = self.write(cr, uid, ids, {'state':'done'}) for line in self.browse(cr,uid,ids,context): | res = self.write(cr, uid, ids, {'state': 'done'}) for line in self.browse(cr, uid, ids, context): | def button_done(self, cr, uid, ids, context={}): wf_service = netsvc.LocalService("workflow") res = self.write(cr, uid, ids, {'state':'done'}) for line in self.browse(cr,uid,ids,context): wf_service.trg_write(uid, 'sale.order', line.order_id.id, cr) | fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
67,
8734,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
11578,
67,
3278,
273,
21954,
4227,
18,
25635,
2932,
13815,
7923,
400,
273,
365,
18,
2626,
12,
3353,
16,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
67,
8734,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
11578,
67,
3278,
273,
21954,
4227,
18,
25635,
2932,
13815,
7923,
400,
273,
365,
18,
2626,
12,
3353,
16,
45... |
directory=get_bundle_path(), lastlog=False, utmp=False, wtmp=False) | directory=get_bundle_path()) | def gobutton_cb(self, button): self._vte.grab_focus() self._vte.feed("\x1B[H\x1B[J\x1B[0;39m") # FIXME: We're losing an odd race here # gtk.main_iteration(block=False) start, end = self.text_buffer.get_bounds() text = self.text_buffer.get_text(start, end) | 6b9a427f10ebf8b233c1640532ba7b5a9ae71315 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7610/6b9a427f10ebf8b233c1640532ba7b5a9ae71315/activity.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20062,
2644,
67,
7358,
12,
2890,
16,
3568,
4672,
365,
6315,
90,
736,
18,
2752,
70,
67,
13923,
1435,
365,
6315,
90,
736,
18,
7848,
31458,
92,
21,
38,
63,
44,
64,
92,
21,
38,
63,
46,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20062,
2644,
67,
7358,
12,
2890,
16,
3568,
4672,
365,
6315,
90,
736,
18,
2752,
70,
67,
13923,
1435,
365,
6315,
90,
736,
18,
7848,
31458,
92,
21,
38,
63,
44,
64,
92,
21,
38,
63,
46,... |
g.draw() | def demo(self): D = Drawing(100, 100) | 27b6bffb56ecaf66dee61eab61c6828d35de4558 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/27b6bffb56ecaf66dee61eab61c6828d35de4558/grids.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21477,
12,
2890,
4672,
463,
273,
10184,
310,
12,
6625,
16,
2130,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
21477,
12,
2890,
4672,
463,
273,
10184,
310,
12,
6625,
16,
2130,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
obj2 = self.pool.get(obj._inherit_fields[obj._order_name][0]) | obj2 = self.pool.get( obj._inherit_fields[obj._order_name][0]) | def _order_calc(self, cursor, user, field, otype, context=None): order_by = [] tables = [] field_name = None table_name = None link_field = None clause = '' | 151ca4d00596ae2adeea6a9a25f559f6b8e7f729 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/151ca4d00596ae2adeea6a9a25f559f6b8e7f729/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1019,
67,
12448,
12,
2890,
16,
3347,
16,
729,
16,
652,
16,
320,
723,
16,
819,
33,
7036,
4672,
1353,
67,
1637,
273,
5378,
4606,
273,
5378,
652,
67,
529,
273,
599,
1014,
67,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1019,
67,
12448,
12,
2890,
16,
3347,
16,
729,
16,
652,
16,
320,
723,
16,
819,
33,
7036,
4672,
1353,
67,
1637,
273,
5378,
4606,
273,
5378,
652,
67,
529,
273,
599,
1014,
67,
529,
... |
text1 += _("We hope that you will appreciate GTG. Please send us bug reports and ideas for improvement using : ") | text1 += _("We hope that you will appreciate GTG. Please send us bug reports and ideas for improvement using: ") | def populate() : doc,root = cleanxml.emptydoc("project") #Task 0@1 : Getting started with GTG title1 = _("Getting started with GTG") text1 = _("Welcome in Getting Things Gnome!, your new task manager.") text1 += "\n\n" text1 += _("In GTG, everything is a task. From building a bridge over the Pacific Ocean to changing a light bulb or organizing a party. When you edit a task, it is automatically saved.") text1 += "\n\n" text1 += _("Once a task is done, you can push the "Mark as done" button. If the task is not relevant any-more, simply press "Dismiss".") text1 += "\n\n" text1 += _("A task might be composed of multiple subtasks that appear as links in the description. Simply click on the following link :") text1 += "\n" text1 += "<subtask>1@1</subtask>\n" text1 += "\n\n" text1 += _("Don't forget to mark this subtask as done !") text1 += "\n\n" text1 += _("Other stuff you should read :") text1 += "\n" text1 += "<subtask>2@1</subtask>\n" text1 += "<subtask>3@1</subtask>\n" text1 += "<subtask>4@1</subtask>\n" text1 += "\n\n" text1 += _("We hope that you will appreciate GTG. Please send us bug reports and ideas for improvement using : ") text1 += "https://bugs.launchpad.net/gtg" text1 += "\n\n" text1 += _("Thank you for trying out GTG :-)") t1 = addtask(doc,"0@1",title1,text1,["1@1","2@1","3@1","4@1"]) root.appendChild(t1) #Task 1@1 : Learn to use subtasks title2 = _("Learn to use subtasks") text2 = _("In the task description (this window), if you begin a line with "-", it will be considered as a "subtask", something that needs to be done in order to accomplish your task. Just try to write "- test subtask" on the next line and press enter.") text2 += "\n\n" text2 += _("You can also use the "insert subtask" button.") text2 += "\n\n\n" text2 += _("Task and subtasks can be re-organized by drag-n-drop in the tasks list.") text2 += "\n\n" text2 += _("Some concept come with subtasks : for example, a subtask due date can never be after its parent due date.") text2 += "\n\n" text2 += _("Also, marking a parent as done will mark all the subtasks as done.") t2 = addtask(doc,"1@1",title2,text2,[]) root.appendChild(t2) #Task 2@1 : Learn to use tags title3 = _("Learn to use tags") text3 = _("A tag is a simple word that begin with "@".") text3 += "\n\n" text3 += _("Try to type a word beginning with @ here :") text3 += "\n\n" text3 += _("It becomes yellow, it's a tag.") text3 += "\n\n" text3 += _("Tags are useful to sort your tasks. In the view menu, you can enable a sidebar which displays all the tags you are using so you can easily see tasks for a given tag. There's no limit to the number of tags a task can have.") text3 += "\n\n" text3 += _("If you right click on a tag in the sidebar you can also set its color. It will permit you to have a more colorful list of tasks, if you want it that way.") text3 += "\n\n" text3 += _("A new tag is only added to the current task. There's no recursivity and the tag is not applied to subtasks. But when you create a new subtask, this subtask will inherit the tags of its parent as a good primary default (it will also be the case if you add a tag to a parent just after creating a subtask). Of course, you can modify at any time the tags of this particular subtask. It will never be changed by the parent.") t3 = addtask(doc,"2@1",title3,text3,[]) root.appendChild(t3) #Task 3@1 : Using the Workview title4 = _("Using the Workview") text4 = _("If you press the "Workview" button, only actionable tasks will be displayed.") text4 += "\n\n" text4 += _("What is an actionable task? It's a task you can do directly, right now.") text4 += "\n\n" text4 += _("It's a task that is already "start-able", i.e. the start date is already over.") text4 += "\n\n" text4 += _("It's a task that doesn't have open subtasks, i.e. you can do the task itself directly.") text4 += "\n\n" text4 += _("Thus, the workview will only show you tasks you should do right now.") text4 += "\n\n" text4 += _("If you use tags, you can right click on a tag in the sidebar and choose to not display tasks with this particular tag in the workview. It's very useful if you have a tag like "someday" that you use for tasks you would like to do but are not particularly urgent.") t4 = addtask(doc,"3@1",title4,text4,[]) root.appendChild(t4) #Task 4@1 : Reporting bugs title5 = _("Reporting bugs") text5 = _("GTG is still very alpha software. We like it and use it everyday but you will encounter some bugs.") text5 += "\n\n" text5 += _("Please, report them ! We need you to make this software better. Any contribution, any idea is welcome.") text5 += "\n\n" text5 += _("If you have some trouble with GTG, we might be able to help you or to solve your problem really quickly.") t5 = addtask(doc,"4@1",title5,text5,[]) root.appendChild(t5) return doc | 88f87d38f8969fbb3a1bb46f14b705ca8e310947 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/88f87d38f8969fbb3a1bb46f14b705ca8e310947/firstrun_tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
1435,
294,
997,
16,
3085,
273,
2721,
2902,
18,
5531,
2434,
2932,
4406,
7923,
468,
2174,
374,
36,
21,
294,
26602,
5746,
598,
19688,
43,
2077,
21,
273,
389,
2932,
19213,
5746,
598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
1435,
294,
997,
16,
3085,
273,
2721,
2902,
18,
5531,
2434,
2932,
4406,
7923,
468,
2174,
374,
36,
21,
294,
26602,
5746,
598,
19688,
43,
2077,
21,
273,
389,
2932,
19213,
5746,
598,
... |
if opts.has_key('search'): opts['search_fields'] = ",".join(opts['search']) | if opts.has_key('search'): opts['search_fields'] = ",".join(opts['search']) opts['show_search'] = opts.get('show_search', True) else: opts['show_search'] = False | def render(self, context): opts = {} global disp_list_guid disp_list_guid = disp_list_guid + 1 # add dojo modules add_module("dojox.data.QueryReadStore") add_module("dojox.grid.DataGrid") # Setable options, not listed: label, query, search, nosort if self.model: opts['list_display'] = [x.attname for x in self.model._meta.fields] opts['width'] = {} opts['label'] = {} opts['default_width'] = "auto" opts['width'] = "100%" opts['height'] = "100%" opts['query']={} opts['query']['inclusions']=[] opts['id'] = "disp_list_%s_%s" % (disp_list_guid,random.randint(10000,99999)) try: # reverse lookup of the datagrid-list url (see dojango/urls.py) if self.model: opts['json_store_url'] = reverse("dojango-datagrid-list", args=(self.app_name, self.model_name)) except NoReverseMatch: pass # User overrides if self.options: opts.update(extract_nodelist_options(self.options,context)) if not opts['query'].has_key('inclusions'): opts['query']['inclusions'] = [] # we must ensure that the json_store_url is defined if not opts.get('json_store_url', False): raise TemplateSyntaxError, "Please enable the url 'dojango-datagrid-list' in your urls.py or pass a 'json_store_url' to the datagrid templatetag." # Incase list_display was passed as tuple, turn to list for mutability if not self.model and not opts.get('list_display', False): raise TemplateSyntaxError, "'list_display' not defined. If you use your own 'json_store_url' you have to define which fields are visible." opts['list_display'] = list(opts['list_display']) # Config for template opts['headers'] = [] | 0228a2b894fe2eca3c11a5a9838d9e78baf6d462 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12008/0228a2b894fe2eca3c11a5a9838d9e78baf6d462/dojango_grid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
4672,
1500,
273,
2618,
2552,
16232,
67,
1098,
67,
14066,
16232,
67,
1098,
67,
14066,
273,
16232,
67,
1098,
67,
14066,
397,
404,
468,
527,
741,
30952,
4381,
527,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
819,
4672,
1500,
273,
2618,
2552,
16232,
67,
1098,
67,
14066,
16232,
67,
1098,
67,
14066,
273,
16232,
67,
1098,
67,
14066,
397,
404,
468,
527,
741,
30952,
4381,
527,
... |
os.path.join(datadir, 'output', | join_path(datadir, 'output', | def test(self): """Process self.configfile.""" os.chdir(testroot) # Keyword parameters for publish_file: params = {} # Initialize 'settings_overrides' for test settings scripts, # and disable configuration files: params['settings_overrides'] = {'_disable_config': 1} # Read the variables set in the default config file and in # the current config file into params: execfile(os.path.join(datadir, 'tests', '_default.py'), params) execfile(self.configfile, params) # Check for required settings: assert params.has_key('test_source'),\ "No 'test_source' supplied in " + self.configfile assert params.has_key('test_destination'),\ "No 'test_destination' supplied in " + self.configfile # Set source_path and destination_path if not given: params.setdefault('source_path', os.path.join(datadir, 'input', params['test_source'])) # Path for actual output: params.setdefault('destination_path', os.path.join(datadir, 'output', params['test_destination'])) # Path for expected output: expected_path = os.path.join(datadir, 'expected', params['test_destination']) # test_source and test_destination aren't needed any more: del params['test_source'] del params['test_destination'] # Delete private stuff like params['__builtins__']: for key in params.keys(): if key.startswith('_'): del params[key] # Get output (automatically written to the output/ directory # by publish_file): output = docutils.core.publish_file(**params) # Get the expected output *after* writing the actual output. self.assert_(os.access(expected_path, os.R_OK),\ 'Cannot find expected output at\n' + expected_path) expected = open(expected_path).read() diff = ('Please compare the expected and actual output files:\n' 'diff %s %s\n' % (expected_path, params['destination_path'])) try: self.assertEquals(output, expected, diff) except AssertionError: if hasattr(difflib, 'unified_diff'): # Generate diff if unified_diff available: diff = ''.join( difflib.unified_diff(expected.splitlines(1), output.splitlines(1), expected_path, params['destination_path'])) print >>sys.stderr, '\n%s:' % (self,) print >>sys.stderr, diff raise | 897dca2b1aba044313037b1f074a1f74fcf0903d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/897dca2b1aba044313037b1f074a1f74fcf0903d/test_functional.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
3536,
2227,
365,
18,
1425,
768,
12123,
1140,
18,
343,
1214,
12,
3813,
3085,
13,
468,
18317,
1472,
364,
3808,
67,
768,
30,
859,
273,
2618,
468,
9190,
296,
4272,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
3536,
2227,
365,
18,
1425,
768,
12123,
1140,
18,
343,
1214,
12,
3813,
3085,
13,
468,
18317,
1472,
364,
3808,
67,
768,
30,
859,
273,
2618,
468,
9190,
296,
4272,
67... |
def init(self): | def do_init(self): | def init(self): self.editor = None self.bufferlist = None self.currentbufnum = None | c8a04dbd147e55cb69aadf28e56d48a8f2959ffa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/c8a04dbd147e55cb69aadf28e56d48a8f2959ffa/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2738,
12,
2890,
4672,
365,
18,
9177,
273,
599,
365,
18,
4106,
1098,
273,
599,
365,
18,
2972,
4385,
2107,
273,
599,
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,
741,
67,
2738,
12,
2890,
4672,
365,
18,
9177,
273,
599,
365,
18,
4106,
1098,
273,
599,
365,
18,
2972,
4385,
2107,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.expand_directory(itempath, False, go_buttons_enabled) | self.expand_directory(itempath, False, go_buttons_enabled, False) | def expand_filelist_and_load_image(self, inputlist): self.images_found = 0 self.stop_now = True # Make sure that any previous search process is stopped # Takes the current list (i.e. ["pic.jpg", "pic2.gif", "../images"]) and # expands it into a list of all pictures found; returns new list self.change_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH)) if not self.closing_app: while gtk.events_pending(): gtk.main_iteration() first_image = "" first_image_found = False first_image_loaded = False second_image = "" second_image_found = False second_image_preloaded = False self.randomlist = [] folderlist = [] self.image_list = [] self.curr_img_in_list = 0 go_buttons_enabled = False self.set_go_sensitivities(False) # Clean up list (remove preceding "file://" or "file:" and trailing "/") for itemnum in range(len(inputlist)): # Strip off preceding file.. if inputlist[itemnum].startswith('file://'): inputlist[itemnum] = inputlist[itemnum][7:] elif inputlist[itemnum].startswith('file:'): inputlist[itemnum] = inputlist[itemnum][5:] # Strip off trailing "/" if it exists: if inputlist[itemnum][len(inputlist[itemnum])-1] == "/": inputlist[itemnum] = inputlist[itemnum][:(len(inputlist[itemnum])-1)] inputlist[itemnum] = os.path.abspath(inputlist[itemnum]) # If open all images in dir... if self.open_all_images == True: for item in inputlist: if os.path.isfile(item): itempath = os.path.dirname(os.path.abspath(item)) temp = self.recursive self.recursive = False self.stop_now = False self.expand_directory(itempath, False, go_buttons_enabled) self.recursive = temp for item in self.image_list: # Make sure item is not already in list: duplicate_image = False for item2 in inputlist: if item == item2: duplicate_image = True if duplicate_image == False: inputlist.append(item) self.image_list = [] for item in inputlist: if item[0] != '.' and self.closing_app == False: if os.path.isfile(item): if self.valid_image(item): if second_image_found == False: if first_image_found == True: second_image_found = True second_image = item if first_image_found == False: first_image_found = True first_image = item first_image_came_from_dir = False self.image_list.append(item) if go_buttons_enabled == False: if len(self.image_list) > 1: self.set_go_navigation_sensitivities() go_buttons_enabled = True if self.verbose == True: self.images_found += 1 print _("Found:"), item_fullpath, "[" + str(self.images_found) + "]" else: # If it's a directory that was explicitly selected or passed to # the program, get all the files in the dir. # Retrieve only images in the top directory specified by the user # only explicitly told to recurse (via -R or in Settings>Preferences) folderlist.append(item) if second_image_found == False: # See if we can find an image in this directory: self.stop_now = False self.expand_directory(item, True, go_buttons_enabled) itemnum = 0 while itemnum < len(self.image_list) and second_image_found == False: if os.path.isfile(self.image_list[itemnum]): if second_image_found == False: if first_image_found == True: second_image_found = True second_image = self.image_list[itemnum] if first_image_found == False: first_image_found = True first_image = self.image_list[itemnum] first_image_came_from_dir = True itemnum += 1 # Load first image and display: if first_image_found == True and first_image_loaded == False: first_image_loaded = True if self.slideshow_mode == True: self.toggle_slideshow(None) if self.verbose == True and self.currimg_name != "": print _("Loading:"), self.currimg_name try: self.load_new_image(False, False, False, False) if self.currimg_is_animation == False: self.previmg_width = self.currimg_pixbuf.get_width() else: self.previmg_width = self.currimg_pixbuf.get_static_image().get_width() self.image_loaded = True if not self.closing_app: while gtk.events_pending(): gtk.main_iteration(True) except: self.image_load_failed(False) pass if first_image_came_from_dir == True: self.image_list = [] # Pre-load second image: if second_image_found == True and second_image_preloaded == False: second_image_preloaded = True try: self.load_new_image(False, True, False, False) except: pass if first_image_found == True: # Sort the filelist and folderlist alphabetically, and recurse into folderlist: if first_image_came_from_dir == True: self.add_folderlist_images(folderlist, go_buttons_enabled) self.do_image_list_stuff(first_image, second_image) else: self.do_image_list_stuff(first_image, second_image) self.add_folderlist_images(folderlist, go_buttons_enabled) self.set_window_title() if not self.closing_app: while gtk.events_pending(): gtk.main_iteration(True) if not self.closing_app: self.change_cursor(None) | f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
7540,
5449,
67,
464,
67,
945,
67,
2730,
12,
2890,
16,
810,
1098,
4672,
365,
18,
7369,
67,
7015,
273,
374,
365,
18,
5681,
67,
3338,
273,
1053,
468,
4344,
3071,
716,
1281,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
7540,
5449,
67,
464,
67,
945,
67,
2730,
12,
2890,
16,
810,
1098,
4672,
365,
18,
7369,
67,
7015,
273,
374,
365,
18,
5681,
67,
3338,
273,
1053,
468,
4344,
3071,
716,
1281,
24... |
""" gives the difference in offsets of one end of this object to one end of the other object. | """ compares an end of this object to an end of another object | def compareEndPoints(self,other,which): """ gives the difference in offsets of one end of this object to one end of the other object. | 84979cbebda93a39a352185d4a96a2c6a3fa25b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/84979cbebda93a39a352185d4a96a2c6a3fa25b0/textHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
1638,
5636,
12,
2890,
16,
3011,
16,
12784,
4672,
3536,
14758,
326,
7114,
316,
8738,
434,
1245,
679,
434,
333,
733,
358,
1245,
679,
434,
326,
1308,
733,
18,
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,
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,
3400,
1638,
5636,
12,
2890,
16,
3011,
16,
12784,
4672,
3536,
14758,
326,
7114,
316,
8738,
434,
1245,
679,
434,
333,
733,
358,
1245,
679,
434,
326,
1308,
733,
18,
2,
-100,
-100,
-100,
-... |
sage: G.is_normal(H) True | sage: H.is_normal(G) False | def is_normal(self,other): """ Return True if the group self is a normal subgroup of other. | e7fb472aa4a510b0d654fccc28ac931eb8639d16 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e7fb472aa4a510b0d654fccc28ac931eb8639d16/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
6130,
12,
2890,
16,
3011,
4672,
3536,
2000,
1053,
309,
326,
1041,
365,
353,
279,
2212,
720,
1655,
434,
1308,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
6130,
12,
2890,
16,
3011,
4672,
3536,
2000,
1053,
309,
326,
1041,
365,
353,
279,
2212,
720,
1655,
434,
1308,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
counter += 1 | def __pair_arg_with_option(self): | 8dd06ecea1ea403d62155706d3cdd2c7f4fb1a46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/8dd06ecea1ea403d62155706d3cdd2c7f4fb1a46/options_trem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6017,
67,
3175,
67,
1918,
67,
3482,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6017,
67,
3175,
67,
1918,
67,
3482,
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,
... | |
print old[1][0], new[1][0].split("'")[1].split(".")[1] | def different_attributes(old, new): # If they're not triples, just do normal comparison if not isinstance(old, (list, tuple)) or not isinstance(new, (list, tuple)): return old != new # If the first or third bits or end of second are different, it really is different. if old[0] != new[0] or old[2] != new[2] or old[1][1:] != new[1][1:]: return True if not old[1] and not new[1]: return False # Compare first positional arg if "orm" in new[1][0] and "orm" not in old[1][0]: # Do special comparison to fix #153 try: print old[1][0], new[1][0].split("'")[1].split(".")[1] return old[1][0] != new[1][0].split("'")[1].split(".")[1] except IndexError: pass # Fall back to next comparison return old[1][0] != new[1][0] | 7194e9a40b9f9c4482774ff8e4243c0d683ee6ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/7194e9a40b9f9c4482774ff8e4243c0d683ee6ec/startmigration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3775,
67,
4350,
12,
1673,
16,
394,
4672,
468,
971,
2898,
4565,
486,
22388,
16,
2537,
741,
2212,
5826,
309,
486,
1549,
12,
1673,
16,
261,
1098,
16,
3193,
3719,
578,
486,
1549,
12,
2704,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3775,
67,
4350,
12,
1673,
16,
394,
4672,
468,
971,
2898,
4565,
486,
22388,
16,
2537,
741,
2212,
5826,
309,
486,
1549,
12,
1673,
16,
261,
1098,
16,
3193,
3719,
578,
486,
1549,
12,
2704,... | |
args = ex.args() | args = ex.operands() | def derivative(self, ex, operator): """ EXAMPLES:: | e6f673e3980b94d07970b5010a76c00eb1fbfc97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e6f673e3980b94d07970b5010a76c00eb1fbfc97/expression_conversions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16417,
12,
2890,
16,
431,
16,
3726,
4672,
3536,
5675,
8900,
11386,
2866,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
16417,
12,
2890,
16,
431,
16,
3726,
4672,
3536,
5675,
8900,
11386,
2866,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
def mean(values): return sum(values) / float(len(values)) def variance(values): | def _mean(values): return sum(values) / float(max(len(values), 1)) def _variance(values): | def mean(values): return sum(values) / float(len(values)) | bc9d5a1d58b676e7cc6dcf78f4cef02419954da2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3480/bc9d5a1d58b676e7cc6dcf78f4cef02419954da2/lipsum.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3722,
12,
2372,
4672,
327,
2142,
12,
2372,
13,
342,
1431,
12,
1897,
12,
2372,
3719,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3722,
12,
2372,
4672,
327,
2142,
12,
2372,
13,
342,
1431,
12,
1897,
12,
2372,
3719,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
} | } | def __init__(self): family.Family.__init__(self) self.name = 'wikiquote' self.langs = { 'minnan':'zh-min-nan.wikiquote.org', 'nb':'no.wikiquote.org', 'zh-cn':'zh.wikiquote.org', 'zh-tw':'zh.wikiquote.org' } for lang in self.knownlanguages: self.langs[lang] = lang+'.wikiquote.org' | d4d5b4a020a852c7a6a88ca621b8a14d165344aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/d4d5b4a020a852c7a6a88ca621b8a14d165344aa/wikiquote_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
13044,
6889,
11,
225,
365,
18,
4936,
87,
273,
288,
296,
1154,
13569,
11,
2497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
13044,
6889,
11,
225,
365,
18,
4936,
87,
273,
288,
296,
1154,
13569,
11,
2497,
... |
if self._clean: return self._clean = True self.stdin.close() self.drain() self.stdout.thread.join() self.stderr.thread.join() | self._clean_lock.acquire() try: if self._clean: return self._clean = True self.stdin.close() self.drain() self.stdout.thread.join() self.stderr.thread.join() finally: self._clean_lock.release() | def _cleanup(self): """Close pipes to sub-process""" if self._clean: return self._clean = True self.stdin.close() self.drain() # Drain output pipes. self.stdout.thread.join() # Drain thread closes pipe. self.stderr.thread.join() | 7a04cce01ce4bf9e9d98cd2d28619c28938cd9e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/197/7a04cce01ce4bf9e9d98cd2d28619c28938cd9e7/brokertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16732,
12,
2890,
4672,
3536,
4605,
16062,
358,
720,
17,
2567,
8395,
309,
365,
6315,
6200,
30,
327,
365,
6315,
6200,
273,
1053,
365,
18,
21772,
18,
4412,
1435,
365,
18,
72,
7596,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16732,
12,
2890,
4672,
3536,
4605,
16062,
358,
720,
17,
2567,
8395,
309,
365,
6315,
6200,
30,
327,
365,
6315,
6200,
273,
1053,
365,
18,
21772,
18,
4412,
1435,
365,
18,
72,
7596,
1... |
@param defval: the default identifier. This value will appear in | @param defval: the default identifier. This value will appear in | def AskIdent(defval, prompt): """ Ask the user to enter an identifier @param defval: the default identifier. This value will appear in the dialog box. @param prompt: the prompt to display in the dialog box @return: the entered identifier or 0. """ return idaapi.askident(defval, prompt) | 507ea15b7a89e88e413b47a9fe03b571d956c14a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4773/507ea15b7a89e88e413b47a9fe03b571d956c14a/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25747,
6106,
12,
536,
1125,
16,
6866,
4672,
3536,
25747,
326,
729,
358,
6103,
392,
2756,
225,
632,
891,
1652,
1125,
30,
326,
805,
2756,
18,
1220,
460,
903,
9788,
316,
326,
6176,
3919,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25747,
6106,
12,
536,
1125,
16,
6866,
4672,
3536,
25747,
326,
729,
358,
6103,
392,
2756,
225,
632,
891,
1652,
1125,
30,
326,
805,
2756,
18,
1220,
460,
903,
9788,
316,
326,
6176,
3919,
... |
childobj_ = AbstractSeqMatrix.factory() childobj_.build(child_) | type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <matrix> element') | def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'matrix': childobj_ = AbstractSeqMatrix.factory() childobj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'matrix', childobj_) self.content_.append(obj_) if hasattr(self, 'add_matrix'): self.add_matrix(obj_.value) elif hasattr(self, 'set_matrix'): self.set_matrix(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractSeqs, self).buildChildren(child_, nodeName_, True) | 10f2a4b3101435822c472af9b202a5a0bb496366 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/10f2a4b3101435822c472af9b202a5a0bb496366/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4212,
12,
2890,
16,
1151,
67,
16,
7553,
67,
16,
628,
67,
10678,
33,
8381,
4672,
309,
7553,
67,
422,
296,
5667,
4278,
618,
67,
529,
67,
273,
1151,
27799,
14588,
18,
588,
2668,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4212,
12,
2890,
16,
1151,
67,
16,
7553,
67,
16,
628,
67,
10678,
33,
8381,
4672,
309,
7553,
67,
422,
296,
5667,
4278,
618,
67,
529,
67,
273,
1151,
27799,
14588,
18,
588,
2668,
9... |
@see: keywords @type duration: {unit : value} @keyword months: Months @keyword weeks: Weeks @keyword days: Days @keyword hours: Hours @keyword minutes: Minutes @keyword seconds: Seconds | The duration may be: (months|weeks|days|hours|minutes|seconds). @type duration: {unit:value} | def setduration(self, **duration): """ Set the caching duration which defines how long the file will be cached. @param duration: The cached file duration which defines how long the file will be cached. A duration=0 means forever. @see: keywords @type duration: {unit : value} @keyword months: Months @keyword weeks: Weeks @keyword days: Days @keyword hours: Hours @keyword minutes: Minutes @keyword seconds: Seconds """ if len(duration) == 1: arg = duration.items()[0] if not arg[0] in self.units: raise Exception('must be: ' % self.units) self.duration = arg return self | e192ac766e38768d31d61e7ecb63c36916e3c1c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1242/e192ac766e38768d31d61e7ecb63c36916e3c1c9/cache.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
8760,
12,
2890,
16,
2826,
8760,
4672,
3536,
1000,
326,
11393,
3734,
1492,
11164,
3661,
1525,
326,
585,
903,
506,
3472,
18,
632,
891,
3734,
30,
1021,
3472,
585,
3734,
1492,
11164,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
8760,
12,
2890,
16,
2826,
8760,
4672,
3536,
1000,
326,
11393,
3734,
1492,
11164,
3661,
1525,
326,
585,
903,
506,
3472,
18,
632,
891,
3734,
30,
1021,
3472,
585,
3734,
1492,
11164,
36... |
self._datasets = sets | def __init__(self, sets=None): | e3e6b656e32c64b7f4d5713ede350bb77506650b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14944/e3e6b656e32c64b7f4d5713ede350bb77506650b/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1678,
33,
7036,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1678,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
def setGeomery(self, mask): | def setGeometry(self, mask): | def setGeomery(self, mask): mask.setTheZ(self.coord.theZ); mask.setTheT(self.coord.theZ); mask.setX(self.x); mask.setY(self.y); mask.setWidth(self.width); mask.setHeight(self.height); mask.setBytes(self.bytedata); | f0bdd8df3ad2c2d884653d30a298452010b0e426 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/f0bdd8df3ad2c2d884653d30a298452010b0e426/ROI_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
9823,
12,
2890,
16,
3066,
4672,
3066,
18,
542,
1986,
62,
12,
2890,
18,
5732,
18,
5787,
62,
1769,
3066,
18,
542,
1986,
56,
12,
2890,
18,
5732,
18,
5787,
62,
1769,
3066,
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,
444,
9823,
12,
2890,
16,
3066,
4672,
3066,
18,
542,
1986,
62,
12,
2890,
18,
5732,
18,
5787,
62,
1769,
3066,
18,
542,
1986,
56,
12,
2890,
18,
5732,
18,
5787,
62,
1769,
3066,
18,
542,
... |
return self._name in os.environ and self.value() | return bool(self.value()) | def __nonzero__(self): return self._name in os.environ and self.value() | 2c4a959643bdf7629553862e9350d58fac8e86ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14112/2c4a959643bdf7629553862e9350d58fac8e86ed/setpkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
26449,
972,
12,
2890,
4672,
327,
365,
6315,
529,
316,
1140,
18,
28684,
471,
365,
18,
1132,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
26449,
972,
12,
2890,
4672,
327,
365,
6315,
529,
316,
1140,
18,
28684,
471,
365,
18,
1132,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
writer.writerow([str(klass.get(itemid, col)) for col in columns]) | self.client._socket_op(writer.writerow, [str(klass.get(itemid, col)) for col in columns]) | def handle(self): ''' Export the specified search query as CSV. ''' # figure the request request = templating.HTMLRequest(self.client) filterspec = request.filterspec sort = request.sort group = request.group columns = request.columns klass = self.db.getclass(request.classname) | f8ec122352785350c2a05250e505d71de38b4810 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1906/f8ec122352785350c2a05250e505d71de38b4810/actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
9163,
11054,
326,
1269,
1623,
843,
487,
10381,
18,
9163,
468,
7837,
326,
590,
590,
273,
28923,
18,
4870,
691,
12,
2890,
18,
2625,
13,
1034,
2793,
273,
590,
18,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
9163,
11054,
326,
1269,
1623,
843,
487,
10381,
18,
9163,
468,
7837,
326,
590,
590,
273,
28923,
18,
4870,
691,
12,
2890,
18,
2625,
13,
1034,
2793,
273,
590,
18,
21... |
def buildUnitTestList(options): | def buildTestList(options, excludeTools=True): """ Build test list from singles or collect all unit tests. """ | def buildUnitTestList(options): excludeDirs = [] if len(options.single) > 0: includePattern = options.single else: includePattern = 'Test*.py' for item in [ 'tools', 'util', 'projects', 'plugins', 'build', 'Chandler.egg-info' ]: excludeDirs.append('%s/%s' % (options.chandlerHome, item)) for item in [ 'release', 'debug' ]: excludeDirs.append('%s/%s' % (options.chandlerBin, item)) return findTestFiles(options.chandlerHome, excludeDirs, includePattern) | 1fa50cc35d43e15872013fff7d8961677efb0593 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/1fa50cc35d43e15872013fff7d8961677efb0593/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4709,
682,
12,
2116,
16,
4433,
10348,
33,
5510,
4672,
3536,
3998,
1842,
666,
628,
4864,
1040,
578,
3274,
777,
2836,
7434,
18,
3536,
4433,
9872,
273,
5378,
225,
309,
562,
12,
2116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4709,
682,
12,
2116,
16,
4433,
10348,
33,
5510,
4672,
3536,
3998,
1842,
666,
628,
4864,
1040,
578,
3274,
777,
2836,
7434,
18,
3536,
4433,
9872,
273,
5378,
225,
309,
562,
12,
2116,
... |
"""class to handle AP scanning""" | """ Class to handle AP scanning. """ | def _parse(self, data): iwstruct = Iwstruct() result = iwstruct.parse_data(self.fmt, data) # XXX there is maybe a much more elegant way to do this self.throughput, self.min_nwid, self.max_nwid = result[0:3] self.old_num_channels, self.old_num_frequency = result[3:5] self.old_freq = result[5:11] self.sensitivity = result[11] self.max_qual.setValues(result[12:16]) self.avg_qual.setValues(result[16:20]) self.num_bitrates = result[20] # <- XXX raw_bitrates = result[21:21+self.num_bitrates] for rate in raw_bitrates: iwfreq = Iwfreq() iwfreq.frequency = rate btr = iwfreq.getBitrate() if btr is not None: self.bitrates.append(btr) self.min_rts, self.max_rts = result[53:55] self.min_frag, self.max_frag = result[55:57] self.min_pmp, self.max_pmp = result[57:59] self.min_pmt, self.max_pmt = result[59:61] self.pmp_flags, self.pmt_flags, self.pm_capa = result[61:64] self.encoding_size = result[64:72] self.num_encoding_sizes, self.max_encoding_tokens = result[72:74] self.encoding_login_index = result[74] self.txpower_capa, self.num_txpower = result[75:77] self.txpower = result[77:85] self.we_vers_compiled, self.we_vers_src = result[85:87] self.retry_capa, self.retry_flags, self.r_time_flags = result[87:90] self.min_retry, self.max_retry = result[90:92] self.min_r_time, self.max_r_time = result[92:94] self.num_channels = result[94] self.num_frequency = result[95] freq = result[96:224] i = self.num_frequency for x in range(0, len(freq), 4): iwfreq = Iwfreq() iwfreq._setFrequency(freq[x:x+4]) fq = iwfreq.getFrequency() if fq is not None: self.frequencies.append(fq) i -= 1 if i <= 0: break self.enc_capa = result[224] self.min_pms = result[225] self.max_pms = result[226] self.pms_flags = result[227] self.modul_capa = result[228] self.bitrate_capa = result[229] | 05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258/iwlibs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
2890,
16,
501,
4672,
25522,
1697,
273,
467,
91,
1697,
1435,
563,
273,
25522,
1697,
18,
2670,
67,
892,
12,
2890,
18,
8666,
16,
501,
13,
225,
468,
11329,
1915,
353,
6944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
2890,
16,
501,
4672,
25522,
1697,
273,
467,
91,
1697,
1435,
563,
273,
25522,
1697,
18,
2670,
67,
892,
12,
2890,
18,
8666,
16,
501,
13,
225,
468,
11329,
1915,
353,
6944,
... |
score = str(ua_results.get(test_key).get('score')) test_scores.append([test_key, score]) logging.info('TEST_SCORES: %s' % test_scores) | display = str(ua_results.get(test_key).get('display')) test_scores.append([test_key, display]) | def UpdateDatastore(request): """Generic datastore munging routine.""" # query = db.Query(models.user_agent.UserAgent) # query.filter('family =', 'IE') # query.filter('v1 =', '9') # key = request.GET.get('key') # if key: # query.filter('__key__ >', db.Key(key)) # query.order('__key__') # user_agent = query.get() # if not user_agent: # return http.HttpResponse('All Done!') # # Do something with user_agent here. # user_agent.family = 'IE Platform Preview' # user_agent.save() query = db.Query(models.user_test.Test) key = request.GET.get('key') if key: query.filter('__key__ >', db.Key(key)) query.order('__key__') test = query.get() if not test: return http.HttpResponse('All Done!') test_set = test.get_test_set_from_test_keys(test.test_keys) browsers = result_stats.CategoryBrowserManager.GetBrowsers( test_set.category, version_level='top') visible_test_keys = test.test_keys stats_data = result_stats.CategoryStatsManager.GetStats( test_set, browsers, visible_test_keys, use_memcache=True) for user_agent in browsers: row_stats = stats_data.get(user_agent) ua_results = row_stats.get('results') if ua_results: test_scores = [] for test_key in test.test_keys: score = str(ua_results.get(test_key).get('score')) test_scores.append([test_key, score]) logging.info('TEST_SCORES: %s' % test_scores) models.user_test.update_test_meta(test.key(), test_scores) #deferred.defer(models.user_test.update_test_meta, key, test_scores) params = { 'next_url': '/update_datastore?key=%s' % test.key(), 'current_name': test.name, 'next_name': 'nextosity' } return Render(request, 'update_datastore.html', params) | 0f9fe80f14f31244dc044eefea4a8913a5c250ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5745/0f9fe80f14f31244dc044eefea4a8913a5c250ab/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
21191,
12,
2293,
4672,
3536,
7014,
9290,
312,
318,
1998,
12245,
12123,
225,
468,
843,
273,
1319,
18,
1138,
12,
7665,
18,
1355,
67,
5629,
18,
12276,
13,
468,
843,
18,
2188,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2315,
21191,
12,
2293,
4672,
3536,
7014,
9290,
312,
318,
1998,
12245,
12123,
225,
468,
843,
273,
1319,
18,
1138,
12,
7665,
18,
1355,
67,
5629,
18,
12276,
13,
468,
843,
18,
2188,
2668,
... |
if c == '5': | if c == b'5': | def getresp(self): """Internal: get a response from the server. Raise various errors if the response indicates an error.""" resp = self.getline() if self.debugging: print('*resp*', repr(resp)) c = resp[:1] if c == '4': raise NNTPTemporaryError(resp) if c == '5': raise NNTPPermanentError(resp) if c not in '123': raise NNTPProtocolError(resp) return resp | eb96c4e975fd746fcc8b85f47c3592472b8d6b15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/eb96c4e975fd746fcc8b85f47c3592472b8d6b15/nntplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12243,
12,
2890,
4672,
3536,
3061,
30,
336,
279,
766,
628,
326,
1438,
18,
20539,
11191,
1334,
309,
326,
766,
8527,
392,
555,
12123,
1718,
273,
365,
18,
588,
1369,
1435,
309,
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,
336,
12243,
12,
2890,
4672,
3536,
3061,
30,
336,
279,
766,
628,
326,
1438,
18,
20539,
11191,
1334,
309,
326,
766,
8527,
392,
555,
12123,
1718,
273,
365,
18,
588,
1369,
1435,
309,
365,
... |
__version__='$Revision: 1.36 $'[11:-2] | __version__='$Revision: 1.37 $'[11:-2] | def taste(spam): "a favorable reviewer" return spam,'yum yum, I like ' + spam | 09f5b1db455435c5f09abbc280b9c25669d23fd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/09f5b1db455435c5f09abbc280b9c25669d23fd1/Publish.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
14725,
12,
1752,
301,
4672,
315,
69,
18552,
429,
10725,
264,
6,
327,
24824,
11189,
93,
379,
677,
379,
16,
467,
3007,
296,
397,
24824,
225,
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,
268,
14725,
12,
1752,
301,
4672,
315,
69,
18552,
429,
10725,
264,
6,
327,
24824,
11189,
93,
379,
677,
379,
16,
467,
3007,
296,
397,
24824,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.assertContains(response, person.location_display_name) | def test_guess_location_on_login(self): person = Person.objects.get(user__username="paulproteus") self.assertFalse(person.location_confirmed) self.assertFalse(person.location_display_name) client = self.login_with_client() response = client.get(reverse(mysite.profile.views.display_list_of_people)) self.assertContains(response, "OpenHatch") person = Person.objects.get(user__username="paulproteus") self.assertEqual(person.location_display_name, "Rochester, NY, United States") self.assertContains(response, person.location_display_name) | f87505ecc99975e914a674cb0ae047d363ef97ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/f87505ecc99975e914a674cb0ae047d363ef97ae/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
20885,
67,
3562,
67,
265,
67,
5819,
12,
2890,
4672,
6175,
273,
11573,
18,
6911,
18,
588,
12,
1355,
972,
5053,
1546,
8774,
332,
685,
736,
407,
7923,
365,
18,
11231,
8381,
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,
1842,
67,
20885,
67,
3562,
67,
265,
67,
5819,
12,
2890,
4672,
6175,
273,
11573,
18,
6911,
18,
588,
12,
1355,
972,
5053,
1546,
8774,
332,
685,
736,
407,
7923,
365,
18,
11231,
8381,
12,
... | |
maildir.remove_leftover_messages() | maildir.remove_leftover() | def backup(self, account): try: self.__config_logger(account) maildir = Maildir(self.__config.get_maildir(account), True) imap = IMAP(self.__config.get_host(account), self.__config.get_port(account), self.__config.get_username(account), self.__config.get_password(account)) fo_filter = self.__config.get_imapfilter(account) for folder in imap.get_folders(fo_filter): # create folder if needed cf = maildir.create_folder(folder) mlist = imap.get_messages(folder) for uid, hhd in mlist.iteritems(): has_msg = maildir.has_message_header(folder, hhd) if cf or not has_msg: # folder was newly created and header not in maildir index # so save message flags, body = imap.get_message(folder, uid) maildir.write_message(folder, body, flags) else: maildir.remove_from_index(folder, hhd) | a8e0f7ceeec47534bdceb754109f766d17d2e25f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2245/a8e0f7ceeec47534bdceb754109f766d17d2e25f/imapbackup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5114,
12,
2890,
16,
2236,
4672,
775,
30,
365,
16186,
1425,
67,
4901,
12,
4631,
13,
10843,
545,
481,
273,
490,
69,
545,
481,
12,
2890,
16186,
1425,
18,
588,
67,
2540,
545,
481,
12,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5114,
12,
2890,
16,
2236,
4672,
775,
30,
365,
16186,
1425,
67,
4901,
12,
4631,
13,
10843,
545,
481,
273,
490,
69,
545,
481,
12,
2890,
16186,
1425,
18,
588,
67,
2540,
545,
481,
12,
46... |
if os.path.exists("download.test"): shutil.rmtree("download.test") os.mkdir("download.test") shutil.copy("metainfo","download.test") tempdir = tempfile.mkdtemp()+"/" try: do_rsync(softwareurl, "download.test/",tempdir) except Exception: pass finally: shutil.rmtree(tempdir) shutil.rmtree("download.test") | def init(): """ <Purpose> This method is here to do a runthrough of trying to update. The idea is that if there is going to be a fatal error, we want to die immediately rather than later. This way, when a node is updating to a flawed version, the old one won't die until we know the new one is working. Also goes through the magic explained in the comment block above. <Arguments> None <Exceptions> See fresh_software_updater and software_updater_start. <Side Effects> If we can't get the lock, we will exit. We will hold the softwareupdater.new lock while trying to start, but if all goes well, we will release that lock and aquire the softwareupdater.old lock. <Returns> None """ gotlock = runonce.getprocesslock("softwareupdater.new") if gotlock == True: # I got the lock. All is well... pass else: # didn't get the lock, and we like to be real quiet, so lets # exit quietly sys.exit(55) # Close stdin because we don't read from stdin at all. We leave stdout and stderr # open because we haven't done anything to make sure that output to those (such as # uncaught python exceptions) go somewhere else useful. sys.stdin.close() # don't hang if the socket is slow (in some ways, this doesn't always work) # BUG: http://mail.python.org/pipermail/python-list/2008-January/471845.html socket.setdefaulttimeout(10) # remove any old / broken test dirs... if os.path.exists("download.test"): shutil.rmtree("download.test") # create the test dir... os.mkdir("download.test") # copy my metainfo file into there shutil.copy("metainfo","download.test") # do an update to that directory. If I don't see an unexpected error, we # should be in good shape tempdir = tempfile.mkdtemp()+"/" try: do_rsync(softwareurl, "download.test/",tempdir) except Exception: # We continue if this happens later, # so we should do so now as well pass finally: shutil.rmtree(tempdir) # remove the test directory shutil.rmtree("download.test") # time to handle startup (with respect to other copies of the updater if len(sys.argv) == 1: # I was called with no arguments, must be a fresh start... fresh_software_updater() else: # the first argument is our mutex number... software_updater_start(sys.argv[1]) | f3b3993f3603e2426a15444c480d2e715151931b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/f3b3993f3603e2426a15444c480d2e715151931b/softwareupdater.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
13332,
3536,
411,
10262,
4150,
34,
1220,
707,
353,
2674,
358,
741,
279,
1086,
10064,
434,
8374,
358,
1089,
18,
225,
1021,
21463,
353,
716,
309,
1915,
353,
8554,
358,
506,
279,
1008... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
13332,
3536,
411,
10262,
4150,
34,
1220,
707,
353,
2674,
358,
741,
279,
1086,
10064,
434,
8374,
358,
1089,
18,
225,
1021,
21463,
353,
716,
309,
1915,
353,
8554,
358,
506,
279,
1008... | |
def handle_args(doc): rewrite_desc_entries(doc, "args") rewrite_desc_entries(doc, "constructor-args") | signature.appendChild(doc.createTextNode("\n ")) def methodline_to_signature(doc, methodline): signature = doc.createElement("signature") signature.appendChild(doc.createTextNode("\n ")) name = doc.createElement("name") name.appendChild(doc.createTextNode(methodline.getAttribute("name"))) signature.appendChild(name) methodline.parentNode.removeChild(methodline) if len(methodline.childNodes): methodline._node.name = "args" methodline.removeAttribute("name") signature.appendChild(doc.createTextNode("\n ")) signature.appendChild(methodline) signature.appendChild(doc.createTextNode("\n ")) return signature | def rewrite_desc_entries(doc, argname_gi): argnodes = doc.getElementsByTagName(argname_gi) for node in argnodes: parent = node.parentNode nodes = [] for n in parent.childNodes: if n.nodeType != xml.dom.core.ELEMENT or n.tagName != argname_gi: nodes.append(n) desc = doc.createElement("description") for n in nodes: parent.removeChild(n) desc.appendChild(n) if node.childNodes: # keep the <args>...</args>, newline & indent parent.insertBefore(doc.createText("\n "), node) else: # no arguments, remove the <args/> node parent.removeChild(node) parent.appendChild(doc.createText("\n ")) parent.appendChild(desc) parent.appendChild(doc.createText("\n")) | 6fd3b456df1736e218c2900c3479631306a4f4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6fd3b456df1736e218c2900c3479631306a4f4d7/docfixer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10738,
67,
5569,
67,
8219,
12,
2434,
16,
1501,
529,
67,
10052,
4672,
1501,
4690,
273,
997,
18,
588,
3471,
10401,
12,
3175,
529,
67,
10052,
13,
364,
756,
316,
1501,
4690,
30,
982,
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,
10738,
67,
5569,
67,
8219,
12,
2434,
16,
1501,
529,
67,
10052,
4672,
1501,
4690,
273,
997,
18,
588,
3471,
10401,
12,
3175,
529,
67,
10052,
13,
364,
756,
316,
1501,
4690,
30,
982,
273,
... |
sys.stdout = Logger() | def any(iteravel): for item in iteravel: if item: return True | 1435f5b16ab63c49eda8477605294e09eb8c9507 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8537/1435f5b16ab63c49eda8477605294e09eb8c9507/migracao_ldap_zimbra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1281,
12,
2165,
7882,
4672,
364,
761,
316,
1400,
7882,
30,
309,
761,
30,
327,
1053,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1281,
12,
2165,
7882,
4672,
364,
761,
316,
1400,
7882,
30,
309,
761,
30,
327,
1053,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
"""Returns capacity of all batteries (in mAh)""" | """Returns capacity of all batteries (in mWh)""" | def capacity(self): """Returns capacity of all batteries (in mAh)""" return self.acpi.capacity() | bc309ea49d9351f53989eddc8793a5c3182af5d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2969/bc309ea49d9351f53989eddc8793a5c3182af5d8/acpi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7519,
12,
2890,
4672,
3536,
1356,
7519,
434,
777,
324,
9293,
606,
261,
267,
312,
2888,
15574,
327,
365,
18,
1077,
7259,
18,
16017,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7519,
12,
2890,
4672,
3536,
1356,
7519,
434,
777,
324,
9293,
606,
261,
267,
312,
2888,
15574,
327,
365,
18,
1077,
7259,
18,
16017,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
rapid(x=(x_cen + bottom_r), y=y_cen) rapid(z=z_safe) | cone_feed = (step_down / math.tan(angle * math.pi / 180)) if angle < 0 : cone_feed = cone_feed * -1 flush_nc() | def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down): | 7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
356,
73,
12,
92,
67,
71,
275,
16,
677,
67,
71,
275,
16,
998,
67,
71,
275,
16,
5226,
67,
350,
16,
358,
1673,
77,
16986,
16,
1694,
728,
298,
67,
13871,
16,
10300,
67,
7848,
5141,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
356,
73,
12,
92,
67,
71,
275,
16,
677,
67,
71,
275,
16,
998,
67,
71,
275,
16,
5226,
67,
350,
16,
358,
1673,
77,
16986,
16,
1694,
728,
298,
67,
13871,
16,
10300,
67,
7848,
5141,
1... |
load(filename) | try: load(filename) except gobject.GError, e: traceback.print_exc() raise SaveLoadError, _('Error while loading: GError %s') % e except IOError, e: traceback.print_exc() raise SaveLoadError, _('Error while loading: IOError %s') % e | def load(self, filename): if not os.path.isfile(filename): raise SaveLoadError, _('File does not exist: %s') % repr(filename) if not os.access(filename,os.R_OK): raise SaveLoadError, _('You do not have the necessary permissions to open file: %s') % repr(filename) trash, ext = os.path.splitext(filename) ext = ext.lower().replace('.', '') load = getattr(self, 'load_' + ext, self.unsupported) load(filename) self.command_stack.clear() self.unsaved_painting_time = 0.0 self.call_doc_observers() | 5ddd0d5190d8306aaecb08f7e2f896b8e858d0fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7129/5ddd0d5190d8306aaecb08f7e2f896b8e858d0fe/document.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
1544,
4672,
309,
486,
1140,
18,
803,
18,
291,
768,
12,
3459,
4672,
1002,
7074,
2563,
668,
16,
389,
2668,
812,
1552,
486,
1005,
30,
738,
87,
6134,
738,
8480,
12,
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,
1262,
12,
2890,
16,
1544,
4672,
309,
486,
1140,
18,
803,
18,
291,
768,
12,
3459,
4672,
1002,
7074,
2563,
668,
16,
389,
2668,
812,
1552,
486,
1005,
30,
738,
87,
6134,
738,
8480,
12,
3... |
'ext_modules': ('build_ext', 'modules'), | 'ext_modules': ('build_ext', 'extensions'), | def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; parse the command-line, creating and customizing instances of the command class for each command found on the command-line; run each of those commands. The Distribution instance might be an instance of a class supplied via the 'distclass' keyword argument to 'setup'; if no such class is supplied, then the 'Distribution' class (also in this module) is instantiated. All other arguments to 'setup' (except for 'cmdclass') are used to set attributes of the Distribution instance. The 'cmdclass' argument, if supplied, is a dictionary mapping command names to command classes. Each command encountered on the command line will be turned into a command class, which is in turn instantiated; any class found in 'cmdclass' is used in place of the default, which is (for command 'foo_bar') class 'FooBar' in module 'distutils.command.foo_bar'. The command object must provide an 'options' attribute which is a list of option specifiers for 'distutils.fancy_getopt'. Any command-line options between the current and the next command are used to set attributes in the current command object. When the entire command-line has been successfully parsed, calls the 'run' method on each command object in turn. This method will be driven entirely by the Distribution object (which each command object has a reference to, thanks to its constructor), and the command-specific options that became attributes of each command object.""" # Determine the distribution class -- either caller-supplied or # our Distribution (see below). klass = attrs.get ('distclass') if klass: del attrs['distclass'] else: klass = Distribution # Create the Distribution instance, using the remaining arguments # (ie. everything except distclass) to initialize it dist = klass (attrs) # If we had a config file, this is where we would parse it: override # the client-supplied command options, but be overridden by the # command line. # Parse the command line; any command-line errors are the end-users # fault, so turn them into SystemExit to suppress tracebacks. try: dist.parse_command_line (sys.argv[1:]) except DistutilsArgError, msg: raise SystemExit, msg # And finally, run all the commands found on the command line. dist.run_commands () | 6a1a425ca56b0a5b61dcc9b37a6bf590aa74fd8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/6a1a425ca56b0a5b61dcc9b37a6bf590aa74fd8b/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
261,
636,
7039,
4672,
3536,
1986,
6878,
358,
326,
19893,
5471,
30,
741,
7756,
3433,
3875,
2728,
4260,
358,
741,
16,
316,
279,
3551,
715,
16600,
1523,
471,
729,
17,
3069,
837,
4031,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
261,
636,
7039,
4672,
3536,
1986,
6878,
358,
326,
19893,
5471,
30,
741,
7756,
3433,
3875,
2728,
4260,
358,
741,
16,
316,
279,
3551,
715,
16600,
1523,
471,
729,
17,
3069,
837,
4031,... |
self.reload_acl() | result = self.reload_acl() if (result.text.find("format error",0,len(result.text)) != -1): self.fail(result) | def test_exchange_acl_deny(self): session = self.get_session('bob','bob') session.queue_declare(queue="baz") | 8deee3fee6e04aee030aa54666955757b6b127dd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/198/8deee3fee6e04aee030aa54666955757b6b127dd/acl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16641,
67,
10150,
67,
13002,
93,
12,
2890,
4672,
1339,
273,
365,
18,
588,
67,
3184,
2668,
70,
947,
17023,
70,
947,
6134,
1339,
18,
4000,
67,
29554,
12,
4000,
1546,
70,
1561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16641,
67,
10150,
67,
13002,
93,
12,
2890,
4672,
1339,
273,
365,
18,
588,
67,
3184,
2668,
70,
947,
17023,
70,
947,
6134,
1339,
18,
4000,
67,
29554,
12,
4000,
1546,
70,
1561,
... |
filename = "0-REGTYPE" | filename = "/0-REGTYPE" | def test_seek(self): """Test seek() method of _FileObject, incl. random reading. """ if self.sep != "|": filename = "0-REGTYPE" self.tar.extract(filename, dirname()) data = file(os.path.join(dirname(), filename), "rb").read() | 6284c8dd59cadc161fe9dd2cc2eed2d6ac38a170 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6284c8dd59cadc161fe9dd2cc2eed2d6ac38a170/test_tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16508,
12,
2890,
4672,
3536,
4709,
6520,
1435,
707,
434,
389,
21471,
16,
2823,
18,
2744,
6453,
18,
3536,
309,
365,
18,
10814,
480,
11747,
6877,
1544,
273,
2206,
20,
17,
5937,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16508,
12,
2890,
4672,
3536,
4709,
6520,
1435,
707,
434,
389,
21471,
16,
2823,
18,
2744,
6453,
18,
3536,
309,
365,
18,
10814,
480,
11747,
6877,
1544,
273,
2206,
20,
17,
5937,
... |
"""<union> | """<list> | def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node) self.content = [] self.attr_content = [] | 66c6baf2288f065b45db940b63cfc5dba1aa9fb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/66c6baf2288f065b45db940b63cfc5dba1aa9fb0/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
8832,
12,
2890,
16,
756,
4672,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
365,
18,
1745,
273,
5378,
365,
18,
1747,
67,
1745,
273,
5378,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
628,
8832,
12,
2890,
16,
756,
4672,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
365,
18,
1745,
273,
5378,
365,
18,
1747,
67,
1745,
273,
5378,
2,
... |
info['hosts'] = host_info | info['hosts'] = host_dicts | def get_info_for_clone(id): """\ Retrieves all the information needed to clone a job. """ info = {} job = models.Job.objects.get(id=id) query = job.hostqueueentry_set.filter(deleted=False) hosts = [queue_entry.host for queue_entry in query if queue_entry.host and not queue_entry.meta_host] meta_hosts = [queue_entry.meta_host.name for queue_entry in query if queue_entry.meta_host] host_info = get_hosts(hostname__in=[host.hostname for host in hosts]) for host in host_info: platform = host['platform'] if platform is not None and platform in host['labels']: host['labels'].remove(platform) host['other_labels'] = ', '.join(host['labels']) meta_host_counts = {} for meta_host in meta_hosts: meta_host_counts.setdefault(meta_host, 0) meta_host_counts[meta_host] += 1 info['job'] = job.get_object_dict() info['meta_host_counts'] = meta_host_counts info['hosts'] = host_info return rpc_utils.prepare_for_serialization(info) | 5074e8dd5e83601a51c89a5bb27b545f00e838d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/5074e8dd5e83601a51c89a5bb27b545f00e838d5/rpc_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1376,
67,
1884,
67,
14056,
12,
350,
4672,
3536,
64,
20507,
777,
326,
1779,
3577,
358,
3236,
279,
1719,
18,
3536,
1123,
273,
2618,
1719,
273,
3679,
18,
2278,
18,
6911,
18,
588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1376,
67,
1884,
67,
14056,
12,
350,
4672,
3536,
64,
20507,
777,
326,
1779,
3577,
358,
3236,
279,
1719,
18,
3536,
1123,
273,
2618,
1719,
273,
3679,
18,
2278,
18,
6911,
18,
588,... |
def user(self, uri, user): | def user(self, uri): | def user(self, uri, user): box = '<table class="box">\n' if uri.username > '': user = lampadas.users[uri.username] box = box + '<form method=GET action="data/save/user" name="user">\n' else: user = User() box = box + '<form method=GET action="data/save/newuser" name="user">\n' box = box + '<input name="username" type=hidden value=' + uri.username + '></input>\n' box = box + '<tr><th colspan=2>|struserdetails|</th><th>|strcomments|</th></tr>\n' box = box + '<tr><th class="label">|strusername|</th><td>' + uri.username + '</td>\n' box = box + '<td rowspan=10 style="width:100%"><textarea name="notes" wrap=soft style="width:100%; height:100%">' + user.notes + '</textarea></td></tr>\n' box = box + '<tr><th class="label">|strfirst_name|</th><td><input type=text name=first_name value="' + user.first_name + '"></input></td></tr>\n' box = box + '<tr><th class="label">|strmiddle_name|</th><td><input type=text name=middle_name value="' + user.middle_name + '"></input></td></tr>\n' box = box + '<tr><th class="label">|strsurname|</th><td><input type=text name=surname value="' + user.surname + '"></input></td></tr>\n' box = box + '<tr><th class="label">|stremail|</th><td><input type=text name=email value="' + user.email + '"></input></td></tr>\n' box = box + '<tr><th class="label">|strstylesheet|</th><td><input type=text name=stylesheet value="' + user.stylesheet + '"></input></td></tr>\n' box = box + '<tr><th class="label">|strnewpassword|</th><td><input type=text name=password></input></td></tr>\n' box = box + '<tr><th class="label">|stradmin|</th><td>' + combo_factory.tf('admin', user.admin, uri.lang) + '</td></tr>\n' box = box + '<tr><th class="label">|strsysadmin|</th><td>' + combo_factory.tf('sysadmin', user.sysadmin, uri.lang) + '</td></tr>\n' box = box + '<tr><td></td><td><input type=submit name=save value=Save></td></tr>\n' box = box + '</form>\n' box = box + '</table>\n' return box | 9618319c1fd328973a07d58cde7c01262bd1d9fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/9618319c1fd328973a07d58cde7c01262bd1d9fb/HTML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
12,
2890,
16,
2003,
4672,
3919,
273,
2368,
2121,
667,
1546,
2147,
6,
5333,
82,
11,
309,
2003,
18,
5053,
405,
875,
30,
729,
273,
328,
931,
361,
345,
18,
5577,
63,
1650,
18,
5053,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
729,
12,
2890,
16,
2003,
4672,
3919,
273,
2368,
2121,
667,
1546,
2147,
6,
5333,
82,
11,
309,
2003,
18,
5053,
405,
875,
30,
729,
273,
328,
931,
361,
345,
18,
5577,
63,
1650,
18,
5053,... |
makedirs(self.bdir) | os.makedirs(self.bdir) | def __init__(self, sdir, bdir=""): self.sdir = os.path.join(self.topdir, sdir) if bdir != "": self.bdir = os.path.join(self.sdir, bdir) if not os.path.isdir(self.bdir): try: makedirs(self.bdir) except: fatal("error creating directory " + self.bdir) else: self.bdir = self.sdir | 89b15e98275333525e3bccdd4be6b1cae64e3221 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5963/89b15e98275333525e3bccdd4be6b1cae64e3221/build_packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
272,
1214,
16,
324,
1214,
1546,
6,
4672,
365,
18,
87,
1214,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3669,
1214,
16,
272,
1214,
13,
309,
324,
1214,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
272,
1214,
16,
324,
1214,
1546,
6,
4672,
365,
18,
87,
1214,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3669,
1214,
16,
272,
1214,
13,
309,
324,
1214,
... |
else: for index, value in self.sms_map.iteritems(): if should_fragment_be_assembled(value, sms): completed = self.sms_map[index].append_sms(sms) debug("MAL::_add_sms multi part SMS with logical " "index %d, completed %s" % (index, completed)) | for index, value in self.sms_map.iteritems(): if should_fragment_be_assembled(value, sms): completed = self.sms_map[index].append_sms(sms) debug("MAL::_add_sms multi part SMS with logical " "index %d, completed %s" % (index, completed)) if completed: notification = self.sms_map[index] if self._is_a_wap_push_notification(notification): self._process_wap_push_notification(index, emit) return if emit: self.wrappee.emit_signal(SIG_SMS, index, completed) | def _add_sms(self, sms, emit=False): """ Adds ``sms`` to the cache | 8025c5a277afe71e867db2e6eebabd693f24d4b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12036/8025c5a277afe71e867db2e6eebabd693f24d4b4/mal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
20984,
12,
2890,
16,
16188,
16,
3626,
33,
8381,
4672,
3536,
15605,
12176,
20984,
10335,
358,
326,
1247,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1289,
67,
20984,
12,
2890,
16,
16188,
16,
3626,
33,
8381,
4672,
3536,
15605,
12176,
20984,
10335,
358,
326,
1247,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.files_to_remove.append(file_path) | self._DeleteAfterShutdown(file_path) | def testCancelDownload(self): """Verify that we can cancel a download.""" # Create a big file (250 MB) on the fly, so that the download won't finish # before being cancelled. file_path = self._MakeFile(2**28) file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), os.path.basename(file_path)) os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg) self.DownloadAndWaitForStart(file_url) self.PerformActionOnDownload(self._GetDownloadId(), 'cancel') self.files_to_remove.append(file_path) | 9951757e1f667c18359da5732e2c0a70ed2be48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9951757e1f667c18359da5732e2c0a70ed2be48e/downloads.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6691,
7109,
12,
2890,
4672,
3536,
8097,
716,
732,
848,
3755,
279,
4224,
12123,
468,
1788,
279,
5446,
585,
261,
26520,
17897,
13,
603,
326,
21434,
16,
1427,
716,
326,
4224,
8462,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6691,
7109,
12,
2890,
4672,
3536,
8097,
716,
732,
848,
3755,
279,
4224,
12123,
468,
1788,
279,
5446,
585,
261,
26520,
17897,
13,
603,
326,
21434,
16,
1427,
716,
326,
4224,
8462,
14... |
self._port_handle.BaudRate = self._baudrate | try: self._port_handle.BaudRate = self._baudrate except IOError, e: raise ValueError(str(e)) | def _reconfigurePort(self): """Set communication parameters on opened port.""" if not self._port_handle: raise SerialException("Can only operate on a valid port handle") self.ReceivedBytesThreshold = 1 if self._timeout is None: self._port_handle.ReadTimeout = System.IO.Ports.SerialPort.InfiniteTimeout else: self._port_handle.ReadTimeout = int(self._timeout*1000) # if self._timeout != 0 and self._interCharTimeout is not None: # timeouts = (int(self._interCharTimeout * 1000),) + timeouts[1:] if self._writeTimeout is None: self._port_handle.WriteTimeout = System.IO.Ports.SerialPort.InfiniteTimeout else: self._port_handle.WriteTimeout = int(self._writeTimeout*1000) | c53a8cacf340c4f54dc16eb7107da9ddbbcbbeec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2937/c53a8cacf340c4f54dc16eb7107da9ddbbcbbeec/serialcli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
14895,
2617,
12,
2890,
4672,
3536,
694,
18279,
1472,
603,
10191,
1756,
12123,
309,
486,
365,
6315,
655,
67,
4110,
30,
1002,
7366,
503,
2932,
2568,
1338,
20829,
603,
279,
923,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
14895,
2617,
12,
2890,
4672,
3536,
694,
18279,
1472,
603,
10191,
1756,
12123,
309,
486,
365,
6315,
655,
67,
4110,
30,
1002,
7366,
503,
2932,
2568,
1338,
20829,
603,
279,
923,
1... |
menubar = Menu(self._top, borderwidth=2, | menubar = Menu(self._root, borderwidth=2, | def _init_menubar(self): menubar = Menu(self._top, borderwidth=2, background=BG_COLOR, activebackground=BG_COLOR) filemenu = Menu(menubar, tearoff=0) filemenu.add_command(label='Open Project', underline=0, command=self._open, accelerator='Ctrl-o') filemenu.add_command(label='Save Project', underline=0, command=self._save, accelerator='Ctrl-s') filemenu.add_command(label='Save As..', underline=5, command=self._saveas, accelerator='Ctrl-a') filemenu.add_separator() filemenu.add_command(label='Exit', underline=1, command=self.destroy, accelerator='Ctrl-x') menubar.add_cascade(label='File', underline=0, menu=filemenu) gomenu = Menu(menubar, tearoff=0) gomenu.add_command(label='Run Epydoc', command=self._open, underline=0, accelerator='Alt-g') menubar.add_cascade(label='Run', menu=gomenu, underline=0) self._top.config(menu=menubar) | 4cf6d74130c32443c10897614b39d1c2c512796c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/4cf6d74130c32443c10897614b39d1c2c512796c/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
27617,
373,
297,
12,
2890,
4672,
21247,
373,
297,
273,
9809,
12,
2890,
6315,
3085,
16,
5795,
2819,
33,
22,
16,
5412,
33,
30098,
67,
10989,
16,
2695,
9342,
33,
30098,
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,
389,
2738,
67,
27617,
373,
297,
12,
2890,
4672,
21247,
373,
297,
273,
9809,
12,
2890,
6315,
3085,
16,
5795,
2819,
33,
22,
16,
5412,
33,
30098,
67,
10989,
16,
2695,
9342,
33,
30098,
67,... |
self.gridlayout9.addWidget(self.rotationSensitivity_txtlbl,3,0,1,1) | self.gridlayout7.addWidget(self.rotationSensitivity_txtlbl,3,0,1,1) | def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,609,642).size()).expandedTo(UserPrefsDialog.minimumSizeHint())) | 30deb2219e016847d91b37e801c50b75fbd1c3cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/30deb2219e016847d91b37e801c50b75fbd1c3cf/UserPrefsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
18,... |
subtitle = """<a name="11"></a>Collections Status""" | subtitle = """<a name="11"></a>Collections Status   [<a href="%s/admin/websearch/guide.html | def perform_validateconf(colID, ln, confirm=0, callback='yes'): """Validation of the configuration of the collections""" subtitle = """<a name="11"></a>Collections Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) collections = run_sql("SELECT id, name, dbquery, restricted FROM collection ORDER BY id") header = ['Id', 'Name', 'Query', 'Subcollections', 'Restricted', 'I8N','Status'] rnk_list = get_def_name('', "rnkMETHOD") actions = [] for (id, name, dbquery, restricted) in collections: reg_sons = len(get_col_tree(id, 'r')) vir_sons = len(get_col_tree(id, 'v')) status = "" langs = run_sql("SELECT ln from collectionname where id_collection=%s" % id) i8n = "" if len(langs) > 0: for lang in langs: i8n += "%s, " % lang else: i8n = """<b><span class="info">None</span></b>""" if (reg_sons > 1 and dbquery) or dbquery=="": status = """<b><span class="warning">1:Query</span></b>""" elif dbquery is None and reg_sons == 1: status = """<b><span class="warning">2:Query</span></b>""" elif dbquery == "" and reg_sons == 1: status = """<b><span class="warning">3:Query</span></b>""" if (reg_sons > 1 or vir_sons > 1): subs = """<b><span class="info">Yes</span></b>""" else: subs = """<b><span class="info">No</span></b>""" if dbquery is None: dbquery = """<b><span class="info">No</span></b>""" if restricted == "": restricted = "" if status: status += """<b><span class="warning">,4:Restricted</span></b>""" else: status += """<b><span class="warning">4:Restricted</span></b>""" elif restricted is None: restricted = """<b><span class="info">No</span></b>""" if status == "": status = """<b><span class="info">OK</span></b>""" actions.append([id, """<a href="%s/admin/websearch/websearchadmin.py/editcollection?colID=%s&ln=%s">%s</a>""" % (weburl, id, ln, name), dbquery, subs, restricted, i8n, status]) output += tupletotable(header=header, tuple=actions) try: body = [output, extra] except NameError: body = [output] return addadminbox(subtitle, body) if callback: return perform_index(colID, ln, "perform_validateconf", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body) | 754d19915d70f2e3a0364cac500bb203b82c6e16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/754d19915d70f2e3a0364cac500bb203b82c6e16/websearchadminlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
5662,
3923,
12,
1293,
734,
16,
7211,
16,
6932,
33,
20,
16,
1348,
2218,
9707,
11,
4672,
3536,
4354,
434,
326,
1664,
434,
326,
6980,
8395,
225,
20281,
273,
3536,
32,
69,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
5662,
3923,
12,
1293,
734,
16,
7211,
16,
6932,
33,
20,
16,
1348,
2218,
9707,
11,
4672,
3536,
4354,
434,
326,
1664,
434,
326,
6980,
8395,
225,
20281,
273,
3536,
32,
69,
508,
... |
image = proj.imagedata | slice_data = slice_.Slice() n_array = slice_data.matrix spacing = slice_data.spacing slice_number = 0 orientation = 'AXIAL' image = imagedata_utils.to_vtk(n_array, spacing, slice_number, orientation) self.image = image | def LoadVolume(self): proj = prj.Project() image = proj.imagedata | da74828263b2fbca975ccf3e88db5ffdafbcfe89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/da74828263b2fbca975ccf3e88db5ffdafbcfe89/volume.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
4545,
12,
2890,
4672,
10296,
273,
27378,
18,
4109,
1435,
1316,
273,
10296,
18,
381,
11349,
396,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4444,
4545,
12,
2890,
4672,
10296,
273,
27378,
18,
4109,
1435,
1316,
273,
10296,
18,
381,
11349,
396,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return cmp(t2_title, t1_title) elif not t1_dleft and t2_dleft: if order == gtk.SORT_ASCENDING: return 1 else: return -1 elif t1_dleft and not t2_dleft: if order == gtk.SORT_ASCENDING: return -1 else: return 1 else: return cmp(t2_dleft, t1_dleft) | sort = cmp(t2_title, t1_title) return sort | def dleft_sort_func(self, model, iter1, iter2, user_data=None): order = self.task_tv.get_model().get_sort_column_id()[1] task1 = model.get_value(iter1, tasktree.COL_OBJ) task2 = model.get_value(iter2, tasktree.COL_OBJ) t1_dleft = task1.get_due_date() t2_dleft = task2.get_due_date() if not t1_dleft and not t2_dleft: t1_title = task1.get_title() t2_title = task2.get_title() t1_title = locale.strxfrm(t1_title) t2_title = locale.strxfrm(t2_title) if order == gtk.SORT_ASCENDING: return cmp(t1_title, t2_title) else: return cmp(t2_title, t1_title) elif not t1_dleft and t2_dleft: if order == gtk.SORT_ASCENDING: return 1 else: return -1 elif t1_dleft and not t2_dleft: if order == gtk.SORT_ASCENDING: return -1 else: return 1 else: return cmp(t2_dleft, t1_dleft) | 0065fb95ec5eca60c1fe1023388241f232d911f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/0065fb95ec5eca60c1fe1023388241f232d911f6/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
4482,
67,
3804,
67,
644,
12,
2890,
16,
938,
16,
1400,
21,
16,
1400,
22,
16,
729,
67,
892,
33,
7036,
4672,
1353,
273,
365,
18,
4146,
67,
24161,
18,
588,
67,
2284,
7675,
588,
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,
302,
4482,
67,
3804,
67,
644,
12,
2890,
16,
938,
16,
1400,
21,
16,
1400,
22,
16,
729,
67,
892,
33,
7036,
4672,
1353,
273,
365,
18,
4146,
67,
24161,
18,
588,
67,
2284,
7675,
588,
67... |
self.hostname = 'localhost' | self.hostname = '127.0.0.1' | def setUp(self): self.jobdb = JobDatabaseSQLite(test=True) self.monitordb = MonitorDatabase(test=True) self.clientdb = ClientDatabase(test=True) self.dsage_server = DSageServer(self.jobdb, self.monitordb, self.clientdb, log_level=5) self.realm = Realm(self.dsage_server) self.p = _SSHKeyPortalRoot(portal.Portal(Realm(self.dsage_server))) self.clientdb = ClientDatabase(test=True) self.p.portal.registerChecker(PublicKeyCredentialsCheckerDB( self.clientdb)) self.client_factory = pb.PBServerFactory(self.p) self.hostname = 'localhost' self.r = reactor.listenTCP(0, self.client_factory) self.port = self.r.getHost().port | 7131940cc7bda42b7c11566db0754e224dbfa7b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7131940cc7bda42b7c11566db0754e224dbfa7b0/test_pubkeyauth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
4688,
1966,
273,
3956,
4254,
3997,
1137,
12,
3813,
33,
5510,
13,
365,
18,
2586,
305,
517,
70,
273,
14086,
4254,
12,
3813,
33,
5510,
13,
365,
18,
2625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
4688,
1966,
273,
3956,
4254,
3997,
1137,
12,
3813,
33,
5510,
13,
365,
18,
2586,
305,
517,
70,
273,
14086,
4254,
12,
3813,
33,
5510,
13,
365,
18,
2625,
... |
In addition to the data object, the following options can be given as keyword arguments: | In addition to the data object, the following options can be given as keyword arguments: | def dumps(params, methodname=None, methodresponse=None, encoding=None): """data [,options] -> marshalled data Convert an argument tuple or a Fault instance to an XML-RPC request (or response, if the methodresponse option is used). In addition to the data object, the following options can be given as keyword arguments: methodname: the method name for a methodCall packet methodresponse: true to create a methodResponse packet. If this option is used with a tuple, the tuple must be a singleton (i.e. it can contain only one element). encoding: the packet encoding (default is UTF-8) All 8-bit strings in the data structure are assumed to use the packet encoding. Unicode strings are automatically converted, as necessary. """ assert isinstance(params, TupleType) or isinstance(params, Fault),\ "argument must be tuple or Fault instance" if isinstance(params, Fault): methodresponse = 1 elif methodresponse and isinstance(params, TupleType): assert len(params) == 1, "response tuple must be a singleton" if not encoding: encoding = "utf-8" m = Marshaller(encoding) data = m.dumps(params) if encoding != "utf-8": xmlheader = "<?xml version='1.0' encoding=%s?>\n" % repr(encoding) else: xmlheader = "<?xml version='1.0'?>\n" # utf-8 is default # standard XML-RPC wrappings if methodname: # a method call if not isinstance(methodname, StringType): methodname = methodname.encode(encoding) data = ( xmlheader, "<methodCall>\n" "<methodName>", methodname, "</methodName>\n", data, "</methodCall>\n" ) elif methodresponse: # a method response, or a fault structure data = ( xmlheader, "<methodResponse>\n", data, "</methodResponse>\n" ) else: return data # return as is return string.join(data, "") | 3edebf5466fcffcb907147e1bee2a0d7cb258fc6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3edebf5466fcffcb907147e1bee2a0d7cb258fc6/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6711,
12,
2010,
16,
707,
529,
33,
7036,
16,
707,
2740,
33,
7036,
16,
2688,
33,
7036,
4672,
3536,
892,
306,
16,
2116,
65,
317,
10893,
1259,
501,
225,
4037,
392,
1237,
3193,
578,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6711,
12,
2010,
16,
707,
529,
33,
7036,
16,
707,
2740,
33,
7036,
16,
2688,
33,
7036,
4672,
3536,
892,
306,
16,
2116,
65,
317,
10893,
1259,
501,
225,
4037,
392,
1237,
3193,
578,
279,
... |
print(cmd) | print(subprocess.list2cmdline(cmd)) | def run_test(test, lib_dir): if test.tmflags: env = os.environ.copy() env['TMFLAGS'] = test.tmflags else: env = None cmd = get_test_cmd(test.path, lib_dir) if (test.valgrind and any([os.path.exists(os.path.join(d, 'valgrind')) for d in os.environ['PATH'].split(os.pathsep)])): valgrind_prefix = [ 'valgrind', '-q', '--smc-check=all', '--error-exitcode=1', '--leak-check=full'] if os.uname()[0] == 'Darwin': valgrind_prefix += ['--dsymutil=yes'] cmd = valgrind_prefix + cmd if OPTIONS.show_cmd: print(cmd) # close_fds is not supported on Windows and will cause a ValueError. close_fds = sys.platform != 'win32' p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=close_fds, env=env) out, err = p.communicate() out, err = out.decode(), err.decode() if OPTIONS.show_output: sys.stdout.write(out) sys.stdout.write(err) sys.stdout.write('Exit code: ' + str(p.returncode) + "\n") if test.valgrind: sys.stdout.write(err) return (check_output(out, err, p.returncode, test.allow_oom, test.error), out, err) | fa4836b91e9683181fa78d467af05cb7120f541e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/fa4836b91e9683181fa78d467af05cb7120f541e/trace-test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3813,
12,
3813,
16,
2561,
67,
1214,
4672,
309,
1842,
18,
16925,
7133,
30,
1550,
273,
1140,
18,
28684,
18,
3530,
1435,
1550,
3292,
22903,
17836,
3546,
273,
1842,
18,
16925,
7133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
3813,
12,
3813,
16,
2561,
67,
1214,
4672,
309,
1842,
18,
16925,
7133,
30,
1550,
273,
1140,
18,
28684,
18,
3530,
1435,
1550,
3292,
22903,
17836,
3546,
273,
1842,
18,
16925,
7133... |
elif ( type == 'zTXt' ): log.debug('Compressed Text found.') (data,crc) = struct.unpack('>%isI' % length,file.read(length+4)) split = data.split('\0') key = split[0] value = "".join(split[1:]) compression = ord(value[0]) value = value[1:] if compression == 0: decompressed = zlib.decompress(value) log.debug("%s (Compressed %i) -> %s" % \ (key,compression,decompressed)) else: log.debug("%s has unknown Compression %c" % (key,compression)) self.meta[key] = value | if type == 'IEND': return 0 | def _readChunk(self,file): try: (length, type) = struct.unpack('>I4s', file.read(8)) except (OSError, IOError): return 0 if ( type == 'tEXt' ): log.debug('latin-1 Text found.') (data, crc) = struct.unpack('>%isI' % length,file.read(length+4)) (key, value) = data.split('\0') self.meta[key] = value | 406ed256504f64178f5e0aaab56da54fbcbf4dcb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11721/406ed256504f64178f5e0aaab56da54fbcbf4dcb/pnginfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
5579,
12,
2890,
16,
768,
4672,
775,
30,
261,
2469,
16,
618,
13,
273,
1958,
18,
17309,
2668,
34,
45,
24,
87,
2187,
585,
18,
896,
12,
28,
3719,
1335,
261,
4618,
668,
16,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5579,
12,
2890,
16,
768,
4672,
775,
30,
261,
2469,
16,
618,
13,
273,
1958,
18,
17309,
2668,
34,
45,
24,
87,
2187,
585,
18,
896,
12,
28,
3719,
1335,
261,
4618,
668,
16,
83... |
self.surface = pygame.Surface(self.get_size(), 0, 32) | self.surface = pygame.Surface(int(self.get_size()), 0, 32) | def _draw(self): """ The actual internal draw function. | 983bd9dd7d7c99329fb151cc6c86951f735999f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/983bd9dd7d7c99329fb151cc6c86951f735999f0/PopupBox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9446,
12,
2890,
4672,
3536,
1021,
3214,
2713,
3724,
445,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
389,
9446,
12,
2890,
4672,
3536,
1021,
3214,
2713,
3724,
445,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.pushBotJoin() | if self.syncd: self.pushBotJoin() | def handleCmd_KICK(self, prefix, args): | 41cfee835992c192fb2464a231351b4271c46427 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8524/41cfee835992c192fb2464a231351b4271c46427/bridge_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
5931,
67,
47,
16656,
12,
2890,
16,
1633,
16,
833,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1640,
5931,
67,
47,
16656,
12,
2890,
16,
1633,
16,
833,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
host = req.get_host() | host = urlparse.urlparse(req.get_full_url())[1] | def do_open(self, http_class, req): host = req.get_host() if not host: raise URLError('no host given') | a9622a9af8d20bbd03a15a63df4b8c3261cfa69f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a9622a9af8d20bbd03a15a63df4b8c3261cfa69f/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3190,
12,
2890,
16,
1062,
67,
1106,
16,
1111,
4672,
1479,
273,
15185,
18,
718,
2670,
12,
3658,
18,
588,
67,
2854,
67,
718,
10756,
63,
21,
65,
309,
486,
1479,
30,
1002,
1976,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
67,
3190,
12,
2890,
16,
1062,
67,
1106,
16,
1111,
4672,
1479,
273,
15185,
18,
718,
2670,
12,
3658,
18,
588,
67,
2854,
67,
718,
10756,
63,
21,
65,
309,
486,
1479,
30,
1002,
1976,... |
if (len(cards)==0): return | if (len(cards)==0): self.task = 0 return Task.done | def maintainReadout(self, task): """Access: private. Whenever necessary, rebuilds the entire display from scratch. This is only done when the configuration parameters have changed.""" | 06dfeaba34b429b409c55e45dfc20b8deb66bf5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/06dfeaba34b429b409c55e45dfc20b8deb66bf5b/BufferViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17505,
1994,
659,
12,
2890,
16,
1562,
4672,
3536,
1862,
30,
3238,
18,
225,
3497,
4009,
502,
4573,
16,
13419,
87,
326,
7278,
2562,
628,
15289,
18,
225,
1220,
353,
1338,
2731,
1347,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17505,
1994,
659,
12,
2890,
16,
1562,
4672,
3536,
1862,
30,
3238,
18,
225,
3497,
4009,
502,
4573,
16,
13419,
87,
326,
7278,
2562,
628,
15289,
18,
225,
1220,
353,
1338,
2731,
1347,
326,
... |
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... |
key = string.upper(key) | def __setitem__(self, key, item): key = string.upper(key) putenv(key, item) self.data[key] = item | f4e72db40428bd47f54ddfb3fd610276a11c72f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f4e72db40428bd47f54ddfb3fd610276a11c72f5/os.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
761,
4672,
1378,
3074,
12,
856,
16,
761,
13,
365,
18,
892,
63,
856,
65,
273,
761,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
761,
4672,
1378,
3074,
12,
856,
16,
761,
13,
365,
18,
892,
63,
856,
65,
273,
761,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
return MySQLdb.connect(host=self.host, db=self.db, | return MySQLdb.connect(host=self.host, port=self.port, db=self.db, | def makeConnection(self): return MySQLdb.connect(host=self.host, db=self.db, user=self.user, passwd=self.password) | c6118b2b0daab1d4d5d41d38786f832d7c72a4f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/c6118b2b0daab1d4d5d41d38786f832d7c72a4f7/mysqlconnection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1952,
12,
2890,
4672,
327,
13485,
1966,
18,
3612,
12,
2564,
33,
2890,
18,
2564,
16,
1756,
33,
2890,
18,
655,
16,
1319,
33,
2890,
18,
1966,
16,
729,
33,
2890,
18,
1355,
16,
1909... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1952,
12,
2890,
4672,
327,
13485,
1966,
18,
3612,
12,
2564,
33,
2890,
18,
2564,
16,
1756,
33,
2890,
18,
655,
16,
1319,
33,
2890,
18,
1966,
16,
729,
33,
2890,
18,
1355,
16,
1909... |
if f_name: | if f_name and version: | def noninteractiveMode(self): """ noninteractiveMode() -> None Run the console in non-interactive mode """ usedb = False if self.temp_db_options.host: usedb = True if self.input: w_list = [] for filename in self.input: f_name, version = self._parse_vtinfo(filename, not usedb) if f_name: if not usedb: locator = FileLocator(os.path.abspath(f_name)) else: locator = DBLocator(host=self.temp_db_options.host, port=self.temp_db_options.port, database=self.temp_db_options.db, user=self.temp_db_options.user, passwd='', obj_id=f_name, obj_type=None, connection_id=None) w_list.append((locator, version)) import core.console_mode if self.temp_db_options.parameters == None: self.temp_db_options.parameters = '' workflowInfo = None if self.temp_configuration.check('workflowInfo'): workflow_info = self.temp_configuration.workflowInfo else: workflow_info = None errs = core.console_mode.run(w_list, self.temp_db_options.parameters, workflow_info) if len(errs) > 0: for err in errs: print "*** Error in %s:%s:%s -- %s" % err return False return True else: debug.critical("no input vistrails provided") return False | b5813d8a38e4e720cab29aac6d05cb4709b6be40 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6341/b5813d8a38e4e720cab29aac6d05cb4709b6be40/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1661,
24761,
2309,
12,
2890,
4672,
3536,
1661,
24761,
2309,
1435,
317,
599,
1939,
326,
2983,
316,
1661,
17,
24761,
1965,
225,
3536,
1399,
70,
273,
1083,
309,
365,
18,
5814,
67,
1966,
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,
1661,
24761,
2309,
12,
2890,
4672,
3536,
1661,
24761,
2309,
1435,
317,
599,
1939,
326,
2983,
316,
1661,
17,
24761,
1965,
225,
3536,
1399,
70,
273,
1083,
309,
365,
18,
5814,
67,
1966,
67,... |
the standard deviation of the flattened array. | the mean of the flattened array. | def mean(a, axis=None, dtype=None, out=None): """Compute the mean along the specified axis. Returns the average of the array elements. The average is taken over the flattened array by default, otherwise over the specified axis. The dtype returned for integer type arrays is float Parameters ---------- a : {array_like} Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted. axis : {None, integer}, optional Axis along which the means are computed. The default is to compute the standard deviation of the flattened array. dtype : {None, dtype}, optional Type to use in computing the means. For arrays of integer type the default is float32, for arrays of float types it is the same as the array type. out : {None, array}, optional Alternative output array in which to place the result. It must have the same shape as the expected output but the type will be cast if necessary. Returns ------- mean : {array, scalar}, see dtype parameter above If out=None, returns a new array containing the mean values, otherwise a reference to the output array is returned. See Also -------- var : Variance std : Standard deviation Notes ----- The mean is the sum of the elements along the axis divided by the number of elements. Examples -------- >>> a = array([[1,2],[3,4]]) >>> mean(a) 2.5 >>> mean(a,0) array([ 2., 3.]) >>> mean(a,1) array([ 1.5, 3.5]) """ try: mean = a.mean except AttributeError: return _wrapit(a, 'mean', axis, dtype, out) return mean(axis, dtype, out) | 5fc40c054140b8f43eb2838f892367ca05bcf302 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/5fc40c054140b8f43eb2838f892367ca05bcf302/fromnumeric.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3722,
12,
69,
16,
2654,
33,
7036,
16,
3182,
33,
7036,
16,
596,
33,
7036,
4672,
3536,
7018,
326,
3722,
7563,
326,
1269,
2654,
18,
225,
2860,
326,
8164,
434,
326,
526,
2186,
18,
225,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3722,
12,
69,
16,
2654,
33,
7036,
16,
3182,
33,
7036,
16,
596,
33,
7036,
4672,
3536,
7018,
326,
3722,
7563,
326,
1269,
2654,
18,
225,
2860,
326,
8164,
434,
326,
526,
2186,
18,
225,
1... |
PyErr_Mac(ErrorObject, err); | PyMac_Error(err); | #ifdef WITHOUT_FRAMEWORKS | 0d3945c1b6ce8c3d7027bc8f9a84299861cf9b01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d3945c1b6ce8c3d7027bc8f9a84299861cf9b01/filesupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
430,
536,
13601,
5069,
67,
15072,
10566,
55,
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,
468,
430,
536,
13601,
5069,
67,
15072,
10566,
55,
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... |
'Test name: %s ' % test_name, | 'Test name: %s ' % label, | def measure(code_str,times=1,label=None): """ Return elapsed time for executing code_str in the namespace of the caller for given times. """ frame = sys._getframe(1) locs,globs = frame.f_locals,frame.f_globals code = compile(code_str, 'Test name: %s ' % test_name, 'exec') i = 0 elapsed = jiffies() while i<times: i += 1 exec code in globs,locs elapsed = jiffies() - elapsed return 0.01*elapsed | d88397baff7bed0d749c929e762d617bfd1bc223 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/d88397baff7bed0d749c929e762d617bfd1bc223/ntest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6649,
12,
710,
67,
701,
16,
8293,
33,
21,
16,
1925,
33,
7036,
4672,
3536,
2000,
9613,
813,
364,
11274,
981,
67,
701,
316,
326,
1981,
434,
326,
4894,
364,
864,
4124,
18,
3536,
2623,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6649,
12,
710,
67,
701,
16,
8293,
33,
21,
16,
1925,
33,
7036,
4672,
3536,
2000,
9613,
813,
364,
11274,
981,
67,
701,
316,
326,
1981,
434,
326,
4894,
364,
864,
4124,
18,
3536,
2623,
2... |
- ``second_descent`` (bool, default True) -- (only relevant | - ``second_descent`` (bool, default ``True``) -- (only relevant | def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve. | 1cc4edc9aafb88d044d853b60331d1432546cf60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1cc4edc9aafb88d044d853b60331d1432546cf60/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2795,
67,
5569,
319,
12,
2890,
16,
3988,
273,
1053,
16,
357,
6592,
67,
3700,
273,
1083,
16,
1122,
67,
3595,
273,
4200,
16,
2205,
67,
3595,
273,
1725,
16,
290,
67,
18196,
273,
300,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2795,
67,
5569,
319,
12,
2890,
16,
3988,
273,
1053,
16,
357,
6592,
67,
3700,
273,
1083,
16,
1122,
67,
3595,
273,
4200,
16,
2205,
67,
3595,
273,
1725,
16,
290,
67,
18196,
273,
300,
21... |
node = avg.WordsNode(parent=root, text="testtext") | node = avg.WordsNode(parent=root, text="testtext", font="Bitstream Vera Sans") | def testWordsNullFX(self): self.loadEmptyScene() root = Player.getRootNode() node = avg.WordsNode(parent=root, text="testtext") node.setEffect(avg.NullFXNode()) self.start(None, (lambda: self.compareImage("testWordsNullFX", True), )) | 28c6f6a6ee188ec5c84585b91d6b61ce16953c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7300/28c6f6a6ee188ec5c84585b91d6b61ce16953c7e/FXTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7363,
2041,
25172,
12,
2890,
4672,
365,
18,
945,
1921,
14370,
1435,
1365,
273,
19185,
18,
588,
29658,
1435,
756,
273,
11152,
18,
7363,
907,
12,
2938,
33,
3085,
16,
977,
1546,
3813,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7363,
2041,
25172,
12,
2890,
4672,
365,
18,
945,
1921,
14370,
1435,
1365,
273,
19185,
18,
588,
29658,
1435,
756,
273,
11152,
18,
7363,
907,
12,
2938,
33,
3085,
16,
977,
1546,
3813,... |
prefix = os.path.splitext(store.name)[0] + '_' | if store.translation_project.language.code == 'templates': prefix = os.path.splitext(store.name)[0] + '_' else: prefix = os.path.splitext(store.name)[0][:-len(store.translation_project.language.code)] | def get_translated_name_gnu(translation_project, store): """given a template store and a translation_project return target filename""" suffix = translation_project.language.code + os.extsep + translation_project.project.localfiletype use_prefix = store.parent.child_stores.count() > 1 or \ translation_project.stores.exclude(name=suffix).exclude(file="").count() if not use_prefix: # let's make sure for tp in translation_project.project.translationproject_set.exclude(language__code='templates').iterator(): temp_suffix = tp.language.code + os.extsep + translation_project.project.localfiletype if translation_project.stores.exclude(name=temp_suffix).exclude(file="").count(): use_prefix = True break pootle_path_parts = store.pootle_path.split('/') pootle_path_parts[1] = translation_project.language.code if store.file: path_parts = store.file.path.split(os.sep) if use_prefix: #FIXME: what about dashes prefix = os.path.splitext(store.name)[0] + '_' else: prefix = "" name = prefix + suffix path_parts[-1] = name pootle_path_parts[-1] = name else: path_parts = store.parent.get_real_path().split(os.sep) path_parts.append(store.name) return '/'.join(pootle_path_parts), os.sep.join(path_parts) | cb97c96d1c550fb557fccbdfca7ecad110243462 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11388/cb97c96d1c550fb557fccbdfca7ecad110243462/project_tree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22899,
67,
529,
67,
1600,
89,
12,
10173,
67,
4406,
16,
1707,
4672,
3536,
10822,
279,
1542,
1707,
471,
279,
4794,
67,
4406,
327,
1018,
1544,
8395,
3758,
273,
4794,
67,
4406,
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,
336,
67,
22899,
67,
529,
67,
1600,
89,
12,
10173,
67,
4406,
16,
1707,
4672,
3536,
10822,
279,
1542,
1707,
471,
279,
4794,
67,
4406,
327,
1018,
1544,
8395,
3758,
273,
4794,
67,
4406,
18... |
Return a new Weierstrass model of self under the standard transformation `(u,r,s,,t)` | Return a new Weierstrass model of self under the standard transformation `(u,r,s,t)` | def change_weierstrass_model(self, *urst): r""" Return a new Weierstrass model of self under the standard transformation `(u,r,s,,t)` .. math:: (x,y) \mapsto (x',y') = (u^2xr , u^3y + su^2x' + t). EXAMPLES:: sage: E = EllipticCurve('15a') sage: F1 = E.change_weierstrass_model([1/2,0,0,0]); F1 Elliptic Curve defined by y^2 + 2*x*y + 8*y = x^3 + 4*x^2 - 160*x - 640 over Rational Field sage: F2 = E.change_weierstrass_model([7,2,1/3,5]); F2 Elliptic Curve defined by y^2 + 5/21*x*y + 13/343*y = x^3 + 59/441*x^2 - 10/7203*x - 58/117649 over Rational Field sage: F1.is_isomorphic(F2) True """ if isinstance(urst[0], (tuple, list)): urst = urst[0] return constructor.EllipticCurve((wm.baseWI(*urst))(self.ainvs())) | bb08beb02d03f760beb67b038c96feb12ff51fc3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/bb08beb02d03f760beb67b038c96feb12ff51fc3/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
1814,
20778,
313,
428,
67,
2284,
12,
2890,
16,
380,
18593,
4672,
436,
8395,
2000,
279,
394,
1660,
20778,
313,
428,
938,
434,
365,
3613,
326,
4529,
8620,
1375,
12,
89,
16,
86,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
1814,
20778,
313,
428,
67,
2284,
12,
2890,
16,
380,
18593,
4672,
436,
8395,
2000,
279,
394,
1660,
20778,
313,
428,
938,
434,
365,
3613,
326,
4529,
8620,
1375,
12,
89,
16,
86,... |
assert _cardInfo.has_key(ccType), "I can't validate that type of credit card" | assert self._cardInfo.has_key(ccType), "I can't validate that type of credit card" | def _validateReturn(self, fieldDict, state): ccType = string.lower(string.strip(fieldDict[self._ccTypeField])) number = string.strip(fieldDict[self._ccNumberField]) number = string.replace(number, ' ', '') number = string.replace(number, '-', '') try: long(number) except ValueError: return {self._ccNumberField: self.message('invalidNumber', "Please enter only the number, no other characters")} | f4fc213e95e4590e769d3c9c8128b44ba55d5da7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/f4fc213e95e4590e769d3c9c8128b44ba55d5da7/validators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5662,
990,
12,
2890,
16,
652,
5014,
16,
919,
4672,
4946,
559,
273,
533,
18,
8167,
12,
1080,
18,
6406,
12,
1518,
5014,
63,
2890,
6315,
952,
559,
974,
22643,
1300,
273,
533,
18,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5662,
990,
12,
2890,
16,
652,
5014,
16,
919,
4672,
4946,
559,
273,
533,
18,
8167,
12,
1080,
18,
6406,
12,
1518,
5014,
63,
2890,
6315,
952,
559,
974,
22643,
1300,
273,
533,
18,
6... |
self.assert_(msg.get_sequences() == ['flagged', 'foobar']) | self.assertEqual(msg.get_sequences(), ['flagged', 'foobar']) | def test_sequences(self): # Get, set, join, and leave sequences msg = mailbox.MHMessage(_sample_message) self.assertEqual(msg.get_sequences(), []) msg.set_sequences(['foobar']) self.assertEqual(msg.get_sequences(), ['foobar']) msg.set_sequences([]) self.assertEqual(msg.get_sequences(), []) msg.add_sequence('unseen') self.assertEqual(msg.get_sequences(), ['unseen']) msg.add_sequence('flagged') self.assert_(msg.get_sequences() == ['unseen', 'flagged']) msg.add_sequence('flagged') self.assert_(msg.get_sequences() == ['unseen', 'flagged']) msg.remove_sequence('unseen') self.assertEqual(msg.get_sequences(), ['flagged']) msg.add_sequence('foobar') self.assert_(msg.get_sequences() == ['flagged', 'foobar']) msg.remove_sequence('replied') self.assert_(msg.get_sequences() == ['flagged', 'foobar']) msg.set_sequences(['foobar', 'replied']) self.assert_(msg.get_sequences() == ['foobar', 'replied']) | fc9997a71def3361507ae020d7f678e347d8646b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/fc9997a71def3361507ae020d7f678e347d8646b/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
17190,
12,
2890,
4672,
468,
968,
16,
444,
16,
1233,
16,
471,
8851,
8463,
1234,
273,
14187,
18,
49,
44,
1079,
24899,
6358,
67,
2150,
13,
365,
18,
11231,
5812,
12,
3576,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
17190,
12,
2890,
4672,
468,
968,
16,
444,
16,
1233,
16,
471,
8851,
8463,
1234,
273,
14187,
18,
49,
44,
1079,
24899,
6358,
67,
2150,
13,
365,
18,
11231,
5812,
12,
3576,
18,
... |
if self.GetLineStartPos(self.GetLineFromPos(pos)) != pos: | if self.PositionFromLine(self.LineFromPosition(pos)) != pos: | def OnKeyDown(self, event): if self.CallTipActive(): self.callTipCheck() | ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
653,
4164,
12,
2890,
16,
871,
4672,
309,
365,
18,
1477,
14189,
3896,
13332,
365,
18,
1991,
14189,
1564,
1435,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
653,
4164,
12,
2890,
16,
871,
4672,
309,
365,
18,
1477,
14189,
3896,
13332,
365,
18,
1991,
14189,
1564,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
length = float( math.sqrt( (self.beginningCoord[0]+self.endCoord[0])**2 + (self.beginningCoord[1]+self.endCoord[1])**2 + (self.beginningCoord[2]+self.endCoord[2])**2 ) ) | length = self.getLength() | def getUnitVector(self): ''' Returns a vector along the helical axis pointing toward the endpoint farther from the origin. ''' length = float( math.sqrt( (self.beginningCoord[0]+self.endCoord[0])**2 + (self.beginningCoord[1]+self.endCoord[1])**2 + (self.beginningCoord[2]+self.endCoord[2])**2 ) ) return ( (self.beginningCoord[0]-self.endCoord[0])/length, (self.beginningCoord[1]-self.endCoord[1])/length, (self.beginningCoord[2]-self.endCoord[2])/length ) | 1f6f9de74c16f958b5f9b266984165a662bdffd6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/1f6f9de74c16f958b5f9b266984165a662bdffd6/ObservedHelix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19194,
5018,
12,
2890,
4672,
9163,
2860,
279,
3806,
7563,
326,
13150,
1706,
2654,
17022,
358,
2913,
326,
2494,
10247,
1136,
628,
326,
4026,
18,
9163,
769,
273,
365,
18,
588,
1782,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19194,
5018,
12,
2890,
4672,
9163,
2860,
279,
3806,
7563,
326,
13150,
1706,
2654,
17022,
358,
2913,
326,
2494,
10247,
1136,
628,
326,
4026,
18,
9163,
769,
273,
365,
18,
588,
1782,
1435,
... |
examples = [source + _expect(expect) for source, expect, dummy in _extract_examples(test)] return '\n'.join(examples) def debug(module, name): """Debug a single docstring containing doctests. Provide the module (or dotted name of the module) containing the docstring to be debugged, and the name (within the module) of the object with the docstring to be debugged. The doctest examples are extracted (see function testsource()), and written to a temp file. The Python debugger (pdb) is then invoked on that file. | examples = _extract_examples(test) testsrc = '\n'.join([ "%s%s" % (source, _expect(expect)) for (source, expect, lineno) in examples ]) return testsrc def debug_src(src, pm=False, globs=None): """Debug a single doctest test doc string The string is provided directly | def testsource(module, name): """Extract the doctest examples from a docstring. Provide the module (or dotted name of the module) containing the tests to be extracted, and the name (within the module) of the object with the docstring containing the tests to be extracted. The doctest examples are returned as a string containing Python code. The expected output blocks in the examples are converted to Python comments. """ module = _normalize_module(module) tests = _find_tests(module, "") test = [doc for (tname, doc, dummy, dummy) in tests if tname == name] if not test: raise ValueError(name, "not found in tests") test = test[0] examples = [source + _expect(expect) for source, expect, dummy in _extract_examples(test)] return '\n'.join(examples) | a643b658a7cd1d820fd561665402705f0f76b1d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a643b658a7cd1d820fd561665402705f0f76b1d0/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3168,
12,
2978,
16,
508,
4672,
3536,
4976,
326,
31263,
395,
10991,
628,
279,
14525,
18,
225,
26569,
326,
1605,
261,
280,
20965,
508,
434,
326,
1605,
13,
4191,
326,
7434,
358,
506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3168,
12,
2978,
16,
508,
4672,
3536,
4976,
326,
31263,
395,
10991,
628,
279,
14525,
18,
225,
26569,
326,
1605,
261,
280,
20965,
508,
434,
326,
1605,
13,
4191,
326,
7434,
358,
506,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.