rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
ssd =AlignMol(mol,core,atomMap=algMap)
rms =AlignMol(mol,core,atomMap=algMap)
def ConstrainedEmbed(mol,core,useTethers,randomseed=2342): match = mol.GetSubstructMatch(core) if not match: raise ValueError,"molecule doesn't match the core" coordMap={} coreConf = core.GetConformer() for i,idxI in enumerate(match): corePtI = coreConf.GetAtomPosition(i) coordMap[idxI]=corePtI ci = EmbedMolecule(mol,coordMap=coordMap,randomSeed=randomseed) if ci<0: logger.error('could not embed molecule %s, no coordinates generated.'%mol.GetProp('_Name')) algMap=[] for i,itm in enumerate(match): algMap.append((itm,i)) if not useTethers: # clean up the conformation ff = UFFGetMoleculeForceField(mol,confId=0) for i,idxI in enumerate(match): for j in range(i+1,len(match)): idxJ = match[j] d = coordMap[idxI].Distance(coordMap[idxJ]) ff.AddDistanceConstraint(idxI,idxJ,d,d,100.) ff.Initialize() n=4 more=ff.Minimize() while more and n: more=ff.Minimize() n-=1 # rotate the embedded conformation onto the core: ssd =AlignMol(mol,core,atomMap=algMap) else: # rotate the embedded conformation onto the core: ssd = AlignMol(mol,core,atomMap=algMap) ff = UFFGetMoleculeForceField(mol,confId=0) conf = core.GetConformer() for i in range(core.GetNumAtoms()): p =conf.GetAtomPosition(i) pIdx=ff.AddExtraPoint(p.x,p.y,p.z,fixed=True)-1 ff.AddDistanceConstraint(pIdx,match[i],0,0,100.) ff.Initialize() n=4 more=ff.Minimize(energyTol=1e-4,forceTol=1e-3) while more and n: more=ff.Minimize(energyTol=1e-4,forceTol=1e-3) n-=1 # realign ssd = AlignMol(mol,core,atomMap=algMap) print numpy.sqrt(ssd/len(algMap)) return mol
06790088a279034c39aa5ee91c735025dbe17313 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9195/06790088a279034c39aa5ee91c735025dbe17313/AllChem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 735, 31142, 9538, 12, 21260, 16, 3644, 16, 1202, 56, 546, 414, 16, 9188, 12407, 33, 4366, 9452, 4672, 845, 273, 12629, 18, 967, 1676, 1697, 2060, 12, 3644, 13, 309, 486, 845, 30, 1002,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 735, 31142, 9538, 12, 21260, 16, 3644, 16, 1202, 56, 546, 414, 16, 9188, 12407, 33, 4366, 9452, 4672, 845, 273, 12629, 18, 967, 1676, 1697, 2060, 12, 3644, 13, 309, 486, 845, 30, 1002,...
this = apply(_quickfix.new_AssignmentMethod, args)
this = _quickfix.new_AssignmentMethod(*args)
def __init__(self, *args): this = apply(_quickfix.new_AssignmentMethod, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 7729, 1305, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 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, 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, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 7729, 1305, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 1...
varnames.append(name[1][1][1])
src = DottedName(name[1][1][1]) var_proxies[name[1][1][1]] = ValueDocProxy(src)
def process_import(self, cmd, names, pseudo_docstring): """ The statement handler for import statements. This handler adds a C{VariableDoc} to the parent C{APIDoc} for each name that is created by importing. These C{VariableDoc}s have empty C{ValueDoc}s, and are marked as imported (i.e., C{L{is_imported<VariableDoc.is_imported>}=True}).
d4b62290bc22e63f8cc96e7c77bc6b16300b943b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/d4b62290bc22e63f8cc96e7c77bc6b16300b943b/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 5666, 12, 2890, 16, 1797, 16, 1257, 16, 12454, 67, 24675, 4672, 3536, 1021, 3021, 1838, 364, 1930, 6317, 18, 225, 1220, 1838, 4831, 279, 385, 95, 3092, 1759, 97, 358, 326, 98...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 5666, 12, 2890, 16, 1797, 16, 1257, 16, 12454, 67, 24675, 4672, 3536, 1021, 3021, 1838, 364, 1930, 6317, 18, 225, 1220, 1838, 4831, 279, 385, 95, 3092, 1759, 97, 358, 326, 98...
Construct C{Token}s for the bullet and the first paragraph of the
Construct L{Token}s for the bullet and the first paragraph of the
def _tokenize_listart(lines, start, bullet_indent, tokens, warnings): """ Construct C{Token}s for the bullet and the first paragraph of the list item (or field) starting at C{lines[start]}, and append them to C{tokens}. C{bullet_indent} should be the indentation of the list item. Any warnings generated while tokenizing will be appended to C{warnings}. @param lines: The list of lines to be tokenized @param start: The index into C{lines} of the first line of the list item to be tokenized. @param bullet_indent: The indentation of C{lines[start]}. This is the indentation of the list item. @param warnings: A list of the warnings generated by parsing. Any new warnings generated while will tokenizing this paragraph will be appended to this list. @return: The line number of the first line following the list item's first paragraph. @type lines: C{list} of C{string} @type start: C{int} @type bullet_indent: C{int} @type warnings: C{list} of C{ParseError} @rtype: C{int} """ linenum = start + 1 para_indent = None brace_level = lines[start].count('{') - lines[start].count('}') if brace_level < 0: brace_level = 0 while linenum < len(lines): # Find the indentation of this line. line = lines[linenum] indent = len(line) - len(line.lstrip()) # A blank line ends the token if indent == len(line): break # Dedenting past bullet_indent ends the list item. if indent < bullet_indent: break # A line beginning with a bullet ends the token. if brace_level == 0 and _LIST_BULLET_RE.match(line, indent): if para_indent and indent == para_indent: estr = ("Sublists should be indented or separated "+ "by blank lines.") warnings.append(TokenizationError(estr, linenum, line)) break brace_level += line.count('{') brace_level -= line.count('}') if brace_level < 0: brace_level = 0 if indent == bullet_indent: if brace_level == 0 and _BULLET_RE.match(line, indent): # Don't complain if it's a field.?? break else: estr = ("List item contents should be indented; "+ "Paragraphs should be separated from "+ "lists by blank lines.") warnings.append(TokenizationError(estr, linenum, line)) break # If this is the second line, set the paragraph indentation, or # end the token, as appropriate. if para_indent == None: para_indent = indent # A change in indentation ends the token if indent != para_indent: break # Go on to the next line. linenum += 1 # Add the bullet token. para_start = _BULLET_RE.match(lines[start], bullet_indent).end() bcontents = lines[start][bullet_indent:para_start].strip() tokens.append(Token(Token.BULLET, start, bcontents, bullet_indent)) # Add the paragraph token. pcontents = ([lines[start][para_start:].strip()] + [line.strip() for line in lines[start+1:linenum]]) pcontents = ' '.join(pcontents).strip() if pcontents: tokens.append(Token(Token.PARA, start, pcontents, para_indent)) # Return the linenum after the paragraph token ends. return linenum
0cc72bd3422be83752480f57dbecac32d991815f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/0cc72bd3422be83752480f57dbecac32d991815f/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 67, 1098, 485, 12, 3548, 16, 787, 16, 31650, 67, 9355, 16, 2430, 16, 5599, 4672, 3536, 14291, 511, 95, 1345, 97, 87, 364, 326, 31650, 471, 326, 1122, 10190, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 67, 1098, 485, 12, 3548, 16, 787, 16, 31650, 67, 9355, 16, 2430, 16, 5599, 4672, 3536, 14291, 511, 95, 1345, 97, 87, 364, 326, 31650, 471, 326, 1122, 10190, 434, 326, ...
if w[0] != '-' and w[-2:] in ('.o', '.a'):
if w[0] not in ('-', '$') and w[-2:] in ('.o', '.a'):
def select(e, mods, vars, mod, skipofiles): files = [] for w in mods[mod]: w = treatword(w) if not w: continue w = expandvars(w, vars) for w in string.split(w): if skipofiles and w[-2:] == '.o': continue if w[0] != '-' and w[-2:] in ('.o', '.a'): w = os.path.join(e, w) if w[:2] in ('-L', '-R'): w = w[:2] + os.path.join(e, w[2:]) files.append(w) return files
000f53a1828d7ac0be6401a52915ca6a2be159dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/000f53a1828d7ac0be6401a52915ca6a2be159dc/checkextensions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 12, 73, 16, 15546, 16, 4153, 16, 681, 16, 2488, 792, 1449, 4672, 1390, 273, 5378, 364, 341, 316, 15546, 63, 1711, 14542, 341, 273, 10116, 1095, 12, 91, 13, 309, 486, 341, 30, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 12, 73, 16, 15546, 16, 4153, 16, 681, 16, 2488, 792, 1449, 4672, 1390, 273, 5378, 364, 341, 316, 15546, 63, 1711, 14542, 341, 273, 10116, 1095, 12, 91, 13, 309, 486, 341, 30, 1...
subarchs = subarch_mapping[arch] challenger_index = subarchs.index(challenger['arch']) incumbent_index = subarchs.index(incumbent['arch'])
subarchs = arch_mapping[arch] challenger_index = subarchs.index(challenger['subarch']) incumbent_index = subarchs.index(incumbent['subarch'])
def prune_pkgs_archs(pkgs): """prune a pkgs structure to contain no more than one subarch per architecture for each set of packages.""" subarch_mapping = {'x86':['i686','i586','i386'], 'x86_64':['x86_64'], 'noarch':['noarch']} arch_mapping = {'i686':'x86', 'i586':'x86', 'i386':'x86', 'x86_64':'x86_64', 'noarch':'noarch'} pruned_pkgs = {} for rpmblobs in pkgs.values(): pkg_name = rpmblobs[0]['name'] arch_sifter = {} for challenger in rpmblobs: arch = arch_mapping[challenger['arch']] incumbent = arch_sifter.get(arch) if incumbent == None: arch_sifter[arch] = challenger else: subarchs = subarch_mapping[arch] challenger_index = subarchs.index(challenger['arch']) incumbent_index = subarchs.index(incumbent['arch']) if challenger_index < incumbent_index: arch_sifter[arch] = challenger pruned_pkgs[pkg_name] = arch_sifter.values() return pruned_pkgs
a3e467705967c9bd663a934cca8f3c746d746f6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/a3e467705967c9bd663a934cca8f3c746d746f6f/rpmlisting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13293, 67, 25376, 67, 991, 87, 12, 25376, 4672, 3536, 28545, 279, 16922, 3695, 358, 912, 1158, 1898, 2353, 1245, 720, 991, 1534, 27418, 364, 1517, 444, 434, 5907, 12123, 720, 991, 67, 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, 13293, 67, 25376, 67, 991, 87, 12, 25376, 4672, 3536, 28545, 279, 16922, 3695, 358, 912, 1158, 1898, 2353, 1245, 720, 991, 1534, 27418, 364, 1517, 444, 434, 5907, 12123, 720, 991, 67, 67...
self.AssignImageList(self.il, wx.IMAGE_LIST_SMALL)
if wx.Platform == '__WXMAC__': self.AssignImageList(self.il, wx.IMAGE_LIST_NORMAL) else: self.AssignImageList(self.il, wx.IMAGE_LIST_SMALL)
def __init__(self, parent, main_win): style = wx.LC_LIST|wx.LC_SINGLE_SEL if not (wx.VERSION >= (2, 5) and wx.Platform == '__WXGTK__'): style |= wx.LC_ALIGN_TOP wx.ListCtrl.__init__(self, parent , -1, (0,0), (-1,-1), style) self.data = {} self.locals = {} self.modules = {} self.main_win = main_win self.currentIcon = None self.currentIconName = None self.init_events() self.SetToolTip(wx.ToolTip( 'Double-click to display.\n' + 'Right-click to perform functions.\n')) self.help_mode = 0 self.dt = IconDisplayDropTarget(self) self.dt.display = self self.SetDropTarget(self.dt) self.il = wx.ImageList(32, 32) self.classes = [] for klass in builtin_icon_types: self.add_class(klass) self.AssignImageList(self.il, wx.IMAGE_LIST_SMALL)
78c0974ddb9b6ae0284891023e1d96240ca16205 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9927/78c0974ddb9b6ae0284891023e1d96240ca16205/icon_display.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 2774, 67, 8082, 4672, 2154, 273, 7075, 18, 13394, 67, 7085, 96, 27226, 18, 13394, 67, 20184, 67, 1090, 48, 309, 486, 261, 27226, 18, 5757, 1545,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 982, 16, 2774, 67, 8082, 4672, 2154, 273, 7075, 18, 13394, 67, 7085, 96, 27226, 18, 13394, 67, 20184, 67, 1090, 48, 309, 486, 261, 27226, 18, 5757, 1545,...
js_is_ok=True
js_is_ok = True
def findMatchedJobs(self, constraint): """ _findMatchedJobs_
13e1427903eb8f858c07db082bf2a1862b744b31 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8887/13e1427903eb8f858c07db082bf2a1862b744b31/LCGAdvanced.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 15400, 7276, 12, 2890, 16, 4954, 4672, 3536, 389, 4720, 15400, 7276, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 15400, 7276, 12, 2890, 16, 4954, 4672, 3536, 389, 4720, 15400, 7276, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if newest_first and is_new_article(record):
if newest_first and is_new_article(journal_name, issue_number, record):
def get_order_dict_from_recid_list(recids, journal_name, issue_number, newest_first=False, newest_only=False): """ Returns the ordered list of input recids, for given 'issue_number'. Since there might be several articles at the same position, the returned structure is a dictionary with keys being order number indicated in record metadata, and values being list of recids for this order number (recids for one position are ordered from highest to lowest recid). Eg: {'1': [2390, 2386, 2385], '3': [2388], '2': [2389], '4': [2387]} Parameters: recids - a list of all recid's that should be brought into order journal_name - the name of the journal issue_number - *str* the issue_number for which we are deriving the order newest_first - *bool* if True, new articles should be placed at beginning of the list. If so, their position/order will be negative integers newest_only - *bool* if only new articles should be returned Returns: ordered_records: a dictionary with the recids ordered by keys """ ordered_records = {} ordered_new_records = {} records_without_defined_order = [] new_records_without_defined_order = [] for record in recids: temp_rec = BibFormatObject(record) articles_info = temp_rec.fields('773__') for article_info in articles_info: if article_info.get('n', '') == issue_number or \ '0' + article_info.get('n', '') == issue_number: if article_info.has_key('c') and \ article_info['c'].isdigit(): order_number = int(article_info.get('c', '')) if (newest_first or newest_only) and \ is_new_article(journal_name, issue_number, record): if ordered_new_records.has_key(order_number): ordered_new_records[order_number].append(record) else: ordered_new_records[order_number] = [record] elif not newest_only: if ordered_records.has_key(order_number): ordered_records[order_number].append(record) else: ordered_records[order_number] = [record] else: # No order? No problem! Append it at the end. if newest_first and is_new_article(record): new_records_without_defined_order.append(record) elif not newest_only: records_without_defined_order.append(record) # Append records without order at the end of the list if records_without_defined_order: ordered_records[max(ordered_records.keys()) + 1] = records_without_defined_order # Append new records without order at the end of the list of new # records if new_records_without_defined_order: ordered_new_records[max(ordered_new_records.keys()) + 1] = new_records_without_defined_order # Append new records at the beginning of the list of 'old' # records. To do so, use negative integers if ordered_new_records: highest_new_record_order = max(ordered_new_records.keys()) for order, new_records in ordered_new_records.iteritems(): ordered_records[- highest_new_record_order + order - 1] = new_records for (order, records) in ordered_records.iteritems(): # Reverse so that if there are several articles at same # positon, newest appear first records.reverse() return ordered_records
9365201b32b7c020871d05518aa8648929e8f0a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/9365201b32b7c020871d05518aa8648929e8f0a1/webjournal_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1019, 67, 1576, 67, 2080, 67, 3927, 350, 67, 1098, 12, 3927, 2232, 16, 13001, 67, 529, 16, 5672, 67, 2696, 16, 19824, 67, 3645, 33, 8381, 16, 19824, 67, 3700, 33, 8381, 4672...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1019, 67, 1576, 67, 2080, 67, 3927, 350, 67, 1098, 12, 3927, 2232, 16, 13001, 67, 529, 16, 5672, 67, 2696, 16, 19824, 67, 3645, 33, 8381, 16, 19824, 67, 3700, 33, 8381, 4672...
else: re.setRGBA(index,255,255,255,255)
def getROIsplitView (re, pixels, zStart, zEnd, splitIndexes, channelNames, mergedNames, colourChannels, mergedIndexes, mergedColours, roiX, roiY, roiWidth, roiHeight, roiZoom, tIndex, spacer, algorithm, stepping, fontsize, showTopLabels): """ This takes a ROI rectangle from an image and makes a split view canvas of the region in the ROI, zoomed by a defined factor. @param re The OMERO rendering engine. """ if algorithm is None: # omero::constants::projection::ProjectionType algorithm = omero.constants.projection.ProjectionType.MAXIMUMINTENSITY mode = "RGB" white = (255, 255, 255) sizeX = pixels.getSizeX().getValue() sizeY = pixels.getSizeY().getValue() sizeZ = pixels.getSizeZ().getValue() sizeC = pixels.getSizeC().getValue() if pixels.getPhysicalSizeX(): physicalX = pixels.getPhysicalSizeX().getValue() else: physicalX = 0 if pixels.getPhysicalSizeY(): physicalY = pixels.getPhysicalSizeY().getValue() else: physicalY = 0 log(" Pixel size (um): x: %.3f y: %.3f" % (physicalX, physicalY)) log(" Image dimensions (pixels): x: %d y: %d" % (sizeX, sizeY)) log(" Projecting ROIs...") proStart = zStart proEnd = zEnd # make sure we're within Z range for projection. if proEnd >= sizeZ: proEnd = sizeZ - 1 if proStart > sizeZ: proStart = 0 log(" WARNING: Current image has fewer Z-sections than the primary image projection.") if proStart < 0: proStart = 0 log(" Projecting z range: %d - %d (max Z is %d)" % (proStart+1, proEnd+1, sizeZ)) # set up rendering engine with the pixels pixelsId = pixels.getId().getValue() re.lookupPixels(pixelsId) re.lookupRenderingDef(pixelsId) re.load() # now get each channel in greyscale (or colour) # a list of renderedImages (data as Strings) for the split-view row renderedImages = [] panelWidth = 0 channelMismatch = False # first, turn off all channels in pixels for i in range(sizeC): re.setActive(i, False) # for each channel in the splitview... for index in splitIndexes: if index >= sizeC: channelMismatch = True # can't turn channel on - simply render black square! else: re.setActive(index, True) # turn channel on if colourChannels: # if split channels are coloured... if index in mergedIndexes: # and this channel is in the combined image rgba = tuple(mergedColours[index]) re.setRGBA(index, *rgba) # set coloured else: re.setRGBA(index,255,255,255,255) # otherwise set white (max alpha) else: re.setRGBA(index,255,255,255,255) # if not colourChannels - channels are white info = (channelNames[index], re.getChannelWindowStart(index), re.getChannelWindowEnd(index)) log(" Render channel: %s start: %d end: %d" % info) projection = re.renderProjectedCompressed(algorithm, tIndex, stepping, proStart, proEnd) fullImage = Image.open(StringIO.StringIO(projection)) box = (roiX, roiY, roiX+roiWidth, roiY+roiHeight) roiImage = fullImage.crop(box) roiImage.load() # hoping that when we zoom, don't zoom fullImage if roiZoom is not 1: newSize = (int(roiWidth*roiZoom), int(roiHeight*roiZoom)) roiImage = roiImage.resize(newSize) renderedImages.append(roiImage) panelWidth = roiImage.size[0] if index < sizeC: re.setActive(index, False) # turn the channel off again! # turn on channels in mergedIndexes. for i in mergedIndexes: if i >= sizeC: channelMismatch = True else: rgba = mergedColours[i] re.setActive(i, True) re.setRGBA(i, *rgba) # get the combined image, using the existing rendering settings channelsString = ", ".join([str(i) for i in mergedIndexes]) log(" Rendering merged channels: %s" % channelsString) merged = re.renderProjectedCompressed(algorithm, tIndex, stepping, proStart, proEnd) fullMergedImage = Image.open(StringIO.StringIO(merged)) roiMergedImage = fullMergedImage.crop(box) roiMergedImage.load() # make sure this is not just a lazy copy of the full image if roiZoom is not 1: newSize = (int(roiWidth*roiZoom), int(roiHeight*roiZoom)) roiMergedImage = roiMergedImage.resize(newSize) if channelMismatch: log(" WARNING channel mismatch: The current image has fewer channels than the primary image.") # now assemble the roi split-view canvas font = imgUtil.getFont(fontsize) textHeight = font.getsize("Textq")[1] topSpacer = 0 if showTopLabels: if mergedNames: topSpacer = (textHeight * len(mergedIndexes)) + spacer else: topSpacer = textHeight + spacer imageCount = len(renderedImages) + 1 # extra image for merged image canvasWidth = ((panelWidth + spacer) * imageCount) - spacer # no spaces around panels canvasHeight = renderedImages[0].size[1] + topSpacer size = (canvasWidth, canvasHeight) canvas = Image.new(mode, size, white) # create a canvas of appropriate width, height px = 0 textY = topSpacer - textHeight - spacer/2 panelY = topSpacer # paste the split images in, with channel labels draw = ImageDraw.Draw(canvas) for i, index in enumerate(splitIndexes): label = channelNames[index] indent = (panelWidth - (font.getsize(label)[0])) / 2 # text is coloured if channel is grey AND in the merged image rgb = (0,0,0) if index in mergedIndexes: if not colourChannels: rgb = tuple(mergedColours[index]) if rgb == (255,255,255,255): # if white (unreadable), needs to be black! rgb = (0,0,0) if showTopLabels: draw.text((px+indent, textY), label, font=font, fill=(0,0,0)) imgUtil.pasteImage(renderedImages[i], canvas, px, panelY) px = px + panelWidth + spacer # and the merged image if showTopLabels: #indent = (panelWidth - (font.getsize("Merged")[0])) / 2 #draw.text((px+indent, textY), "Merged", font=font, fill=(0,0,0)) if (mergedNames): for index in mergedIndexes: if index in mergedColours: rgb = tuple(mergedColours[index]) else: rgb = (255,255,255) if index in channelNames: name = channelNames[index] else: name = str(index) combTextWidth = font.getsize(name)[0] inset = int((panelWidth - combTextWidth) / 2) draw.text((px + inset, textY), name, font=font, fill=rgb) textY = textY - textHeight else: combTextWidth = font.getsize("Merged")[0] inset = int((panelWidth - combTextWidth) / 2) draw.text((px + inset, textY), "Merged", font=font, fill=(0,0,0)) imgUtil.pasteImage(roiMergedImage, canvas, px, panelY) # return the roi splitview canvas, as well as the full merged image return (canvas, fullMergedImage, panelY)
8837d59ea52bd9bb52bbde9b25824e6dcdaf9935 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/8837d59ea52bd9bb52bbde9b25824e6dcdaf9935/Roi_Figure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1457, 2520, 1127, 1767, 565, 261, 266, 16, 8948, 16, 998, 1685, 16, 998, 1638, 16, 1416, 8639, 16, 1904, 1557, 16, 5384, 1557, 16, 15046, 10585, 16, 5384, 8639, 16, 5384, 914, 439...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1457, 2520, 1127, 1767, 565, 261, 266, 16, 8948, 16, 998, 1685, 16, 998, 1638, 16, 1416, 8639, 16, 1904, 1557, 16, 5384, 1557, 16, 15046, 10585, 16, 5384, 8639, 16, 5384, 914, 439...
rotation = Rotation(universe.calc_align_rotation_matrix())
rotation = universe.cell.alignment_a
def do(self): universe = context.application.cache.node # first make sure the cell is right handed if numpy.linalg.det(universe.cell.matrix) < 0 and universe.cell_active.sum() == 3: new_matrix = universe.cell.matrix.copy() temp = new_matrix[:,0].copy() new_matrix[:,0] = new_matrix[:,1] new_matrix[:,1] = temp new_cell = UnitCell(new_matrix, universe.cell.active) primitive.SetProperty(universe, "cell", new_cell)
2702e3bc2808c7f7bc27eee391b5c96dd929731c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11052/2702e3bc2808c7f7bc27eee391b5c96dd929731c/center_align.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 12, 2890, 4672, 29235, 273, 819, 18, 3685, 18, 2493, 18, 2159, 468, 1122, 1221, 3071, 326, 2484, 353, 2145, 27309, 309, 3972, 18, 80, 11521, 18, 8238, 12, 318, 17488, 18, 3855, 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, 741, 12, 2890, 4672, 29235, 273, 819, 18, 3685, 18, 2493, 18, 2159, 468, 1122, 1221, 3071, 326, 2484, 353, 2145, 27309, 309, 3972, 18, 80, 11521, 18, 8238, 12, 318, 17488, 18, 3855, 18...
us_table.attach(self.button_dict[fmt_list[1]],1,2,row,row+1) row=row+1
us_table.attach(self.button_dict[fmt_list[1]], 1, 2, row, row+1) row += 1
def init_dialog(self): self.dialog = gtk.Window() self.dialog.set_title('Available Image Formats') self.dialog.set_size_request(300,500) self.dialog.set_border_width(10) self.dialog.set_resizable(True) self.tooltips=gtk.Tooltips() self.button_dict={} # main shell mainshell = gtk.VBox(spacing=1, homogeneous=False) self.dialog.add(mainshell) self.show_list=[] self.show_list.append(mainshell)
b9d9dcc6d1e1e74e47142ba36667998282ffa40c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11090/b9d9dcc6d1e1e74e47142ba36667998282ffa40c/Tool_DriverList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 12730, 12, 2890, 4672, 365, 18, 12730, 273, 22718, 18, 3829, 1435, 365, 18, 12730, 18, 542, 67, 2649, 2668, 5268, 3421, 2748, 2323, 6134, 365, 18, 12730, 18, 542, 67, 1467, 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, 1208, 67, 12730, 12, 2890, 4672, 365, 18, 12730, 273, 22718, 18, 3829, 1435, 365, 18, 12730, 18, 542, 67, 2649, 2668, 5268, 3421, 2748, 2323, 6134, 365, 18, 12730, 18, 542, 67, 1467, 6...
def get_real_price(res_dict, product_id, pricelist):
def get_real_price(res_dict, product_id, qty, uom, pricelist):
def get_real_price(res_dict, product_id, pricelist): item_obj = self.pool.get('product.pricelist.item') price_type_obj = self.pool.get('product.price.type') product_obj = self.pool.get('product.product') template_obj = self.pool.get('product.template') field_name = 'list_price'
95124a4a3f5b4124e6d6fd7b365643e639e0c5f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/95124a4a3f5b4124e6d6fd7b365643e639e0c5f7/product_visible_discount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 26667, 16, 582, 362, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7688, 67, 8694, 12, 455, 67, 1576, 16, 3017, 67, 350, 16, 26667, 16, 582, 362, 16, 846, 335, 5449, 4672, 761, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 683, 3...
import string
def line2argv(line): r"""Parse the given line into an argument vector. "line" is the line of input to parse. This may get niggly when dealing with quoting and escaping. The current state of this parsing may not be completely thorough/correct in this respect. >>> from cmdln import line2argv >>> line2argv("foo") ['foo'] >>> line2argv("foo bar") ['foo', 'bar'] >>> line2argv("foo bar ") ['foo', 'bar'] >>> line2argv(" foo bar") ['foo', 'bar'] Quote handling: >>> line2argv("'foo bar'") ['foo bar'] >>> line2argv('"foo bar"') ['foo bar'] >>> line2argv(r'"foo\"bar"') ['foo"bar'] >>> line2argv("'foo bar' spam") ['foo bar', 'spam'] >>> line2argv("'foo 'bar spam") ['foo bar', 'spam'] >>> line2argv('some\tsimple\ttests') ['some', 'simple', 'tests'] >>> line2argv('a "more complex" test') ['a', 'more complex', 'test'] >>> line2argv('a more="complex test of " quotes') ['a', 'more=complex test of ', 'quotes'] >>> line2argv('a more" complex test of " quotes') ['a', 'more complex test of ', 'quotes'] >>> line2argv('an "embedded \\"quote\\""') ['an', 'embedded "quote"'] # Komodo bug 48027 >>> line2argv('foo bar C:\\') ['foo', 'bar', 'C:\\'] # Komodo change 127581 >>> line2argv(r'"\test\slash" "foo bar" "foo\"bar"') ['\\test\\slash', 'foo bar', 'foo"bar'] # Komodo change 127629 >>> if sys.platform == "win32": ... line2argv(r'\foo\bar') == ['\\foo\\bar'] ... line2argv(r'\\foo\\bar') == ['\\\\foo\\\\bar'] ... line2argv('"foo') == ['foo'] ... else: ... line2argv(r'\foo\bar') == ['foobar'] ... line2argv(r'\\foo\\bar') == ['\\foo\\bar'] ... try: ... line2argv('"foo') ... except ValueError, ex: ... "not terminated" in str(ex) True True True """ import string line = line.strip() argv = [] state = "default" arg = None # the current argument being parsed i = -1 while 1: i += 1 if i >= len(line): break ch = line[i] if ch == "\\" and i+1 < len(line): # escaped char always added to arg, regardless of state if arg is None: arg = "" if (sys.platform == "win32" or state in ("double-quoted", "single-quoted") ) and line[i+1] not in tuple('"\''): arg += ch i += 1 arg += line[i] continue if state == "single-quoted": if ch == "'": state = "default" else: arg += ch elif state == "double-quoted": if ch == '"': state = "default" else: arg += ch elif state == "default": if ch == '"': if arg is None: arg = "" state = "double-quoted" elif ch == "'": if arg is None: arg = "" state = "single-quoted" elif ch in string.whitespace: if arg is not None: argv.append(arg) arg = None else: if arg is None: arg = "" arg += ch if arg is not None: argv.append(arg) if not sys.platform == "win32" and state != "default": raise ValueError("command line is not terminated: unfinished %s " "segment" % state) return argv
b0379f0413bbc008cfc2c6aea45e14483c13917b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10333/b0379f0413bbc008cfc2c6aea45e14483c13917b/cmdln.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 22, 19485, 12, 1369, 4672, 436, 8395, 3201, 326, 864, 980, 1368, 392, 1237, 3806, 18, 225, 315, 1369, 6, 353, 326, 980, 434, 810, 358, 1109, 18, 225, 1220, 2026, 336, 290, 360, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 22, 19485, 12, 1369, 4672, 436, 8395, 3201, 326, 864, 980, 1368, 392, 1237, 3806, 18, 225, 315, 1369, 6, 353, 326, 980, 434, 810, 358, 1109, 18, 225, 1220, 2026, 336, 290, 360, ...
homoa = len(self.moenergies[0]) - 1
homoa = len(moenergies[0]) - 1
def parse(self, fupdate=0.05, cupdate=0.002): """Extract information from the logfile.""" inputfile = utils.openlogfile(self.filename) if self.progress: inputfile.seek(0, 2) #go to end of file nstep = inputfile.tell() inputfile.seek(0) self.progress.initialize(nstep) oldstep = 0 # Used to avoid extracting the final geometry twice in a GeoOpt NOTFOUND, GETLAST, NOMORE = range(3) finalgeometry = NOTFOUND # Used for calculating the scftarget (variables names taken from the ADF manual) accint = SCFconv = sconv2 = None # keep track of nosym and unrestricted case to parse Energies since it doens't have an all Irreps section nosymflag = False unrestrictedflag = False for line in inputfile: if self.progress and random.random() < cupdate: step = inputfile.tell() if step != oldstep: self.progress.update(step, "Unsupported Information") oldstep = step if line.find("INPUT FILE") >= 0:
cdea9cfefada3b48d1408c0a77370d457a0edd8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/cdea9cfefada3b48d1408c0a77370d457a0edd8a/adfparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 284, 2725, 33, 20, 18, 6260, 16, 276, 2725, 33, 20, 18, 24908, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 2990, 18, 3190, 28806, 12, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 284, 2725, 33, 20, 18, 6260, 16, 276, 2725, 33, 20, 18, 24908, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 2990, 18, 3190, 28806, 12, 2890, 18, ...
for tr in stream: self.assertAlmostEqual(tr.data.mean(),-393.66969706930229) self.assertEqual(tr.stats.network, 'BW') self.assertEqual(tr.stats['station'], 'BGLD') self.assertEqual(tr.stats.get('npts'), 17280322) print '.',
tr = stream[0] self.assertAlmostEqual(tr.data.mean(), 201.55502749647832) self.assertEqual(tr.stats.network, 'BW') self.assertEqual(tr.stats['station'], 'RJOB') self.assertEqual(tr.stats.get('npts'), 9380474) print "%.2fs" % (time.time() - start),
def test_readMemory(self): """ Read file test via L{obspy.core.Stream}. """ for i in xrange(100): stream = read(self.file) stream.verify() for tr in stream: self.assertAlmostEqual(tr.data.mean(),-393.66969706930229) self.assertEqual(tr.stats.network, 'BW') self.assertEqual(tr.stats['station'], 'BGLD') self.assertEqual(tr.stats.get('npts'), 17280322) print '.',
11fbb9c25138cc56f45001cead14b89841e4d794 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/11fbb9c25138cc56f45001cead14b89841e4d794/test_memory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 6031, 12, 2890, 4672, 3536, 2720, 585, 1842, 3970, 511, 95, 947, 30884, 18, 3644, 18, 1228, 5496, 3536, 364, 277, 316, 12314, 12, 6625, 4672, 1407, 273, 855, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 6031, 12, 2890, 4672, 3536, 2720, 585, 1842, 3970, 511, 95, 947, 30884, 18, 3644, 18, 1228, 5496, 3536, 364, 277, 316, 12314, 12, 6625, 4672, 1407, 273, 855, 12, 2890, 1...
self.assertRaises(TemplateError,
self.assertRaises(util.DemocracyUnicodeError,
def testNonUnicode(self): # genRepeatText self.assertRaises(TemplateError, lambda : template_compiler.genRepeatText("out","123"," ",u"boo")) self.assertRaises(TemplateError, lambda : template_compiler.genRepeatText("out","123"," ","Chinese Numbers \x25cb\x4e00\x4e8c\x4e09\x56db\x4e94\x516d\x4e03\x516b\x4e5d")) self.assertEqual(u" out.write(u'Chinese Numbers \\u25cb\\u4e00\\u4e8c\\u4e09\\u56db\\u4e94\\u516d\\u4e03\\u516b\\u4e5d')\n", template_compiler.genRepeatText("out","123"," ",u"Chinese Numbers \u25cb\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d"))
43ec567a4eaeb3ea19a008eff155038031636dde /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/43ec567a4eaeb3ea19a008eff155038031636dde/unicodetest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3989, 16532, 12, 2890, 4672, 468, 3157, 16750, 1528, 365, 18, 11231, 12649, 6141, 12, 1367, 18, 15058, 504, 354, 2431, 16532, 668, 16, 3195, 294, 1542, 67, 9576, 18, 4507, 16750, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3989, 16532, 12, 2890, 4672, 468, 3157, 16750, 1528, 365, 18, 11231, 12649, 6141, 12, 1367, 18, 15058, 504, 354, 2431, 16532, 668, 16, 3195, 294, 1542, 67, 9576, 18, 4507, 16750, 1...
self._detachAxis(sObject) self._attachAxis(sObject, worldPoints[0:2])
canChange = True if 'axisPoints' in self._tdObjectsDict[sObject]: oName = self._tdObjectsDict[sObject]['objectName'] md = wx.MessageDialog( self.slice3dVWR.controlFrame, "Are you sure you want to CHANGE the axis on object " "%s?" % (oName,), "Confirm axis change", wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION) if md.ShowModal() != wx.ID_YES: canChange = False if canChange: self._detachAxis(sObject) self._attachAxis(sObject, worldPoints[0:2])
def _handlerObjectAttachAxis(self, event): """The user should have selected at least two points and an object. This will record the axis formed by the two selected points as the object axis. If no points are selected, and an axis already exists, we detach the axis. """
69f495522a602d493d3a84df8589bb56e87498e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/69f495522a602d493d3a84df8589bb56e87498e5/tdObjects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4176, 921, 4761, 6558, 12, 2890, 16, 871, 4672, 3536, 1986, 729, 1410, 1240, 3170, 622, 4520, 2795, 3143, 471, 392, 733, 18, 1220, 903, 1409, 326, 2654, 20010, 635, 326, 2795, 3170,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4176, 921, 4761, 6558, 12, 2890, 16, 871, 4672, 3536, 1986, 729, 1410, 1240, 3170, 622, 4520, 2795, 3143, 471, 392, 733, 18, 1220, 903, 1409, 326, 2654, 20010, 635, 326, 2795, 3170,...
('preferred_language', mm_cfg.Select, (langs, langnames, langi), 0, _('Default language for this list.'), _('''All messages not related to an specific user will be displayed in this language.''')),
def GetConfigInfo(self, mlist): WIDTH = mm_cfg.TEXTFIELDWIDTH
5112d15088f2eb36e4ea6c06178430662af1adb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/5112d15088f2eb36e4ea6c06178430662af1adb3/General.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26666, 966, 12, 2890, 16, 312, 1098, 4672, 22631, 273, 9740, 67, 7066, 18, 5151, 6776, 10023, 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, ...
[ 1, 1, 1, 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, 26666, 966, 12, 2890, 16, 312, 1098, 4672, 22631, 273, 9740, 67, 7066, 18, 5151, 6776, 10023, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if theWeapon != None:
if spe.ownsWeapon( self.userid, 'weapon_%s' % self.weapon ):
def give_weapon(self): ''' Gives a player their current levels weapon. ''' error = None # Make sure player is on a team if es.getplayerteam(self.userid) < 2: error = ('Unable to give player weapon (%s):' % self.userid + ' is not on a team.')
2ded6fe10a3e7e38cdc07c0efae6b0c3528a7319 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4555/2ded6fe10a3e7e38cdc07c0efae6b0c3528a7319/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8492, 67, 1814, 28629, 12, 2890, 4672, 9163, 611, 3606, 279, 7291, 3675, 783, 7575, 732, 28629, 18, 9163, 555, 273, 599, 468, 4344, 3071, 7291, 353, 603, 279, 5927, 309, 5001, 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, 8492, 67, 1814, 28629, 12, 2890, 4672, 9163, 611, 3606, 279, 7291, 3675, 783, 7575, 732, 28629, 18, 9163, 555, 273, 599, 468, 4344, 3071, 7291, 353, 603, 279, 5927, 309, 5001, 18, 588, ...
del self.params[name[:-10].upper().replace('_', '-')]
del self.params[toVName(name, 10, True)]
def __delattr__(self, name): try: if name.endswith('_param'): del self.params[name[:-6].upper().replace('_', '-')] elif name.endswith('_paramlist'): del self.params[name[:-10].upper().replace('_', '-')] else: object.__delattr__(self, name) except KeyError: raise exceptions.AttributeError, name
3bcfacc1aeae62b13b509d0eb3beea6d9b9a2b5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9169/3bcfacc1aeae62b13b509d0eb3beea6d9b9a2b5b/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 1747, 972, 12, 2890, 16, 508, 4672, 775, 30, 309, 508, 18, 5839, 1918, 2668, 67, 891, 11, 4672, 1464, 365, 18, 2010, 63, 529, 10531, 17, 26, 8009, 5797, 7675, 2079, 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, 1001, 3771, 1747, 972, 12, 2890, 16, 508, 4672, 775, 30, 309, 508, 18, 5839, 1918, 2668, 67, 891, 11, 4672, 1464, 365, 18, 2010, 63, 529, 10531, 17, 26, 8009, 5797, 7675, 2079, 2668, ...
if lastSentToWidget is not None: method = getattr (lastSentToWidget, "GetValue", None)
if ProcessEvent.lastSentToWidget is not None: method = getattr (ProcessEvent.lastSentToWidget, "GetValue", None)
def NameToWidget (name): """ Given a name, returns the corresponding widget. """ if type (name) is str: if name == "MainFrame": sentTo = application.mainFrame elif name == "__FocusWindow__": sentTo = wx.Window_FindFocus() else: sentTo = Block.findBlockByName (name) if sentTo is not None: sentTo = sentTo.widget if isinstance (sentTo, wx.grid.Grid): sentTo = sentTo.GetGridWindow() else: sentTo = wx.Window.FindWindowById (name) return sentTo
a619c8354e019ff5c6d2286971d78561ec21505e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a619c8354e019ff5c6d2286971d78561ec21505e/script_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1770, 774, 4609, 261, 529, 4672, 3536, 16803, 279, 508, 16, 1135, 326, 4656, 3604, 18, 3536, 309, 618, 261, 529, 13, 353, 609, 30, 309, 508, 422, 315, 6376, 3219, 6877, 3271, 774, 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, 1770, 774, 4609, 261, 529, 4672, 3536, 16803, 279, 508, 16, 1135, 326, 4656, 3604, 18, 3536, 309, 618, 261, 529, 13, 353, 609, 30, 309, 508, 422, 315, 6376, 3219, 6877, 3271, 774, 273,...
CGC = options.CGC check_cgc(CGC)
cgc_path = options.cgc_path check_cgc(cgc_path)
def main(cg_shader, CGC): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
b4063f4f2c6fc90bbda47a2fb5e91c437341938f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4063f4f2c6fc90bbda47a2fb5e91c437341938f/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 26275, 67, 674, 1143, 16, 385, 15396, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 26275, 67, 674, 1143, 16, 385, 15396, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 16...
sage: (bsetA == setA and bsetB == setB ) or ((bsetA == setB and bsetB == setA ))
sage: (bsetA == setA and bsetB == setB ) or ((bsetA == setB and bsetB == setA ))
def max_cut(self, value_only=True, use_edge_labels=True, vertices=False, solver=None, verbose=0): r""" Returns a maximum edge cut of the graph. For more information, see the `Wikipedia article on cuts <http://en.wikipedia.org/wiki/Cut_%28graph_theory%29>`_.
08b3ef8c500132f63d2dfd7371451a85a1a6987d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/08b3ef8c500132f63d2dfd7371451a85a1a6987d/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 943, 67, 5150, 12, 2890, 16, 460, 67, 3700, 33, 5510, 16, 999, 67, 7126, 67, 5336, 33, 5510, 16, 6928, 33, 8381, 16, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 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, 943, 67, 5150, 12, 2890, 16, 460, 67, 3700, 33, 5510, 16, 999, 67, 7126, 67, 5336, 33, 5510, 16, 6928, 33, 8381, 16, 12776, 33, 7036, 16, 3988, 33, 20, 4672, 436, 8395, 2860, 279, ...
segments = Message(text).get_segments()
message = Message() message.append_text(text) segments = message.get_segments()
def test_etc(self): text = u"A lot of animals... And no man" result = [u'A lot of animals...', u'And no man'] segments = Message(text).get_segments() self.assertEqual(list(segments), result)
35ce99942bc0e90ca3b6320121aad380eff31c2a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/35ce99942bc0e90ca3b6320121aad380eff31c2a/test_i18n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14175, 12, 2890, 4672, 977, 273, 582, 6, 37, 17417, 434, 10536, 1031, 2777, 7835, 1158, 3161, 6, 563, 273, 306, 89, 11, 37, 17417, 434, 10536, 1031, 7821, 16, 582, 11, 1876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14175, 12, 2890, 4672, 977, 273, 582, 6, 37, 17417, 434, 10536, 1031, 2777, 7835, 1158, 3161, 6, 563, 273, 306, 89, 11, 37, 17417, 434, 10536, 1031, 7821, 16, 582, 11, 1876, ...
if self.min <= x <= self.max:
if x == self.max: return self.n - 1 if self.min <= x < self.max:
def __getitem__(self, x): if isinstance(x, segments.segment): return slice(self[x[0]], self[x[1]] + 1) if isinstance(x, slice): if x.step != None: raise NotImplementedError, "slices with steps not yet supported" return slice(self[x.start], self[x.stop]) if self.min <= x <= self.max: return int(math.log(x / self.min) / self.delta) raise IndexError, x
76fd067a92f49e28033c601ff58f2d832ef082b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3592/76fd067a92f49e28033c601ff58f2d832ef082b7/rate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 619, 4672, 309, 1549, 12, 92, 16, 5155, 18, 9273, 4672, 327, 2788, 12, 2890, 63, 92, 63, 20, 65, 6487, 365, 63, 92, 63, 21, 13563, 397, 404, 13, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 619, 4672, 309, 1549, 12, 92, 16, 5155, 18, 9273, 4672, 327, 2788, 12, 2890, 63, 92, 63, 20, 65, 6487, 365, 63, 92, 63, 21, 13563, 397, 404, 13, 309...
submitted.append(parts[1]) for cmd in ['SUBMIT']:
if len(parts) < 2 or not parts[1].strip(): break mo = self.re_get.match(parts[1]) if not mo: print "Can't parse reply:", parts[1] continue jid, data, job_mask = mo.groups() if submitted[jid] != data: print "At data length %d" % len(submitted[jid]), print "Error in GET: data mismatch" executing.append(parts[1]) for cmd in ['SUBMIT', 'GET']:
def test_single_task_life_cycle(self): submitted = [] failures = {} s = self.socket for l in [0, 1, 4, 16, 63, 64, 65, 2047, 2048, 2049, 2050, 16*1024-8, 64*1024, 1024*1024-4]: if l > self.params['max_input_size']: continue data = " " * l s.send('SUBMIT "%s"\n' % data) parts = self.read_reply() if parts[0] == "ERR": print "At data length %d" % l, print "Error: %s" % ": ".join(parts[1:]) failures.setdefault("SUBMIT", []).append(data) continue submitted.append(parts[1]) for cmd in ['SUBMIT']: if not cmd in failures: self.successes[cmd] = 1 if failures: return 1 return 0
6f4afcda014a36e955c7cd4a9ca97db6ca0edbd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/310/6f4afcda014a36e955c7cd4a9ca97db6ca0edbd6/test_netschedule_smoke.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7526, 67, 4146, 67, 10256, 73, 67, 13946, 12, 2890, 4672, 9638, 273, 5378, 11720, 273, 2618, 272, 273, 365, 18, 7814, 364, 328, 316, 306, 20, 16, 404, 16, 1059, 16, 2872, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7526, 67, 4146, 67, 10256, 73, 67, 13946, 12, 2890, 4672, 9638, 273, 5378, 11720, 273, 2618, 272, 273, 365, 18, 7814, 364, 328, 316, 306, 20, 16, 404, 16, 1059, 16, 2872, 1...
cleanup('qt')
cleanup('qt', 'shtoom.ui.qtshtoom')
def getQtInterface(fail=False): try: import qt except (ImportError, SystemError): cleanup('qt') qt = None if fail: raise if qt is not None: from shtoom.ui.qtshtoom import main return main
4d444fd2c23ee8e2032e8949246d648385edbaaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/4d444fd2c23ee8e2032e8949246d648385edbaaa/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23310, 1358, 12, 6870, 33, 8381, 4672, 775, 30, 1930, 25672, 1335, 261, 5010, 668, 16, 2332, 668, 4672, 6686, 2668, 23311, 2187, 296, 87, 647, 4252, 18, 4881, 18, 85, 3428, 647, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23310, 1358, 12, 6870, 33, 8381, 4672, 775, 30, 1930, 25672, 1335, 261, 5010, 668, 16, 2332, 668, 4672, 6686, 2668, 23311, 2187, 296, 87, 647, 4252, 18, 4881, 18, 85, 3428, 647, 4...
return self.Put(video_entry, uri=edit_uri, converter=gdata.youtube.YouTubeVideoEntryFromString)
return self.Put(video_entry, uri=edit_uri, converter=gdata.youtube.YouTubeVideoEntryFromString)
def UpdateVideoEntry(self, video_entry): """Updates a video entry's meta-data.
4ad9d31c84c9e242dc29028b79f2f1264dbe22da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5609/4ad9d31c84c9e242dc29028b79f2f1264dbe22da/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 10083, 1622, 12, 2890, 16, 6191, 67, 4099, 4672, 3536, 5121, 279, 6191, 1241, 1807, 2191, 17, 892, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 10083, 1622, 12, 2890, 16, 6191, 67, 4099, 4672, 3536, 5121, 279, 6191, 1241, 1807, 2191, 17, 892, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def SameTypeFileInDir(FileNum, FileType, Dir):
def SameTypeFileInDir(self, FileNum, FileType, Dir):
def SameTypeFileInDir(FileNum, FileType, Dir): if FileNum >= 2: print "There are %d %s files in %s.\n" % (FileNum, FileType, Dir) self.isexit(1)
c00be440a988bdc5f867d4cd1f47514f2561e4d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/c00be440a988bdc5f867d4cd1f47514f2561e4d8/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17795, 559, 812, 382, 1621, 12, 2890, 16, 1387, 2578, 16, 29449, 16, 8446, 4672, 309, 1387, 2578, 1545, 576, 30, 1172, 315, 9828, 854, 738, 72, 738, 87, 1390, 316, 738, 87, 8403, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17795, 559, 812, 382, 1621, 12, 2890, 16, 1387, 2578, 16, 29449, 16, 8446, 4672, 309, 1387, 2578, 1545, 576, 30, 1172, 315, 9828, 854, 738, 72, 738, 87, 1390, 316, 738, 87, 8403, 82, ...
for repeat in range(multiple.get(info[0][0], 1)):
for repeat in range(count):
def parse(self, fupdate=0.05, cupdate=0.002): """Extract information from the logfile.""" inputfile = open(self.filename, "r") if self.progress: inputfile.seek(0, 2) #go to end of file nstep = inputfile.tell() inputfile.seek(0) self.progress.initialize(nstep) oldstep = 0 # Used to avoid extracting the final geometry twice in a GeoOpt NOTFOUND, GETLAST, NOMORE = range(3) finalgeometry = NOTFOUND # Used for calculating the scftarget (variables names taken from the ADF manual) accint = SCFconv = sconv2 = None # keep track of nosym and unrestricted case to parse Energies since it doens't have an all Irreps section nosymflag = False unrestrictedflag = False for line in inputfile: if self.progress and random.random() < cupdate: step = inputfile.tell() if step != oldstep: self.progress.update(step, "Unsupported Information") oldstep = step if line.find("INPUT FILE") >= 0:
722578f84e20e2883d2f098179d9927deafe4732 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/722578f84e20e2883d2f098179d9927deafe4732/adfparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 284, 2725, 33, 20, 18, 6260, 16, 276, 2725, 33, 20, 18, 24908, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 1696, 12, 2890, 18, 3459, 16, 315, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 284, 2725, 33, 20, 18, 6260, 16, 276, 2725, 33, 20, 18, 24908, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 1696, 12, 2890, 18, 3459, 16, 315, 8...
self.pingSelf = 1 self.hasReconnected = 0 self.timeout = 60
self.pingSelf = 1 self.hasReconnected = 0 self.timeout = 60
def __init__(self, nickname, password, channels, status, categories): """ @type nickname: string @param nickname: the nickname by which this bot should be known @type password: string @param password: the password to use for identifying with Nickserv @type channels: list of strings @param channels: the bot will maintain a presence in these channels @type status: L{buildbot.status.builder.Status} @param status: the build master's Status object, through which the bot retrieves all status information """ self.nickname = nickname
c8dc6496fcdea91de7fd32e1a604f8130e3c8357 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5901/c8dc6496fcdea91de7fd32e1a604f8130e3c8357/words.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 19570, 16, 2201, 16, 5750, 16, 1267, 16, 6477, 4672, 3536, 632, 723, 225, 19570, 30, 533, 632, 891, 19570, 30, 326, 19570, 635, 1492, 333, 2512, 1410, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19570, 16, 2201, 16, 5750, 16, 1267, 16, 6477, 4672, 3536, 632, 723, 225, 19570, 30, 533, 632, 891, 19570, 30, 326, 19570, 635, 1492, 333, 2512, 1410, 50...
{'inWeb': trans.gloss.inWeb, 'inMedLex': trans.gloss.InMedLex, 'healthtf': trans.gloss.healthtf,
{'inWeb': gloss.inWeb, 'inMedLex': gloss.InMedLex, 'healthtf': gloss.healthtf,
def gloss(request, idgloss, flavour='dictionary'): """View of a gloss - mimics the word view, really for admin use when we want to preview a particular gloss""" gloss = Gloss.objects.get(idgloss=idgloss) # and all the keywords associated with this sign allkwds = gloss.translation_set.all() if len(allkwds) == 0: trans = Translation() else: trans = allkwds[0] videourl = gloss.get_video_url() gloss = trans.gloss if request.user.is_staff: if flavour == 'medical': glosscount = Gloss.objects.filter(Q(healthtf__exact=True) | Q(InMedLex__exact=True)).count() glossposn = Gloss.objects.filter(Q(InMedLex__exact=True) | Q(healthtf__exact=True), sn__lt=gloss.sn).count()+1 else: glosscount = Gloss.objects.count() glossposn = Gloss.objects.filter(sn__lt=gloss.sn).count()+1 else: if flavour == 'medical': glosscount = Gloss.objects.filter(inWeb__exact=True, healthtf__exact=True).count() glossposn = Gloss.objects.filter(inWeb__exact=True, healthtf__exact=True, sn__lt=gloss.sn).count()+1 else: glosscount = Gloss.objects.filter(inWeb__exact=True).count() glossposn = Gloss.objects.filter(inWeb__exact=True, sn__lt=gloss.sn).count()+1 # navigation gives us the next and previous signs nav = gloss.navigation(flavour, request.user.is_staff) # the gloss update form for staff update_form = None if request.user.is_authenticated() and request.user.is_staff: update_form = GlossUpdateForm( {'inWeb': trans.gloss.inWeb, 'inMedLex': trans.gloss.InMedLex, 'healthtf': trans.gloss.healthtf, }) # get the last match keyword if there is one passed along as a form variable if request.GET.has_key('lastmatch'): lastmatch = request.GET['lastmatch'] else: lastmatch = None return render_to_response("dictionary/word.html", {'translation': trans, 'definitions': gloss.definitions(), 'allkwds': allkwds, 'flavour': flavour, 'lastmatch': lastmatch, 'videofile': videourl, 'viewname': word, 'feedback': None, 'gloss': gloss, 'glosscount': glosscount, 'glossposn': glossposn, 'navigation': nav, 'update_form': update_form, }, context_instance=RequestContext(request))
d5e695b61ac1ad3197980d1eb0d685ffcdc4f6c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/744/d5e695b61ac1ad3197980d1eb0d685ffcdc4f6c3/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 7873, 12, 2293, 16, 612, 75, 7873, 16, 31227, 477, 2218, 15556, 11, 4672, 3536, 1767, 434, 279, 314, 7873, 300, 20369, 2102, 326, 2076, 1476, 16, 8654, 364, 3981, 999, 1347, 732, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 7873, 12, 2293, 16, 612, 75, 7873, 16, 31227, 477, 2218, 15556, 11, 4672, 3536, 1767, 434, 279, 314, 7873, 300, 20369, 2102, 326, 2076, 1476, 16, 8654, 364, 3981, 999, 1347, 732, ...
filelinkrevs[f].remove(flr)
if havecl: filelinkrevs[f].remove(flr)
def checkversion(obj, name): if obj.version != revlog.REVLOGV0: if not revlogv1: warn(_("warning: `%s' uses revlog format 1") % name) elif revlogv1: warn(_("warning: `%s' uses revlog format 0") % name)
81ab121d11413401b817b66dfac2aab4c2762a61 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/81ab121d11413401b817b66dfac2aab4c2762a61/verify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1589, 12, 2603, 16, 508, 4672, 309, 1081, 18, 1589, 480, 5588, 1330, 18, 862, 58, 4842, 58, 20, 30, 309, 486, 5588, 1330, 90, 21, 30, 1894, 24899, 2932, 8551, 30, 12430, 87, 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, 866, 1589, 12, 2603, 16, 508, 4672, 309, 1081, 18, 1589, 480, 5588, 1330, 18, 862, 58, 4842, 58, 20, 30, 309, 486, 5588, 1330, 90, 21, 30, 1894, 24899, 2932, 8551, 30, 12430, 87, 11,...
self.alive.set()
def StartThread(self): """Start the receiver thread""" self.thread = threading.Thread(target=self.ComPortThread) self.thread.setDaemon(1) self.thread.start() self.alive.set()
d8d0f9f06cce8cfc5a50ad8a02b55ed2e0542eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/d8d0f9f06cce8cfc5a50ad8a02b55ed2e0542eaf/wxTerminal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 3830, 12, 2890, 4672, 3536, 1685, 326, 5971, 2650, 8395, 365, 18, 5930, 273, 17254, 18, 3830, 12, 3299, 33, 2890, 18, 799, 2617, 3830, 13, 365, 18, 5930, 18, 542, 12858, 12, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 3830, 12, 2890, 4672, 3536, 1685, 326, 5971, 2650, 8395, 365, 18, 5930, 273, 17254, 18, 3830, 12, 3299, 33, 2890, 18, 799, 2617, 3830, 13, 365, 18, 5930, 18, 542, 12858, 12, 21, ...
def __disown__(self): self.this.disown() _tinyWRAP.disown_ProxyAudioProducer(self) return weakref_proxy(self)
def __disown__(self): self.this.disown() _tinyWRAP.disown_ProxyAudioProducer(self) return weakref_proxy(self)
2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5606/2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a/tinyWRAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2251, 995, 972, 12, 2890, 4672, 365, 18, 2211, 18, 2251, 995, 1435, 389, 88, 11652, 27664, 18, 2251, 995, 67, 3886, 12719, 12140, 12, 2890, 13, 327, 16046, 1734, 67, 5656, 12, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2251, 995, 972, 12, 2890, 4672, 365, 18, 2211, 18, 2251, 995, 1435, 389, 88, 11652, 27664, 18, 2251, 995, 67, 3886, 12719, 12140, 12, 2890, 13, 327, 16046, 1734, 67, 5656, 12, 28...
Response_Code.setvalue(0,' '*2)
Response_Code.setvalue(0,u' '*2)
def write_receipt_waybill_compas(self,waybill_id): db = cx_Oracle.Connection("TESTJERX001/TESTJERX001@//10.11.216.4:1521/JERX001") cursor = db.cursor()#connections['compas'].cursor() self.ErrorMessages = '' self.ErrorCodes = '' the_waybill = Waybill.objects.get(id=waybill_id) lineItems = the_waybill.loadingdetail_set.select_related() WB_CODE = the_waybill.waybillNumber receiverPerson = EpicPerson.objects.get(person_pk = the_waybill.recipientName) recPersonOUC = receiverPerson.org_unit_code recPersonCode = receiverPerson.code arrival_date = the_waybill.recipientArrivalDate all_ok = True db.begin() for lineItem in lineItems: goodUnits = lineItem.numberUnitsGood damadgedUnits =lineItem.numberUnitsDamaged damadgedReason = lineItem.unitsDamagedReason.compasCode lostUnits =lineItem.numberUnitsLost lossReason = lineItem.unitsLostReason.compasCode Response_Message = cursor.var(cx_Oracle.STRING) Response_Message.setvalue(0,' '*200) Response_Code = cursor.var(cx_Oracle.STRING) Response_Code.setvalue(0,' '*2) Full_coi= TheStockItems[0].origin_id
c497ff3c7ca806866130c41e5403acfcbf770652 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12559/c497ff3c7ca806866130c41e5403acfcbf770652/compas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 8606, 8138, 67, 1888, 17240, 67, 2919, 345, 12, 2890, 16, 1888, 17240, 67, 350, 4672, 1319, 273, 9494, 67, 23601, 18, 1952, 2932, 16961, 46, 654, 60, 11664, 19, 16961, 46, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 8606, 8138, 67, 1888, 17240, 67, 2919, 345, 12, 2890, 16, 1888, 17240, 67, 350, 4672, 1319, 273, 9494, 67, 23601, 18, 1952, 2932, 16961, 46, 654, 60, 11664, 19, 16961, 46, 65...
self.started_playing = False
self.started_playing = STOPPED
def select_file(self, filename): """starts playing the specified file"""
2934e8b32a8c6a4773091ef2abaa54b3e4f5615d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/2934e8b32a8c6a4773091ef2abaa54b3e4f5615d/vlc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 768, 12, 2890, 16, 1544, 4672, 3536, 17514, 23982, 326, 1269, 585, 8395, 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, 2027, 67, 768, 12, 2890, 16, 1544, 4672, 3536, 17514, 23982, 326, 1269, 585, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
g = m2.bio_ctrl_get_write_guarantee(self.sslBio._ptr()) if g > 0 and self.data != '' or clientHello: r = m2.bio_write(self.sslBio._ptr(), self.data) if r <= 0: assert(m2.bio_should_retry(self.sslBio._ptr())) else: assert(self.checked) self.data = self.data[r:] encryptedData = ''
def _encrypt(self, data='', clientHello=0): # XXX near mirror image of _decrypt - refactor self.data += data g = m2.bio_ctrl_get_write_guarantee(self.sslBio._ptr()) if g > 0 and self.data != '' or clientHello: r = m2.bio_write(self.sslBio._ptr(), self.data) if r <= 0: assert(m2.bio_should_retry(self.sslBio._ptr())) else: assert(self.checked) self.data = self.data[r:] encryptedData = '' while 1: pending = m2.bio_ctrl_pending(self.networkBio) if pending: d = m2.bio_read(self.networkBio, pending) if d is not None: # This is strange, but d can be None encryptedData += d else: assert(m2.bio_should_retry(self.networkBio)) else: break
d7e77e3c43d56315376c6ade4bbf339ebb61a136 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/d7e77e3c43d56315376c6ade4bbf339ebb61a136/TwistedProtocolWrapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15890, 12, 2890, 16, 501, 2218, 2187, 1004, 18601, 33, 20, 4672, 468, 11329, 13378, 15593, 1316, 434, 389, 19790, 300, 26627, 365, 18, 892, 1011, 501, 225, 1323, 404, 30, 4634, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15890, 12, 2890, 16, 501, 2218, 2187, 1004, 18601, 33, 20, 4672, 468, 11329, 13378, 15593, 1316, 434, 389, 19790, 300, 26627, 365, 18, 892, 1011, 501, 225, 1323, 404, 30, 4634, 273,...
print name
def getPage(code, name): """Get the contents of page 'name' from the 'code' language wikipedia""" host = langs[code] if host[-4:]=='.com': # Old algorithm name = re.sub('_', ' ', name) n=[] for x in name.split(): n.append(x.capitalize()) name='_'.join(n) print name else: name = re.sub(' ', '_', name) if not '%' in name: # It should not have been done yet if name!=urllib.quote(name): print "DBG> quoting",name name = urllib.quote(name) if host[-4:] == '.org': # New software address = '/w/wiki.phtml?title='+name+'&action=edit' elif host[-4:]=='.com': # Old software address = '/wiki.cgi?action=edit&id='+name if debug: print host,address text,charset = getUrl(host,address) if debug: print "Raw:",len(text),type(text),text.count('x') if charset is None: print "WARNING: No character set found" else: # Store character set for later reference if charsets.has_key(code): assert charsets[code]==charset charsets[code]=charset if debug>1: print repr(text) m = re.search('value="(\d+)" name=\'wpEdittime\'',text) if m: edittime[code,space2underline(name)]=m.group(1) else: m = re.search('value="(\d+)" name="wpEdittime"',text) if m: edittime[code,name]=m.group(1) else: edittime[code,name]=0 try: i1 = re.search('<textarea[^>]*>',text).end() except AttributeError: print "No text area.",host,address raise NoPage() i2 = re.search('</textarea>',text).start() if i2-i1 < 2: # new software raise NoPage() if debug: print text[i1:i2] if text[i1:i2] == 'Describe the new page here.\n': # old software raise NoPage() Rredirect=re.compile(r'\#redirect:? *\[\[(.*?)\]\]',re.I) m=Rredirect.match(text[i1:i2]) if m: raise IsRedirectPage(m.group(1)) assert edittime[code,name]!=0 or host[-4:]=='.com', "No edittime on non-empty page?! %s:%s\n%s"%(code,name,text) x=text[i1:i2] x=unescape(x) if charset=='utf-8': # Make it to a unicode string encode_func, decode_func, stream_reader, stream_writer = codecs.lookup('utf-8') x,l=decode_func(x) # Convert the unicode characters to &# references, and make it ascii. x=str(UnicodeToHtml(x)) return x
b1fd08aa751b719064a4ec7ba519b68666060919 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/b1fd08aa751b719064a4ec7ba519b68666060919/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8957, 12, 710, 16, 508, 4672, 3536, 967, 326, 2939, 434, 1363, 296, 529, 11, 628, 326, 296, 710, 11, 2653, 21137, 8395, 1479, 273, 26467, 63, 710, 65, 309, 1479, 18919, 24, 26894, 631,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8957, 12, 710, 16, 508, 4672, 3536, 967, 326, 2939, 434, 1363, 296, 529, 11, 628, 326, 296, 710, 11, 2653, 21137, 8395, 1479, 273, 26467, 63, 710, 65, 309, 1479, 18919, 24, 26894, 631,...
self.__buddyList.remove(oldBuddy) self.__updateConfig()
self._buddyList.remove(oldBuddy) self._updateConfig()
def __removeBuddy(self, oldBuddy): "Remove an existing buddy from the buddy list." if self._buddyList.count(oldBuddy) == 0: # No such buddy. return self.do_REMOVE_BUDDY(list(oldBuddy)) self.__buddyList.remove(oldBuddy) self.__updateConfig()
184ee879dbace215f2aded29987de7f6e9ce724d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13130/184ee879dbace215f2aded29987de7f6e9ce724d/aim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 38, 29017, 12, 2890, 16, 1592, 38, 29017, 4672, 315, 3288, 392, 2062, 324, 29017, 628, 326, 324, 29017, 666, 1199, 309, 365, 6315, 70, 29017, 682, 18, 1883, 12, 1673, 38, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4479, 38, 29017, 12, 2890, 16, 1592, 38, 29017, 4672, 315, 3288, 392, 2062, 324, 29017, 628, 326, 324, 29017, 666, 1199, 309, 365, 6315, 70, 29017, 682, 18, 1883, 12, 1673, 38, 2...
lfit = RegressionResults(L.lstsq(self.wdesign, Z)[0], Y)
lfit = RegressionResults(np.linalg.lstsq(self.wdesign, Z)[0], Y)
def est_coef(self, Y): """ Estimate coefficients using lstsq, returning fitted values, Y and coefficients, but initialize is not called so no psuedo-inverse is calculated. """ Z = self.whiten(Y)
d2943ba86f6fded3206a1c709529212d0c25be17 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12658/d2943ba86f6fded3206a1c709529212d0c25be17/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4387, 67, 24305, 12, 2890, 16, 1624, 4672, 3536, 17787, 4988, 14229, 1450, 9441, 11410, 16, 5785, 31379, 924, 16, 1624, 471, 14229, 16, 1496, 4046, 353, 486, 2566, 1427, 1158, 4250, 5957, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4387, 67, 24305, 12, 2890, 16, 1624, 4672, 3536, 17787, 4988, 14229, 1450, 9441, 11410, 16, 5785, 31379, 924, 16, 1624, 471, 14229, 16, 1496, 4046, 353, 486, 2566, 1427, 1158, 4250, 5957, ...
if irole == role])
if role in irole])
def getEmailsForRole(self, role):
ae31c24da4466c092ac955fa363cab5f118767d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12239/ae31c24da4466c092ac955fa363cab5f118767d8/adapters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17297, 28388, 2996, 12, 2890, 16, 2478, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17297, 28388, 2996, 12, 2890, 16, 2478, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
series_index = '%04d%%s' % (integer, str('%0.4f' % fraction).lstrip('0'))
series_index = '%04d%s' % (integer, str('%0.4f' % fraction).lstrip('0'))
def _update_iTunes_metadata(self, metadata, db_added, lb_added, this_book): ''' ''' if DEBUG: self.log.info(" ITUNES._update_iTunes_metadata()")
1f42467f38031b0dee547b89b0fd1bab28102615 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/1f42467f38031b0dee547b89b0fd1bab28102615/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 77, 56, 27490, 67, 4165, 12, 2890, 16, 1982, 16, 1319, 67, 9665, 16, 7831, 67, 9665, 16, 333, 67, 3618, 4672, 9163, 9163, 309, 6369, 30, 365, 18, 1330, 18, 1376, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 2725, 67, 77, 56, 27490, 67, 4165, 12, 2890, 16, 1982, 16, 1319, 67, 9665, 16, 7831, 67, 9665, 16, 333, 67, 3618, 4672, 9163, 9163, 309, 6369, 30, 365, 18, 1330, 18, 1376, 2932,...
need_sample = True
word_wrap = False filename = None
def OnPrint(self, evt): pdd = wx.PrintDialogData(print_data) printer = wx.Printer(pdd) printout = STCPrintout(self.stc) result = printer.Print(self, printout) if result: data = printer.GetPrintDialogData() PageSetup.print_data = wx.PrintData(data.GetPrintData()) elif printer.GetLastError() == wx.PRINTER_ERROR: wx.MessageBox(_("There was an error when printing.\n" "Check that your printer is properly connected."), _("Printer Error"), style=wx.ICON_ERROR|wx.OK) printout.Destroy()
32a7a26e5c3d81294813c6ef0bc5be0aada1c3ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/32a7a26e5c3d81294813c6ef0bc5be0aada1c3ab/stcprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 5108, 12, 2890, 16, 6324, 4672, 293, 449, 273, 7075, 18, 5108, 6353, 751, 12, 1188, 67, 892, 13, 12539, 273, 7075, 18, 12149, 12, 84, 449, 13, 1172, 659, 273, 2347, 39, 5108, 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, 2755, 5108, 12, 2890, 16, 6324, 4672, 293, 449, 273, 7075, 18, 5108, 6353, 751, 12, 1188, 67, 892, 13, 12539, 273, 7075, 18, 12149, 12, 84, 449, 13, 1172, 659, 273, 2347, 39, 5108, 6...
self.launch_event('inforbar_editable_reply', self.editable_label) def evt_get_info_bar_text(self,event): self.launch_event('info_bar_text',self.editable_label.get_text()) def evt_info_bar_right(self,event): cursor_pos=self.editable_label.get_cursor_position() cursor_res =cursor_pos+1 self.editable_label.set_selection(cursor_res, cursor_res) def evt_info_bar_left(self,event): cursor_pos=self.editable_label.get_cursor_position() if cursor_pos == -1: cursor_pos = len(self.editable_label.get_text())-1 cursor_res = cursor_pos - 1 self.editable_label.set_selection(cursor_res, cursor_res) def evt_info_bar_get_cursor_position(self,event): cursor_pos=self.editable_label.get_cursor_position() print cursor_pos self.launch_event('info_bar_cursor_position',cursor_pos)
self.editable_label.show() self.launch_event('infobar_editable_reply', self.editable_label)
def evt_request_infobar_editable(self, event): self.launch_event('inforbar_editable_reply', self.editable_label)
ba8a8c5460fb6bd80df8295d50dad060bc01184c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5280/ba8a8c5460fb6bd80df8295d50dad060bc01184c/infobar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6324, 67, 2293, 67, 1376, 3215, 67, 19653, 12, 2890, 16, 871, 4672, 365, 18, 20738, 67, 2575, 2668, 267, 1884, 3215, 67, 19653, 67, 10629, 2187, 365, 18, 19653, 67, 1925, 13, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6324, 67, 2293, 67, 1376, 3215, 67, 19653, 12, 2890, 16, 871, 4672, 365, 18, 20738, 67, 2575, 2668, 267, 1884, 3215, 67, 19653, 67, 10629, 2187, 365, 18, 19653, 67, 1925, 13, 2, -100, ...
for i in [2, 3, 5]: d += (x[i] == y[i])
for i in [2, 5]: d += (x[i] == y[i] or y[i] == '*') d += x[3] == y[3]
def p0f_correl(x,y): d = 0 # wwww can be "*" or "%nn" d += (x[0] == y[0] or y[0] == "*" or (y[0][0] == "%" and x[0].isdigit() and (int(x[0]) % int(y[0][1:])) == 0)) # ttl d += (y[1] >= x[1] and y[1] - x[1] < 32) for i in [2, 3, 5]: d += (x[i] == y[i]) xopt = x[4].split(",") yopt = y[4].split(",") if len(xopt) == len(yopt): same = True for i in range(len(xopt)): if not (xopt[i] == yopt[i] or (len(yopt[i]) == 2 and len(xopt[i]) > 1 and yopt[i][1] == "*" and xopt[i][0] == yopt[i][0]) or (len(yopt[i]) > 2 and len(xopt[i]) > 1 and yopt[i][1] == "%" and xopt[i][0] == yopt[i][0] and int(xopt[i][1:]) % int(yopt[i][2:]) == 0)): same = False break if same: d += len(xopt) return d
bebe0596dd5f92720a86c6f3fa23aaf4b1bbc984 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7311/bebe0596dd5f92720a86c6f3fa23aaf4b1bbc984/p0f.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 20, 74, 67, 3850, 2878, 12, 92, 16, 93, 4672, 302, 273, 374, 468, 341, 5591, 848, 506, 10971, 578, 2213, 9074, 6, 302, 1011, 261, 92, 63, 20, 65, 422, 677, 63, 20, 65, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 20, 74, 67, 3850, 2878, 12, 92, 16, 93, 4672, 302, 273, 374, 468, 341, 5591, 848, 506, 10971, 578, 2213, 9074, 6, 302, 1011, 261, 92, 63, 20, 65, 422, 677, 63, 20, 65, 578, ...
child.setSize((max(xSize, 0.5), childHeight, max(zSize, 0.5)))
if not child.sizeIsAbsolute: child.setSize((max(xSize, 0.5), childHeight, max(zSize, 0.5)))
def _arrangeChildren(self, recurse = True): if self.arrangedAxis is None or len(self.children) == 0: return worldSize = self.worldSize() if self.arrangedAxis == 'largest': # Pick the axis in which our size is largest. if worldSize[0] >= worldSize[1] and worldSize[0] >= worldSize[2]: axisToUse = 'X' elif worldSize[1] >= worldSize[0] and worldSize[1] >= worldSize[2]: axisToUse = 'Y' else: axisToUse = 'Z' else: axisToUse = self.arrangedAxis childCount = len(self.children) weightedChildCount = 0.0 for child in self.children: weightedChildCount += child.arrangedWeight if axisToUse == 'X': worldSpacing = worldSize[0] * self.arrangedSpacing ySize = (worldSize[1] - 2.0 * worldSpacing) / worldSize[1] zSize = (worldSize[2] - 2.0 * worldSpacing) / worldSize[2] curX = -0.5 + self.arrangedSpacing for index in range(0, childCount): child = self.children[index] childWidth = (1.0 - self.arrangedSpacing * (childCount + 1.0)) / weightedChildCount * child.arrangedWeight child.setPosition((curX + childWidth / 2.0, 0.0, 0.0)) child.setSize((childWidth, max(ySize, 0.5), max(zSize, 0.5))) child.setPositionIsFixed(True) curX += childWidth + self.arrangedSpacing elif axisToUse == 'Y': worldSpacing = worldSize[1] * self.arrangedSpacing xSize = (worldSize[0] - 2.0 * worldSpacing) / worldSize[0] zSize = (worldSize[2] - 2.0 * worldSpacing) / worldSize[2] curY = 0.5 - self.arrangedSpacing for index in range(0, childCount): child = self.children[index] childHeight = (1.0 - self.arrangedSpacing * (childCount + 1.0)) / weightedChildCount * child.arrangedWeight child.setPosition((0.0, curY - childHeight / 2.0, 0.0)) child.setSize((max(xSize, 0.5), childHeight, max(zSize, 0.5))) child.setPositionIsFixed(True) curY -= childHeight + self.arrangedSpacing else: # axisToUse == 'Z' worldSpacing = worldSize[2] * self.arrangedSpacing xSize = (worldSize[0] - 2.0 * worldSpacing) / worldSize[0] ySize = (worldSize[1] - 2.0 * worldSpacing) / worldSize[1] curZ = -0.5 + self.arrangedSpacing for index in range(0, childCount): child = self.children[index] childDepth = (1.0 - self.arrangedSpacing * (childCount + 1.0)) / weightedChildCount * child.arrangedWeight child.setPosition((0.0, 0.0, curZ + childDepth / 2.0)) child.setSize((max(xSize, 0.5), max(ySize, 0.5), childDepth)) child.setPositionIsFixed(True) curZ += childDepth + self.arrangedSpacing if recurse: for child in self.children: child._arrangeChildren(recurse = True)
bd2f0b26c36b96f38b17256dfa8c2c5231236ba0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6368/bd2f0b26c36b96f38b17256dfa8c2c5231236ba0/Visible.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 297, 3676, 4212, 12, 2890, 16, 11502, 273, 1053, 4672, 309, 365, 18, 5399, 2330, 6558, 353, 599, 578, 562, 12, 2890, 18, 5906, 13, 422, 374, 30, 327, 225, 9117, 1225, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 297, 3676, 4212, 12, 2890, 16, 11502, 273, 1053, 4672, 309, 365, 18, 5399, 2330, 6558, 353, 599, 578, 562, 12, 2890, 18, 5906, 13, 422, 374, 30, 327, 225, 9117, 1225, 273, 365, ...
print "no, not available"
def isModeAvailable(self, port, mode, rate): print "isModeAvailable:", port, mode, rate, rate = self.rates[mode][rate] for mode in rate.values(): # DVI modes must be in "modes_preferred"
71f08ddecd2acdde935476ea53503d4fd95b5a46 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/71f08ddecd2acdde935476ea53503d4fd95b5a46/VideoHardware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2309, 5268, 12, 2890, 16, 1756, 16, 1965, 16, 4993, 4672, 1172, 315, 291, 2309, 5268, 2773, 16, 1756, 16, 1965, 16, 4993, 16, 4993, 273, 365, 18, 24285, 63, 3188, 6362, 5141, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2309, 5268, 12, 2890, 16, 1756, 16, 1965, 16, 4993, 4672, 1172, 315, 291, 2309, 5268, 2773, 16, 1756, 16, 1965, 16, 4993, 16, 4993, 273, 365, 18, 24285, 63, 3188, 6362, 5141, 65, ...
np.savetxt('ranked_sky_pixels',np.column_stack([np.asarray(toppoints)[:,0:1],np.asarray(toppoints)[:,1],np.asarray(toppoints)[:,3]]))
np.savetxt(os.path.join(outdir,'ranked_sky_pixels.dat'),np.column_stack([np.asarray(toppoints)[:,0:1],np.asarray(toppoints)[:,1],np.asarray(toppoints)[:,3]]))
def plotSkyMap(skypos,skyres,sky_injpoint,confidence_levels,outdir): from mpl_toolkits.basemap import Basemap from pylal import skylocutils np.seterr(under='ignore') skypoints=np.array(skylocutils.gridsky(float(skyres))) skycarts=map(lambda s: pol2cart(s[1],s[0]),skypoints) skyinjectionconfidence=None shist=skyhist_cart(np.array(skycarts),skypos) #shist=skyhist_cart(skycarts,list(pos)) bins=skycarts # Find the bin of the injection if available injbin=None if sky_injpoint: injhist=skyhist_cart_slow(skycarts,np.array([sky_injpoint])) injbin=injhist.tolist().index(1) print 'Found injection in bin %d with co-ordinates %f,%f .'%(injbin,skypoints[injbin,0],skypoints[injbin,1]) (skyinjectionconfidence,toppoints,skyreses)=calculateConfidenceLevels(shist,skypoints,injbin,float(skyres),confidence_levels,len(skypos)) if injbin and skyinjectionconfidence: i=list(np.nonzero(np.asarray(toppoints)[:,2]==injbin))[0] min_sky_area_containing_injection=float(skyres)*float(skyres)*i print 'Minimum sky area containing injection point = %f square degrees'%min_sky_area_containing_injection myfig=plt.figure() plt.clf() m=Basemap(projection='moll',lon_0=180.0,lat_0=0.0) plx,ply=m(np.asarray(toppoints)[::-1,1]*57.296,np.asarray(toppoints)[::-1,0]*57.296) cnlevel=[1-tp for tp in np.asarray(toppoints)[::-1,3]] plt.scatter(plx,ply,s=5,c=cnlevel,faceted=False,cmap=mpl_cm.jet) m.drawmapboundary() m.drawparallels(np.arange(-90.,120.,45.),labels=[1,0,0,0],labelstyle='+/-') # draw parallels m.drawmeridians(np.arange(0.,360.,90.),labels=[0,0,0,1],labelstyle='+/-') # draw meridians plt.title("Skymap") # add a title plt.colorbar() myfig.savefig(os.path.join(outdir,'skymap.png')) plt.clf() #Save skypoints np.savetxt('ranked_sky_pixels',np.column_stack([np.asarray(toppoints)[:,0:1],np.asarray(toppoints)[:,1],np.asarray(toppoints)[:,3]])) return skyreses,skyinjectionconfidence
e76da4d61e554d2a4f584e0b3fe0c166c657dc43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/e76da4d61e554d2a4f584e0b3fe0c166c657dc43/bayespputils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 5925, 93, 863, 12, 7771, 879, 538, 16, 22921, 455, 16, 22921, 67, 267, 78, 1153, 16, 27911, 67, 12095, 16, 659, 1214, 4672, 225, 628, 18476, 67, 6738, 79, 1282, 18, 1969, 1458, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 5925, 93, 863, 12, 7771, 879, 538, 16, 22921, 455, 16, 22921, 67, 267, 78, 1153, 16, 27911, 67, 12095, 16, 659, 1214, 4672, 225, 628, 18476, 67, 6738, 79, 1282, 18, 1969, 1458, ...
print "DESCS_%s = {" % name.upper()
print("DESCS_%s = {" % name.upper())
print "def get_%s_localised_present_from_enum(enum):" % name
8e9c4450c56bff53eb0384354e13d91c56601046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11043/8e9c4450c56bff53eb0384354e13d91c56601046/enum-convertor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1172, 315, 536, 336, 10185, 87, 67, 3729, 5918, 67, 6706, 67, 2080, 67, 7924, 12, 7924, 13, 2773, 738, 508, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1172, 315, 536, 336, 10185, 87, 67, 3729, 5918, 67, 6706, 67, 2080, 67, 7924, 12, 7924, 13, 2773, 738, 508, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.folder.invokeFactory(types['folder'], id='folder') portal_repository = self.portal_repository portal_archivist = self.portal_archivist content = self.folder.folder portal_repository.applyVersionControl(content, comment='save no 1') portal_repository.save(content, comment='save no 2') vdata = portal_archivist.retrieve(content, 0) obj = vdata.data.object vdata = portal_archivist.retrieve(content, 1) obj = vdata.data.object portal_repository.revert(content, 0)
titleOne = 'folderOne' titleTwo = 'folderTwo' self.folder.invokeFactory(types['folder'], id='myfolder') portal_repository = self.portal_repository content = self.folder.myfolder content.setTitle(titleOne) portal_repository.applyVersionControl(content, comment='save no 0') content.setTitle(titleTwo) portal_repository.save(content, comment='save no 1') vdata = portal_repository.retrieve(content, 0) obj = vdata.object self.assertEqual(obj.Title(), titleOne) vdata = portal_repository.retrieve(content, 1) obj = vdata.object self.assertEqual(obj.Title(), titleTwo) portal_repository.revert(content, 0) self.assertEqual(content.Title(), titleOne)
def testFolder(self): self.folder.invokeFactory(types['folder'], id='folder') portal_repository = self.portal_repository portal_archivist = self.portal_archivist content = self.folder.folder portal_repository.applyVersionControl(content, comment='save no 1') portal_repository.save(content, comment='save no 2') vdata = portal_archivist.retrieve(content, 0) obj = vdata.data.object vdata = portal_archivist.retrieve(content, 1) obj = vdata.data.object portal_repository.revert(content, 0)
0c55d14cc02ee6857398195362688d81907df2af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11952/0c55d14cc02ee6857398195362688d81907df2af/test_ATContentTypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3899, 12, 2890, 4672, 365, 18, 5609, 18, 14407, 1733, 12, 2352, 3292, 5609, 17337, 612, 2218, 5609, 6134, 11899, 67, 9071, 273, 365, 18, 24386, 67, 9071, 11899, 67, 991, 427, 376, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3899, 12, 2890, 4672, 365, 18, 5609, 18, 14407, 1733, 12, 2352, 3292, 5609, 17337, 612, 2218, 5609, 6134, 11899, 67, 9071, 273, 365, 18, 24386, 67, 9071, 11899, 67, 991, 427, 376, ...
self._change_state("TERMINATIED")
self._change_state("TERMINATED")
def terminate(self): """Terminates the SIP session from whatever state it is in. Moves the object to the TERMINATING state.""" with self._lock: if self.state in ["NULL", "TERMINATING", "TERMINATED"]: return self._change_state("TERMINATING") self.notification_center.post_notification("SCSessionWillEnd", self, TimestampedNotificationData()) if self._inv.state != "DISCONNECTING": try: self._inv.disconnect() except SIPCoreError: self._change_state("TERMINATIED") self.notification_center.post_notification("SCSessionDidEnd", self, TimestampedNotificationData(originator="local"))
2cb965e3995fbde7f1bbf1e97cc0205eab9907ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/2cb965e3995fbde7f1bbf1e97cc0205eab9907ff/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10850, 12, 2890, 4672, 3536, 4065, 4174, 326, 348, 2579, 1339, 628, 15098, 919, 518, 353, 316, 18, 490, 10829, 326, 733, 358, 326, 20772, 6236, 28054, 919, 12123, 598, 365, 6315, 739, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10850, 12, 2890, 4672, 3536, 4065, 4174, 326, 348, 2579, 1339, 628, 15098, 919, 518, 353, 316, 18, 490, 10829, 326, 733, 358, 326, 20772, 6236, 28054, 919, 12123, 598, 365, 6315, 739, 30...
labelCustomTitle=Label(frameCustom,text='Set Custom Highlighting')
def CreatePageHighlight(self): self.builtinTheme=StringVar(self) self.customTheme=StringVar(self) self.fgHilite=BooleanVar(self) self.colour=StringVar(self) self.fontName=StringVar(self) self.themeIsBuiltin=BooleanVar(self) self.highlightTarget=StringVar(self) ##widget creation #body frame frame=self.tabPages.pages['Highlighting']['page'] #body section frames frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) frameTheme=Frame(frame,borderwidth=2,relief=GROOVE) #frameCustom self.textHighlightSample=Text(frameCustom,relief=SOLID,borderwidth=1, font=('courier',12,''),cursor='hand2',width=21,height=10, takefocus=FALSE,highlightthickness=0,wrap=NONE) text=self.textHighlightSample text.bind('<Double-Button-1>',lambda e: 'break') text.bind('<B1-Motion>',lambda e: 'break') textAndTags=(('#you can click here','comment'),('\n','normal'), ('#to choose items','comment'),('\n','normal'),('def','keyword'), (' ','normal'),('func','definition'),('(param):','normal'), ('\n ','normal'),('"""string"""','string'),('\n var0 = ','normal'), ("'string'",'string'),('\n var1 = ','normal'),("'selected'",'hilite'), ('\n var2 = ','normal'),("'found'",'hit'), ('\n var3 = ','normal'),('list', 'builtin'), ('(','normal'), ('None', 'builtin'),(')\n\n','normal'), (' error ','error'),(' ','normal'),('cursor |','cursor'), ('\n ','normal'),('shell','console'),(' ','normal'),('stdout','stdout'), (' ','normal'),('stderr','stderr'),('\n','normal')) for txTa in textAndTags: text.insert(END,txTa[0],txTa[1]) for element in self.themeElements.keys(): text.tag_bind(self.themeElements[element][0],'<ButtonPress-1>', lambda event,elem=element: event.widget.winfo_toplevel() .highlightTarget.set(elem)) text.config(state=DISABLED) self.frameColourSet=Frame(frameCustom,relief=SOLID,borderwidth=1) frameFgBg=Frame(frameCustom) labelCustomTitle=Label(frameCustom,text='Set Custom Highlighting') buttonSetColour=Button(self.frameColourSet,text='Choose Colour for :', command=self.GetColour,highlightthickness=0) self.optMenuHighlightTarget=DynOptionMenu(self.frameColourSet, self.highlightTarget,None,highlightthickness=0)#,command=self.SetHighlightTargetBinding self.radioFg=Radiobutton(frameFgBg,variable=self.fgHilite, value=1,text='Foreground',command=self.SetColourSampleBinding) self.radioBg=Radiobutton(frameFgBg,variable=self.fgHilite, value=0,text='Background',command=self.SetColourSampleBinding) self.fgHilite.set(1) buttonSaveCustomTheme=Button(frameCustom, text='Save as New Custom Theme',command=self.SaveAsNewTheme) #frameTheme labelThemeTitle=Label(frameTheme,text='Select a Highlighting Theme') labelTypeTitle=Label(frameTheme,text='Select : ') self.radioThemeBuiltin=Radiobutton(frameTheme,variable=self.themeIsBuiltin, value=1,command=self.SetThemeType,text='a Built-in Theme') self.radioThemeCustom=Radiobutton(frameTheme,variable=self.themeIsBuiltin, value=0,command=self.SetThemeType,text='a Custom Theme') self.optMenuThemeBuiltin=DynOptionMenu(frameTheme, self.builtinTheme,None,command=None) self.optMenuThemeCustom=DynOptionMenu(frameTheme, self.customTheme,None,command=None) self.buttonDeleteCustomTheme=Button(frameTheme,text='Delete Custom Theme', command=self.DeleteCustomTheme) ##widget packing #body frameCustom.pack(side=LEFT,padx=5,pady=10,expand=TRUE,fill=BOTH) frameTheme.pack(side=LEFT,padx=5,pady=10,fill=Y) #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) self.frameColourSet.pack(side=TOP,padx=5,pady=5,expand=TRUE,fill=X) frameFgBg.pack(side=TOP,padx=5,pady=0) self.textHighlightSample.pack(side=TOP,padx=5,pady=5,expand=TRUE, fill=BOTH) buttonSetColour.pack(side=TOP,expand=TRUE,fill=X,padx=8,pady=4) self.optMenuHighlightTarget.pack(side=TOP,expand=TRUE,fill=X,padx=8,pady=3) self.radioFg.pack(side=LEFT,anchor=E) self.radioBg.pack(side=RIGHT,anchor=W) buttonSaveCustomTheme.pack(side=BOTTOM,fill=X,padx=5,pady=5) #frameTheme labelThemeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) labelTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) self.radioThemeBuiltin.pack(side=TOP,anchor=W,padx=5) self.radioThemeCustom.pack(side=TOP,anchor=W,padx=5,pady=2) self.optMenuThemeBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) self.optMenuThemeCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) self.buttonDeleteCustomTheme.pack(side=TOP,fill=X,padx=5,pady=5) return frame
ed15565253c2cb817c68ed89e22c7a6c7707ab66 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ed15565253c2cb817c68ed89e22c7a6c7707ab66/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 16205, 12, 2890, 4672, 365, 18, 24553, 8335, 33, 780, 1537, 12, 2890, 13, 365, 18, 3662, 8335, 33, 780, 1537, 12, 2890, 13, 365, 18, 2137, 44, 330, 1137, 33, 5507, 1537, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1964, 16205, 12, 2890, 4672, 365, 18, 24553, 8335, 33, 780, 1537, 12, 2890, 13, 365, 18, 3662, 8335, 33, 780, 1537, 12, 2890, 13, 365, 18, 2137, 44, 330, 1137, 33, 5507, 1537, ...
def __init__(self, name=None, **kwargs):
def __init__(self, name, **kwargs):
def __init__(self, name=None, **kwargs): """ Assign name to __name__. Add properties and passed-in keyword args to __dict__. Validate assigned validator(s). """ DefaultLayerContainer.__init__(self)
453dbec64114494e84772b5599152b8e99e1eeab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/453dbec64114494e84772b5599152b8e99e1eeab/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2826, 4333, 4672, 3536, 12093, 508, 358, 1001, 529, 25648, 1436, 1790, 471, 2275, 17, 267, 4932, 833, 358, 1001, 1576, 25648, 3554, 6958, 4213, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2826, 4333, 4672, 3536, 12093, 508, 358, 1001, 529, 25648, 1436, 1790, 471, 2275, 17, 267, 4932, 833, 358, 1001, 1576, 25648, 3554, 6958, 4213, 12...
t[0] = flatten_nodetree(t[2])
t[0] = t[2]
def p_matrix(t): ''' matrix : LBRACKET valuelist RBRACKET ''' t[0] = flatten_nodetree(t[2])
1a8e540808c326b13fcc3d7ecf1906c80d3bce53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/1a8e540808c326b13fcc3d7ecf1906c80d3bce53/emparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 5667, 12, 88, 4672, 9163, 3148, 294, 511, 21217, 21748, 5449, 534, 21217, 9163, 268, 63, 20, 65, 273, 268, 63, 22, 65, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 5667, 12, 88, 4672, 9163, 3148, 294, 511, 21217, 21748, 5449, 534, 21217, 9163, 268, 63, 20, 65, 273, 268, 63, 22, 65, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if isinstance(item.file, FileType):
if isinstance(item.file, FileType) or \ isinstance(getattr(item.file, 'file', None), FileType):
def getlist(self, key): """ return a list of received values """ if self.list is None: raise TypeError, "not indexable" found = [] for item in self.list: if item.name == key: if isinstance(item.file, FileType): found.append(item) else: found.append(StringField(item.value)) return found
c78fd11971315200b059f3cafea4f57e3b919317 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/c78fd11971315200b059f3cafea4f57e3b919317/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1098, 12, 2890, 16, 498, 4672, 3536, 327, 279, 666, 434, 5079, 924, 3536, 309, 365, 18, 1098, 353, 599, 30, 1002, 3580, 16, 315, 902, 770, 429, 6, 1392, 273, 5378, 364, 761, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1098, 12, 2890, 16, 498, 4672, 3536, 327, 279, 666, 434, 5079, 924, 3536, 309, 365, 18, 1098, 353, 599, 30, 1002, 3580, 16, 315, 902, 770, 429, 6, 1392, 273, 5378, 364, 761, 316...
TEST_F(GLES2DecoderTest, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) {
def WriteServiceUnitTest(self, func, file): """Writes the service unit test for a command.""" if func.GetInfo('unit_test') == False: file.Write("// TODO(gman): %s\n" % func.name) return valid_test = """
3916c97e1bb1ef3fecfdcaf9d80f239016756c06 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/3916c97e1bb1ef3fecfdcaf9d80f239016756c06/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 2836, 1842, 364, 279, 1296, 12123, 309, 1326, 18, 967, 966, 2668, 4873, 67, 3813, 6134, 422, 1083, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 8368, 326, 1156, 2836, 1842, 364, 279, 1296, 12123, 309, 1326, 18, 967, 966, 2668, 4873, 67, 3813, 6134, 422, 1083, 30, ...
"Date varchar(256), " +
"Date datetime, " +
def __init__ (self): options = OptionsStore() try: #print options.db_driver_out self.database = create_database(options.db_driver_out +"://"+ options.db_user_out +":"+ options.db_password_out +"@"+ options.db_hostname_out+":"+ options.db_port_out+"/"+ options.db_database_out) except DatabaseModuleError, e: raise DBDatabaseDriverNotAvailable (str (e)) except ImportError: raise DBDatabaseDriverNotSupported except: raise
900bfa3da083243a22e8a8fa703346e76a043583 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10888/900bfa3da083243a22e8a8fa703346e76a043583/SqlBug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 702, 273, 5087, 2257, 1435, 225, 775, 30, 468, 1188, 702, 18, 1966, 67, 7407, 67, 659, 365, 18, 6231, 273, 752, 67, 6231, 12, 2116, 18, 1966, 67, 74...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 702, 273, 5087, 2257, 1435, 225, 775, 30, 468, 1188, 702, 18, 1966, 67, 7407, 67, 659, 365, 18, 6231, 273, 752, 67, 6231, 12, 2116, 18, 1966, 67, 74...
def pref_minimize_leave_out_PAM_bondpoints():
def pref_minimize_leave_out_PAM_bondpoints():
def pref_minimize_leave_out_PAM_bondpoints(): #bruce 080507 """ If enabled, bondpoints on PAM atoms are left out of simulations and minimizations, rather than being converted to H (as always occurred until now) or anchored or left unchanged (not yet possible). @warning: not yet fully implemented. """ res = debug_pref("Minimize: leave out PAM bondpoints? (partly nim)", Choice_boolean_False, # not yet safe or tested (and partly nim) non_debug = True, # should be easy to test prefs_key = True ) return res
f1e78937848c5c8d963598ffbca33488a935896c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/f1e78937848c5c8d963598ffbca33488a935896c/GlobalPreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11307, 67, 1154, 10153, 67, 19574, 67, 659, 67, 52, 2192, 67, 26425, 4139, 13332, 468, 2848, 3965, 374, 3672, 3361, 27, 3536, 971, 3696, 16, 8427, 4139, 603, 453, 2192, 9006, 854, 2002, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11307, 67, 1154, 10153, 67, 19574, 67, 659, 67, 52, 2192, 67, 26425, 4139, 13332, 468, 2848, 3965, 374, 3672, 3361, 27, 3536, 971, 3696, 16, 8427, 4139, 603, 453, 2192, 9006, 854, 2002, ...
ts.addErase("%s-%s" % (pkg.name, version))
ts.addErase(offset)
def commit(self, changeset, pkgpaths):
61ba75da1f8be8444a13c60740f9b26167226a8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/61ba75da1f8be8444a13c60740f9b26167226a8b/pm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 22463, 16, 3475, 4481, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 22463, 16, 3475, 4481, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Generates a valid unique id based on a suggested id, title or prefix
Generates a valid unique id based on a suggested id, title or prefix
def make_id(parent, temp_parent=None, id='', title='', prefix='', removelist=None): """ Generates a valid unique id based on a suggested id, title or prefix The generated id is checked for uniqueness in the parent folder and if passed, in a second, 'temporary' folder """ gen_id = cleanupId(id) if not gen_id: gen_id = genObjectId(title, removelist=removelist) if not gen_id: gen_id = prefix + genRandomId(5) i = 1 search_id = gen_id while True: condition = parent._getOb(search_id, None) is not None if temp_parent: condition = condition or temp_parent._getOb(search_id, None) is not None if condition: search_id = '%s-%d' % (gen_id, i) i += 1 else: break return search_id
dc58e97386383c409526c7d0d62bfe760915b941 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/dc58e97386383c409526c7d0d62bfe760915b941/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 350, 12, 2938, 16, 1906, 67, 2938, 33, 7036, 16, 612, 2218, 2187, 2077, 2218, 2187, 1633, 2218, 2187, 849, 83, 941, 376, 33, 7036, 4672, 3536, 31902, 279, 923, 3089, 612, 251...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 350, 12, 2938, 16, 1906, 67, 2938, 33, 7036, 16, 612, 2218, 2187, 2077, 2218, 2187, 1633, 2218, 2187, 849, 83, 941, 376, 33, 7036, 4672, 3536, 31902, 279, 923, 3089, 612, 251...
if nodeName_ == 'matrix':
if nodeName_ == 'matrix':
def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'matrix': 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') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'matrix', obj_) 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)
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, 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...
self.connect(name_prefix + collection_name, collection_path, action='index', conditions={'method':['GET']}, **options)
self.connect(name_prefix + collection_name, collection_path, action='index', conditions={'method':['GET']}, **options)
def requirements_for(meth): """Returns a new dict to be used for all route creation as the route options""" opts = options.copy() if method != 'any': opts['conditions'] = {'method':[meth.upper()]} return opts
52ae2d9eaabbf5ff009086347bb090d7048fa505 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12081/52ae2d9eaabbf5ff009086347bb090d7048fa505/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8433, 67, 1884, 12, 27305, 4672, 3536, 1356, 279, 394, 2065, 358, 506, 1399, 364, 777, 1946, 6710, 487, 326, 1946, 702, 8395, 1500, 273, 702, 18, 3530, 1435, 309, 707, 480, 296, 2273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8433, 67, 1884, 12, 27305, 4672, 3536, 1356, 279, 394, 2065, 358, 506, 1399, 364, 777, 1946, 6710, 487, 326, 1946, 702, 8395, 1500, 273, 702, 18, 3530, 1435, 309, 707, 480, 296, 2273, ...
bond_registries.append(bond_reg)
def coordination_sequences_sorted(structure, proxies, n_shells=10): scatterers = structure.scatterers() print "sorted_proxies.proxies.size():", \ proxies.sorted_proxies.proxies.size() print "sorted_proxies.sym_proxies.size():", \ proxies.sorted_proxies.sym_proxies.size() if (proxies.sorted_proxies.proxies.size() > 0): print "Mixed proxies" pair_lists_direct = [[] for i in xrange(scatterers.size())] for proxy in proxies.sorted_proxies.proxies: pair_lists_direct[proxy.i_seqs[0]].append(proxy.i_seqs[1]) pair_lists_direct[proxy.i_seqs[1]].append(proxy.i_seqs[0]) pair_lists_sym = [[] for i in xrange(scatterers.size())] for proxy in proxies.sorted_proxies.sym_proxies: pair = proxy.pair pair_lists_sym[pair.i_seq].append(pair) if (pair.j_sym == 0): pair_lists_sym[pair.j_seq].append(pair) assert list(proxies.bond_counts) \ == [len(pair_list_d)+len(pair_list_s) for pair_list_d,pair_list_s in zip(pair_lists_direct,pair_lists_sym)] asu_mappings = proxies.asu_mappings special_ops = [site_symmetry.special_op() for site_symmetry in proxies.site_symmetries] bond_registries = [] term_table = [] for i_seq_pivot in xrange(len(pair_lists_sym)): bond_reg = bond_registry() if ( len(pair_lists_direct[i_seq_pivot]) + len(pair_lists_sym[i_seq_pivot]) == 0): bond_registries.append(bond_reg) term_table.append(flex.size_t()) continue nodes_middle = [] nodes_next = [node( i_seq=i_seq_pivot, rt_mx=sgtbx.rt_mx(), special_ops=special_ops)] if (0): nodes_for_pdb = nodes_next[:] terms = flex.size_t([1]) for i_shell in xrange(1,n_shells+1): nodes_previous = nodes_middle nodes_middle = nodes_next nodes_next = [] for node_m in nodes_middle: for j_seq in pair_lists_direct[node_m.i_seq]: rt_mx_n = node_m.rt_mx rt_mx_i = asu_mappings.get_rt_mx(i_seq=node_m.i_seq, i_sym=0) rt_mx_j = rt_mx_i new_node = node( i_seq=j_seq, rt_mx=rt_mx_n.multiply(rt_mx_i.inverse().multiply(rt_mx_j)), special_ops=special_ops) if ( not find_node(test_node=new_node, node_list=nodes_previous) and not find_node(test_node=new_node, node_list=nodes_middle) and not find_node(test_node=new_node, node_list=nodes_next)): nodes_next.append(new_node) for pair in pair_lists_sym[node_m.i_seq]: rt_mx_n = node_m.rt_mx rt_mx_i = asu_mappings.get_rt_mx(i_seq=pair.i_seq, i_sym=0) rt_mx_j = asu_mappings.get_rt_mx(i_seq=pair.j_seq, i_sym=pair.j_sym) if (pair.i_seq == node_m.i_seq): new_node = node( i_seq=pair.j_seq, rt_mx=rt_mx_n.multiply(rt_mx_i.inverse().multiply(rt_mx_j)), special_ops=special_ops) else: assert pair.j_seq == node_m.i_seq new_node = node( i_seq=pair.i_seq, rt_mx=rt_mx_n.multiply(rt_mx_j.inverse().multiply(rt_mx_i)), special_ops=special_ops) if ( not find_node(test_node=new_node, node_list=nodes_previous) and not find_node(test_node=new_node, node_list=nodes_middle) and not find_node(test_node=new_node, node_list=nodes_next)): nodes_next.append(new_node) terms.append(len(nodes_next)) if (i_shell <= 3): bond_reg.start_next_shell() for n in nodes_next: i_sym = asu_mappings.find_i_sym(i_seq=n.i_seq, rt_mx=n.rt_mx) if (i_sym > 0 or i_sym == 0 and i_seq_pivot < n.i_seq): bond_reg.enter_sym((n.i_seq, i_sym)) bond_registries.append(bond_reg) term_table.append(terms) print scatterers[i_seq_pivot].label, list(terms) return term_table
86e97da2afaaf36c150e53e2d9d7b38e904b7c14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/86e97da2afaaf36c150e53e2d9d7b38e904b7c14/distance_ls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2745, 1735, 67, 17190, 67, 10350, 12, 7627, 16, 13263, 16, 290, 67, 10304, 87, 33, 2163, 4672, 14644, 414, 273, 3695, 18, 31320, 414, 1435, 1172, 315, 10350, 67, 20314, 606, 18, 20314, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2745, 1735, 67, 17190, 67, 10350, 12, 7627, 16, 13263, 16, 290, 67, 10304, 87, 33, 2163, 4672, 14644, 414, 273, 3695, 18, 31320, 414, 1435, 1172, 315, 10350, 67, 20314, 606, 18, 20314, ...
<b>%(numHams)d</b> ham, <b>%(numUnsure)d</b> unsure.
<b>%(numHams)d</b> ham, <b>%(numUnsure)d</b> unsure.<br> Total emails trained: Spam: <b>%(nspam)d</b> Ham: <b>%(nham)d</b><br> <form action='save' method='POST'> <input type='submit' value='Save database'> </form>
def __init__(self, uiPort, socketMap=asyncore.socket_map): Listener.__init__(self, uiPort, UserInterface, (), socketMap=socketMap)
b4db8e8cff9ae2da9617fcf4ec43e2aa8aa06995 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/b4db8e8cff9ae2da9617fcf4ec43e2aa8aa06995/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 2987, 863, 33, 3810, 479, 18, 7814, 67, 1458, 4672, 10652, 16186, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 21369, 16, 1832, 16, 2987, 863...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 2987, 863, 33, 3810, 479, 18, 7814, 67, 1458, 4672, 10652, 16186, 2738, 972, 12, 2890, 16, 5915, 2617, 16, 21369, 16, 1832, 16, 2987, 863...
defer.addCallback(self._add_session, try_relays, call_id)
defer.addCallback(self._add_session, try_relays, call_id, headers)
def send_command(self, command, headers): call_id = None for header in headers: if header.startswith("call_id: "): call_id = header.split("call_id: ", 1)[1] break if call_id is None: raise RelayError("Could not parse call_id") if call_id in self.sessions: relay = self.sessions[call_id] if relay not in self.relays: raise RelayError("Relay for this session (%s) is no longer connected" % relay) return self.relays[relay].send_command(command, headers) elif command == "update": preferred_relay = None for header in headers: if header.startswith("media_relay: "): preferred_relay = header.split("media_relay: ", 1)[1] break if preferred_relay is not None: try_relays = [protocol for protocol in self.relays.itervalues() if protocol.ip == preferred_relay] other_relays = [protocol for protocol in self.relays.itervalues() if protocol.ready and protocol.ip != preferred_relay] random.shuffle(other_relays) try_relays.extend(other_relays) else: try_relays = [protocol for protocol in self.relays.itervalues() if protocol.ready] random.shuffle(try_relays) defer = self._try_next(try_relays, command, headers) defer.addCallback(self._add_session, try_relays, call_id) return defer else: raise RelayError("Non-update command received from OpenSIPS for unknown session")
f7130984f2ca1366867740488342822309d3fb12 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3445/f7130984f2ca1366867740488342822309d3fb12/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3076, 12, 2890, 16, 1296, 16, 1607, 4672, 745, 67, 350, 273, 599, 364, 1446, 316, 1607, 30, 309, 1446, 18, 17514, 1918, 2932, 1991, 67, 350, 30, 315, 4672, 745, 67, 350, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3076, 12, 2890, 16, 1296, 16, 1607, 4672, 745, 67, 350, 273, 599, 364, 1446, 316, 1607, 30, 309, 1446, 18, 17514, 1918, 2932, 1991, 67, 350, 30, 315, 4672, 745, 67, 350, 27...
Move the scrap/damaged product into scrap location
Move the scrap/damaged product into scrap location
def action_scrap(self, cr, uid, ids, quantity, location_id, context=None): ''' Move the scrap/damaged product into scrap location @ param cr: the database cursor @ param uid: the user id @ param ids: ids of stock move object to be scraped @ param quantity : specify scrap qty @ param location_id : specify scrap location @ param context: context arguments
18be8e52469417aa8e0ec02e033c0942d0ad805f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/18be8e52469417aa8e0ec02e033c0942d0ad805f/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 1017, 1266, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10457, 16, 2117, 67, 350, 16, 819, 33, 7036, 4672, 9163, 9933, 326, 888, 1266, 19, 72, 301, 11349, 3017, 1368, 888, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 1017, 1266, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10457, 16, 2117, 67, 350, 16, 819, 33, 7036, 4672, 9163, 9933, 326, 888, 1266, 19, 72, 301, 11349, 3017, 1368, 888, ...
unpickle_persistent_loader. Used by explain_pickle. EXAMPLES:
unpickle_persistent_loader. Used by ``explain_pickle``. EXAMPLES::
def unpickle_persistent(s): r""" Takes an integer index and returns the persistent object with that index; works by calling whatever callable is stored in unpickle_persistent_loader. Used by explain_pickle. EXAMPLES: sage: import sage.misc.explain_pickle sage: sage.misc.explain_pickle.unpickle_persistent_loader = lambda n: n+7 sage: unpickle_persistent(35) 42 """ return unpickle_persistent_loader(s)
03555b4381371de7688c2f08f833898ba9658b7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/03555b4381371de7688c2f08f833898ba9658b7b/explain_pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 20847, 67, 19393, 12, 87, 4672, 436, 8395, 23004, 392, 3571, 770, 471, 1135, 326, 9195, 733, 598, 716, 770, 31, 6330, 635, 4440, 15098, 4140, 353, 4041, 316, 640, 20847, 67, 19393, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 20847, 67, 19393, 12, 87, 4672, 436, 8395, 23004, 392, 3571, 770, 471, 1135, 326, 9195, 733, 598, 716, 770, 31, 6330, 635, 4440, 15098, 4140, 353, 4041, 316, 640, 20847, 67, 19393, ...
return networkx.cliques.node_clique_number(self._nxg, nodes, with_labels, cliques) def cliques_number_of(self, nodes=None, cliques=None, with_labels=False):
return networkx.cliques.node_clique_number(self._nxg, vertices, with_labels, cliques) def cliques_number_of(self, vertices=None, cliques=None, with_labels=False):
def cliques_node_clique_number(self, nodes=None, with_labels=False, cliques=None): r""" Returns a list of sizes of the largest maximal cliques containing each node. (Returns a single value if only one input node). Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. (See examples below). INPUT: -- nodes - the nodes to inspect (default is entire graph) -- with_labels - (boolean) default False returns list as above True returns a dictionary keyed by node labels -- cliques - list of cliques (if already computed) EXAMPLES: sage: C = Graph('DJ{') sage: C.cliques_node_clique_number() [2, 4, 4, 4, 4] sage: E = C.cliques() sage: E [[4, 1, 2, 3], [4, 0]] sage: C.cliques_node_clique_number(cliques=E) [2, 4, 4, 4, 4] sage: F = graphs.Grid2dGraph(2,3) sage: F.cliques_node_clique_number(with_labels=True) {(0, 1): 2, (1, 2): 2, (0, 0): 2, (1, 1): 2, (1, 0): 2, (0, 2): 2} sage: F.cliques_node_clique_number(nodes=[(0, 1), (1, 2)]) [2, 2] sage: D = DiGraph({0:[1,2,3], 1:[2], 3:[0,1]}) sage.: D.show(figsize=[2,2]) sage: D.cliques_node_clique_number() Traceback (most recent call last): ... TypeError: Function defined for undirected graphs only. See documentation. sage: D = D.to_undirected() sage.: D.show(figsize=[2,2]) sage: D.cliques_node_clique_number() [3, 3, 3, 3] """ if (self.is_directed()): raise TypeError('Function defined for undirected graphs only. See documentation.') else: import networkx.cliques return networkx.cliques.node_clique_number(self._nxg, nodes, with_labels, cliques)
a520fa15cff86fbbd1335f8b6f9d36203c74d574 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a520fa15cff86fbbd1335f8b6f9d36203c74d574/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 2159, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 2199, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, 2860, 279, 666, 434, 8453, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 2159, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 2199, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, 2860, 279, 666, 434, 8453, 434, ...
already_set.append(params)
already_inserted.append(params)
def createNewInventory(self, hostname, inventory, date): """ Add a new inventory for a computer """ # TODO : check that inventory is not empty.... k = 0 for i in map(lambda x: len(inventory[x]), inventory): k = i+k if k == 0: return False
43cd6be4b6b5fa6754c3b5889965bb0d607c16a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/43cd6be4b6b5fa6754c3b5889965bb0d607c16a7/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15291, 15059, 12, 2890, 16, 5199, 16, 13086, 16, 1509, 4672, 3536, 1436, 279, 394, 13086, 364, 279, 26579, 3536, 468, 2660, 294, 866, 716, 13086, 353, 486, 1008, 6265, 417, 273, 374, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15291, 15059, 12, 2890, 16, 5199, 16, 13086, 16, 1509, 4672, 3536, 1436, 279, 394, 13086, 364, 279, 26579, 3536, 468, 2660, 294, 866, 716, 13086, 353, 486, 1008, 6265, 417, 273, 374, 364...
return message_dialog(parent,
return self.message_dialog(parent,
def ask_overwrite(self, parent, path): return message_dialog(parent, "A file named '%s' already exists. Overwrite?" % path, "Confirm Overwrite", wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION) == wx.ID_YES
51abfbdf0942b8973b0991dc986f01b440875681 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11441/51abfbdf0942b8973b0991dc986f01b440875681/dialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 67, 19274, 12, 2890, 16, 982, 16, 589, 4672, 327, 365, 18, 2150, 67, 12730, 12, 2938, 16, 315, 37, 585, 4141, 1995, 87, 11, 1818, 1704, 18, 29747, 7225, 738, 589, 16, 315, 1126...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 67, 19274, 12, 2890, 16, 982, 16, 589, 4672, 327, 365, 18, 2150, 67, 12730, 12, 2938, 16, 315, 37, 585, 4141, 1995, 87, 11, 1818, 1704, 18, 29747, 7225, 738, 589, 16, 315, 1126...
vals_line['general_account_id'] = a vals_line['journal_id'] = emp.journal_id.id
vals_line['general_account_id'] = result['general_account_id'] vals_line['journal_id'] = result['journal_id']
def create(self, cr, uid, vals, *args, **kwargs):
8fd383c54afd7f653a6b7073c946ccc6563c6050 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/8fd383c54afd7f653a6b7073c946ccc6563c6050/project_timesheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 380, 1968, 16, 2826, 4333, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 5773, 16, 380, 1968, 16, 2826, 4333, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def declareInstanceRunning( self, imageName, uniqueID, publicIP, privateIP ):
def declareInstanceRunning( self, imageName, uniqueID, publicIP, privateIP = "" ):
def declareInstanceRunning( self, imageName, uniqueID, publicIP, privateIP ): """ Declares an instance Running and sets its associated info (uniqueID, publicIP, privateIP) Returns S_ERROR if: - instanceName does not have a "Submitted" entry - uniqueID is not unique """ instanceID = self.__getInstanceID( uniqueID ) if instanceID['OK']: return DIRAC.S_ERROR( 'UniqueID is not unique: %s' % uniqueID )
058a2c6f50a34df91a59df183e0cd9d069640dfa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12038/058a2c6f50a34df91a59df183e0cd9d069640dfa/VirtualMachineDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14196, 1442, 7051, 12, 365, 16, 29842, 16, 3089, 734, 16, 1071, 2579, 16, 3238, 2579, 273, 1408, 262, 30, 3536, 16110, 4807, 392, 791, 20480, 471, 1678, 2097, 3627, 1123, 261, 6270, 734,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14196, 1442, 7051, 12, 365, 16, 29842, 16, 3089, 734, 16, 1071, 2579, 16, 3238, 2579, 273, 1408, 262, 30, 3536, 16110, 4807, 392, 791, 20480, 471, 1678, 2097, 3627, 1123, 261, 6270, 734,...
encodings = [self.options.input_encoding, 'utf-8']
encodings = [self.settings.input_encoding, 'utf-8']
def decode(self, data): """ Decode a string, `data`, heuristically. Raise UnicodeError if unsuccessful.
4dc05f6313b31ed168d03606d78b896f61e0699c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/4dc05f6313b31ed168d03606d78b896f61e0699c/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 2890, 16, 501, 4672, 3536, 6209, 279, 533, 16, 1375, 892, 9191, 25833, 1230, 18, 20539, 9633, 668, 309, 29411, 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, 2495, 12, 2890, 16, 501, 4672, 3536, 6209, 279, 533, 16, 1375, 892, 9191, 25833, 1230, 18, 20539, 9633, 668, 309, 29411, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
@app.route('/rsvp') def rsvp():
@app.route('/rsvp/<edition>') def rsvp(edition):
def logout(): g.user = None del session['userid'] return redirect(url_for('index'), code=303)
f7cc649d162305e0ce6ef8008f6f776172e0d077 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12083/f7cc649d162305e0ce6ef8008f6f776172e0d077/website.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12735, 13332, 314, 18, 1355, 273, 599, 1464, 1339, 3292, 8339, 3546, 327, 3136, 12, 718, 67, 1884, 2668, 1615, 19899, 981, 33, 23, 4630, 13, 282, 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, 12735, 13332, 314, 18, 1355, 273, 599, 1464, 1339, 3292, 8339, 3546, 327, 3136, 12, 718, 67, 1884, 2668, 1615, 19899, 981, 33, 23, 4630, 13, 282, 2, -100, -100, -100, -100, -100, -100, ...
except SystemError: continue
except SystemError, e: if e[0] == 3: continue curr_affinity == None
def move_threads_to_cpu(cpus, pid_list, set_affinity_warning = None, spread = False): changed = False ps = procfs.pidstats() cpu_idx = 0 nr_cpus = len(cpus) new_affinity = cpus last_cpu = max(cpus) + 1 for pid in pid_list: if spread: new_affinity = [cpus[cpu_idx]] cpu_idx += 1 if cpu_idx == nr_cpus: cpu_idx = 0 try: try: curr_affinity = schedutils.get_affinity(pid) except SystemError: # (3, 'No such process') continue if set(curr_affinity) != set(new_affinity): try: schedutils.set_affinity(pid, new_affinity) curr_affinity = schedutils.get_affinity(pid) except SystemError: # (3, 'No such process') continue if set(curr_affinity) == set(new_affinity): changed = True if is_hardirq_handler(ps, pid): try: irq = int(ps[pid]["stat"]["comm"][4:]) bitmasklist = procfs.hexbitmask(new_affinity, last_cpu) set_irq_affinity(irq, bitmasklist) except: pass elif set_affinity_warning: set_affinity_warning(pid, new_affinity) else: print "move_threads_to_cpu: %s " % \ (_("could not change %(pid)d affinity to %(new_affinity)s") % \ {'pid':pid, 'new_affinity':new_affinity}) # See if this is the thread group leader if not ps.has_key(pid): continue threads = procfs.pidstats("/proc/%d/task" % pid) for tid in threads.keys(): try: curr_affinity = schedutils.get_affinity(tid) except SystemError: # (3, 'No such process') continue if set(curr_affinity) != set(new_affinity): try: schedutils.set_affinity(tid, new_affinity) curr_affinity = schedutils.get_affinity(tid) except SystemError: # (3, 'No such process') continue if set(curr_affinity) == set(new_affinity): changed = True elif set_affinity_warning: set_affinity_warning(tid, new_affinity) else: print "move_threads_to_cpu: %s " % \ (_("could not change %(pid)d affinity to %(new_affinity)s") % \ {'pid':pid, 'new_affinity':new_affinity}) except SystemError: # process died continue return changed
7d4f25878d6025883343aeed9002c1a4c21547d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3406/7d4f25878d6025883343aeed9002c1a4c21547d3/tuna.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 12495, 67, 869, 67, 11447, 12, 20696, 16, 4231, 67, 1098, 16, 444, 67, 1727, 7850, 67, 8551, 273, 599, 16, 15103, 273, 1083, 4672, 3550, 273, 1083, 225, 4250, 273, 5418, 2556...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 12495, 67, 869, 67, 11447, 12, 20696, 16, 4231, 67, 1098, 16, 444, 67, 1727, 7850, 67, 8551, 273, 599, 16, 15103, 273, 1083, 4672, 3550, 273, 1083, 225, 4250, 273, 5418, 2556...
'--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'end.py') ]
'--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'end.py'),]
def runStartupPerfTests(options, timer, largeData=False, repeat=3, logger=log): """ Run startup time tests. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', repeat=1) Creating repository for startup time tests /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log /.../RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', largeData=True) Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --restore=test_profile/__repository__.001 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup_with_large_calendar 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 False >>> options.tbox = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py Startup 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 <BLANKLINE> Startup [#TINDERBOX# Status = PASSED] OSAF_QA: Startup | ... | 0.00 #TINDERBOX# Testname = Startup #TINDERBOX# Status = PASSED #TINDERBOX# Time elapsed = 0.00 (seconds) - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ if repeat < 3: repeat = 3 # You can't get an accurate number otherwise # Create test repo if options.verbose: log('Creating repository for startup time tests') cmd = [ options.runchandler['release'], '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'quit.py') ] if not largeData: cmd += ['--create'] timeout = 180 name = 'Startup' else: cmd += ['--restore=%s' % os.path.join(options.profileDir, '__repository__.001')] timeout = 600 name = 'Startup_with_large_calendar' if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=timeout, logger=logger) if result != 0: log('***Error exit code=%d, creating %s repository' % (result, name)) failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) # Time startup values = [] timeLog = os.path.join(options.profileDir, 'time.log') if not options.dryrun: if os.path.isfile(timeLog): os.remove(timeLog) cmd = [ timer, r'--format=%e', '-o', timeLog, options.runchandler['release'], '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'end.py') ] if options.params: cmd += [ options.params ] if options.verbose: log(' '.join(cmd)) log(name.ljust(33), newline=' ') for _x in range(repeat): if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=180, logger=logger) if result == 0: if options.dryrun: line = '0.0' else: line = open(timeLog).readline()[:-1] try: value = float(line) except ValueError, e: log('| %s' % str(e)) failedTests.append(name) return True log(('%02.2f' % value).rjust(6), newline=' ') values.append(value) else: log('| failed') failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) else: values.sort() value = values[repeat/2] log(' | ', newline='') log(('%02.2f' % value).rjust(6) , newline='') log(u' \u00B1 '.encode('utf8'), newline='') # Unicode PLUS-MINUS SIGN log(('%02.2f' % stddev(values)).rjust(6)) if options.tbox: revision = getattr(build_lib.loadModuleFromFile(os.path.join(options.chandlerHome, 'version.py'), 'vmodule'), 'revision', '') log('') log('%s [#TINDERBOX# Status = PASSED]' % name) log('OSAF_QA: %s | %s | %02.2f' % (name, revision, value)) log('#TINDERBOX# Testname = %s' % name) log('#TINDERBOX# Status = PASSED') log('#TINDERBOX# Time elapsed = %02.2f (seconds)' % value) if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) return False
134ce2a6ff32b988db479ade6fcf70a08aac23f5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/134ce2a6ff32b988db479ade6fcf70a08aac23f5/rt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 22178, 22016, 14650, 12, 2116, 16, 5441, 16, 7876, 751, 33, 8381, 16, 7666, 33, 23, 16, 1194, 33, 1330, 4672, 3536, 1939, 11850, 813, 7434, 18, 225, 4080, 702, 273, 1109, 1320, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22178, 22016, 14650, 12, 2116, 16, 5441, 16, 7876, 751, 33, 8381, 16, 7666, 33, 23, 16, 1194, 33, 1330, 4672, 3536, 1939, 11850, 813, 7434, 18, 225, 4080, 702, 273, 1109, 1320, 1...
svg,boxes = drawGraph()
svg,bins = drawGraph()
def renderToPNG(request): import cairo if request.method == 'POST': # If the form has been submitted form = PlotForm(request.POST) # A form bound to the POST data if form.is_valid(): # All validation rules pass data = form.cleaned_data svg, boxes = drawGraph( data['x'], data['y'], data['x1'], data['y1'], data['attribute'], data['xProperty'], data['yProperty'], data['reference'], data['residue'], data['xBin'], data['yBin']) else: form = PlotForm() # An unbound form svg,boxes = drawGraph() width = 500 height = 500 response = HttpResponse(mimetype="image/png") response['Content-Disposition'] = 'attachment; filename="plot.png"' surface = cairo.ImageSurface (cairo.FORMAT_ARGB32, width, height) ctx = cairo.Context (surface) for rec in svg.rects: rect(rec, ctx) for action in svg.lines: line(action, ctx) surface.write_to_png(response) return response
ae7b5044f6598967bf2329294cb36e9a4c957da8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6163/ae7b5044f6598967bf2329294cb36e9a4c957da8/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 774, 23092, 12, 2293, 4672, 1930, 14503, 225, 309, 590, 18, 2039, 422, 296, 3798, 4278, 468, 971, 326, 646, 711, 2118, 9638, 646, 273, 15211, 1204, 12, 2293, 18, 3798, 13, 468, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 774, 23092, 12, 2293, 4672, 1930, 14503, 225, 309, 590, 18, 2039, 422, 296, 3798, 4278, 468, 971, 326, 646, 711, 2118, 9638, 646, 273, 15211, 1204, 12, 2293, 18, 3798, 13, 468, 4...
return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2)." def _precompute(self, how_many=50): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,4,5) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A015551(SloaneSequence): r""" Linear 2nd order recurrence, $a(0)=0$, $a(1)=1$ and $a(n) = 4 a(n-1) + 5 a(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A015531;a Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2). sage: a(0) 0 sage: a(1) 1 sage: a(2) 4 sage: a.offset 0 sage: a(8) 65104 sage: a(60) 144560289664733924534327040115992228190104 sage: a.list(9) [0, 1, 4, 21, 104, 521, 2604, 13021, 65104] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self): SloaneSequence.__init__(self, offset=0) self._b = [] self._precompute(2) def _repr_(self): return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2)." def _precompute(self, how_many=50): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,4,5) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n]
""" EXAMPLES: sage: sloane.A015551._repr_() 'Linear 2nd order recurrence, a(n) = 6 a(n-1) + 5 a(n-2).' """ return "Linear 2nd order recurrence, a(n) = 6 a(n-1) + 5 a(n-2)."
def _repr_(self): return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2)."
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 327, 315, 15982, 576, 4880, 1353, 25939, 16, 279, 12, 82, 13, 273, 1059, 279, 12, 82, 17, 21, 13, 397, 1381, 279, 12, 82, 17, 22, 14944, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 327, 315, 15982, 576, 4880, 1353, 25939, 16, 279, 12, 82, 13, 273, 1059, 279, 12, 82, 17, 21, 13, 397, 1381, 279, 12, 82, 17, 22, 14944, 2, -100, -1...
sage: sr = mq.SR(2,1,1,4)
sage: sr = mq.SR(2, 1, 1, 4)
def ring(self, order=None): """ Construct a ring as a base ring for the polynomial system.
26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9221, 12, 2890, 16, 1353, 33, 7036, 4672, 3536, 14291, 279, 9221, 487, 279, 1026, 9221, 364, 326, 16991, 2619, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9221, 12, 2890, 16, 1353, 33, 7036, 4672, 3536, 14291, 279, 9221, 487, 279, 1026, 9221, 364, 326, 16991, 2619, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self._check_bye()
if name != 'LOGOUT': self._check_bye()
def _command_complete(self, name, tag): self._check_bye() try: typ, data = self._get_tagged_response(tag) except self.abort as val: raise self.abort('command: %s => %s' % (name, val)) except self.error as val: raise self.error('command: %s => %s' % (name, val)) self._check_bye() if typ == 'BAD': raise self.error('%s command error: %s %s' % (name, typ, data)) return typ, data
e87875bfad3ebe18bf87ebd5cbe3db493c34dc1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/e87875bfad3ebe18bf87ebd5cbe3db493c34dc1f/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3076, 67, 6226, 12, 2890, 16, 508, 16, 1047, 4672, 309, 508, 480, 296, 4842, 5069, 4278, 365, 6315, 1893, 67, 1637, 73, 1435, 775, 30, 3815, 16, 501, 273, 365, 6315, 588, 67, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3076, 67, 6226, 12, 2890, 16, 508, 16, 1047, 4672, 309, 508, 480, 296, 4842, 5069, 4278, 365, 6315, 1893, 67, 1637, 73, 1435, 775, 30, 3815, 16, 501, 273, 365, 6315, 588, 67, 23...
return Errors.YumBaseError, "Not installing key"
raise Errors.YumBaseError, "Not installing key"
def getKeyForPackage(self, po, askcb = None): """Retrieve a key for a package. If needed, prompt for if the key should be imported using askcb. @po: Package object to retrieve the key of. @askcb: Callback function to use for asking for verification. Takes arguments of the po, the userid for the key, and the keyid.""" repo = self.repos.getRepo(po.repoid) keyurls = repo.gpgkey key_installed = False
89e8c8752c4a97f9805ea1c16bb677df6db4de3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/89e8c8752c4a97f9805ea1c16bb677df6db4de3e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 1290, 2261, 12, 2890, 16, 8275, 16, 6827, 7358, 273, 599, 4672, 3536, 5767, 279, 498, 364, 279, 2181, 18, 225, 971, 3577, 16, 6866, 364, 309, 326, 498, 1410, 506, 9101, 1450, 682...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 1290, 2261, 12, 2890, 16, 8275, 16, 6827, 7358, 273, 599, 4672, 3536, 5767, 279, 498, 364, 279, 2181, 18, 225, 971, 3577, 16, 6866, 364, 309, 326, 498, 1410, 506, 9101, 1450, 682...
display_cell.innerHTML = prettyPrintOne(t);
// This is nasty, but is seems like the only way to get // the notation R.<x,y> = blah that we use in SAGE to not // result in R. = blah after highlighting. t = t.replace('<','<span class=pun><</span>') display_cell.innerHTML = prettyPrintOne(t)
def javascript(): s = async_lib() s+= r"""
00e12b47d15c8470208df696a9cc9f03342c4356 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/00e12b47d15c8470208df696a9cc9f03342c4356/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 272, 273, 4326, 67, 2941, 1435, 272, 15, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 272, 273, 4326, 67, 2941, 1435, 272, 15, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if len(line) >= 3: if (line[:3] == '"""' or line[:3] == "'''"): if line[-3:] == line[:3]: continue incomment = line[:3] continue if line[0] != '
if brackets <= 0 and line[0] not in (' break
def checkline(self, filename, lineno): """Return line number of first line at or after input argument such that if the input points to a 'def', the returned line number is the first non-blank/non-comment line to follow. If the input points to a blank or comment line, return 0. At end of file, also return 0."""
323f97436d8fb14c49eb896cfe36a491b673ec1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/323f97436d8fb14c49eb896cfe36a491b673ec1f/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1369, 12, 2890, 16, 1544, 16, 7586, 4672, 3536, 990, 980, 1300, 434, 1122, 980, 622, 578, 1839, 810, 1237, 4123, 716, 309, 326, 810, 3143, 358, 279, 296, 536, 2187, 326, 2106, 980...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1369, 12, 2890, 16, 1544, 16, 7586, 4672, 3536, 990, 980, 1300, 434, 1122, 980, 622, 578, 1839, 810, 1237, 4123, 716, 309, 326, 810, 3143, 358, 279, 296, 536, 2187, 326, 2106, 980...
show_hitcounts = int(request.form.get('hitcounts', [0])[0]) != 0 show_general = int(request.form.get('general', [0])[0]) != 0
try: show_hitcounts = int(request.form.get('hitcounts', [0])[0]) != 0 except ValueError: show_hitcounts = False try: show_general = int(request.form.get('general', [0])[0]) != 0 except ValueError: show_general = False
def render_action(text, query, **kw): kw.update(dict(rel='nofollow')) return page.link_to(request, text, querystr=query, **kw)
7bfbc5de61379a50038d5b4e148981f04cb8119c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/7bfbc5de61379a50038d5b4e148981f04cb8119c/info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 1128, 12, 955, 16, 843, 16, 2826, 9987, 4672, 5323, 18, 2725, 12, 1576, 12, 2878, 2218, 82, 792, 2392, 26112, 327, 1363, 18, 1232, 67, 869, 12, 2293, 16, 977, 16, 843, 701,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 67, 1128, 12, 955, 16, 843, 16, 2826, 9987, 4672, 5323, 18, 2725, 12, 1576, 12, 2878, 2218, 82, 792, 2392, 26112, 327, 1363, 18, 1232, 67, 869, 12, 2293, 16, 977, 16, 843, 701,...
oscmd("rpm -E '{%_arch}' > rpmarch.txt") arch=ReadFile("rpmarch.txt") oscmd("rm -rf "+arch)
def MakeInstallerLinux(): import compileall PYTHONV=os.path.basename(PYTHONSDK) if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz rpmarch.txt panda3d.spec") oscmd("mkdir -p linuxroot/usr/bin") oscmd("mkdir -p linuxroot/usr/include") oscmd("mkdir -p linuxroot/usr/share/panda3d") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages") oscmd("mkdir -p linuxroot/etc/ld.so.conf.d") oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc") oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc") oscmd("cp --recursive built/include linuxroot/usr/include/panda3d") oscmd("cp --recursive direct linuxroot/usr/share/panda3d/direct") oscmd("cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac") oscmd("cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw") oscmd("cp built/direct/__init__.py linuxroot/usr/share/panda3d/direct/__init__.py") oscmd("cp --recursive SceneEditor linuxroot/usr/share/panda3d/SceneEditor") oscmd("cp --recursive built/models linuxroot/usr/share/panda3d/models") oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples") oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE") oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes") oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("cp built/bin/* linuxroot/usr/bin/") for base in os.listdir("built/lib"): oscmd("ln -sf /usr/lib/"+base+" linuxroot/usr/lib/"+PYTHONV+"/lib-dynload/"+base) oscmd("cp built/lib/"+base+" linuxroot/usr/lib/"+base) for base in os.listdir("linuxroot/usr/share/panda3d/direct/src"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("linuxroot/usr/share/panda3d/direct/src/"+base) compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw") compileall.compile_dir("linuxroot/usr/share/panda3d/SceneEditor") oscmd("chmod -R 555 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/dpkg-deb")): txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV) oscmd("mkdir -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_i386.deb") oscmd("chmod -R 755 linuxroot") if (os.path.exists("/usr/bin/rpmbuild")): oscmd("rpm -E '{%_arch}' > rpmarch.txt") arch=ReadFile("rpmarch.txt") oscmd("rm -rf "+arch) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec") if (os.path.exists(arch+"/panda3d-"+VERSION+"-1."+arch+".rpm")): oscmd("mv "+arch+"/panda3d-"+VERSION+"-1."+arch+".rpm .") oscmd("rm -rf rpmarch.txt "+arch) oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec")
9c6956b3856f36322acea26128d9cc5a7a883428 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/9c6956b3856f36322acea26128d9cc5a7a883428/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 18678, 19475, 13332, 1930, 4074, 454, 12191, 20131, 58, 33, 538, 18, 803, 18, 13909, 12, 16235, 20131, 22625, 13, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20132, 3085, 6, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 18678, 19475, 13332, 1930, 4074, 454, 12191, 20131, 58, 33, 538, 18, 803, 18, 13909, 12, 16235, 20131, 22625, 13, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20132, 3085, 6, 3719,...
os.waitpid(child_pid, 0)
child.wait()
def wait(self, child_pid): """Wait for child_pid to finish, ignoring EINTR.""" while True: try: os.waitpid(child_pid, 0) return except OSError as e: if e.errno == errno.ECHILD: return if e.errno != errno.EINTR: raise
a7bc02c83a29a079dc01f5ef1401989921f2f5e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a7bc02c83a29a079dc01f5ef1401989921f2f5e6/test_signal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 12, 2890, 16, 1151, 67, 6610, 4672, 3536, 5480, 364, 1151, 67, 6610, 358, 4076, 16, 14398, 512, 3217, 54, 12123, 1323, 1053, 30, 775, 30, 1151, 18, 7048, 1435, 327, 1335, 10002, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 12, 2890, 16, 1151, 67, 6610, 4672, 3536, 5480, 364, 1151, 67, 6610, 358, 4076, 16, 14398, 512, 3217, 54, 12123, 1323, 1053, 30, 775, 30, 1151, 18, 7048, 1435, 327, 1335, 10002, ...
@param top: Whether this is the navigation bar at the top of the page. @type top: C{boolean} """
@param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. """
def _write_navbar(self, public, private, where=None, top=0): """ @return: The HTML code for a navigation bar on the given type of page. The navigation bar typically looks like:: [ Package Module Class Tree Index Help ] @rtype: C{string} @param where: An identifier indicating what page we're creating a navigation bar for. This is either a UID (for an object documentation page); or one of the strings C{'tree'}, C{'index'}, and C{'help'}. @type where: C{UID} or C{string} @param top: Whether this is the navigation bar at the top of the page. @type top: C{boolean} """ sio = StringIO() sio.write(self._start_of('Navbar')) sio.write('<table class="navbar" border="0" width="100%"') sio.write(' cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">\n') sio.write(' <tr valign="center">\n')
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 11589, 3215, 12, 2890, 16, 1071, 16, 3238, 16, 1625, 33, 7036, 16, 1760, 33, 20, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 11589, 3215, 12, 2890, 16, 1071, 16, 3238, 16, 1625, 33, 7036, 16, 1760, 33, 20, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, ...
print "ping", ip
def check(self, ip): "Check if an IP or network is contained in this network address" print "ping", ip if isinstance(ip, NetAddress): return self.check(ip.start) and self.check(ip.end) if isinstance(ip, basestring): ip = self.inet_aton(ip) print "pong" if ip is None: return False if ip & self.mask == self.net: return True else: return False
bd41a1b2904f09222a2c96d40bdea64f0dcf88d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/bd41a1b2904f09222a2c96d40bdea64f0dcf88d9/stun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 2359, 4672, 315, 1564, 309, 392, 2971, 578, 2483, 353, 7542, 316, 333, 2483, 1758, 6, 309, 1549, 12, 625, 16, 8503, 1887, 4672, 327, 365, 18, 1893, 12, 625, 18, 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, 866, 12, 2890, 16, 2359, 4672, 315, 1564, 309, 392, 2971, 578, 2483, 353, 7542, 316, 333, 2483, 1758, 6, 309, 1549, 12, 625, 16, 8503, 1887, 4672, 327, 365, 18, 1893, 12, 625, 18, 19...
self.failUnless(schema.reset().check(), "check() failed")
self.failUnless(self.view.check(), "check() failed")
def tearDown(self): self.failUnless(schema.reset().check(), "check() failed")
0ea0ca28e750fa768856f2fe486df9f55a5d4d6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0ea0ca28e750fa768856f2fe486df9f55a5d4d6f/TestCollections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 12, 4821, 18, 6208, 7675, 1893, 9334, 315, 1893, 1435, 2535, 7923, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 12, 4821, 18, 6208, 7675, 1893, 9334, 315, 1893, 1435, 2535, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if source_port in self.pending_streams: router = self.pending_streams[source_port]
with self.send_pending_lock: if source_port in self.pending_streams: router = self.pending_streams[source_port]
def stream_status_event(self, event): if event.status == "NEW": if event.target_host == config.test_host: portsep = event.source_addr.rfind(':') source_port = int(event.source_addr[portsep+1:]) # Check if this stream is one of ours (TODO: there's no # reason AFAIK that it shouldn't be one we initiated # if event.target_host is us). if source_port in self.pending_streams: router = self.pending_streams[source_port] #log.debug("Event (%s, %d): New target stream (sport %d).", # router.nickname, event.target_port, source_port) try: log.debug("Event (%s, %d): Attaching stream %d to circuit %d.", router.nickname, event.target_port, event.strm_id, router.circuit) # And attach. self.conn.attach_stream(event.strm_id, router.circuit)
b2b4de13f8ebfc38c0ddc8e30e7ce997d7650acc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/b2b4de13f8ebfc38c0ddc8e30e7ce997d7650acc/torbel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1407, 67, 2327, 67, 2575, 12, 2890, 16, 871, 4672, 309, 871, 18, 2327, 422, 315, 12917, 6877, 309, 871, 18, 3299, 67, 2564, 422, 642, 18, 3813, 67, 2564, 30, 1756, 10814, 273, 871, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1407, 67, 2327, 67, 2575, 12, 2890, 16, 871, 4672, 309, 871, 18, 2327, 422, 315, 12917, 6877, 309, 871, 18, 3299, 67, 2564, 422, 642, 18, 3813, 67, 2564, 30, 1756, 10814, 273, 871, 1...
""" This is because I got sick of having to debug issues due to the fact that I typed one or the other. """ return get_posts_by_category(parser,token)
""" This is because I got sick of having to debug issues due to the fact that I typed one or the other. """ return get_posts_by_category(parser,token)
def get_news_by_category(parser,token): """ This is because I got sick of having to debug issues due to the fact that I typed one or the other. """ return get_posts_by_category(parser,token)
2d3c8ed0ed7c2f6a9f8202b37fc595f1f8bfb7d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2484/2d3c8ed0ed7c2f6a9f8202b37fc595f1f8bfb7d6/news_tags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 18443, 67, 1637, 67, 4743, 12, 4288, 16, 2316, 4672, 3536, 1220, 353, 2724, 467, 2363, 272, 1200, 434, 7999, 358, 1198, 8296, 6541, 358, 326, 5410, 716, 467, 9092, 1245, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 18443, 67, 1637, 67, 4743, 12, 4288, 16, 2316, 4672, 3536, 1220, 353, 2724, 467, 2363, 272, 1200, 434, 7999, 358, 1198, 8296, 6541, 358, 326, 5410, 716, 467, 9092, 1245, 578, ...
try: val = opts[o] except KeyError: continue else: if val == '': continue baseui.setconfig("web", o, val) if repo and repo.ui != baseui: repo.ui.setconfig("web", o, val)
val = opts.get(o, '') if val is None or val == '': continue baseui.setconfig("web", o, val) if repo and repo.ui != baseui: repo.ui.setconfig("web", o, val)
def serve(ui, repo, **opts): """export the repository via HTTP Start a local HTTP repository browser and pull server. By default, the server logs accesses to stdout and errors to stderr. Use the -A/--accesslog and -E/--errorlog options to log to files. To have the server choose a free port number to listen on, specify a port number of 0; in this case, the server will print the port number it uses. """ if opts["stdio"]: if repo is None: raise error.RepoError(_("There is no Mercurial repository here" " (.hg not found)")) s = sshserver.sshserver(ui, repo) s.serve_forever() baseui = repo and repo.baseui or ui optlist = ("name templates style address port prefix ipv6" " accesslog errorlog webdir_conf certificate encoding") for o in optlist.split(): try: val = opts[o] except KeyError: continue else: if val == '': continue baseui.setconfig("web", o, val) if repo and repo.ui != baseui: repo.ui.setconfig("web", o, val) if repo is None and not ui.config("web", "webdir_conf"): raise error.RepoError(_("There is no Mercurial repository here" " (.hg not found)")) class service(object): def init(self): util.set_signal_handler() self.httpd = server.create_server(baseui, repo) if opts['port'] and not ui.verbose: return if self.httpd.prefix: prefix = self.httpd.prefix.strip('/') + '/' else: prefix = '' port = ':%d' % self.httpd.port if port == ':80': port = '' bindaddr = self.httpd.addr if bindaddr == '0.0.0.0': bindaddr = '*' elif ':' in bindaddr: # IPv6 bindaddr = '[%s]' % bindaddr fqaddr = self.httpd.fqaddr if ':' in fqaddr: fqaddr = '[%s]' % fqaddr if opts['port']: write = ui.status else: write = ui.write write(_('listening at http://%s%s/%s (bound to %s:%d)\n') % (fqaddr, port, prefix, bindaddr, self.httpd.port)) def run(self): self.httpd.serve_forever() service = service() cmdutil.service(opts, initfn=service.init, runfn=service.run)
62b8b64ec2f42cc28c60be40b895940ef8a86307 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/62b8b64ec2f42cc28c60be40b895940ef8a86307/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 12, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 6530, 326, 3352, 3970, 2239, 225, 3603, 279, 1191, 2239, 3352, 4748, 471, 6892, 1438, 18, 225, 2525, 805, 16, 326, 1438, 5963, 2006...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12175, 12, 4881, 16, 3538, 16, 2826, 4952, 4672, 3536, 6530, 326, 3352, 3970, 2239, 225, 3603, 279, 1191, 2239, 3352, 4748, 471, 6892, 1438, 18, 225, 2525, 805, 16, 326, 1438, 5963, 2006...
except:
except ExpatError, msg:
def Index(self): try: xdata = XML(self.data) except: syslog(LOG_ERR, "Failed to parse %s"%(self.name)) return self.store = {} for e in xdata.getchildren(): if e.tag not in self.__containers__: self.StoreRecord(('Global','all'), e) else: m = (e.tag, e.attrib['name']) for entry in e.getchildren(): self.StoreRecord(m, entry) # now to build the __provides__ table self.__provides__ = {} for key in self.store.keys(): self.__provides__[key] = {} for j in self.store[key].keys(): self.__provides__[key][j] = self.FetchRecord # also need to sort all leaf node lists self.store[key][j].sort(self.Sort)
031ad9ffba438e5c9a32a212c15bc9cc88ee0a25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/031ad9ffba438e5c9a32a212c15bc9cc88ee0a25/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3340, 12, 2890, 4672, 775, 30, 25363, 273, 3167, 12, 2890, 18, 892, 13, 1335, 7784, 270, 668, 16, 1234, 30, 16718, 12, 4842, 67, 9712, 16, 315, 2925, 358, 1109, 738, 87, 6, 17105, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3340, 12, 2890, 4672, 775, 30, 25363, 273, 3167, 12, 2890, 18, 892, 13, 1335, 7784, 270, 668, 16, 1234, 30, 16718, 12, 4842, 67, 9712, 16, 315, 2925, 358, 1109, 738, 87, 6, 17105, 28...
mousedown="EventTicklerMousedown"),
mousedown="EventTicklerMousedown", mousedownselected="EventTicklerMousedownSelected"),
def makeStates(self): states = [ BitmapInfo(stateName="SumEvent.Unstamped", normal=attributeEditors.IconAttributeEditor.noImage, selected=attributeEditors.IconAttributeEditor.noImage, rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), BitmapInfo(stateName="SumEvent.Stamped", normal="SumEventStamped", selected="SumEventStamped-Reversed", rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), BitmapInfo(stateName="SumEvent.Tickled", normal="EventTickled", selected="EventTickledSelected", rollover="EventTicklerRollover", rolloverselected="EventTicklerRolloverSelected", mousedown="EventTicklerMousedown"), ] return states
af425b7896d6f0178da77c37da1bec0eb96d300a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/af425b7896d6f0178da77c37da1bec0eb96d300a/summaryblocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 7629, 12, 2890, 4672, 5493, 273, 306, 14764, 966, 12, 2019, 461, 1546, 3495, 1133, 18, 984, 14317, 329, 3113, 2212, 33, 4589, 4666, 1383, 18, 5554, 1499, 6946, 18, 2135, 2040, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 7629, 12, 2890, 4672, 5493, 273, 306, 14764, 966, 12, 2019, 461, 1546, 3495, 1133, 18, 984, 14317, 329, 3113, 2212, 33, 4589, 4666, 1383, 18, 5554, 1499, 6946, 18, 2135, 2040, 16, ...
ret = (char*)malloc(strlen(arg) + 1);
/* lltype.free uses OP_RAW_FREE, we must allocate * with the matching function */ OP_RAW_MALLOC(strlen(arg) + 1, ret, char*)
def test_string_reverse(self): # XXX This test crashes with a debug build # (when python is built WITH_PYMALLOC and PYMALLOC_DEBUG): # lltype.free calls OP_RAW_FREE() == PyObject_Free(), # but the buffer comes from a malloc() if sys.platform == 'win32' and 'python_d' in sys.executable: py.test.skip("Crash with a debug build") c_source = py.code.Source(""" #include <string.h> char *f(char* arg) { char *ret; ret = (char*)malloc(strlen(arg) + 1); strcpy(ret, arg); return ret; } """) eci = ExternalCompilationInfo(separate_module_sources=[c_source]) z = llexternal('f', [CCHARP], CCHARP, compilation_info=eci) def f(): s = str2charp("xxx") l_res = z(s) res = charp2str(l_res) lltype.free(l_res, flavor='raw') free_charp(s) return len(res) xf = self.compile(f, [], backendopt=False) assert xf(expected_extra_mallocs=-1) == 3
e435a7fb191d5d0384668d38f1c8e0985e14e72a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/e435a7fb191d5d0384668d38f1c8e0985e14e72a/test_rffi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1080, 67, 9845, 12, 2890, 4672, 468, 11329, 1220, 1842, 4422, 7690, 598, 279, 1198, 1361, 468, 261, 13723, 5790, 353, 6650, 13601, 67, 16235, 49, 1013, 29450, 471, 12191, 49, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1080, 67, 9845, 12, 2890, 4672, 468, 11329, 1220, 1842, 4422, 7690, 598, 279, 1198, 1361, 468, 261, 13723, 5790, 353, 6650, 13601, 67, 16235, 49, 1013, 29450, 471, 12191, 49, 1...
if not vuid: continue
if not vuid.found_fullname(): continue
def __init__(self, cls, verbosity=0): self._tmp_ivar = {} self._tmp_cvar = {} self._tmp_type = {} ObjDoc.__init__(self, cls, verbosity)
065d9e81e0092aa76af93c5f65eb4326d02a3124 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/065d9e81e0092aa76af93c5f65eb4326d02a3124/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2028, 16, 11561, 33, 20, 4672, 365, 6315, 5645, 67, 22647, 273, 2618, 365, 6315, 5645, 67, 71, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 1876...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 2028, 16, 11561, 33, 20, 4672, 365, 6315, 5645, 67, 22647, 273, 2618, 365, 6315, 5645, 67, 71, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 1876...
fp = open(TEXTFILE, 'w+')
fp = open(textfile, 'w+')
def create(mlist, cgi=0): # Acquire the global list database lock lock = makelock() lock.lock() lockfp = None try: # First, open the dbhash file using built-in open so we can acquire an # exclusive lock on it. See the discussion above for why we do it # this way instead of specifying the `l' option to dbhash.open() lockfp = open(DBFILE) fcntl.flock(lockfp.fileno(), fcntl.LOCK_EX) db = dbhash.open(DBFILE, 'c') # Crack open the plain text file try: fp = open(TEXTFILE, 'r+') except IOError, e: if e.errno <> errno.ENOENT: raise omask = os.umask(007) try: fp = open(TEXTFILE, 'w+') finally: os.umask(omask) addlist(mlist, db, fp) # And flush everything out to disk db.sync() fp.close() finally: if lockfp: fcntl.flock(lockfp.fileno(), fcntl.LOCK_UN) lockfp.close() lock.unlock(unconditionally=1)
0f74c78c0fe989ebf5c2a1c7fe6b1a538f381ac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/0f74c78c0fe989ebf5c2a1c7fe6b1a538f381ac5/Postfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 781, 376, 16, 276, 10052, 33, 20, 4672, 468, 28822, 326, 2552, 666, 2063, 2176, 2176, 273, 29796, 292, 975, 1435, 2176, 18, 739, 1435, 2176, 7944, 273, 599, 775, 30, 468, 5783...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 781, 376, 16, 276, 10052, 33, 20, 4672, 468, 28822, 326, 2552, 666, 2063, 2176, 2176, 273, 29796, 292, 975, 1435, 2176, 18, 739, 1435, 2176, 7944, 273, 599, 775, 30, 468, 5783...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 555) else quickfix.IntField.__init__(self, 555, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 2539, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 2539, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...