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
entry.rulelines.append(RuleLine(line[1], 1))
entry.rulelines.append(RuleLine(line[1], True))
def parse(self, lines): """parse the input lines from a robot.txt file. We allow that a user-agent: line is not preceded by one or more blank lines.""" state = 0 linenumber = 0 entry = Entry()
9f86ae009f1e74ee040c0d6e683bcba6894a674b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4845/9f86ae009f1e74ee040c0d6e683bcba6894a674b/robotparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 2362, 4672, 3536, 2670, 326, 810, 2362, 628, 279, 14386, 18, 5830, 585, 18, 1660, 1699, 716, 279, 729, 17, 5629, 30, 980, 353, 486, 29953, 635, 1245, 578, 1898, 705...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1109, 12, 2890, 16, 2362, 4672, 3536, 2670, 326, 810, 2362, 628, 279, 14386, 18, 5830, 585, 18, 1660, 1699, 716, 279, 729, 17, 5629, 30, 980, 353, 486, 29953, 635, 1245, 578, 1898, 705...
os.chmod(src, stat.S_IMODE(sstat[stat.ST_MODE]))
return False finally: os.chmod(src, sstat[stat.ST_MODE])
def copyfile(src, dest, newmtime = None, sstat = None): """ Copies a file from src to dest, preserving all permissions and attributes; mtime will be preserved even when moving across filesystems. Returns true on success and false on failure. """ #print "copyfile(" + src + "," + dest + "," + str(newmtime) + "," + str(sstat) + ")" try: if not sstat: sstat = os.lstat(src) except Exception as e: print("copyfile: Stating source file failed...", e) return False destexists = 1 try: dstat = os.lstat(dest) except: dstat = os.lstat(os.path.dirname(dest)) destexists = 0 if destexists: if stat.S_ISLNK(dstat[stat.ST_MODE]): try: os.unlink(dest) destexists = 0 except Exception as e: pass if stat.S_ISLNK(sstat[stat.ST_MODE]): try: target = os.readlink(src) if destexists and not stat.S_ISDIR(dstat[stat.ST_MODE]): os.unlink(dest) os.symlink(target, dest) #os.lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID]) return os.lstat(dest) except Exception as e: print("copyfile: failed to properly create symlink:", dest, "->", target, e) return False if stat.S_ISREG(sstat[stat.ST_MODE]): os.chmod(src, stat.S_IRUSR) # Make sure we can read it try: # For safety copy then move it over. shutil.copyfile(src, dest + "#new") os.rename(dest + "#new", dest) except Exception as e: print('copyfile: copy', src, '->', dest, 'failed.', e) os.chmod(src, stat.S_IMODE(sstat[stat.ST_MODE])) os.utime(src, (sstat[stat.ST_ATIME], sstat[stat.ST_MTIME])) return False else: #we don't yet handle special, so we need to fall back to /bin/mv a = getstatusoutput("/bin/cp -f " + "'" + src + "' '" + dest + "'") if a[0] != 0: print("copyfile: Failed to copy special file:" + src + "' to '" + dest + "'", a) return False # failure try: os.lchown(dest, sstat[stat.ST_UID], sstat[stat.ST_GID]) os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown except Exception as e: print("copyfile: Failed to chown/chmod/unlink", dest, e) return False if newmtime: os.utime(dest, (newmtime, newmtime)) else: os.utime(dest, (sstat[stat.ST_ATIME], sstat[stat.ST_MTIME])) newmtime = sstat[stat.ST_MTIME] return newmtime
71a46a44a2f278db1ac1b309ff52b7836f3286b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8123/71a46a44a2f278db1ac1b309ff52b7836f3286b4/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29310, 12, 4816, 16, 1570, 16, 394, 10838, 273, 599, 16, 272, 5642, 273, 599, 4672, 3536, 28506, 606, 279, 585, 628, 1705, 358, 1570, 16, 27995, 777, 4371, 471, 1677, 31, 13158, 903, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29310, 12, 4816, 16, 1570, 16, 394, 10838, 273, 599, 16, 272, 5642, 273, 599, 4672, 3536, 28506, 606, 279, 585, 628, 1705, 358, 1570, 16, 27995, 777, 4371, 471, 1677, 31, 13158, 903, 5...
attrs = Span.translate_attrs(css, dpi, fonts, logger, font_delta=font_delta, memory=memory)
attrs = Span.translate_font_attrs(css, dpi, fonts, logger, font_delta=font_delta, memory=memory)
def __init__(self, ns, css, memory, dpi, fonts, logger, font_delta, parent_style, normal_font_size=100): src = ns.string if hasattr(ns, 'string') else ns for pat, repl in Span.rules: src = pat.sub(repl, src) src = src.replace(u'\xa0', ' ') # nbsp is replaced with \xa0 by BeatifulSoup attrs = Span.translate_attrs(css, dpi, fonts, logger, font_delta=font_delta, memory=memory) if 'fontsize' in attrs.keys(): normal_font_size = int(attrs['fontsize']) variant = attrs.pop('fontvariant', None) if variant == 'small-caps': dump = _Span(fontsize=normal_font_size-30) temp = [] for c in src: if c.isupper(): if temp: dump.append(''.join(temp)) temp = [] dump.append(_Span(c, fontsize=normal_font_size)) else: temp.append(c.upper()) src = dump if temp: src.append(''.join(temp)) family, key = attrs['fontfacename'] if fonts[family].has_key(key): attrs['fontfacename'] = fonts[family][key][1] else: attrs['fontfacename'] = fonts[family]['normal'][1] if key in ['bold', 'bi']: attrs['fontweight'] = 700 if key in ['italic', 'bi']: src = Italic(src) if 'fontsize' in attrs.keys(): attrs['baselineskip'] = int(attrs['fontsize']) + 20 if attrs['fontfacename'] == fonts['serif']['normal'][1]: attrs.pop('fontfacename') for key in attrs: if parent_style.has_key(key) and str(parent_style[key]) == str(attrs[key]): attrs.pop(key) self.text_src = src self.span_needed = bool(attrs) _Span.__init__(self, text=src, **attrs)
e39dc4223f880d6b721e75d35aaa36ac5ad96971 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/e39dc4223f880d6b721e75d35aaa36ac5ad96971/convert_from.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3153, 16, 3747, 16, 3778, 16, 16361, 16, 16450, 16, 1194, 16, 3512, 67, 9878, 16, 982, 67, 4060, 16, 2212, 67, 5776, 67, 1467, 33, 6625, 4672, 1705, 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, 1001, 2738, 972, 12, 2890, 16, 3153, 16, 3747, 16, 3778, 16, 16361, 16, 16450, 16, 1194, 16, 3512, 67, 9878, 16, 982, 67, 4060, 16, 2212, 67, 5776, 67, 1467, 33, 6625, 4672, 1705, 27...
os.path.join(here, "releases", "ZODB3", "PUBLICATION.cfg"))
os.path.join(here, "PUBLICATION.cfg"))
def join(*parts): local_full_path = os.path.join(here, *parts) relative_path = posixpath.join(*parts) return local_full_path, relative_path
e745a089a0e52a0aae220e38eabe4d68d279a9c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e745a089a0e52a0aae220e38eabe4d68d279a9c1/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 30857, 6019, 4672, 1191, 67, 2854, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 14852, 16, 380, 6019, 13, 3632, 67, 803, 273, 16366, 803, 18, 5701, 30857, 6019, 13, 327, 1191, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 30857, 6019, 4672, 1191, 67, 2854, 67, 803, 273, 1140, 18, 803, 18, 5701, 12, 14852, 16, 380, 6019, 13, 3632, 67, 803, 273, 16366, 803, 18, 5701, 30857, 6019, 13, 327, 1191, 67, ...
scripts = ['idle']
scripts = [os.path.join(package_dir, 'idle')]
def _bytecode_filenames(self, files): files = [n for n in files if n.endswith('.py')] return install_lib._bytecode_filenames(self,files)
3e0edbf4d8cc7728fb75cb23602ca18c0282c192 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3e0edbf4d8cc7728fb75cb23602ca18c0282c192/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1637, 16651, 67, 19875, 12, 2890, 16, 1390, 4672, 1390, 273, 306, 82, 364, 290, 316, 1390, 309, 290, 18, 5839, 1918, 2668, 18, 2074, 6134, 65, 327, 3799, 67, 2941, 6315, 1637, 166...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 1637, 16651, 67, 19875, 12, 2890, 16, 1390, 4672, 1390, 273, 306, 82, 364, 290, 316, 1390, 309, 290, 18, 5839, 1918, 2668, 18, 2074, 6134, 65, 327, 3799, 67, 2941, 6315, 1637, 166...
return '/tags%s' % self.abs_tag_path (tag) def tag_path_split (self, tag):
return '/tags%s' % self.abs_tag_path(tag) def tag_path_split(self, tag):
def full_tag_path (self, tag): """Returns the absolute tag path (see above), prefixed with /tag.
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 2692, 67, 803, 261, 2890, 16, 1047, 4672, 3536, 1356, 326, 4967, 1047, 589, 261, 5946, 5721, 3631, 12829, 598, 342, 2692, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 2692, 67, 803, 261, 2890, 16, 1047, 4672, 3536, 1356, 326, 4967, 1047, 589, 261, 5946, 5721, 3631, 12829, 598, 342, 2692, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
{'poise':'CGS unit defined to be 1/10 of pascal*second.', 'reyn':'Defined to be a pound_force*second/inch^2.\nApproximately equal to 6894.76 pascal*second.'},
{'poise':'CGS unit defined to be 1/10 of pascal*second.', 'reyn':'Defined to be a pound_force*second/inch^2.\nApproximately equal to 6894.76 pascal*second.'},
def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys()))
04717bf1b9b9ac138edf5b9001954a2a12d3790d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/04717bf1b9b9ac138edf5b9001954a2a12d3790d/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
dlg = wx.FileDialog(self, "Choose a file", self.state.rule_dir, "", "*.*", wx.OPEN)
dlg = wx.FileDialog(self, "Open Rule Set", self.state.rule_dir, "", "*.*", wx.OPEN)
def OnLoadRuleSet(self, event): dlg = wx.FileDialog(self, "Choose a file", self.state.rule_dir, "", "*.*", wx.OPEN) if dlg.ShowModal() == wx.ID_OK: name = dlg.GetPath() rulename = dlg.GetFilename() self.state.rule_dir = name[:name.index(rulename) - 1] suffix = name[-3:] if not (suffix == 'trs' or suffix == 'xml'): print "Unrecognized file format: " + name return operations.setmode('trs') self.radio_trs.SetValue(True) self.radio_lambda.SetValue(False) self.UpdateRuleInfo(rulename) with open(name, 'r') as f: contents = f.read() ruleset = operations.parse_rule_set(suffix, contents) self.rule_set = self.last_used_rule_set = ruleset self.last_used_rule_name = rulename self.SetRadioVal(None) self.save_state()
cb430ad03a412e9eab8f96d83eedfbd4a280bd5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4435/cb430ad03a412e9eab8f96d83eedfbd4a280bd5d/new-reduction-visualizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2563, 21474, 12, 2890, 16, 871, 4672, 25840, 273, 7075, 18, 812, 6353, 12, 2890, 16, 315, 3678, 6781, 1000, 3113, 365, 18, 2019, 18, 5345, 67, 1214, 16, 23453, 15902, 4509, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2563, 21474, 12, 2890, 16, 871, 4672, 25840, 273, 7075, 18, 812, 6353, 12, 2890, 16, 315, 3678, 6781, 1000, 3113, 365, 18, 2019, 18, 5345, 67, 1214, 16, 23453, 15902, 4509, 3113, ...
def test_hotelling2(self): """ Marginally, Hotelling's T^2(k) with m degrees of freedom in the denominator satisfies (m-k+1)/(mk) T^2 \sim F_{k,m-k+1}. """ x = np.linspace(0.1,10,100) for dfn in range(6, 10): h = rft.Hotelling(k=dfn)(x) chi = rft.ChiSquared(dfn=dfn)(x) assert_almost_equal(h, chi) chi2 = scipy.stats.chi2.sf(x, dfn) assert_almost_equal(h, chi2) p = rft.spherical_search(dfn) for dfd in [40,50]: fac = (dfd-dfn+1.)/(dfd*dfn) h = rft.Hotelling(dfd=dfd,k=dfn)(x) f = scipy.stats.f.sf(x*fac, dfn, dfd-dfn+1) f2 = rft.FStat(dfd=dfd-dfn+1,dfn=dfn)(x*fac) assert_almost_equal(f2, f) assert_almost_equal(h, f) @dec.slow def test_roy1(self): """ EC densities of Roy with dfn=1 should be twice EC densities of Hotelling T^2's. """ x = np.linspace(0.1,10,100) for dfd in [40,50,np.inf]: for k in [1,4,6]: for dim in range(7): h = 2*rft.Hotelling(dfd=dfd,k=k).density(x, dim) r = rft.Roy(dfd=dfd,k=k,dfn=1).density(x, dim) assert_almost_equal(h, r) @dec.slow def test_onesidedF(self): """ EC densities of one sided F should be a difference of F EC densities """ x = np.linspace(0.1,10,100) for dfd in [40,50,np.inf]: for dfn in range(2,10): for dim in range(7): f1 = rft.FStat(dfd=dfd,dfn=dfn).density(x, dim) f2 = rft.FStat(dfd=dfd,dfn=dfn-1).density(x, dim) onesided = rft.OneSidedF(dfd=dfd,dfn=dfn).density(x, dim) assert_almost_equal(onesided, 0.5*(f1-f2)) @dec.slow def test_multivariate_forms(self): """ MVform with one sphere is sqrt(chi^2), two spheres is sqrt(Roy) with infinite degrees of freedom. """ x = np.linspace(0.1,10,100) for k1 in range(5,10): m = rft.MultilinearForm(k1) c = rft.ChiSquared(k1)
search = rft.IntrinsicVolumes([3,4,5]) for k in range(5, 10): p = rft.spherical_search(k) for dfd in [np.inf,40,50]: f = rft.FStat(dfd=dfd, dfn=1)(x, search=p*search) h = 2*rft.Hotelling(k=k, dfd=dfd)(x, search=search) h2 = 0 for i in range(search.mu.shape[0]): h2 += 2*rft.Hotelling(k=k, dfd=dfd).density(x, i) * search.mu[i] assert_almost_equal(h, f) assert_almost_equal(h, h2) def test_hotelling2(): x = np.linspace(0.1,10,100) for dfn in range(6, 10): h = rft.Hotelling(k=dfn)(x) chi = rft.ChiSquared(dfn=dfn)(x) assert_almost_equal(h, chi) chi2 = scipy.stats.chi2.sf(x, dfn) assert_almost_equal(h, chi2) p = rft.spherical_search(dfn) for dfd in [40,50]: fac = (dfd-dfn+1.)/(dfd*dfn) h = rft.Hotelling(dfd=dfd,k=dfn)(x) f = scipy.stats.f.sf(x*fac, dfn, dfd-dfn+1) f2 = rft.FStat(dfd=dfd-dfn+1,dfn=dfn)(x*fac) assert_almost_equal(f2, f) assert_almost_equal(h, f) @dec.slow def test_roy1(): x = np.linspace(0.1,10,100) for dfd in [40,50,np.inf]: for k in [1,4,6]:
def test_hotelling4(self): """ Hotelling T^2 should just be like taking product with sphere.
ba76b4fab0747d1377df6816793c47ebf52b7b6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12658/ba76b4fab0747d1377df6816793c47ebf52b7b6a/test_rft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15224, 1165, 310, 24, 12, 2890, 4672, 3536, 670, 352, 1165, 310, 399, 66, 22, 1410, 2537, 506, 3007, 13763, 3017, 598, 20041, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15224, 1165, 310, 24, 12, 2890, 4672, 3536, 670, 352, 1165, 310, 399, 66, 22, 1410, 2537, 506, 3007, 13763, 3017, 598, 20041, 18, 2, -100, -100, -100, -100, -100, -100, -100, ...
occupationenergy=None,
fixedenergy=None,
def __init__(self, nwannier, calc, nbands=None, occupationenergy=None, fixedstates=None, spin=0, verbose=True):
2ac4b9fe09b4902e5b1bcc73a3b1bbce7b323ca5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/2ac4b9fe09b4902e5b1bcc73a3b1bbce7b323ca5/wannier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14376, 1072, 2453, 16, 7029, 16, 4264, 5708, 33, 7036, 16, 5499, 15358, 33, 7036, 16, 5499, 7992, 33, 7036, 16, 12490, 33, 20, 16, 3988, 33, 5510, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14376, 1072, 2453, 16, 7029, 16, 4264, 5708, 33, 7036, 16, 5499, 15358, 33, 7036, 16, 5499, 7992, 33, 7036, 16, 12490, 33, 20, 16, 3988, 33, 5510, 4672, ...
shutil.copy(srcname, dstname)
shutil.copy2(srcname, dstname) try: shutil.copystat(srcname, dstname) except Exception, e: if verbose: print >>sys.stderr, "warning: ignoring failure to copy permission bits from '%s' to '%s': %s" % (filename, target, str(e))
def cpy(srcname, dstname, verbose = False): if verbose: print >>sys.stderr, "copying '%s' to '%s' ..." % (srcname, dstname) shutil.copy(srcname, dstname)
808b904a2bad6d0477675248b027262b4f819a8e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/808b904a2bad6d0477675248b027262b4f819a8e/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24534, 12, 4816, 529, 16, 3046, 529, 16, 3988, 273, 1083, 4672, 309, 3988, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 3530, 310, 1995, 87, 11, 358, 1995, 87, 11, 18483, 738, 261, 4816, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24534, 12, 4816, 529, 16, 3046, 529, 16, 3988, 273, 1083, 4672, 309, 3988, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 3530, 310, 1995, 87, 11, 358, 1995, 87, 11, 18483, 738, 261, 4816, ...
dirs = ['.']
dirs = [os.path.abspath('.')]
def __init__(self, runner=None, dirs=None, dirdepth=100, ignoreprefix='.', ignore=None, hasher=md5_hasher, depsname='.deps', quiet=False): """ Initialise a Builder with the given options.
be498024423efe18ee1a6a8b9d87cb92fa2d0a22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12518/be498024423efe18ee1a6a8b9d87cb92fa2d0a22/fabricate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 8419, 33, 7036, 16, 7717, 33, 7036, 16, 1577, 5979, 33, 6625, 16, 2305, 3239, 2218, 1093, 16, 2305, 33, 7036, 16, 15764, 33, 1264, 25, 67, 2816, 264, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8419, 33, 7036, 16, 7717, 33, 7036, 16, 1577, 5979, 33, 6625, 16, 2305, 3239, 2218, 1093, 16, 2305, 33, 7036, 16, 15764, 33, 1264, 25, 67, 2816, 264, 1...
return str(self.settings.value("misc/timezone").toString())
return str(self.get_with_default("misc/timezone", "US/Central").toString())
def get_timezone(self): return str(self.settings.value("misc/timezone").toString())
b59a8506b48a0a4a39103cbc60a2f5d2017c1c83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/633/b59a8506b48a0a4a39103cbc60a2f5d2017c1c83/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12690, 12, 2890, 4672, 327, 609, 12, 2890, 18, 4272, 18, 1132, 2932, 23667, 19, 12690, 20387, 10492, 10756, 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, 336, 67, 12690, 12, 2890, 4672, 327, 609, 12, 2890, 18, 4272, 18, 1132, 2932, 23667, 19, 12690, 20387, 10492, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
broker.cv.acquire() broker.syncResult = result broker.syncInFlight = False broker.cv.notify() broker.cv.release()
try: broker.cv.acquire() broker.syncResult = result broker.syncInFlight = False broker.cv.notify() finally: broker.cv.release()
def _handleMethodResp(self, broker, codec, seq): code = codec.read_uint32() text = str(codec.read_str16()) outArgs = {} method, synchronous = self.seqMgr._release(seq) if code == 0: for arg in method.arguments: if arg.dir.find("O") != -1: outArgs[arg.name] = self._decodeValue(codec, arg.type) result = MethodResult(code, text, outArgs) if synchronous: broker.cv.acquire() broker.syncResult = result broker.syncInFlight = False broker.cv.notify() broker.cv.release() else: if self.console: self.console.methodResponse(broker, seq, result)
dc4e5689e88e42c1dc783761a2615aab45312cd6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/dc4e5689e88e42c1dc783761a2615aab45312cd6/qmfconsole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 1305, 9732, 12, 2890, 16, 8625, 16, 9196, 16, 3833, 4672, 981, 273, 9196, 18, 896, 67, 11890, 1578, 1435, 977, 273, 609, 12, 21059, 18, 896, 67, 701, 2313, 10756, 596, 2615,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4110, 1305, 9732, 12, 2890, 16, 8625, 16, 9196, 16, 3833, 4672, 981, 273, 9196, 18, 896, 67, 11890, 1578, 1435, 977, 273, 609, 12, 21059, 18, 896, 67, 701, 2313, 10756, 596, 2615,...
self.ipy1taskcontroller.submit(tasks)
return self.ipy1taskcontroller.submit(tasks)
def submit(self, tasks): self.ipy1taskcontroller.submit(tasks)
0eedbef71f108bd5b61123893cf68c56b1cabb9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3858/0eedbef71f108bd5b61123893cf68c56b1cabb9c/ec2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 2890, 16, 4592, 4672, 365, 18, 9126, 21, 4146, 5723, 18, 9297, 12, 9416, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 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, 4879, 12, 2890, 16, 4592, 4672, 365, 18, 9126, 21, 4146, 5723, 18, 9297, 12, 9416, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'name': fields.char('Period Name', size=64),
'name': fields.char('Period Name', size=64, required=True),
def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.strftime('%Y-%m-%d') if name=="Weekly": new_name=de.strftime('%Y, week %W') self.pool.get('stock.period').create(cr, uid, { 'name': new_name, 'date_start': ds.strftime('%Y-%m-%d'), 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'), }) ds = ds + RelativeDateTime(days=interval) + 1 return { 'view_type': 'form', "view_mode": 'tree', 'res_model': 'stock.period', 'type': 'ir.actions.act_window', }
6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6908, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 28793, 3673, 33, 20, 16, 508, 2218, 40, 12857, 11, 4672, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6908, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 819, 28793, 3673, 33, 20, 16, 508, 2218, 40, 12857, 11, 4672, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, ...
pop, dad = 0, mom = 1, off = 2)
pop, pop, dad = 0, mom = 1, off = 2)
def testMitochondrialGenoTransmitter(self): 'Testing operator MitochondrialGenoTransmitter()' # pop = self.getPop(size=100, loci=[10, 20] + [20] + [30]*4, chromTypes=[CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*5) self.assertRaises(ValueError, applyDuringMatingOperator, MitochondrialGenoTransmitter(), pop, dad = 0, mom = 1, off = 2) # pop = self.getPop(size=100, loci=[10, 20] + [30]*5, chromTypes=[CHROMOSOME_X, CHROMOSOME_Y] + [CUSTOMIZED]*5) applyDuringMatingOperator(MitochondrialGenoTransmitter(), pop, dad = 0, mom = 1, off = 2) # src = [pop.individual(1).genotype(0, ch) for ch in range(2, 7)] for ch in range(2, 7): self.assertEqual(pop.individual(2).genotype(0, ch) in src, True)
413376e42263886141c9a591f1c5ee892c441cab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/413376e42263886141c9a591f1c5ee892c441cab/test_14_transmitter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 49, 305, 9842, 1434, 566, 287, 43, 5764, 1429, 1938, 387, 12, 2890, 4672, 296, 22218, 3726, 490, 305, 9842, 1434, 566, 287, 43, 5764, 1429, 1938, 387, 11866, 468, 1843, 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, 1842, 49, 305, 9842, 1434, 566, 287, 43, 5764, 1429, 1938, 387, 12, 2890, 4672, 296, 22218, 3726, 490, 305, 9842, 1434, 566, 287, 43, 5764, 1429, 1938, 387, 11866, 468, 1843, 273, 365, ...
_children['{%s}webContentGadgetPref' % GCAL_NAMESPACE] = ('gadget_pref',
_children['{%s}webContentGadgetPref' % GCAL_NAMESPACE] = ('gadget_pref',
def __init__(self, name=None, value=None, extension_elements=None, extension_attributes=None, text=None): self.name = name self.value = value self.text = text self.extension_elements = extension_elements or [] self.extension_attributes = extension_attributes or {}
6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 7036, 16, 460, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 365, 18, 529, 273, 508, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 33, 7036, 16, 460, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 365, 18, 529, 273, 508, 365, 1...
other options -- passed to plot.
other options -- passed to plot or parametric_plot3d.
def parametric_plot(funcs, *args, **kwargs): r""" \code{parametric_plot} takes two or three functions as a list or a tuple and makes a plot with the first function giving the $x$ coordinates, the second function giving the $y$ coordinates, and the third function (if present) giving the $z$ coordinates. INPUT: funcs -- 2 or 3-tuple of functions other options -- passed to plot. EXAMPLES: We draw some 2d parametric plots: sage: t = var('t') sage: parametric_plot( (sin(t), sin(2*t)), (t, 0, 2*pi), rgbcolor=hue(0.6) ) sage: parametric_plot((1, t), (t, 0, 4)) sage: parametric_plot((t, t^2), (t, -4, 4)) We draw a 3d parametric plot: sage: parametric_plot3d( (5*cos(x), 5*sin(x), x), (-12, 12), plot_points=150, color="red") TESTS: sage: parametric_plot((x, t^2), -4, 4) Traceback (most recent call last): ... ValueError: there cannot be more than one free variable in funcs sage: parametric_plot((1, x+t), -4, 4) Traceback (most recent call last): ... ValueError: there cannot be more than one free variable in funcs """ if len(funcs) == 3: raise ValueError, "use parametric_plot3d for parametric plots in 3d dimensions." elif len(funcs) != 2: raise ValueError, "parametric plots only implemented in 2 and 3 dimensions." else: vars = [] f,g = funcs if hasattr(f, 'variables'): vars += list(f.variables()) if hasattr(g, 'variables'): vars += list(g.variables()) vars = [str(v) for v in vars] from sage.misc.misc import uniq if len(uniq(vars)) > 1: raise ValueError, "there cannot be more than one free variable in funcs" kwargs['parametric'] = True return plot(funcs, *args, **kwargs)
90b9ecf339edef448d04d398d70a614fc66902fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/90b9ecf339edef448d04d398d70a614fc66902fb/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 579, 1591, 67, 4032, 12, 17728, 16, 380, 1968, 16, 2826, 4333, 4672, 436, 8395, 521, 710, 95, 891, 1591, 67, 4032, 97, 5530, 2795, 578, 8925, 4186, 487, 279, 666, 578, 279, 3193, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 579, 1591, 67, 4032, 12, 17728, 16, 380, 1968, 16, 2826, 4333, 4672, 436, 8395, 521, 710, 95, 891, 1591, 67, 4032, 97, 5530, 2795, 578, 8925, 4186, 487, 279, 666, 578, 279, 3193, 471, ...
roles = {'author': 'aut', 'editor': 'edt', 'advisor':'ths'}
role = contributor.get('role') if role: role = role[0] else: roles = {'author': 'aut', 'editor': 'edt', 'advisor':'ths'} role = roles[ctype]
def __call__(self, element, metadata):
c5d3adfb0ea9a0a03368daae90e390c04ef11e96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14691/c5d3adfb0ea9a0a03368daae90e390c04ef11e96/metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 930, 16, 1982, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 930, 16, 1982, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
descriptor.setAttribute("index", "noindex")
descriptor.setAttribute("index", "no")
def rewrite_descriptor(doc, descriptor): # # Do these things: # 1. Add an "index=noindex" attribute to the element if the tagName # ends in 'ni', removing the 'ni' from the name. # 2. Create a <signature> from the name attribute and <args>. # 3. Create additional <signature>s from <*line{,ni}> elements, # if found. # 4. If a <versionadded> is found, move it to an attribute on the # descriptor. # 5. Move remaining child nodes to a <description> element. # 6. Put it back together. # descname = descriptor.tagName index = 1 if descname[-2:] == "ni": descname = descname[:-2] descriptor.setAttribute("index", "noindex") descriptor._node.name = descname index = 0 desctype = descname[:-4] # remove 'desc' linename = desctype + "line" if not index: linename = linename + "ni" # 2. signature = doc.createElement("signature") name = doc.createElement("name") signature.appendChild(doc.createTextNode("\n ")) signature.appendChild(name) name.appendChild(doc.createTextNode(descriptor.getAttribute("name"))) descriptor.removeAttribute("name") if descriptor.attributes.has_key("var"): variable = descriptor.getAttribute("var") if variable: args = doc.createElement("args") args.appendChild(doc.createTextNode(variable)) signature.appendChild(doc.createTextNode("\n ")) signature.appendChild(args) descriptor.removeAttribute("var") newchildren = [signature] children = descriptor.childNodes pos = skip_leading_nodes(children, 0) if pos < len(children): child = children[pos] if child.nodeType == ELEMENT and child.tagName == "args": # create an <args> in <signature>: args = doc.createElement("args") argchildren = [] map(argchildren.append, child.childNodes) for n in argchildren: child.removeChild(n) args.appendChild(n) signature.appendChild(doc.createTextNode("\n ")) signature.appendChild(args) signature.appendChild(doc.createTextNode("\n ")) # 3, 4. pos = skip_leading_nodes(children, pos + 1) while pos < len(children) \ and children[pos].nodeType == ELEMENT \ and children[pos].tagName in (linename, "versionadded"): if children[pos].tagName == linename: # this is really a supplemental signature, create <signature> sig = methodline_to_signature(doc, children[pos]) newchildren.append(sig) else: # <versionadded added=...> descriptor.setAttribute( "added", children[pos].getAttribute("version")) pos = skip_leading_nodes(children, pos + 1) # 5. description = doc.createElement("description") description.appendChild(doc.createTextNode("\n")) newchildren.append(description) move_children(descriptor, description, pos) last = description.childNodes[-1] if last.nodeType == TEXT: last.data = string.rstrip(last.data) + "\n " # 6. # should have nothing but whitespace and signature lines in <descriptor>; # discard them while descriptor.childNodes: descriptor.removeChild(descriptor.childNodes[0]) for node in newchildren: descriptor.appendChild(doc.createTextNode("\n ")) descriptor.appendChild(node) descriptor.appendChild(doc.createTextNode("\n"))
304ebb260c7d5886ccb4a4738c3e4f83f60820f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/304ebb260c7d5886ccb4a4738c3e4f83f60820f6/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10738, 67, 12628, 12, 2434, 16, 4950, 4672, 468, 468, 2256, 4259, 9198, 30, 468, 282, 404, 18, 1436, 392, 315, 1615, 33, 82, 885, 561, 6, 1566, 358, 326, 930, 309, 326, 7196, 468, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10738, 67, 12628, 12, 2434, 16, 4950, 4672, 468, 468, 2256, 4259, 9198, 30, 468, 282, 404, 18, 1436, 392, 315, 1615, 33, 82, 885, 561, 6, 1566, 358, 326, 930, 309, 326, 7196, 468, 13...
if self.widget.kernel_type in [1,2]: params["gamma"]=map(lambda g:2**g, range(-3,10,2)) if self.widget.kernel_type==1:
if self.kernel_type in [1,2]: params["gamma"]=map(lambda g:2**g, range(-3,10,2))+[0] if self.kernel_type==1:
def run(self): params={} if self.widget.useNu: params["nu"]=[0.25, 0.5, 0.75] else: params["C"]=map(lambda g:2**g, range(-5,10,2)) if self.widget.kernel_type in [1,2]: params["gamma"]=map(lambda g:2**g, range(-3,10,2)) if self.widget.kernel_type==1: params["degree"]=[1,2,3] best={} try: best=orngSVM.parameter_selection(orngSVM.SVMLearner(),self.widget.data, 4, params, best, callback=self.widget.progres) except SystemExit: pass self.widget.finishSearch()
a017a62eeb64cb8f18353a5ad8eaccb9881945cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/a017a62eeb64cb8f18353a5ad8eaccb9881945cf/OWSVM.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 859, 12938, 309, 365, 18, 6587, 18, 1202, 50, 89, 30, 859, 9614, 13053, 11929, 22850, 20, 18, 2947, 16, 374, 18, 25, 16, 374, 18, 5877, 65, 469, 30, 859, 9614, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 859, 12938, 309, 365, 18, 6587, 18, 1202, 50, 89, 30, 859, 9614, 13053, 11929, 22850, 20, 18, 2947, 16, 374, 18, 25, 16, 374, 18, 5877, 65, 469, 30, 859, 9614, ...
return unicode(washed_term, 'utf-8')[:max_char_length].encode('utf-8')
return washed_term[:max_char_length].encode('utf-8')
def wash_index_term(term, max_char_length=50): """ Return washed form of the index term TERM that would be suitable for storing into idxWORD* tables. I.e., lower the TERM, and truncate it safely to MAX_CHAR_LENGTH UTF-8 characters (meaning, in principle, 4*MAX_CHAR_LENGTH bytes). The function works by an internal conversion of TERM, when needed, from its input Python UTF-8 binary string format into Python Unicode format, and then truncating it safely to the given number of TF-8 characters, without possible mis-truncation in the middle of a multi-byte UTF-8 character that could otherwise happen if we would have been working with UTF-8 binary representation directly. Note that MAX_CHAR_LENGTH corresponds to the length of the term column in idxINDEX* tables. """ washed_term = term.lower() if len(washed_term) <= max_char_length: # no need to truncate the term, because it will fit # nicely even if it uses four-byte UTF-8 characters return washed_term else: # truncate the term in a safe position: return unicode(washed_term, 'utf-8')[:max_char_length].encode('utf-8')
8bfead56dd2253f3d946c0ce9712d87a4b188b8f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2139/8bfead56dd2253f3d946c0ce9712d87a4b188b8f/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 961, 67, 1615, 67, 6408, 12, 6408, 16, 943, 67, 3001, 67, 2469, 33, 3361, 4672, 3536, 2000, 341, 13912, 646, 434, 326, 770, 2481, 20772, 49, 716, 4102, 506, 10631, 364, 15729, 136...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 961, 67, 1615, 67, 6408, 12, 6408, 16, 943, 67, 3001, 67, 2469, 33, 3361, 4672, 3536, 2000, 341, 13912, 646, 434, 326, 770, 2481, 20772, 49, 716, 4102, 506, 10631, 364, 15729, 136...
feed_name = DataPath('extra_row_cells') loader = transitfeed.Loader( feed_name, problems = ExceptionProblemReporterNoExpiration(), extra_validation = True) try: loader.Load() self.fail('OtherProblem exception expected') except transitfeed.OtherProblem: pass class LoadMissingCellValidationTestCase(unittest.TestCase):
self.Load('extra_row_cells') e = self.problems.PopException("OtherProblem") self.assertEquals("routes.txt", e.file_name) self.assertEquals(4, e.row_num) self.problems.AssertNoMoreExceptions() class LoadMissingCellValidationTestCase(LoadTestCase):
def runTest(self): feed_name = DataPath('extra_row_cells') loader = transitfeed.Loader( feed_name, problems = ExceptionProblemReporterNoExpiration(), extra_validation = True) try: loader.Load() self.fail('OtherProblem exception expected') except transitfeed.OtherProblem: pass
c0875c71366a096d1af9711a40b2bd0594054fa5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6302/c0875c71366a096d1af9711a40b2bd0594054fa5/testtransitfeed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 4709, 12, 2890, 4672, 4746, 67, 529, 273, 1910, 743, 2668, 7763, 67, 492, 67, 14741, 6134, 4088, 273, 22755, 7848, 18, 2886, 12, 4746, 67, 529, 16, 9688, 273, 1185, 13719, 13289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4709, 12, 2890, 4672, 4746, 67, 529, 273, 1910, 743, 2668, 7763, 67, 492, 67, 14741, 6134, 4088, 273, 22755, 7848, 18, 2886, 12, 4746, 67, 529, 16, 9688, 273, 1185, 13719, 13289, ...
sel.connect('changed', change_page)
sel.connect('changed', change_page, notebook)
def change_page(tv, sel = sel, notebook = notebook): selected = sel.get_selected() if not selected: return model, titer = selected page = model.get_value(titer, 1)
ca68a37b3f3d52e70b5f1587a7dad63ae8876fc0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4591/ca68a37b3f3d52e70b5f1587a7dad63ae8876fc0/OptionsBox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 2433, 12, 24161, 16, 357, 273, 357, 16, 14718, 273, 14718, 4672, 3170, 273, 357, 18, 588, 67, 8109, 1435, 309, 486, 3170, 30, 327, 938, 16, 268, 2165, 273, 3170, 1363, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 2433, 12, 24161, 16, 357, 273, 357, 16, 14718, 273, 14718, 4672, 3170, 273, 357, 18, 588, 67, 8109, 1435, 309, 486, 3170, 30, 327, 938, 16, 268, 2165, 273, 3170, 1363, 273, ...
self.url_appcast = appcast_fmt % ('_unofficial',appcast_arch)
def _action( self ): ## add architecture to URL only for Mac if fnmatch.fnmatch( build.spec, '*-*-darwin*' ): url_arch = '.%s' % (arch.mode.mode) else: url_arch = ''
86da8d0455778387b4e216aa9419c7d5955343c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13161/86da8d0455778387b4e216aa9419c7d5955343c8/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1128, 12, 365, 262, 30, 7541, 527, 27418, 358, 1976, 1338, 364, 13217, 309, 18764, 18, 4293, 1916, 12, 1361, 18, 2793, 16, 14609, 17, 14, 17, 28076, 4035, 262, 30, 880, 67, 991, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1128, 12, 365, 262, 30, 7541, 527, 27418, 358, 1976, 1338, 364, 13217, 309, 18764, 18, 4293, 1916, 12, 1361, 18, 2793, 16, 14609, 17, 14, 17, 28076, 4035, 262, 30, 880, 67, 991, ...
this = apply(_quickfix.new_IncTaxInd, args)
this = _quickfix.new_IncTaxInd(*args)
def __init__(self, *args): this = apply(_quickfix.new_IncTaxInd, 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, 14559, 7731, 3866, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 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, 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, 14559, 7731, 3866, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
def test_ssize_return_ptr(self): self.assertEquals(self.MAX, TestGI.ssize_return_ptr_max()) self.assertEquals(self.MIN, TestGI.ssize_return_ptr_min())
def test_ssize_return_ptr(self): self.assertEquals(self.MAX, TestGI.ssize_return_ptr_max()) self.assertEquals(self.MIN, TestGI.ssize_return_ptr_min())
aefac8c5f64bf059dd6652f8a843d17b34fa0854 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8659/aefac8c5f64bf059dd6652f8a843d17b34fa0854/test_gi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1049, 554, 67, 2463, 67, 6723, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 2890, 18, 6694, 16, 7766, 13797, 18, 1049, 554, 67, 2463, 67, 6723, 67, 1896, 10756, 365, 18, 11231, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1049, 554, 67, 2463, 67, 6723, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 2890, 18, 6694, 16, 7766, 13797, 18, 1049, 554, 67, 2463, 67, 6723, 67, 1896, 10756, 365, 18, 11231, ...
"Save the current view used by this GLPane in the given Csys object."
""" Save the current view used by this GLPane in the given Csys object. """
def saveViewInCsys(self, csys): "Save the current view used by this GLPane in the given Csys object." #e [bruce comment 050418: it would be good to verify csys has the right type, # since almost any python object could be used here without any immediately # detectable error. Maybe this should be a method in csys.] csys.quat = Q(self.quat) csys.scale = self.scale csys.pov = V(self.pov[0], self.pov[1], self.pov[2]) csys.zoomFactor = self.zoomFactor
9dc95351096c9deab5f64e3e704bde7a93f95b49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9dc95351096c9deab5f64e3e704bde7a93f95b49/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 1767, 382, 39, 9499, 12, 2890, 16, 2873, 1900, 4672, 3536, 7074, 326, 783, 1476, 1399, 635, 333, 10252, 8485, 316, 326, 864, 385, 9499, 733, 18, 3536, 468, 73, 306, 2848, 3965, 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, 1923, 1767, 382, 39, 9499, 12, 2890, 16, 2873, 1900, 4672, 3536, 7074, 326, 783, 1476, 1399, 635, 333, 10252, 8485, 316, 326, 864, 385, 9499, 733, 18, 3536, 468, 73, 306, 2848, 3965, 2...
sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 0 sage: a(2) 1 sage: a(12) 140151 sage: a.list(13) [0, 1, 3, 9, 25, 75, 231, 763, 2619, 9495, 35695, 140151, 568503] AUTHOR: -- Jaap Spies (2007-02-03) """ def __init__(self):
INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A001189;a Number of degree-n permutations of order exactly 2. sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 0 sage: a(2) 1 sage: a(12) 140151 sage: a.list(13) [0, 1, 3, 9, 25, 75, 231, 763, 2619, 9495, 35695, 140151, 568503] AUTHOR: -- Jaap Spies (2007-02-03) """
def _eval(self, n): return sum([arith.factorial(n)//(arith.factorial(n-2*k)*(2**k)*arith.factorial(k)) for k in range(n//2+1)])
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2142, 3816, 297, 483, 18, 6812, 649, 12, 82, 13, 759, 12, 297, 483, 18, 6812, 649, 12, 82, 17, 22, 14, 79, 17653, 12, 22, 636, 79, 17653, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8622, 12, 2890, 16, 290, 4672, 327, 2142, 3816, 297, 483, 18, 6812, 649, 12, 82, 13, 759, 12, 297, 483, 18, 6812, 649, 12, 82, 17, 22, 14, 79, 17653, 12, 22, 636, 79, 17653, ...
self.full_series.insert(start, patch)
self.full_series.insert(start, fullpatch)
def push(self, repo, patch=None, force=False, list=False, mergeq=None, all=False, move=False): diffopts = self.diffopts() wlock = repo.wlock() try: heads = [] for b, ls in repo.branchmap().iteritems(): heads += ls if not heads: heads = [nullid] if repo.dirstate.parents()[0] not in heads: self.ui.status(_("(working directory not at a head)\n"))
ea21dc84e65137f7b0e8ee1a5bc1476825092b23 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/ea21dc84e65137f7b0e8ee1a5bc1476825092b23/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 12, 2890, 16, 3538, 16, 4729, 33, 7036, 16, 2944, 33, 8381, 16, 666, 33, 8381, 16, 2691, 85, 33, 7036, 16, 777, 33, 8381, 16, 3635, 33, 8381, 4672, 1901, 617, 1092, 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, 1817, 12, 2890, 16, 3538, 16, 4729, 33, 7036, 16, 2944, 33, 8381, 16, 666, 33, 8381, 16, 2691, 85, 33, 7036, 16, 777, 33, 8381, 16, 3635, 33, 8381, 4672, 1901, 617, 1092, 273, 365, ...
result = run(core.system.vistrails_root_directory() + '/tests/resources/pythonsource.xml',"testPortsAndFail")
locator = VistrailLocator(VistrailLocator.ORIGIN.FILE, core.system.vistrails_root_directory() + '/tests/resources/pythonsource.xml') result = run(locator,"testPortsAndFail")
def test_python_source(self): result = run(core.system.vistrails_root_directory() + '/tests/resources/pythonsource.xml',"testPortsAndFail") self.assertEquals(result, True)
34233881c9aeb544b0138e15eccc688c61d51809 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/34233881c9aeb544b0138e15eccc688c61d51809/console_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8103, 67, 3168, 12, 2890, 4672, 8871, 273, 776, 3337, 671, 5786, 12, 3282, 15565, 5786, 18, 24685, 18, 3776, 16, 2922, 18, 4299, 18, 90, 3337, 15208, 67, 3085, 67, 5149, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8103, 67, 3168, 12, 2890, 4672, 8871, 273, 776, 3337, 671, 5786, 12, 3282, 15565, 5786, 18, 24685, 18, 3776, 16, 2922, 18, 4299, 18, 90, 3337, 15208, 67, 3085, 67, 5149, 1435...
" JSObject* wrapper =\n" " xpc_GetCachedSlimWrapper(cache, obj, &vp.array[0]);\n" " if (wrapper) {\n" " return wrapper;\n"
" if (cache) {\n" " JSObject* wrapper = cache->GetWrapper();\n" " if (wrapper &&\n" " IS_SLIM_WRAPPER_OBJECT(wrapper) &&\n" " xpc_GetGlobalForObject(wrapper) ==\n" " xpc_GetGlobalForObject(obj)) {\n" " vp.array[0] = OBJECT_TO_JSVAL(wrapper);\n" " return wrapper;\n" " }\n"
def writeTraceableResultConv(f, type): typeName = getBuiltinOrNativeTypeName(type) assert typeName is not '[jsval]' if typeName is not None: template = traceableResultConvTemplates.get(typeName) if template is not None: values = { 'errorStr': getFailureString( getTraceInfoDefaultReturn(type), 2) } f.write(substitute(template, values)) return # else fall through; this type isn't supported yet elif isInterfaceType(type): if isVariantType(type): f.write(" JSBool ok = xpc_qsVariantToJsval(lccx, result, " "&vp.array[0]);\n") else: f.write(" nsWrapperCache* cache = xpc_qsGetWrapperCache(result);\n" " JSObject* wrapper =\n" " xpc_GetCachedSlimWrapper(cache, obj, &vp.array[0]);\n" " if (wrapper) {\n" " return wrapper;\n" " }\n" " // After this point do not use 'result'!\n" " qsObjectHelper helper(result, cache);\n" " JSBool ok = xpc_qsXPCOMObjectToJsval(lccx, " "helper, &NS_GET_IID(%s), &interfaces[k_%s], " "&vp.array[0]);\n" % (type.name, type.name)) f.write(" if (!ok) {\n"); writeFailure(f, getTraceInfoDefaultReturn(type), 2) f.write(" return JSVAL_TO_OBJECT(vp.array[0]);\n") return warn("Unable to convert result of type %s" % typeName) f.write(" !; // TODO - Convert `result` to jsval, store in rval.\n") f.write(" return xpc_qsThrow(cx, NS_ERROR_UNEXPECTED); // FIXME\n")
0a5bc6324473b85cd20835fa95e70fb6de549745 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/0a5bc6324473b85cd20835fa95e70fb6de549745/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 3448, 429, 1253, 17467, 12, 74, 16, 618, 4672, 8173, 273, 2882, 4853, 267, 1162, 9220, 7947, 12, 723, 13, 1815, 8173, 353, 486, 5271, 2924, 1125, 3864, 309, 8173, 353, 486, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3448, 429, 1253, 17467, 12, 74, 16, 618, 4672, 8173, 273, 2882, 4853, 267, 1162, 9220, 7947, 12, 723, 13, 1815, 8173, 353, 486, 5271, 2924, 1125, 3864, 309, 8173, 353, 486, 599, ...
change_category(article, old_cat, None)
change_category(article, old_cat_title, None)
def remove_category(): old_title = wikipedia.input('Please enter the name of the category that should be removed: ') old_cat = catlib.CatLink(old_title) # get edit summary message wikipedia.setAction(msg_remove[wikipedia.chooselang(wikipedia.mylang,msg_remove)] % old_title) articles = old_cat.articles(recurse = 0) if len(articles) == 0: print 'There are no articles in category ' + old_title else: for article in articles: change_category(article, old_cat, None) subcategories = old_cat.subcategories(recurse = 0) if len(subcategories) == 0: print 'There are no subcategories in category ' + old_title else: for subcategory in subcategories: change_category(subcategory, old_cat, None)
8fe4e1817561eb473c4b424b96ecd3c166227672 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/8fe4e1817561eb473c4b424b96ecd3c166227672/category.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 4743, 13332, 1592, 67, 2649, 273, 21137, 18, 2630, 2668, 8496, 6103, 326, 508, 434, 326, 3150, 716, 1410, 506, 3723, 30, 8624, 1592, 67, 2574, 273, 6573, 2941, 18, 11554, 2098,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 4743, 13332, 1592, 67, 2649, 273, 21137, 18, 2630, 2668, 8496, 6103, 326, 508, 434, 326, 3150, 716, 1410, 506, 3723, 30, 8624, 1592, 67, 2574, 273, 6573, 2941, 18, 11554, 2098,...
print(keys) print(vals) raise Exception("Number of vals does not equal number of keys")
raise Exception("Number of vals does not equal number of keys. \ Number of vals are: "+str(len(vals))+" and number of keys are: "+str(len(keys)))
def get_u_lin_values(self): """ Extract ValueReference and boolean value describing if variable appears linearly in all equations and constraints for all input variables. Returns: Dict with ValueReference as key and boolean isLinear as value.
f764f349d643190118591f5efb0058e97cef2494 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/f764f349d643190118591f5efb0058e97cef2494/xmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 89, 67, 7511, 67, 2372, 12, 2890, 4672, 3536, 8152, 1445, 2404, 471, 1250, 460, 16868, 309, 2190, 14606, 9103, 715, 316, 777, 30369, 471, 6237, 364, 777, 810, 3152, 18, 225, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 89, 67, 7511, 67, 2372, 12, 2890, 4672, 3536, 8152, 1445, 2404, 471, 1250, 460, 16868, 309, 2190, 14606, 9103, 715, 316, 777, 30369, 471, 6237, 364, 777, 810, 3152, 18, 225, 2...
char.hidden = int( textentries[ key ] )
char.hidden = str2bool( textentries[ key ] )
def charinfo_response( player, args, choice ): socket = player.socket char = args[0] if choice.button == 0 or not char or not socket: return 1 # check for rank #if char.rank >= player.rank and not player == char: # socket.sysmessage( "You've burnt your fingers!" ) # return 1 textentries = choice.text keys = textentries.keys() for key in keys: if key == 1: char.name = textentries[ key ] elif key == 2: char.title = textentries[ key ] elif key == 3: char.id = int( hex2dec( textentries[ key ] ) ) elif key == 4: char.orgid = int( hex2dec( textentries[ key ] ) ) elif key == 5: char.skin = int( hex2dec( textentries[ key ] ) ) elif key == 6: char.orgskin = int( hex2dec( textentries[ key ] ) ) elif key == 7: char.fame = int( textentries[ key ] ) elif key == 8: char.karma = int( textentries[ key ] ) elif key == 9: char.kills = int( textentries[ key ] ) elif key == 10: char.deaths = int( textentries[ key ] ) elif key == 11: char.pos = ( textentries[ key ] ) elif key == 12: char.direction = int( textentries[ key ] ) elif key == 13: char.invulnerable = int( textentries[ key ] ) elif key == 14: char.strength = int( textentries[ key ] ) elif key == 15: char.dexterity = int( textentries[ key ] ) elif key == 16: char.intelligence = int( textentries[ key ] ) elif key == 17: char.maxhitpoints = int( textentries[ key ] ) elif key == 18: char.hitpoints = int( textentries[ key ] ) elif key == 19: char.maxstamina = int( textentries[ key ] ) elif key == 20: char.stamina = int( textentries[ key ] ) elif key == 21: char.maxmana = int( textentries[ key ] ) elif key == 22: char.mana = int( textentries[ key ] ) elif key == 23: char.hidden = int( textentries[ key ] ) elif key == 24: char.dead = int( textentries[ key ] ) elif key == 25: char.polymorph = int( textentries[ key ] ) elif key == 26: char.incognito = int( textentries[ key ] ) elif key == 27: char.hunger = int( textentries[ key ] ) elif key == 28: char.war = int( textentries[ key ] ) elif key == 29: char.invisible = int( textentries[ key ] ) elif key == 30: char.frozen = int( textentries[ key ] ) elif key == 31: char.stealthedsteps = int( textentries[ key ] ) elif key == 32: char.strength2 = int( hex2dec( textentries[ key ] ) ) elif key == 33: char.dexterity2 = int( hex2dec( textentries[ key ] ) ) elif key == 34: char.intelligence2 = int( hex2dec( textentries[ key ] ) ) elif key == 35: char.saycolor = int( hex2dec( textentries[ key ] ) ) elif key == 36: char.emotecolor = int( hex2dec( textentries[ key ] ) ) elif key == 37: if ( textentries[key] ) == "female": char.gender = 1 elif ( textentries[key] ) == "male": char.gender = 0 elif ( textentries[key] ) == "none": char.gender = 0 elif len(textentries[key]) == 1: if ( int( textentries[ key ] ) < 0 ) or ( int( textentries[ key ] ) > 1 ): char.gender = 0 else: char.gender = int( textentries[ key ] ) elif key == 38: if not char.npc: char.account.name = textentries[ key ] else: if ( textentries[ key ] ) == 'Null' or ( textentries[ key ] ) == 'None': char.owner = 'None' else: char.owner = int( textentries[ key ] ) elif key == 39: if not char.npc: char.visrange = int( textentries[ key ] ) #else: # char.spawnregion = ( textentries[ key ] ) elif key == 40: if not char.npc: char.lightbonus = int( textentries[ key ] ) #else: # char.carve = ( textentries[ key ] ) elif key == 41: if not char.npc: char.profile = textentries[ key ] elif key == 42: if not char.npc: if (textentries[ key ]) == '': if char.hastag( 'guild' ): char.deltag( 'guild' ) else: char.settag( 'guild', int( hex2dec( textentries[ key ] ) ) ) elif key == 43: if not char.npc: if (textentries[ key ]) == '': if char.hastag( 'notoriety' ): char.deltag( 'notoriety' ) else: char.settag( 'notoriety', int( textentries[ key ] ) ) #elif char.npc: # if not textentries[ key ] == '': # char.mindamage = int( textentries[ key ] ) elif key == 44: if not char.npc: if (textentries[ key ]) == '': if char.hastag( 'poisoned' ): char.deltag( 'poisoned' ) else: char.settag( 'poisoned', int( textentries[ key ] ) ) #elif char.npc: # if not textentries[ key ] == '': # char.maxdamage = int( textentries[ key ] ) elif key == 46: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_fire' ): char.deltag( 'dmg_fire' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_fire', int( textentries[ key ] ) ) elif key == 47: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_cold' ): char.deltag( 'dmg_cold' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_cold', int( textentries[ key ] ) ) elif key == 48: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_poison' ): char.deltag( 'dmg_poison' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_poison', int( textentries[ key ] ) ) elif key == 49: if char.npc: if textentries[ key ] == '' or int(textentries[ key ]) <= 0: if char.hastag( 'dmg_energy' ): char.deltag( 'dmg_energy' ) elif int( textentries[ key ] ) <= 100: char.settag( 'dmg_energy', int( textentries[ key ] ) ) elif key == 50: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_physical' ): char.deltag( 'res_physical' ) else: char.settag( 'res_physical', int( textentries[ key ] ) ) elif key == 51: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_fire' ): char.deltag( 'res_fire' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_fire', int( textentries[ key ] ) ) elif key == 52: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_cold' ): char.deltag( 'res_cold' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_cold', int( textentries[ key ] ) ) elif key == 53: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_poison' ): char.deltag( 'res_poison' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_poison', int( textentries[ key ] ) ) elif key == 54: if char.npc: if (textentries[ key ]) == '' or int(textentries[ key ]) == 0: if char.hastag( 'res_energy' ): char.deltag( 'res_energy' ) elif int( textentries[ key ] ) <= 100: char.settag( 'res_energy', int( textentries[ key ] ) ) if choice.button == 1: charinfo( socket, char ) char.update() return 1
02db11658d92161398ef40c48df266b74fc14e36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/02db11658d92161398ef40c48df266b74fc14e36/info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1149, 1376, 67, 2740, 12, 7291, 16, 833, 16, 6023, 262, 30, 2987, 273, 7291, 18, 7814, 1149, 273, 833, 63, 20, 65, 309, 6023, 18, 5391, 422, 374, 578, 486, 1149, 578, 486, 2987, 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, 1149, 1376, 67, 2740, 12, 7291, 16, 833, 16, 6023, 262, 30, 2987, 273, 7291, 18, 7814, 1149, 273, 833, 63, 20, 65, 309, 6023, 18, 5391, 422, 374, 578, 486, 1149, 578, 486, 2987, 30, ...
if damaged(DSRSENS) and not (abs(game.sector.x-aim.x) < 2 and abs(game.sector.y-aim.y) < 2) and \ (ienm == IHC or ienm == IHS):
if damaged(DSRSENS) and \ not game.sector.distance(aim)<2**0.5 and ienm in (IHC, IHS):
def phasers(): # fire phasers hits = [] kz = 0; k = 1; irec=0 # Cheating inhibitor ifast = False; no = False; itarg = True; msgflag = True; rpow=0 automode = "NOTSET" key=0 skip(1) # SR sensors and Computer are needed fopr automode if damaged(DSRSENS) or damaged(DCOMPTR): itarg = False if game.condition == "docked": prout(_("Phasers can't be fired through base shields.")) chew() return if damaged(DPHASER): prout(_("Phaser control damaged.")) chew() return if game.shldup: if damaged(DSHCTRL): prout(_("High speed shield control damaged.")) chew() return if game.energy <= 200.0: prout(_("Insufficient energy to activate high-speed shield control.")) chew() return prout(_("Weapons Officer Sulu- \"High-speed shield control enabled, sir.\"")) ifast = True # Original code so convoluted, I re-did it all # (That was Tom Almy talking about the C code, I think -- ESR) while automode=="NOTSET": key=scan() if key == IHALPHA: if isit("manual"): if len(game.enemies)==0: prout(_("There is no enemy present to select.")) chew() key = IHEOL automode="AUTOMATIC" else: automode = "MANUAL" key = scan() elif isit("automatic"): if (not itarg) and len(game.enemies) != 0: automode = "FORCEMAN" else: if len(game.enemies)==0: prout(_("Energy will be expended into space.")) automode = "AUTOMATIC" key = scan() elif isit("no"): no = True else: huh() return elif key == IHREAL: if len(game.enemies)==0: prout(_("Energy will be expended into space.")) automode = "AUTOMATIC" elif not itarg: automode = "FORCEMAN" else: automode = "AUTOMATIC" else: # IHEOL if len(game.enemies)==0: prout(_("Energy will be expended into space.")) automode = "AUTOMATIC" elif not itarg: automode = "FORCEMAN" else: proutn(_("Manual or automatic? ")) chew() avail = game.energy if ifast: avail -= 200.0 if automode == "AUTOMATIC": if key == IHALPHA and isit("no"): no = True key = scan() if key != IHREAL and len(game.enemies) != 0: prout(_("Phasers locked on target. Energy available: %.2f")%avail) irec=0 while True: chew() if not kz: for i in range(len(game.enemies)): irec += math.fabs(game.enemies[i].kpower)/(PHASEFAC*math.pow(0.90,game.enemies[i].kdist))*randreal(1.01, 1.06) + 1.0 kz=1 proutn(_("%d units required. ") % irec) chew() proutn(_("Units to fire= ")) key = scan() if key!=IHREAL: return rpow = aaitem if rpow > avail: proutn(_("Energy available= %.2f") % avail) skip(1) key = IHEOL if not rpow > avail: break if rpow<=0: # chicken out chew() return key=scan() if key == IHALPHA and isit("no"): no = True if ifast: game.energy -= 200; # Go and do it! if checkshctrl(rpow): return chew() game.energy -= rpow extra = rpow if len(game.enemies): extra = 0.0 powrem = rpow for i in range(len(game.enemies)): hits.append(0.0) if powrem <= 0: continue hits[i] = math.fabs(game.enemies[i].kpower)/(PHASEFAC*math.pow(0.90,game.enemies[i].kdist)) over = randreal(1.01, 1.06) * hits[i] temp = powrem powrem -= hits[i] + over if powrem <= 0 and temp < hits[i]: hits[i] = temp if powrem <= 0: over = 0.0 extra += over if powrem > 0.0: extra += powrem hittem(hits) game.ididit = True if extra > 0 and not game.alldone: if game.tholian: proutn(_("*** Tholian web absorbs ")) if len(game.enemies)>0: proutn(_("excess ")) prout(_("phaser energy.")) else: prout(_("%d expended on empty space.") % int(extra)) elif automode == "FORCEMAN": chew() key = IHEOL if damaged(DCOMPTR): prout(_("Battle computer damaged, manual fire only.")) else: skip(1) prouts(_("---WORKING---")) skip(1) prout(_("Short-range-sensors-damaged")) prout(_("Insufficient-data-for-automatic-phaser-fire")) prout(_("Manual-fire-must-be-used")) skip(1) elif automode == "MANUAL": rpow = 0.0 for k in range(len(game.enemies)): aim = game.enemies[k].kloc ienm = game.quad[aim.x][aim.y] if msgflag: proutn(_("Energy available= %.2f") % (avail-0.006)) skip(1) msgflag = False rpow = 0.0 if damaged(DSRSENS) and not (abs(game.sector.x-aim.x) < 2 and abs(game.sector.y-aim.y) < 2) and \ (ienm == IHC or ienm == IHS): cramen(ienm) prout(_(" can't be located without short range scan.")) chew() key = IHEOL hits[k] = 0; # prevent overflow -- thanks to Alexei Voitenko k += 1 continue if key == IHEOL: chew() if itarg and k > kz: irec=(abs(game.enemies[k].kpower)/(PHASEFAC*math.pow(0.9,game.enemies[k].kdist))) * randreal(1.01, 1.06) + 1.0 kz = k proutn("(") if not damaged(DCOMPTR): proutn("%d" % irec) else: proutn("??") proutn(") ") proutn(_("units to fire at ")) crmena(False, ienm, "sector", aim) proutn("- ") key = scan() if key == IHALPHA and isit("no"): no = True key = scan() continue if key == IHALPHA: huh() return if key == IHEOL: if k==1: # Let me say I'm baffled by this msgflag = True continue if aaitem < 0: # abort out chew() return hits[k] = aaitem rpow += aaitem # If total requested is too much, inform and start over if rpow > avail: prout(_("Available energy exceeded -- try again.")) chew() return key = scan(); # scan for next value k += 1 if rpow == 0.0: # zero energy -- abort chew() return if key == IHALPHA and isit("no"): no = True game.energy -= rpow chew() if ifast: game.energy -= 200.0 if checkshctrl(rpow): return hittem(hits) game.ididit = True # Say shield raised or malfunction, if necessary if game.alldone: return if ifast: skip(1) if no == 0: if withprob(0.99): prout(_("Sulu- \"Sir, the high-speed shield control has malfunctioned . . .")) prouts(_(" CLICK CLICK POP . . .")) prout(_(" No response, sir!")) game.shldup = False else: prout(_("Shields raised.")) else: game.shldup = False overheat(rpow);
e216123ea61430150dab0ed9623b5cbf53071479 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e216123ea61430150dab0ed9623b5cbf53071479/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1844, 345, 414, 13332, 468, 4452, 1844, 345, 414, 11076, 273, 5378, 417, 94, 273, 374, 31, 417, 273, 404, 31, 277, 3927, 33, 20, 468, 22682, 1776, 316, 15769, 1811, 309, 689, 273, 1083...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1844, 345, 414, 13332, 468, 4452, 1844, 345, 414, 11076, 273, 5378, 417, 94, 273, 374, 31, 417, 273, 404, 31, 277, 3927, 33, 20, 468, 22682, 1776, 316, 15769, 1811, 309, 689, 273, 1083...
pkg = self.getPackageDetails(ob['packages.pkgId'])
pkg = self.getPackageDetails(ob['pkgId'])
def searchAll(self,name): # This should never be called with a name containing a % assert(name.find('%') == -1) result = [] quotename = name.replace("'","''") for (rep,cache) in self.primarydb.items(): cur = cache.cursor() cur.execute("select DISTINCT packages.pkgId from provides,packages where provides.name LIKE '%%%s%%' AND provides.pkgKey = packages.pkgKey" % quotename) for ob in cur.fetchall(): if (self.excludes[rep].has_key(ob['packages.pkgId'])): continue pkg = self.getPackageDetails(ob['packages.pkgId']) result.append((self.pc(pkg,rep)))
557b2254849543ae41b7593fc640688ccc96826c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/557b2254849543ae41b7593fc640688ccc96826c/sqlitesack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 1595, 12, 2890, 16, 529, 4672, 468, 1220, 1410, 5903, 506, 2566, 598, 279, 508, 4191, 279, 738, 1815, 12, 529, 18, 4720, 29909, 6134, 422, 300, 21, 13, 563, 273, 5378, 4914, 1069...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 1595, 12, 2890, 16, 529, 4672, 468, 1220, 1410, 5903, 506, 2566, 598, 279, 508, 4191, 279, 738, 1815, 12, 529, 18, 4720, 29909, 6134, 422, 300, 21, 13, 563, 273, 5378, 4914, 1069...
assert 1 < len(self.data)
assert MIN_SIZE < len(self.data)
def truncate(self): assert 1 < len(self.data) # Store last state (for undo) self.undo = UndoTruncate(self)
195495832154a420d30e3d0c4056f1c3ba5abf79 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/195495832154a420d30e3d0c4056f1c3ba5abf79/file_fuzzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10310, 12, 2890, 4672, 1815, 6989, 67, 4574, 411, 562, 12, 2890, 18, 892, 13, 468, 225, 4994, 1142, 919, 261, 1884, 15436, 13, 365, 18, 31226, 273, 1351, 2896, 25871, 12, 2890, 13, 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, 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, 10310, 12, 2890, 4672, 1815, 6989, 67, 4574, 411, 562, 12, 2890, 18, 892, 13, 468, 225, 4994, 1142, 919, 261, 1884, 15436, 13, 365, 18, 31226, 273, 1351, 2896, 25871, 12, 2890, 13, 2, ...
} PRODUCTION_URLS = {'CHECKOUT_BUTTON': 'https://checkout.google.com/buttons/checkout.gif?merchant_id=%s&w=180&h=46&style=white&variant=text',
} __PRODUCTION_URLS={'CHECKOUT_BUTTON': 'https://checkout.google.com/buttons/checkout.gif?merchant_id=%s&w=180&h=46&style=white&variant=text',
def __init__(self, message, where=''): self.where = where return Exception.__init__(self, message)
2dae73cb17e61665bc3a359c80357abb15f324ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/2dae73cb17e61665bc3a359c80357abb15f324ba/controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 883, 16, 1625, 2218, 11, 4672, 365, 18, 6051, 273, 1625, 327, 1185, 16186, 2738, 972, 12, 2890, 16, 883, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 883, 16, 1625, 2218, 11, 4672, 365, 18, 6051, 273, 1625, 327, 1185, 16186, 2738, 972, 12, 2890, 16, 883, 13, 2, -100, -100, -100, -100, -100, -100, -100,...
app.mainFrame, account=account, itsView=view)
app.mainFrame, account=account, rv=view)
def ensureAccountSetUp(view, sharing=False, inboundMail=False, outboundMail=False): """ A helper method to make sure the user gets the account info filled out. This method will examine all the account info and if anything is missing, a dialog will explain to the user what is missing; if they want to proceed to enter that information, the accounts dialog will pop up. If at any point they hit Cancel, this method will return False. Only when all account info is filled in will this method return True. @param view: The repository view object @type view: L{repository.persistence.RepositoryView} @return: True if accounts are set up; False otherwise. """ while True: DAVReady = not sharing or isWebDAVSetUp(view) InboundMailReady = not inboundMail or isInboundMailSetUp(view) SMTPReady = not outboundMail or isSMTPSetUp(view) if DAVReady and InboundMailReady and SMTPReady: return True msg = _(u"The following account(s) need to be set up:\n\n") if not DAVReady: msg += _(u" - WebDAV (collection publishing)\n") if not InboundMailReady: msg += _(u" - IMAP/POP (inbound email)\n") if not SMTPReady: msg += _(u" - SMTP (outbound email)\n") msg += _(u"\nWould you like to enter account information now?") app = wx.GetApp() response = application.dialogs.Util.yesNo(app.mainFrame, _(u"Account set up"), msg) if response == False: return False if not InboundMailReady: account = pim.mail.getCurrentMailAccount(view) elif not SMTPReady: """ Returns the defaultSMTPAccount or None""" account = pim.mail.getCurrentSMTPAccount(view) else: account = schema.ns('osaf.app', view).currentWebDAVAccount.item response = \ application.dialogs.AccountPreferences.ShowAccountPreferencesDialog( app.mainFrame, account=account, itsView=view) if response == False: return False
7e3f441ec7f5dd800c50b6cb58ac66885efa0ff3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/7e3f441ec7f5dd800c50b6cb58ac66885efa0ff3/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 3032, 694, 1211, 12, 1945, 16, 21001, 33, 8381, 16, 13357, 6759, 33, 8381, 16, 11663, 6759, 33, 8381, 4672, 3536, 432, 4222, 707, 358, 1221, 3071, 326, 729, 5571, 326, 2236, 1123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3387, 3032, 694, 1211, 12, 1945, 16, 21001, 33, 8381, 16, 13357, 6759, 33, 8381, 16, 11663, 6759, 33, 8381, 4672, 3536, 432, 4222, 707, 358, 1221, 3071, 326, 729, 5571, 326, 2236, 1123, ...
SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.coroutine[11]>, line 1)
SyntaxError: 'return' with argument inside generator (<doctest test.test_generators.__test__.coroutine[22]>, line 1)
>>> def f(): return lambda x=(yield): 1
0d62a062066a4cbc8aabab9c305d60ebf7922c8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0d62a062066a4cbc8aabab9c305d60ebf7922c8c/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 13332, 327, 3195, 619, 28657, 23604, 4672, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4080, 1652, 284, 13332, 327, 3195, 619, 28657, 23604, 4672, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sage: J = JonesDatabase() sage: J.get(163, var='z')
sage: J = JonesDatabase() sage: J.get(163, var='z')
def get(self, S, var='a'): """ Return all fields in the database ramified exactly at the primes in S.
dab2a474ba73225ad2422efb1584fdc805479456 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/dab2a474ba73225ad2422efb1584fdc805479456/jones.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 348, 16, 569, 2218, 69, 11, 4672, 3536, 2000, 777, 1466, 316, 326, 2063, 24975, 939, 8950, 622, 326, 846, 4485, 316, 348, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 348, 16, 569, 2218, 69, 11, 4672, 3536, 2000, 777, 1466, 316, 326, 2063, 24975, 939, 8950, 622, 326, 846, 4485, 316, 348, 18, 2, -100, -100, -100, -100, -100, -100, ...
if self.ksdata.bootloader["appendLine"] != "": self.parameters_entry.set_text(self.ksdata.bootloader["appendLine"])
self.parameters_entry.set_text(self.ksdata.bootloader["appendLine"])
def fillData(self): if self.ksdata.bootloader["location"] == "none": self.no_bootloader_radio.set_active(True) elif self.ksdata.bootloader["location"] == "mbr": self.mbr_radiobutton.set_active(True) elif self.ksdata.bootloader["location"] == "partition": self.firstsector_radiobutton.set_active(True)
b37774c9acfa1ca84ba35a7991930d25fda1410e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5376/b37774c9acfa1ca84ba35a7991930d25fda1410e/bootloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 751, 12, 2890, 4672, 309, 365, 18, 7904, 892, 18, 7137, 6714, 9614, 3562, 11929, 422, 315, 6102, 6877, 365, 18, 2135, 67, 7137, 6714, 67, 17006, 18, 542, 67, 3535, 12, 5510, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 751, 12, 2890, 4672, 309, 365, 18, 7904, 892, 18, 7137, 6714, 9614, 3562, 11929, 422, 315, 6102, 6877, 365, 18, 2135, 67, 7137, 6714, 67, 17006, 18, 542, 67, 3535, 12, 5510, 13, ...
logger.Error("Can't display the drbd config: %s" % result.fail_reason)
logger.Error("Can't display the drbd config: %s - %s" % (result.fail_reason, result.output))
def _GetShowData(cls, minor): """Return the `drbdsetup show` data for a minor.
6c896e2ffcdf4889279d9b6607e23d61bab96bc4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/6c896e2ffcdf4889279d9b6607e23d61bab96bc4/bdev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 5706, 751, 12, 6429, 16, 8439, 4672, 3536, 990, 326, 1375, 3069, 16410, 8401, 2405, 68, 501, 364, 279, 8439, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 5706, 751, 12, 6429, 16, 8439, 4672, 3536, 990, 326, 1375, 3069, 16410, 8401, 2405, 68, 501, 364, 279, 8439, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
SetupDiGetDeviceRegistryProperty(
if SetupDiGetDeviceRegistryProperty(
def __str__(self): return "DevicePath:%s" % (self.DevicePath,)
3124e5c8e4a55336e064e9ca2eb9c6558174175c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/3124e5c8e4a55336e064e9ca2eb9c6558174175c/scanwin32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 315, 3654, 743, 5319, 87, 6, 738, 261, 2890, 18, 3654, 743, 16, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 701, 972, 12, 2890, 4672, 327, 315, 3654, 743, 5319, 87, 6, 738, 261, 2890, 18, 3654, 743, 16, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.__setup__() def __setup__(self): '''This method must be overloaded during subclassing. All module specific setup, including all publication, occurs here.'''
self.external = {}
def __init__(self, core, datastore): object.__init__(self) self.core = core self.data = "%s/%s" % (datastore, self.__name__) self.__setup__()
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, 1001, 2738, 972, 12, 2890, 16, 2922, 16, 9290, 4672, 733, 16186, 2738, 972, 12, 2890, 13, 365, 18, 3644, 273, 2922, 365, 18, 892, 273, 2213, 87, 5258, 87, 6, 738, 261, 24522, 16, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2922, 16, 9290, 4672, 733, 16186, 2738, 972, 12, 2890, 13, 365, 18, 3644, 273, 2922, 365, 18, 892, 273, 2213, 87, 5258, 87, 6, 738, 261, 24522, 16, 365...
r""" The squares: $a(n) = n^2$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000290;a The squares: a(n) = n^2. sage: a(0) 0 sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(16) 256 sage: a.list(17) [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self):
def __init__(self): r""" The squares: $a(n) = n^2$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000290;a The squares: a(n) = n^2. sage: a(0) 0 sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(16) 256 sage: a.list(17) [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256] AUTHOR: -- Jaap Spies (2007-01-25) """
def _eval(self, n): return Integer(2*n) + sloane.A010060(n)
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 22, 14, 82, 13, 397, 272, 383, 8806, 18, 37, 1611, 713, 4848, 12, 82, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 22, 14, 82, 13, 397, 272, 383, 8806, 18, 37, 1611, 713, 4848, 12, 82, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.vm.storeVm(("image/dmargs", " ".join(self.dmargs)),
self.vm.storeVm(("image/dmargs", " ".join([ x for x in self.dmargs if x != "-sdl" and x != "-disable-opengl" and x != "-serial" and x != "pty" ])),
def configure(self, vmConfig): ImageHandler.configure(self, vmConfig)
b135d03c6ce837c9404fea856418cbdc89f34a34 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/b135d03c6ce837c9404fea856418cbdc89f34a34/image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 4268, 809, 4672, 3421, 1503, 18, 14895, 12, 2890, 16, 4268, 809, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 5068, 12, 2890, 16, 4268, 809, 4672, 3421, 1503, 18, 14895, 12, 2890, 16, 4268, 809, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
result = PyAutoTextTestRuner(verbosity=verbosity).run(pyauto_suite)
result = unittest.TextTestRunner(verbosity=verbosity).run(pyauto_suite)
def _Run(self): """Run the tests.""" if self._options.wait_for_debugger: raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
bfd181c1d069c9312211a07462b7d9a3f7f79f53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/bfd181c1d069c9312211a07462b7d9a3f7f79f53/pyauto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1997, 12, 2890, 4672, 3536, 1997, 326, 7434, 12123, 309, 365, 6315, 2116, 18, 7048, 67, 1884, 67, 4148, 693, 30, 1831, 67, 2630, 2668, 4761, 19977, 358, 1207, 738, 87, 471, 6800, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 1997, 12, 2890, 4672, 3536, 1997, 326, 7434, 12123, 309, 365, 6315, 2116, 18, 7048, 67, 1884, 67, 4148, 693, 30, 1831, 67, 2630, 2668, 4761, 19977, 358, 1207, 738, 87, 471, 6800, ...
from pychess.Utils.GameModel import GameModel from pychess.widgets.gamewidget import GameWidget panels_gw = GameWidget(GameModel())
def delete_event (widget, *args): widgets["preferences"].hide() if panels_gw in key2gmwidg.values(): delGameWidget(panels_gw) return True
c97e7d768955e1225752ee2ea0c4ecb61a56164c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/c97e7d768955e1225752ee2ea0c4ecb61a56164c/preferencesDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 2575, 261, 6587, 16, 380, 1968, 4672, 10965, 9614, 23219, 6, 8009, 11248, 1435, 309, 20582, 67, 28500, 316, 498, 22, 23336, 30902, 75, 18, 2372, 13332, 1464, 12496, 4609, 12, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 2575, 261, 6587, 16, 380, 1968, 4672, 10965, 9614, 23219, 6, 8009, 11248, 1435, 309, 20582, 67, 28500, 316, 498, 22, 23336, 30902, 75, 18, 2372, 13332, 1464, 12496, 4609, 12, 7...
self.finished(WARNINGS) return
self.finished(SKIPPED) return SKIPPED
def start(self): changes = self.step_status.build.getChanges() if len(changes) < 1: log.msg("No changes, not doing anything") self.step_status.setColor("yellow") self.step_status.setText(["Skipped patch step:", "no patch"]) self.finished(WARNINGS) return
7c0e13d714a10ff2bb840e5f235cded90b3ebac7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/7c0e13d714a10ff2bb840e5f235cded90b3ebac7/steps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 3478, 273, 365, 18, 4119, 67, 2327, 18, 3510, 18, 588, 7173, 1435, 309, 562, 12, 6329, 13, 411, 404, 30, 613, 18, 3576, 2932, 2279, 3478, 16, 486, 9957, 6967, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 3478, 273, 365, 18, 4119, 67, 2327, 18, 3510, 18, 588, 7173, 1435, 309, 562, 12, 6329, 13, 411, 404, 30, 613, 18, 3576, 2932, 2279, 3478, 16, 486, 9957, 6967, 79...
fh = vfs.open(url, vfs.WRITE)
fh = vfs.make_file(url)
def save(self,filename=None): if filename: url = vfs.normalize(filename) fh = vfs.open(url, vfs.WRITE) if fh: fh.write(str(self)) fh.close() else: eprint("Couldn't open %s for writing.\n" % filename)
c73787ad677ae3d1da4a6289f419a659fdd7f198 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/c73787ad677ae3d1da4a6289f419a659fdd7f198/ENVI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 3459, 33, 7036, 4672, 309, 1544, 30, 880, 273, 20682, 18, 12237, 12, 3459, 13, 7625, 273, 20682, 18, 6540, 67, 768, 12, 718, 13, 309, 7625, 30, 7625, 18, 2626, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 3459, 33, 7036, 4672, 309, 1544, 30, 880, 273, 20682, 18, 12237, 12, 3459, 13, 7625, 273, 20682, 18, 6540, 67, 768, 12, 718, 13, 309, 7625, 30, 7625, 18, 2626, 12...
Format = WikiProcessor(self.env, language) html = Format.process(hdf, text) raw = nodes.raw('',html, format='html')
processor = WikiProcessor(self.env, language) html = processor.process(req.hdf, text) raw = nodes.raw('', html, format='html')
def code_formatter(language, text): Format = WikiProcessor(self.env, language) html = Format.process(hdf, text) raw = nodes.raw('',html, format='html') return raw
10acea223618df63fa5a1b02ab6b404ab2700136 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/10acea223618df63fa5a1b02ab6b404ab2700136/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 981, 67, 12354, 12, 4923, 16, 977, 4672, 6659, 273, 28268, 5164, 12, 2890, 18, 3074, 16, 2653, 13, 1729, 273, 6659, 18, 2567, 12, 3658, 18, 26428, 16, 977, 13, 1831, 273, 2199, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 981, 67, 12354, 12, 4923, 16, 977, 4672, 6659, 273, 28268, 5164, 12, 2890, 18, 3074, 16, 2653, 13, 1729, 273, 6659, 18, 2567, 12, 3658, 18, 26428, 16, 977, 13, 1831, 273, 2199, 18, 1...
def __init__(self, name="faultcohesivedynl"):
def __init__(self, name="faultcohesivedyn"):
def __init__(self, name="faultcohesivedynl"): """ Initialize configuration. """ FaultCohesive.__init__(self, name) Integrator.__init__(self) self._loggingPrefix = "CoDy "
585d276e3fec6301cff1ce6398d04d1bff1bc2cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8645/585d276e3fec6301cff1ce6398d04d1bff1bc2cc/FaultCohesiveDyn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 1546, 643, 2894, 76, 281, 2950, 878, 6, 4672, 3536, 9190, 1664, 18, 3536, 25609, 4249, 76, 281, 688, 16186, 2738, 972, 12, 2890, 16, 508, 13, 15285,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 1546, 643, 2894, 76, 281, 2950, 878, 6, 4672, 3536, 9190, 1664, 18, 3536, 25609, 4249, 76, 281, 688, 16186, 2738, 972, 12, 2890, 16, 508, 13, 15285,...
i = child.expect(['Are you ready for manual configuration? [yes] ', PROMPT])
i = child.expect_exact([CONF, PROMPT])
def main(argv): child = pexpect.spawn('cpan') i = child.expect(['Are you ready for manual configuration? [yes] ', PROMPT]) if i == 0: child.sendline('no') child.expect(PROMPT) else: for cmd in argv[1:]: child.sendline(cmd) child.expect(PROMPT) child.sendline('quit')
6daad0abb715b8b8e59a24f9226a4ca11b3fddaf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10751/6daad0abb715b8b8e59a24f9226a4ca11b3fddaf/cpan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 1151, 273, 293, 12339, 18, 1752, 9533, 2668, 4057, 304, 6134, 277, 273, 1151, 18, 12339, 67, 17165, 3816, 14497, 16, 453, 3942, 1856, 5717, 309, 277, 422, 374, 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, 2774, 12, 19485, 4672, 1151, 273, 293, 12339, 18, 1752, 9533, 2668, 4057, 304, 6134, 277, 273, 1151, 18, 12339, 67, 17165, 3816, 14497, 16, 453, 3942, 1856, 5717, 309, 277, 422, 374, 30,...
return Tag.objects.usage_for_model(self.model, *arg, **kwargs)
return Tag.objects.usage_for_model(self.model, *args, **kwargs)
def usage(self, *args, **kwargs): return Tag.objects.usage_for_model(self.model, *arg, **kwargs)
ce5df4b88ccec3a0f37b04a03cd32e83427a18bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4290/ce5df4b88ccec3a0f37b04a03cd32e83427a18bb/managers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 327, 4034, 18, 6911, 18, 9167, 67, 1884, 67, 2284, 12, 2890, 18, 2284, 16, 380, 3175, 16, 2826, 4333, 13, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 327, 4034, 18, 6911, 18, 9167, 67, 1884, 67, 2284, 12, 2890, 18, 2284, 16, 380, 3175, 16, 2826, 4333, 13, 2, -100, -100, -100, -1...
self.get_script()
def main(self): self.run_installer_commands() self.load_packages() self.run_scripts() self.get_script() self.notify('Startup Completed for %s' % config.get_instance('instance-id'))
17e265cef607780dbf95d175f544c73f7b17bc6a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/17e265cef607780dbf95d175f544c73f7b17bc6a/startup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 4672, 365, 18, 2681, 67, 20163, 67, 7847, 1435, 365, 18, 945, 67, 10308, 1435, 365, 18, 2681, 67, 12827, 1435, 365, 18, 12336, 2668, 22178, 28722, 364, 738, 87, 11, 738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 4672, 365, 18, 2681, 67, 20163, 67, 7847, 1435, 365, 18, 945, 67, 10308, 1435, 365, 18, 2681, 67, 12827, 1435, 365, 18, 12336, 2668, 22178, 28722, 364, 738, 87, 11, 738...
Poll.motion = relation(motion.Motion, backref=backref('polls', cascade='delete',
Poll.motion = relation(motion.Motion, backref=backref('polls', cascade='all',
def find(cls, id, instance_filter=True): try: q = meta.Session.query(Poll) q = q.filter(Poll.id==int(id)) poll = q.one() if ifilter.has_instance() and instance_filter: poll = poll.motion.instance == ifilter.get_instance() \ and poll or None return poll except Exception: return None
bc48e2131081eb487311586471d9d41d6c137642 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10360/bc48e2131081eb487311586471d9d41d6c137642/poll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 12, 6429, 16, 612, 16, 791, 67, 2188, 33, 5510, 4672, 775, 30, 1043, 273, 2191, 18, 2157, 18, 2271, 12, 19085, 13, 1043, 273, 1043, 18, 2188, 12, 19085, 18, 350, 631, 474, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 12, 6429, 16, 612, 16, 791, 67, 2188, 33, 5510, 4672, 775, 30, 1043, 273, 2191, 18, 2157, 18, 2271, 12, 19085, 13, 1043, 273, 1043, 18, 2188, 12, 19085, 18, 350, 631, 474, 12, ...
f=open(self.config.sections["userinfo"]["pic"],'r')
f=open(self.config.sections["userinfo"]["pic"],'rb')
def UserInfoRequest(self, msg):
2115eae6f33046a0e4d1191a4152a8128c3630b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8738/2115eae6f33046a0e4d1191a4152a8128c3630b9/pynicotine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25003, 691, 12, 2890, 16, 1234, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25003, 691, 12, 2890, 16, 1234, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.hboxlayout = QtGui.QHBoxLayout() self.hboxlayout.setMargin(0) self.hboxlayout.setSpacing(6) self.hboxlayout.setObjectName("hboxlayout") spacerItem = QtGui.QSpacerItem(35,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) self.hboxlayout.addItem(spacerItem) self.done_btn = QtGui.QToolButton(self.body_frame) self.done_btn.setIcon(QtGui.QIcon("../../../../:icons/MinimizeEnergyPropDialog_image2")) self.done_btn.setObjectName("done_btn") self.hboxlayout.addWidget(self.done_btn) self.abort_btn = QtGui.QToolButton(self.body_frame) self.abort_btn.setIcon(QtGui.QIcon("../../../../:icons/MinimizeEnergyPropDialog_image3")) self.abort_btn.setObjectName("abort_btn") self.hboxlayout.addWidget(self.abort_btn) self.restore_btn = QtGui.QToolButton(self.body_frame) self.restore_btn.setIcon(QtGui.QIcon("../../../../:icons/MinimizeEnergyPropDialog_image4")) self.restore_btn.setObjectName("restore_btn") self.hboxlayout.addWidget(self.restore_btn) self.whatsthis_btn = QtGui.QToolButton(self.body_frame) self.whatsthis_btn.setIcon(QtGui.QIcon("../../../../:icons/MinimizeEnergyPropDialog_image5")) self.whatsthis_btn.setObjectName("whatsthis_btn") self.hboxlayout.addWidget(self.whatsthis_btn) spacerItem1 = QtGui.QSpacerItem(35,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) self.hboxlayout.addItem(spacerItem1) self.vboxlayout1.addLayout(self.hboxlayout) self.vboxlayout2 = QtGui.QVBoxLayout() self.vboxlayout2.setMargin(0) self.vboxlayout2.setSpacing(6) self.vboxlayout2.setObjectName("vboxlayout2") self.buttonGroup8 = QtGui.QGroupBox(self.body_frame) self.buttonGroup8.setObjectName("buttonGroup8") self.vboxlayout3 = QtGui.QVBoxLayout(self.buttonGroup8) self.vboxlayout3.setMargin(9) self.vboxlayout3.setSpacing(6) self.vboxlayout3.setObjectName("vboxlayout3")
def setupUi(self, MinimizeEnergyPropDialog): MinimizeEnergyPropDialog.setObjectName("MinimizeEnergyPropDialog") MinimizeEnergyPropDialog.resize(QtCore.QSize(QtCore.QRect(0,0,400,842).size()).expandedTo(MinimizeEnergyPropDialog.minimumSizeHint()))
4cf7d69a606c10cf896a0045c5df06ba517408f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/4cf7d69a606c10cf896a0045c5df06ba517408f0/MinimizeEnergyPropDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5444, 10153, 664, 31920, 4658, 6353, 4672, 5444, 10153, 664, 31920, 4658, 6353, 18, 542, 16707, 2932, 2930, 10153, 664, 31920, 4658, 6353, 7923, 5444, 10153, 664, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5444, 10153, 664, 31920, 4658, 6353, 4672, 5444, 10153, 664, 31920, 4658, 6353, 18, 542, 16707, 2932, 2930, 10153, 664, 31920, 4658, 6353, 7923, 5444, 10153, 664, ...
self.add_iter1_messages(messages, particle) self.add_iter2_messages(messages, particle) self.add_iter3_messages(messages, particle) return messages def add_iter1_messages(self, messages, particle): if type(particle) == Particle: self.specex.set_neighborhood_rand(particle) for n in self.specex.topology.iterneighbors(particle): messages.add(n) def add_iter2_messages(self, messages, particle): if type(particle) == Particle: particle.iters += 1 self.specex.set_neighborhood_rand(particle) for n in self.specex.topology.iterneighbors(particle): messages.add(n) ndummy = Dummy(n, particle.iters-1, particle.batches) self.specex.set_neighborhood_rand(ndummy) for n2 in self.specex.topology.iterneighbors(ndummy): messages.add(n2) particle.iters -= 1 else: self.specex.set_neighborhood_rand(particle) for n in self.specex.topology.iterneighbors(particle): messages.add(n) def add_iter3_messages(self, messages, particle): if type(particle) == Particle: particle.iters += 2 self.specex.set_neighborhood_rand(particle) for n in self.specex.topology.iterneighbors(particle): messages.add(n) ndummy = Dummy(n, particle.iters-2, particle.batches) self.specex.set_neighborhood_rand(ndummy) for n2 in self.specex.topology.iterneighbors(ndummy): messages.add(n2) ndummy = Dummy(n, particle.iters-1, particle.batches) self.specex.set_neighborhood_rand(ndummy) for n2 in self.specex.topology.iterneighbors(ndummy): messages.add(n2) n2dummy = Dummy(n2, particle.iters-2, particle.batches)
self.specex.set_neighborhood_rand(particle) for n in self.specex.topology.iterneighbors(particle): messages.add(n) ndummy = Dummy(n, particle.iters+1, particle.batches) self.specex.set_neighborhood_rand(ndummy) for n2 in self.specex.topology.iterneighbors(ndummy): messages.add(n2) if type(particle) == Particle: n2dummy = Dummy(n2, particle.iters+2, particle.batches)
def message_ids(self, particle): messages = set() self.add_iter1_messages(messages, particle) self.add_iter2_messages(messages, particle) self.add_iter3_messages(messages, particle) return messages
41686498fea7b977892a39d72e5f04f2f7875c1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/966/41686498fea7b977892a39d72e5f04f2f7875c1a/specmethod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 883, 67, 2232, 12, 2890, 16, 20036, 4672, 2743, 273, 444, 1435, 365, 18, 1289, 67, 2165, 21, 67, 6833, 12, 6833, 16, 20036, 13, 365, 18, 1289, 67, 2165, 22, 67, 6833, 12, 6833, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 883, 67, 2232, 12, 2890, 16, 20036, 4672, 2743, 273, 444, 1435, 365, 18, 1289, 67, 2165, 21, 67, 6833, 12, 6833, 16, 20036, 13, 365, 18, 1289, 67, 2165, 22, 67, 6833, 12, 6833, 16, ...
self._to_add.add(key)
self.added.add(key)
def touch_handler(self, key, handler=None): key = self.normalize_key(key)
3faba4a24cd4eaf0a1e3725c3cf35e7e68fc661b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12681/3faba4a24cd4eaf0a1e3725c3cf35e7e68fc661b/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6920, 67, 4176, 12, 2890, 16, 498, 16, 1838, 33, 7036, 4672, 498, 273, 365, 18, 12237, 67, 856, 12, 856, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6920, 67, 4176, 12, 2890, 16, 498, 16, 1838, 33, 7036, 4672, 498, 273, 365, 18, 12237, 67, 856, 12, 856, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(iwtd, owtd, ewtd) = select.select(selectables, [], selectables)
(iwtd, owtd, ewtd) = select.select(selectables, [], [])
def run(self, sockets): self.running = 1
5ec5176a26cc188e3bf773bf903bbc68efe95421 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/5ec5176a26cc188e3bf773bf903bbc68efe95421/Network.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 16762, 4672, 365, 18, 8704, 273, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 16762, 4672, 365, 18, 8704, 273, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.func()
self.doit()
def run(self): try: self.func() except Exception, err: import traceback try: err = unicode(err) except: err = repr(err) self.error = (err, traceback.format_exc())
5d846dae6f85e2447600adb72f3a0dbff2b867f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/5d846dae6f85e2447600adb72f3a0dbff2b867f1/metadata_bulk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 365, 18, 2896, 305, 1435, 1335, 1185, 16, 393, 30, 1930, 10820, 775, 30, 393, 273, 5252, 12, 370, 13, 1335, 30, 393, 273, 8480, 12, 370, 13, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 365, 18, 2896, 305, 1435, 1335, 1185, 16, 393, 30, 1930, 10820, 775, 30, 393, 273, 5252, 12, 370, 13, 1335, 30, 393, 273, 8480, 12, 370, 13, 365, 18, ...
rp_source.getinode() != -1:
rp_source.getinode() != 0:
def rename(rp_source, rp_dest): """Rename rp_source to rp_dest""" assert rp_source.conn is rp_dest.conn log.Log(lambda: "Renaming %s to %s" % (rp_source.path, rp_dest.path), 7) if not rp_source.lstat(): rp_dest.delete() else: if rp_dest.lstat() and rp_source.getinode() == rp_dest.getinode() and \ rp_source.getinode() != -1: log.Log("Warning: Attempt to rename over same inode: %s to %s" % (rp_source.path, rp_dest.path), 2) # You can't rename one hard linked file over another rp_source.delete() else: try: rp_source.conn.os.rename(rp_source.path, rp_dest.path) except OSError, error: if error.errno != errno.EEXIST: raise # On Windows, files can't be renamed on top of an existing file rp_source.conn.os.unlink(rp_dest.path) rp_source.conn.os.rename(rp_source.path, rp_dest.path) rp_dest.data = rp_source.data rp_source.data = {'type': None}
da6d8bb66e68116f3697e8fdd3e68b60e819c32f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8033/da6d8bb66e68116f3697e8fdd3e68b60e819c32f/rpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6472, 12, 13832, 67, 3168, 16, 8715, 67, 10488, 4672, 3536, 16019, 8715, 67, 3168, 358, 8715, 67, 10488, 8395, 1815, 8715, 67, 3168, 18, 4646, 353, 8715, 67, 10488, 18, 4646, 613, 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, 6472, 12, 13832, 67, 3168, 16, 8715, 67, 10488, 4672, 3536, 16019, 8715, 67, 3168, 358, 8715, 67, 10488, 8395, 1815, 8715, 67, 3168, 18, 4646, 353, 8715, 67, 10488, 18, 4646, 613, 18, ...
atomicPossibilityLayout.addWidget(self.possibilityNumSpinBox) atomicPossibilityLayout.addWidget(self.numPossibilities)
atomicPossibilityLayout.addWidget(self.atomicPossibilityNumSpinBox) atomicPossibilityLayout.addWidget(self.atomicNumPossibilities)
def setupAtomicTab(self): #These go in the atomic tab self.possibilityNumSpinBox = QtGui.QSpinBox() self.possibilityNumSpinBox.setRange(0, 0) self.numPossibilities = QtGui.QLabel('of ?') self.atomicForwardRadioButton = QtGui.QRadioButton('Forward') self.atomicForwardRadioButton.setChecked(True) self.atomicBackwardRadioButton = QtGui.QRadioButton('Backward') self.atomicResNames = { -2:QtGui.QLabel('?'), -1:QtGui.QLabel('?'), 0:QtGui.QLabel('?'), 1:QtGui.QLabel('?'), 2:QtGui.QLabel('?') } self.atomicResNumbers = { -2:QtGui.QLabel('#?'), -1:QtGui.QLabel('#?'), 0:QtGui.QLabel('#?'), 1:QtGui.QLabel('#?'), 2:QtGui.QLabel('#?') } for i in self.atomicResNames.keys(): self.atomicResNames[i].setStyleSheet("QLabel {font-size: 40pt}")#.setFont(resNameFont) self.atomicResNumbers[i].setAlignment(QtCore.Qt.AlignHCenter) self.atomicResNumbers[i].setStyleSheet("QLabel {font-size: 12pt}") #.setFont(resIndexFont) self.atomicResNumbers[0].setStyleSheet("QLabel {color: white; background-color:black; font-size: 12pt}") #This uses syntax similar to Cascading Style Sheets (CSS) self.atomicResNames[0].setStyleSheet("QLabel {color: white; background-color:black; font-size: 40pt}") self.atomicResNumbers[1].setStyleSheet("QLabel {color: green; font-size: 12pt}") #This uses syntax similar to Cascading Style Sheets (CSS) self.atomicResNames[1].setStyleSheet("QLabel {color: green; font-size: 40pt}") self.back1resButton = QtGui.QPushButton('<-') self.forward1resButton = QtGui.QPushButton('->') atomicLayout = QtGui.QVBoxLayout() atomicPossibilityLayout = QtGui.QHBoxLayout() atomicPossibilityLayout.setAlignment(QtCore.Qt.AlignHCenter) atomicPossibilityLayout.addWidget(self.possibilityNumSpinBox) atomicPossibilityLayout.addWidget(self.numPossibilities) atomicForwardBackwardLayout = QtGui.QVBoxLayout() atomicForwardBackwardLayout.addWidget(self.atomicForwardRadioButton) atomicForwardBackwardLayout.addWidget(self.atomicBackwardRadioButton) atomicPossibilityLayout.addLayout(atomicForwardBackwardLayout) atomicLayout.addLayout(atomicPossibilityLayout) atomic3ResLayout = QtGui.QHBoxLayout() atomic3ResSublayouts = {-2:QtGui.QVBoxLayout(), -1:QtGui.QVBoxLayout(), 0:QtGui.QVBoxLayout(), 1:QtGui.QVBoxLayout(), 2:QtGui.QVBoxLayout() }
e8ef4efb1ee70bddc3bc00074e7599d9adb9bfb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/e8ef4efb1ee70bddc3bc00074e7599d9adb9bfb9/structure_editor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 23102, 5661, 12, 2890, 4672, 468, 29690, 1960, 316, 326, 7960, 3246, 365, 18, 917, 17349, 2578, 3389, 267, 3514, 273, 23425, 18, 53, 3389, 267, 3514, 1435, 365, 18, 917, 17349, 257...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 23102, 5661, 12, 2890, 4672, 468, 29690, 1960, 316, 326, 7960, 3246, 365, 18, 917, 17349, 2578, 3389, 267, 3514, 273, 23425, 18, 53, 3389, 267, 3514, 1435, 365, 18, 917, 17349, 257...
print >>sys.stderr,"fip: Friend",self.data['name'],"is helping with torrent",torrentname
if DEBUG: print >>sys.stderr,"fip: Friend",self.data['name'],"is helping with torrent",torrentname
def OnPaint(self, evt): dc = wx.BufferedPaintDC(self) dc.SetBackground(wx.Brush(self.backgroundColor)) dc.Clear() if self.dataBitmap: dc.DrawBitmap(self.dataBitmap, self.xpos,self.ypos, True)
fa71dd7265b4be235addc3475388a6e9d53094ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9686/fa71dd7265b4be235addc3475388a6e9d53094ec/FriendsItemPanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 12699, 12, 2890, 16, 6324, 4672, 6744, 273, 7075, 18, 17947, 12699, 5528, 12, 2890, 13, 6744, 18, 694, 8199, 12, 27226, 18, 19114, 1218, 12, 2890, 18, 9342, 2957, 3719, 6744, 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, 2755, 12699, 12, 2890, 16, 6324, 4672, 6744, 273, 7075, 18, 17947, 12699, 5528, 12, 2890, 13, 6744, 18, 694, 8199, 12, 27226, 18, 19114, 1218, 12, 2890, 18, 9342, 2957, 3719, 6744, 18, ...
def make_primary_key(self, table, col_name): """
def make_primary_key(self, table_name, col_name): """ EMILY - documentation
def make_primary_key(self, table, col_name): """ WORD ON THE STREET IS THAT SQLITE IS RETARDED ABOUT *ALTER TABLE* COMMANDS... SO MEANWHILE WE ACCOMPLISH THIS BY CREATING A TEMPORARY TABLE. SUGGESTIONS FOR SPEEDUP ARE WELCOME. (OR JUST SEND A PATCH...) MAKE NOTE IN DOCS THAT TO GET AN AUTO-INCREMENTING PRIMARY KEY, YOU MUST USE THE FULL WORD *INTEGER* INSTEAD OF *INT*. """ if not self.__skeleton__.has_key(table): raise ValueError("Database has no table %s."%table) if not self.__skeleton__[table].has_key(col_name): raise ValueError("Table %s has no column %s."%(table,col_name)) # Update the skeleton: self.__skeleton__[table][col_name]['primary_key'] = True # Get an ordered list (with the primary key info updated): cur_list = skel_to_col_attr_list(self.__skeleton__[table]) new = '' for col in cur_list: new += col[0] +', ' new = new.rstrip(', ') new_attr = '' new_attr = '' for col in cur_list: if col[2]: # If primary key: new_attr += col[0] + ' ' + col[1] + ' primary key, ' else: new_attr += col[0] + ' ' + col[1] + ', ' new_attr = new_attr.rstrip(', ') # Silly SQLite -- we have to make a temp table to hold info... self.__connection__.executescript(""" create temporary table spam(%s); insert into spam select %s from %s; drop table %s; create table %s (%s); """%(new_attr, new, table, table, table,new_attr)) # Update indices in new table new_table_set_col_attr(self.__connection__, table, self.__skeleton__[table]) # Now we can plop our data into the *new* table: self.__connection__.executescript(""" insert into %s select %s from spam; drop table spam; """%(table, new)) self.vacuum()
12098d45ba68813e42a6a22032a2f2e6d360e158 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/12098d45ba68813e42a6a22032a2f2e6d360e158/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 8258, 67, 856, 12, 2890, 16, 1014, 67, 529, 16, 645, 67, 529, 4672, 3536, 7141, 25554, 300, 7323, 225, 21464, 6229, 12786, 2347, 862, 1584, 4437, 7662, 789, 3063, 5398, 4437, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8258, 67, 856, 12, 2890, 16, 1014, 67, 529, 16, 645, 67, 529, 4672, 3536, 7141, 25554, 300, 7323, 225, 21464, 6229, 12786, 2347, 862, 1584, 4437, 7662, 789, 3063, 5398, 4437, ...
return [Graph(g) for g in os.popen("nauty-geng %s"%(options) ).read().split()]
return [graph.Graph(g) for g in os.popen("nauty-geng %s"%(options) ).read().split()]
def nauty_geng(self, options=""): r""" Calls the geng program in the optional nauty spkg to generate graphs. The options argument is passed straight to nauty.
7b818a3189e3277ddcf20ca343faff5933f326e5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/7b818a3189e3277ddcf20ca343faff5933f326e5/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 5854, 93, 67, 4507, 75, 12, 2890, 16, 702, 1546, 6, 4672, 436, 8395, 23665, 326, 3157, 75, 5402, 316, 326, 3129, 290, 5854, 93, 1694, 14931, 358, 2103, 19422, 18, 225, 1021, 702, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 290, 5854, 93, 67, 4507, 75, 12, 2890, 16, 702, 1546, 6, 4672, 436, 8395, 23665, 326, 3157, 75, 5402, 316, 326, 3129, 290, 5854, 93, 1694, 14931, 358, 2103, 19422, 18, 225, 1021, 702, ...
self.fill("return ")
self.fill("return")
def _Return(self, t): self.fill("return ") if t.value: self.dispatch(t.value)
124df8398dfcb176fbf568130864aad9c8aac103 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/124df8398dfcb176fbf568130864aad9c8aac103/unparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 990, 12, 2890, 16, 268, 4672, 365, 18, 5935, 2932, 2463, 7923, 309, 268, 18, 1132, 30, 365, 18, 10739, 12, 88, 18, 1132, 13, 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, 389, 990, 12, 2890, 16, 268, 4672, 365, 18, 5935, 2932, 2463, 7923, 309, 268, 18, 1132, 30, 365, 18, 10739, 12, 88, 18, 1132, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
"python setup.py install " "--root=$RPM_BUILD_ROOT " "--record=INSTALLED_FILES"),
("%s setup.py install " "--root=$RPM_BUILD_ROOT " "--record=INSTALLED_FILES") % self.python),
def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version(), '%define release ' + self.release, '', 'Summary: ' + self.distribution.get_description(), ]
742f4c9a5d5b54c907d463255f31d9fcfa1f2ce9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/742f4c9a5d5b54c907d463255f31d9fcfa1f2ce9/bdist_rpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6540, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
if self.with_default_memberarea: self._setupHomeFolder()
def _setupPloneSite_with_genericsetup(self): '''Creates the site using GenericSetup.''' start = time() if self.base_profile != default_base_profile: self._print('Adding Plone Site (%s) ... ' % (self.base_profile,)) else: self._print('Adding Plone Site ... ') # Add Plone site factory = self.app.manage_addProduct['CMFPlone'] factory.addPloneSite(self.id, create_userfolder=1, snapshot=0, profile_id=self.base_profile) # Pre-create default memberarea to speed up the tests if self.with_default_memberarea: self._setupHomeFolder() self._commit() self._print('done (%.3fs)\n' % (time()-start,))
b2f4b0d2369f737a0ae5007c9d8cbbfa29076dab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11947/b2f4b0d2369f737a0ae5007c9d8cbbfa29076dab/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 1749, 476, 4956, 67, 1918, 67, 13540, 8401, 12, 2890, 4672, 9163, 2729, 326, 2834, 1450, 7928, 7365, 1093, 6309, 787, 273, 813, 1435, 309, 365, 18, 1969, 67, 5040, 480, 805, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 1749, 476, 4956, 67, 1918, 67, 13540, 8401, 12, 2890, 4672, 9163, 2729, 326, 2834, 1450, 7928, 7365, 1093, 6309, 787, 273, 813, 1435, 309, 365, 18, 1969, 67, 5040, 480, 805, ...
def install_source(self, fname): cp_p(fname, self.source_dir) def install_binary(self, fname): cp_p(fname, self.binary_dir) def install_ez(self, ez_fname, desc, v, runtime_deps, registerForPackaging = True):
def install_source(self, fname): log(LOG_INSTALL, "Installing", fname, "to", self.source_dir) cp_p(fname, self.source_dir) def install_binary(self, fname): log(LOG_INSTALL, "Installing", fname, "to", self.binary_dir) cp_p(fname, self.binary_dir) def install_ez(self, project, ez_fname, desc, v, runtime_deps, registerForPackaging = True):
def install_source(self, fname): cp_p(fname, self.source_dir)
e78ffdbf735f50b9f1f463d9c8eb95ba3dc48cde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14832/e78ffdbf735f50b9f1f463d9c8eb95ba3dc48cde/pb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 3168, 12, 2890, 16, 5299, 4672, 3283, 67, 84, 12, 12749, 16, 365, 18, 3168, 67, 1214, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3799, 67, 3168, 12, 2890, 16, 5299, 4672, 3283, 67, 84, 12, 12749, 16, 365, 18, 3168, 67, 1214, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.priv["tasklist"]["columns"].insert(self.TASKLIST_COL_DLEFT, dleft_col)
self.priv["tasklist"]["columns"].insert( self.TASKLIST_COL_DLEFT, dleft_col)
def __create_task_tview(self):
451ea29e3924785bc6c6b8648aa6459b292a0db4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/451ea29e3924785bc6c6b8648aa6459b292a0db4/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 4146, 67, 88, 1945, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 4146, 67, 88, 1945, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"is intented to go in pair with --patch-name-format, " "when using it's 'firstlogline' variable build the "
"is intended to go in pair with --patch-name-format, " "when using it's 'firstlogline' variable to build the "
def update(self, single_commit, concatenate_logs): """ Update an existing tailorized project.
84a4e232a737a749bbbed11a9f7734d1231926f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/84a4e232a737a749bbbed11a9f7734d1231926f6/tailor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 2202, 67, 7371, 16, 11361, 67, 10011, 4672, 3536, 2315, 392, 2062, 5798, 280, 1235, 1984, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 2202, 67, 7371, 16, 11361, 67, 10011, 4672, 3536, 2315, 392, 2062, 5798, 280, 1235, 1984, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return "Done creating a strand of %s." % (dna.form)
return "Done creating a strand of %s." % (self.dna.form)
def done_msg(self): dna = self.dna if not dna: # Mark 2007-06-01 return "No DNA added."
c59a4da9338634fb0fbe286f96c5d216eb46d77b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/c59a4da9338634fb0fbe286f96c5d216eb46d77b/DnaGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2731, 67, 3576, 12, 2890, 4672, 31702, 273, 365, 18, 5176, 69, 225, 309, 486, 31702, 30, 468, 6622, 4044, 27, 17, 7677, 17, 1611, 327, 315, 2279, 463, 11277, 3096, 1199, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2731, 67, 3576, 12, 2890, 4672, 31702, 273, 365, 18, 5176, 69, 225, 309, 486, 31702, 30, 468, 6622, 4044, 27, 17, 7677, 17, 1611, 327, 315, 2279, 463, 11277, 3096, 1199, 2, -100, -100,...
return special.bdtrik(1-p,n,pr)
return binomppf(1-p,n,pr)
def binomisf(p, n, pr=0.5): return special.bdtrik(1-p,n,pr)
708f55b4b3e8081e9554c6e78bbc04ba3bdbb4ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/708f55b4b3e8081e9554c6e78bbc04ba3bdbb4ca/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4158, 362, 7396, 12, 84, 16, 290, 16, 846, 33, 20, 18, 25, 4672, 327, 4158, 362, 11858, 74, 12, 21, 17, 84, 16, 82, 16, 683, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4158, 362, 7396, 12, 84, 16, 290, 16, 846, 33, 20, 18, 25, 4672, 327, 4158, 362, 11858, 74, 12, 21, 17, 84, 16, 82, 16, 683, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, ...
str += (' <dd><code><a href="' + self._uid_to_uri(foverrides.cls()) + ' foverrides.shortname() + '">' + `foverrides` + '</a></code>')
str += ' <dd>'+self._uid_to_uri(foverrides)
def _func_details(self, functions, cls, heading='Function Details'): """ @return: The HTML code for a function details table. This is used by L{_module_to_html} to describe the functions in a module; and by L{_class_to_html} to describe member functions. @rtype: C{string} """ functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>\n'
7e1af2abc702612461ceeb001b4b551d49cb71d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7e1af2abc702612461ceeb001b4b551d49cb71d3/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 445, 3189, 1014, 18, 225, 1220, 353, 1399, 635...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 445, 3189, 1014, 18, 225, 1220, 353, 1399, 635...
ParserElement._exprArgCache[ lookup ] = \ value = self._parseNoCache( instring, loc, doActions, callPreParse )
value = self._parseNoCache( instring, loc, doActions, callPreParse ) ParserElement._exprArgCache[ lookup ] = (value[0],value[1].copy())
def _parseCache( self, instring, loc, doActions=True, callPreParse=True ): #if doActions and self.parseAction: # return self._parseNoCache( instring, loc, doActions, callPreParse ) lookup = (self,instring,loc,callPreParse,doActions) if lookup in ParserElement._exprArgCache: value = ParserElement._exprArgCache[ lookup ] if isinstance(value,Exception): if isinstance(value,ParseBaseException): value.loc = loc raise value return value else: try: ParserElement._exprArgCache[ lookup ] = \ value = self._parseNoCache( instring, loc, doActions, callPreParse ) return value except ParseBaseException, pe: ParserElement._exprArgCache[ lookup ] = pe raise
bb0e6c1d8894ec4cade5f95640e793eeb8be8f10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3693/bb0e6c1d8894ec4cade5f95640e793eeb8be8f10/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 1649, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 16, 745, 1386, 3201, 33, 5510, 262, 30, 468, 430, 741, 6100, 471, 365, 18, 2670, 1803, 30, 468, 565, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 1649, 12, 365, 16, 316, 1080, 16, 1515, 16, 741, 6100, 33, 5510, 16, 745, 1386, 3201, 33, 5510, 262, 30, 468, 430, 741, 6100, 471, 365, 18, 2670, 1803, 30, 468, 565, 327, ...
ooid = createJDS.jsonFileData.keys()[12]
ooid = '0bae7049-bbff-49f2-dead-7e9fe2081125'
def testPutDumpToFile(self): """ testPutDumpToFile(self):(slow=2) """ storage = dumpStorage.ProcessedDumpStorage(self.testDir,**self.initKwargs[2]) ooid = createJDS.jsonFileData.keys()[12] # #12 is coded for depth 2 so we don't have to think pfx = createJDS.jsonFileData[ooid][2] expectedPath = os.sep.join([storage.storageBranch,pfx,ooid+storage.fileSuffix]) assert not os.path.exists(expectedPath), 'Better not exist at start of test' data = {"header":"header","data":['line ONE','lineTWO','last line']} now = dt.datetime.now() if now.second > 57: time.sleep(60-now.second) now = dt.datetime.now() datePath = None for dirpath, dirnames, filenames in os.walk(storage.dateBranch): if ooid in filenames: datePath = dirpath break assert not datePath, 'tearDown should have removed this. If not, go fix it and try again.' storage.putDumpToFile(ooid,data) # default timestamp datePath = None seenPaths = set() for dirpath, dirnames, filenames in os.walk(storage.dateBranch): if ooid in filenames or ooid in dirnames: datePath = dirpath break else: seenPaths.update([os.path.join(dirpath,x) for x in filenames]) seenPaths.update([os.path.join(dirpath,x) for x in dirnames]) assert datePath, "Expect to find a symbolic link, sure 'nuf, but only saw %s"%seenPaths dateParts = datePath.rsplit(os.sep,5)[-5:] minutes,seq = dateParts[-1].split('_') dateParts[-1] = minutes dateParts.append(seq) assert now.year == int(dateParts[0]) assert now.month == int(dateParts[1]) assert now.day == int(dateParts[2]) assert now.hour == int(dateParts[3]) assert now.minute >= int(dateParts[4]) assert now.minute < int(dateParts[4])+5 assert 0 == int(dateParts[5]) assert os.path.exists(expectedPath), 'Just a nicer way to say your test is FUBAR' f = gzip.open(expectedPath) lines = " ".join(f.readlines()) f.close() assert """{"header": "header", "data": ["line ONE", "lineTWO", "last line"]}""" == lines
6bca1aeeb515360323b6348d65cdedf2cb7f871a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12383/6bca1aeeb515360323b6348d65cdedf2cb7f871a/testProcessedDumpStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6426, 10628, 15450, 12, 2890, 4672, 3536, 1842, 6426, 10628, 15450, 12, 2890, 4672, 12, 87, 821, 33, 22, 13, 3536, 2502, 273, 4657, 3245, 18, 13533, 10628, 3245, 12, 2890, 18, 3813...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 6426, 10628, 15450, 12, 2890, 4672, 3536, 1842, 6426, 10628, 15450, 12, 2890, 4672, 12, 87, 821, 33, 22, 13, 3536, 2502, 273, 4657, 3245, 18, 13533, 10628, 3245, 12, 2890, 18, 3813...
d = self.__defaults.copy() d.update(sectdict)
def get(self, section, option, raw=0, vars=None): """Get an option value for a given section.
05e74c488d7085fb533b40a9d6860ee732e784e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/05e74c488d7085fb533b40a9d6860ee732e784e4/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 16, 4153, 33, 7036, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 2442, 16, 1456, 16, 1831, 33, 20, 16, 4153, 33, 7036, 4672, 3536, 967, 392, 1456, 460, 364, 279, 864, 2442, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`)
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _comment_rx.match(line) if m: text = m.group(1) if text: self.write("(COMMENT\n- %s \n)COMMENT\n-\\n\n" % encode(text)) line = line[m.end():] continue m = _begin_env_rx.match(line) if m: # re-write to use the macro handler line = r"\%s %s" % (m.group(1), line[m.end():]) continue m = _end_env_rx.match(line) if m: # end of environment envname = m.group(1) if envname == "document": # special magic for n in stack[1:]: if n not in self.autoclosing: raise LaTeXFormatError( "open element on stack: " + `n`) # should be more careful, but this is easier to code: stack = [] self.write(")document\n") elif stack and envname == stack[-1]: self.write(")%s\n" % envname) del stack[-1] popping(envname, "a", len(stack) + depth) else: self.err_write("stack: %s\n" % `stack`) raise LaTeXFormatError( "environment close for %s doesn't match" % envname) line = line[m.end():] continue m = _begin_macro_rx.match(line) if m: # start of macro macroname = m.group(1) if macroname == "verbatim": # really magic case! pos = string.find(line, "\\end{verbatim}") text = line[m.end(1):pos] self.write("(verbatim\n") self.write("-%s\n" % encode(text)) self.write(")verbatim\n") line = line[pos + len("\\end{verbatim}"):] continue numbered = 1 opened = 0 if macroname[-1] == "*": macroname = macroname[:-1] numbered = 0 if macroname in self.autoclosing and macroname in stack: while stack[-1] != macroname: top = stack.pop() if top and top not in self.discards: self.write(")%s\n-\\n\n" % top) popping(top, "b", len(stack) + depth) if macroname not in self.discards: self.write("-\\n\n)%s\n-\\n\n" % macroname) popping(macroname, "c", len(stack) + depth - 1) del stack[-1] # if macroname in self.discards: self.push_output(StringIO.StringIO()) else: self.push_output(self.ofp) # params, optional, empty, environ = self.start_macro(macroname) if not numbered: self.write("Anumbered TOKEN no\n") # rip off the macroname if params: line = line[m.end(1):] elif empty: line = line[m.end(1):] else: line = line[m.end():] # # Very ugly special case to deal with \item[]. The catch # is that this needs to occur outside the for loop that # handles attribute parsing so we can 'continue' the outer # loop. # if optional and type(params[0]) is TupleType: # the attribute name isn't used in this special case pushing(macroname, "a", depth + len(stack)) stack.append(macroname) self.write("(%s\n" % macroname) m = _start_optional_rx.match(line) if m: self.line = line[m.end():] line = self.subconvert("]", depth + len(stack)) line = "}" + line continue # handle attribute mappings here: for attrname in params: if optional: optional = 0 if type(attrname) is StringType: m = _optional_rx.match(line) if m: line = line[m.end():] self.write("A%s TOKEN %s\n" % (attrname, encode(m.group(1)))) elif type(attrname) is TupleType: # This is a sub-element; but place the and attribute # we found on the stack (\section-like); the # content of the macro will become the content # of the attribute element, and the macro will # have to be closed some other way (such as # auto-closing). pushing(macroname, "b", len(stack) + depth) stack.append(macroname) self.write("(%s\n" % macroname) macroname = attrname[0] m = _start_group_rx.match(line) if m: line = line[m.end():] elif type(attrname) is ListType: # A normal subelement: <macroname><attrname>...</>... attrname = attrname[0] if not opened: opened = 1 self.write("(%s\n" % macroname) pushing(macroname, "c", len(stack) + depth) self.write("(%s\n" % attrname) pushing(attrname, "sub-elem", len(stack) + depth + 1) self.line = skip_white(line)[1:] line = self.subconvert("}", len(stack) + depth + 1)[1:] popping(attrname, "sub-elem", len(stack) + depth + 1) self.write(")%s\n" % attrname) else: m = _parameter_rx.match(line) if not m: raise LaTeXFormatError( "could not extract parameter %s for %s: %s" % (attrname, macroname, `line[:100]`)) value = m.group(1) if _token_rx.match(value): dtype = "TOKEN" else: dtype = "CDATA" self.write("A%s %s %s\n" % (attrname, dtype, encode(value))) line = line[m.end():] if params and type(params[-1]) is StringType \ and (not empty) and not environ: # attempt to strip off next '{' m = _start_group_rx.match(line) if not m: raise LaTeXFormatError( "non-empty element '%s' has no content: %s" % (macroname, line[:12])) line = line[m.end():] if not opened: self.write("(%s\n" % macroname) pushing(macroname, "d", len(stack) + depth) if empty: line = "}" + line stack.append(macroname) self.pop_output() continue if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line[1:] return self.line if line[0] == "}": # end of macro or group macroname = stack[-1] conversion = self.table.get(macroname) if macroname \ and macroname not in self.discards \ and type(conversion) is not StringType: # otherwise, it was just a bare group self.write(")%s\n" % stack[-1]) popping(macroname, "d", len(stack) + depth - 1) del stack[-1] line = line[1:] continue if line[0] == "{": pushing("", "e", len(stack) + depth) stack.append("") line = line[1:] continue if line[0] == "\\" and line[1] in ESCAPED_CHARS: self.write("-%s\n" % encode(line[1])) line = line[2:] continue if line[:2] == r"\\": self.write("(BREAK\n)BREAK\n") line = line[2:] continue m = _text_rx.match(line) if m: text = encode(m.group()) self.write("-%s\n" % text) line = line[m.end():] continue # special case because of \item[] if line[0] == "]": self.write("-]\n") line = line[1:] continue # avoid infinite loops extra = "" if len(line) > 100: extra = "..." raise LaTeXFormatError("could not identify markup: %s%s" % (`line[:100]`, extra)) while stack and stack[-1] in self.autoclosing: self.write("-\\n\n") self.write(")%s\n" % stack[-1]) popping(stack.pop(), "e", len(stack) + depth - 1) if stack: raise LaTeXFormatError("elements remain on stack: " + string.join(stack, ", ")) # otherwise we just ran out of input here...
ab75840fa4cfb9d978e30ffcae071fbad52b75e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ab75840fa4cfb9d978e30ffcae071fbad52b75e3/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
return HMAC(self)
other = HMAC("") other.digestmod = self.digestmod other.inner = self.inner.copy() other.outer = self.outer.copy() return other
def copy(self): """Return a separate copy of this hashing object.
f205a3950741fa4a90e905bf7646414ca749552c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f205a3950741fa4a90e905bf7646414ca749552c/hmac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 12, 2890, 4672, 3536, 990, 279, 9004, 1610, 434, 333, 24641, 733, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1610, 12, 2890, 4672, 3536, 990, 279, 9004, 1610, 434, 333, 24641, 733, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "Couldn't find section!"
def get_section(self, timeslot=None): """ Cache sections for a class. Always use this function to get a class's sections. """
f313f302c8b4ec29718a5372a1a07838e7ee1a91 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/f313f302c8b4ec29718a5372a1a07838e7ee1a91/class_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3464, 12, 2890, 16, 4124, 23372, 33, 7036, 4672, 3536, 4379, 7178, 364, 279, 667, 18, 225, 14178, 999, 333, 445, 358, 336, 279, 667, 1807, 7178, 18, 3536, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3464, 12, 2890, 16, 4124, 23372, 33, 7036, 4672, 3536, 4379, 7178, 364, 279, 667, 18, 225, 14178, 999, 333, 445, 358, 336, 279, 667, 1807, 7178, 18, 3536, 2, -100, -100, -100,...
try: if use_mechanism == MAD: log( '(ipodsync) Using pymad to get file length')
track_length_found = False if use_mplayer: try: log( 'Using mplayer to get file length', sender = self) mplayer_output = os.popen( MPLAYER_COMMAND % local_filename).read() track_length = int(float(mplayer_output[mplayer_output.index('ID_LENGTH'):].splitlines()[0][10:]) * 1000) track_length_found = True except: log( 'Warning: cannot get length for %s', episode.title, sender = self) else: log( 'Please try installing the "mplayer" package for track length detection.', sender = self) if not track_length_found: try: log( 'Using pymad to get file length', sender = self)
def add_episode_from_channel( self, channel, episode): global DEFAULT_LENGTH global MPLAYER_COMMAND
b6e9a12d1657eaae07e6abde986ea8e65eb781c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12778/b6e9a12d1657eaae07e6abde986ea8e65eb781c5/libipodsync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 29687, 67, 2080, 67, 4327, 12, 365, 16, 1904, 16, 17054, 4672, 2552, 3331, 67, 7096, 2552, 13480, 22166, 67, 19104, 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, 527, 67, 29687, 67, 2080, 67, 4327, 12, 365, 16, 1904, 16, 17054, 4672, 2552, 3331, 67, 7096, 2552, 13480, 22166, 67, 19104, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
""" Computes all n-colorings of the graph G by casting the graph
r""" Computes all `n`-colorings of the graph `G` by casting the graph
def all_graph_colorings(G,n,count_only=False): """ Computes all n-colorings of the graph G by casting the graph coloring problem into an exact cover problem, and passing this into an implementation of the Dancing Links algorithm described by Knuth (who attributes the idea to Hitotumatu and Noshita). The construction works as follows: (columns) * The first |V| columns correspond to a vertex -- a 1 in this column indicates that that vertex has a color. * After those |V| columns, we add n*|E| columns -- a 1 in these columns indicate that a particular edge is incident to a vertex with a certain color. (rows) * For each vertex, add n rows; one for each color c. Place a 1 in the column corresponding to the vertex, and a 1 in the appropriate column for each edge incident to the vertex, indicating that that edge is incident to the color c. * If n > 2, the above construction cannot be exactly covered since each edge will be incident to only two vertices (and hence two colors) - so we add n*|E| rows, each one containing a 1 for each of the n*|E| columns. These get added to the cover solutions "for free" during the backtracking. Note that this construction results in n*|V| + 2*n*|E| + n*|E| entries in the matrix. The Dancing Links algorithm uses a sparse representation, so if the graph is simple, |E| <= |V|^2 and n <= |V|, this construction runs in O(|V|^3) time. Back-conversion to a coloring solution is a simple scan of the solutions, which will contain |V| + (n-2)*|E| entries, so runs in O(|V|^3) time also. For most graphs, the conversion will be much faster -- for example, a planar graph will be transformed for 4-coloring in linear time since |E| = O(|V|). REFERENCES: http://www-cs-staff.stanford.edu/~uno/papers/dancing-color.ps.gz EXAMPLES: sage: from sage.graphs.graph_coloring import all_graph_colorings sage: G = Graph({0:[1,2,3],1:[2]}) sage: n = 0 sage: for C in all_graph_colorings(G,3): ... parts = [C[k] for k in C] ... for P in parts: ... l = len(P) ... for i in range(l): ... for j in range(i+1,l): ... if G.has_edge(P[i],P[j]): ... raise RuntimeError, "Coloring Failed." ... n+=1 sage: print "G has %s 3-colorings."%n G has 12 3-colorings. TESTS: sage: G = Graph({0:[1,2,3],1:[2]}) sage: for C in all_graph_colorings(G,0): print C sage: for C in all_graph_colorings(G,-1): print C Traceback (most recent call last): ... ValueError: n must be non-negative. """ if n == 0: return if n < 0: raise ValueError, "n must be non-negative." V = G.vertices() E = G.edges() nV=len(V) nE=len(E) ones = [] N = xrange(n) Vd= {} colormap = {} k = 0 for i in range(nV): v = V[i] Vd[v] = i for c in N: ones.append([k, [i]]) colormap[k] = (v,c) k+=1 kk = nV for e in E: for c in N: v0 = n*Vd[e[0]]+c v1 = n*Vd[e[1]]+c ones[v0][1].append(kk+c) ones[v1][1].append(kk+c) kk+=n if n > 2: for i in range(n*nE): ones.append([k+i, [nV+i]]) colors = rainbow(n) for i in range(len(ones)): ones[i] = ones[i][1] try: for a in DLXCPP(ones): if count_only: yield 1 continue coloring = {} for x in a: if colormap.has_key(x): v,c = colormap[x] if coloring.has_key(colors[c]): coloring[colors[c]].append(v) else: coloring[colors[c]] = [v] yield coloring except RuntimeError: raise RuntimeError, "Too much recursion! Graph coloring failed."
52bb2bd004fd934c950659300094a9bc9ad4b49c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/52bb2bd004fd934c950659300094a9bc9ad4b49c/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 436, 8395, 14169, 281, 777, 1375, 82, 68, 17, 3266, 899, 434, 326, 2667, 1375, 43, 68, 635, 27660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 436, 8395, 14169, 281, 777, 1375, 82, 68, 17, 3266, 899, 434, 326, 2667, 1375, 43, 68, 635, 27660, ...
server = ServerProxy("http://betty.userland.com")
server = ServerProxy("http://time.xmlrpc.com/RPC2")
def __getattr__(self, name): # magic method dispatcher return _Method(self.__request, name)
468f117c57aae43525fce364024850d287360b59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/468f117c57aae43525fce364024850d287360b59/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 468, 8146, 707, 7393, 327, 389, 1305, 12, 2890, 16186, 2293, 16, 508, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 468, 8146, 707, 7393, 327, 389, 1305, 12, 2890, 16186, 2293, 16, 508, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.dragState.originalDragBox.ResetResizeMode()
canvasItem.ResetResizeMode()
def OnEndResizeItem(self): self.FinishDrag() self.StopDragTimer() self.dragState.originalDragBox.ResetResizeMode()
816aad44240b28fcbb274a133ea9c22cd6d1274d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/816aad44240b28fcbb274a133ea9c22cd6d1274d/TimedCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1638, 12182, 1180, 12, 2890, 4672, 365, 18, 11641, 11728, 1435, 365, 18, 4947, 11728, 6777, 1435, 5953, 1180, 18, 7013, 12182, 2309, 1435, 225, 2, 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, 2755, 1638, 12182, 1180, 12, 2890, 4672, 365, 18, 11641, 11728, 1435, 365, 18, 4947, 11728, 6777, 1435, 5953, 1180, 18, 7013, 12182, 2309, 1435, 225, 2, -100, -100, -100, -100, -100, -100,...
if warnlevel:
if warnlevel > 1:
def __init__(self, dirpath=[], exclude="", warnlevel=0): "Build cross-reference object from the specified filelist." self.filelist = Forest(dirpath, exclude) self.dirpath = filter(lambda x: not re.search(exclude, x), dirpath) self.xref = {} self.fileref = {} self.noxref = False self.properties = {} self.unit_ids = {} ignoreflag = False if warnlevel >=2: print "*** Beginning definition-gathering pass..." for (namespace, filename) in self.filelist.generator(): if warnlevel > 1: print filename + ":" if isresource(filename): self.fileref[filename] = Reference(namespace, filename) elif iswml(filename): # It's a WML file, scan for macro definitions dfp = open(filename) state = "outside" latch_unit = in_base_unit = in_theme = False for (n, line) in enumerate(dfp): if warnlevel > 1: print `line`[1:-1] if line.strip().startswith("#textdomain"): continue m = re.search("# *wmlscope: warnlevel ([0-9]*)", line) if m: warnlevel = int(m.group(1)) print '"%s", line %d: warnlevel set to %d (definition-gathering pass)' \ % (filename, n+1, warnlevel) continue m = re.search("# *wmlscope: set *([^=]*)=(.*)", line) if m: prop = m.group(1).strip() value = m.group(2).strip() if namespace not in self.properties: self.properties[namespace] = {} self.properties[namespace][prop] = value if "# wmlscope: start ignoring" in line: if warnlevel: print '"%s", line %d: starting ignoring' \ % (filename, n+1) ignoreflag = True elif "# wmlscope: stop ignoring" in line: if warnlevel: print '"%s", line %d: stopping ignoring' \ % (filename, n+1) ignoreflag = False elif ignoreflag: continue if line.strip().startswith("#define"): tokens = line.split() name = tokens[1] here = Reference(namespace, filename, n+1, line, args=tokens[2:]) here.hash = md5.new() here.docstring = line.lstrip()[8:] # Strip off #define_ state = "macro_header" continue elif state != 'outside' and line.strip().endswith("#enddef"): here.hash.update(line) here.hash = here.hash.digest() if name in self.xref: for defn in self.xref[name]: if not self.visible_from(defn, filename, n+1): continue elif defn.hash != here.hash: print >>sys.stderr, \ "%s: overrides different %s definition at %s" \ % (here, name, defn) elif warnlevel > 0: print >>sys.stderr, \ "%s: duplicates %s definition at %s" \ % (here, name, defn) if name not in self.xref: self.xref[name] = [] self.xref[name].append(here) state = "outside" elif state == "macro_header" and line.strip() and line.strip()[0] != "#": state = "macro_body" if state == "macro_header": here.docstring += line.lstrip()[1:] if state in ("macro_header", "macro_body"): here.hash.update(line) elif line.strip().startswith("#undef"): tokens = line.split() name = tokens[1] if name in self.xref and self.xref[name]: self.xref[name][-1].undef = n+1 else: print "%s: unbalanced #undef on %s" \ % (Reference(namespace, filename, n+1), name) if state == 'outside': if '[unit_type]' in line: latch_unit = True elif '[/unit_type]' in line: latch_unit = False elif '[base_unit]' in line: in_base_unit = True elif '[/base_unit]' in line: in_base__unit = True elif '[theme]' in line: in_theme = True elif '[/theme]' in line: in_base__unit = True elif latch_unit and not in_base_unit and not in_theme and "id" in line: m = CrossRef.tag_parse.search(line) if m and m.group(1) == "id": uid = m.group(2) if uid not in self.unit_ids: self.unit_ids[uid] = [] self.unit_ids[uid].append(Reference(namespace, filename, n+1)) latch_unit= False dfp.close() elif filename.endswith(".def"): # It's a list of names to be considered defined self.noxref = True dfp = open(filename) for line in dfp: self.xref[line.strip()] = True dfp.close() # Next, decorate definitions with all references from the filelist. self.unresolved = [] self.missing = [] formals = [] if warnlevel >=2: print "*** Beginning reference-gathering pass..." for (ns, fn) in self.filelist.generator(): if iswml(fn): rfp = open(fn) attack_name = None beneath = 0 for (n, line) in enumerate(rfp): if line.strip().startswith("#define"): formals = line.strip().split()[2:] elif line.startswith("#enddef"): formals = [] comment = "" if '#' in line: m = re.search("# *wmlscope: warnlevel ([0-9]*)", line) if m: warnlevel = int(m.group(1)) print '"%s", line %d: warnlevel set to %d (reference-gathering pass)' \ % (fn, n+1, warnlevel) continue fields = line.split('#') line = fields[0] if len(fields) > 1: comment = fields[1] if not line: continue # Find references to macros for match in re.finditer(CrossRef.macro_reference, line): name = match.group(1) candidates = 0 if warnlevel >=2: print '"%s", line %d: seeking definition of %s' \ % (fn, n+1, name) if name in formals: continue elif name in self.xref: # Count the number of actual arguments. # Set args to None if the call doesn't # close on this line brackdepth = parendepth = 0 instring = False args = [] arg = "" for i in range(match.start(0), len(line)): if instring: if line[i] == '"': instring = False else: arg += line[i] elif line[i] == '"': instring = not instring elif line[i] == "{": if brackdepth > 0: arg += line[i] brackdepth += 1 elif line[i] == "}": brackdepth -= 1 if brackdepth == 0: if not line[i-1].isspace(): args.append(arg) arg = "" break else: arg += line[i] elif line[i] == "(": parendepth += 1 elif line[i] == ")": parendepth -= 1 elif not line[i-1].isspace() and \ line[i].isspace() and \ brackdepth == 1 and \ parendepth == 0: args.append(arg) arg = "" elif not line[i].isspace(): arg += line[i] if brackdepth > 0 or parendepth > 0: args = None else: args.pop(0) #if args: # print '"%s", line %d: args of %s is %s' \ # % (fn, n+1, name, args) # Figure out which macros might resolve this for defn in self.xref[name]: if self.visible_from(defn, fn, n+1): candidates += 1 defn.append(fn, n+1, args) if candidates > 1: print "%s: more than one definition of %s is visible here." % (Reference(ns, fn, n), name) if candidates == 0: self.unresolved.append((name,Reference(ns,fn,n+1,args=args))) # Don't be fooled by HTML image references in help strings. if "<img>" in line: continue # Find references to resource files for match in re.finditer(CrossRef.file_reference, line): name = match.group(0) # Catches maps that look like macro names. if (name.endswith(".map") or name.endswith(".mask")) and name[0] == '{': name = name[1:] key = None # If name is already in our resource list, it's easy. if name in self.fileref and self.visible_from(name, fn, n): self.fileref[trial].append(fn, n+1) continue # If the name contains subtitutable parts, count # it as a reference to everything the substitutions # could potentially match. elif '{' in name: pattern = re.sub(r"\{[^}]*\}", '.*', name) key = self.mark_matching_resources(pattern, fn,n+1) if key: self.fileref[key].append(fn, n+1) else: candidates = [] for trial in self.fileref: if trial.endswith(os.sep + name) and self.visible_from(trial, fn, n): key = trial self.fileref[trial].append(fn, n+1) candidates.append(trial) if len(candidates) > 1: print "%s: more than one definition of %s is visible here (%s)." % (Reference(ns,fn, n), name, ", ".join(candidates)) if not key: self.missing.append((name, Reference(ns,fn,n+1))) # Notice implicit references through attacks if state == "outside": if "[attack]" in line: beneath = 0 attack_name = default_icon = None have_icon = False elif "name=" in line and not "no-icon" in comment: attack_name = line[line.find("name=")+5:].strip() default_icon = os.path.join("attacks", attack_name + ".png") elif "icon=" in line and beneath == 0: have_icon = True elif "[/attack]" in line: if attack_name and not have_icon: candidates = [] key = None for trial in self.fileref: if trial.endswith(os.sep + default_icon) and self.visible_from(trial, fn, n): key = trial self.fileref[trial].append(fn, n+1) candidates.append(trial) if len(candidates) > 1: print "%s: more than one definition of %s is visible here (%s)." % (Reference(ns,fn, n), name, ", ".join(candidates)) if not key: self.missing.append((default_icon, Reference(ns,fn,n+1))) elif line.strip().startswith("[/"): beneath -= 1 elif line.strip().startswith("["): beneath += 1 rfp.close() # Check whether each namespace has a defined export property for namespace in self.dirpath: if namespace not in self.properties or "export" not in self.properties[namespace]: print "warning: %s has no export property" % namespace
0bcc0a4bab5f43a02895db715fbf0fbf3af64ec7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9355/0bcc0a4bab5f43a02895db715fbf0fbf3af64ec7/wmltools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 17803, 22850, 6487, 4433, 1546, 3113, 1894, 2815, 33, 20, 4672, 315, 3116, 6828, 17, 6180, 733, 628, 326, 1269, 26204, 1199, 365, 18, 7540, 5449, 273, 1760...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17803, 22850, 6487, 4433, 1546, 3113, 1894, 2815, 33, 20, 4672, 315, 3116, 6828, 17, 6180, 733, 628, 326, 1269, 26204, 1199, 365, 18, 7540, 5449, 273, 1760...
except (EOFError, IOError, ValueError, IndexError), m: logStatusMsg(unicodeC(m) + os.linesep + u"didn't load SaveProcessor. Creating new saveFile.", 1)
except (EOFError, IOError, ValueError, IndexError), m: logStatusMsg(unicodeC(m) + os.linesep + u"""didn't load SaveProcessor. \ Creating new saveFile.""", 1)
def run(): u"""Provides main functionality -- scans threads.""" global saved, rss, downloader, _action getConfig(filename=configFile, reload=True) setLogging(True) if isinstance(getConfig()['global']['umask'], int): os.umask( getConfig()['global']['umask'] ) if getConfig()['global']['urllib']: downloader = urllib2RetrievePage else: downloader = mechRetrievePage getSaved(unset=1) getSaved(getConfig()['global']['saveFile']) try: getSaved().lock() except Locked: logStatusMsg( u"Savefile is currently in use.", 2 ) raise Locked try: getSaved().load() except (EOFError, IOError, ValueError, IndexError), m: logStatusMsg(unicodeC(m) + os.linesep + u"didn't load SaveProcessor. Creating new saveFile.", 1) logStatusMsg(u"checking working dir, maybe changing dir", 5) if os.getcwd() != getConfig()['global']['workingDir'] or os.getcwd() != os.path.realpath( getConfig()['global']['workingDir'] ): os.chdir(getConfig()['global']['workingDir']) sys.path.insert(0, getConfig()['global']['workingDir']) # import userFunct if getConfig()['global']['runOnce'] and getSaved().lastChecked > ( int(time.time()) - (getConfig()['global']['scanMins']*60) ): raise SystemExit(u"Threads have already been scanned.") if getConfig()['global']['rssFeed']: logStatusMsg(u'trying to generate rss feed', 5) if getConfig()['global']['rssFilename']: logStatusMsg(u'rss filename set', 5) rss = MakeRss(filename=getConfig()['global']['rssFilename'], itemsQuaDictBool=True) if os.path.isfile( getConfig()['global']['rssFilename'] ): logStatusMsg(u'loading rss file', 5) rss.parse() rss.channelMeta['title'] = getConfig()['global']['rssTitle'] rss.channelMeta['description'] = getConfig()['global']['rssDescription'] rss.channelMeta['link'] = getConfig()['global']['rssLink'] else: logStatusMsg(u"no rssFilename set, cannot write feed to a file") userFunctHandling() if getSaved().failedDown: logStatusMsg(u"Scanning previously failed downloads", 4) for i in xrange( len( getSaved().failedDown) - 1, -1, -1 ): if not checkScanTime( getSaved().failedDown[i]['threadName'], failed=1 ): continue logStatusMsg(u" Attempting to download %s" % getSaved().failedDown[i]['link'], 4 ) if downloadFile( **getSaved().failedDown[i] ): logStatusMsg(u"Success!", 4) del getSaved().failedDown[ i ] getSaved().save() else: logStatusMsg(u"Failure on %s in failedDown" % getSaved().failedDown[i]['link'], 4) logStatusMsg( u"Scanning threads", 4 ) for key in getConfig()['threads'].keys(): if getConfig()['threads'][key]['active'] == False: continue # ignore inactive threads # if they specified a checkTime value, make sure we are in the specified range if not checkScanTime( key, failed=False): continue logStatusMsg( u"finding new downloads in thread %s" % key, 4 ) rssparse(key) if rss: rss.close(length=getConfig()['global']['rssLength']) rss.write() getSaved().lastChecked = int(time.time()) -30 getSaved().save() getSaved().unlock()
633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 582, 8395, 17727, 2774, 14176, 1493, 19676, 7403, 12123, 2552, 5198, 16, 18817, 16, 28122, 16, 389, 1128, 4367, 12, 3459, 33, 1425, 812, 16, 7749, 33, 5510, 13, 444, 7735, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 582, 8395, 17727, 2774, 14176, 1493, 19676, 7403, 12123, 2552, 5198, 16, 18817, 16, 28122, 16, 389, 1128, 4367, 12, 3459, 33, 1425, 812, 16, 7749, 33, 5510, 13, 444, 7735, 1...
'/?token_scope=%s' % (scope),
'http://gdata-feedfetcher.appspot.com/?token_scope=%s' % (scope),
def GenerateScopeRequestLink(self, scope): return self.client.GenerateAuthSubURL( '/?token_scope=%s' % (scope), scope, secure=False, session=True)
7fba3dde5c4e8bbe0a993e549d3570a884ccbaa3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/907/7fba3dde5c4e8bbe0a993e549d3570a884ccbaa3/feedfetcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 3876, 691, 2098, 12, 2890, 16, 2146, 4672, 327, 365, 18, 2625, 18, 4625, 1730, 1676, 1785, 12, 296, 2505, 2207, 75, 892, 17, 7848, 5754, 264, 18, 11411, 13130, 18, 832, 23239, 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, 6654, 3876, 691, 2098, 12, 2890, 16, 2146, 4672, 327, 365, 18, 2625, 18, 4625, 1730, 1676, 1785, 12, 296, 2505, 2207, 75, 892, 17, 7848, 5754, 264, 18, 11411, 13130, 18, 832, 23239, 23...
assert flex.max(accu) < {6:1.e-4, 5:[1.e-1,1.e-2][int(i==2)]}[dof]
assert flex.max(accu) < {6:1.e-4, 5:1.e-2}[dof]
def exercise_simulation(out, dof, n_trials, n_dynamics_steps, delta_t=0.001): mersenne_twister = flex.mersenne_twister(seed=0) sim_labels = None relative_ranges_accu = None rms_max_list_accu = None for i in xrange(n_trials): sim_labels_new, relative_ranges, rms_max_list = run_simulations( out=out, dof=dof, mersenne_twister=mersenne_twister, n_dynamics_steps=n_dynamics_steps, delta_t=delta_t) if (sim_labels is None): sim_labels = sim_labels_new else: assert sim_labels == sim_labels_new if (relative_ranges_accu is None): relative_ranges_accu=[flex.double() for i in xrange(len(relative_ranges))] else: assert len(relative_ranges) == len(relative_ranges_accu) for r,a in zip(relative_ranges, relative_ranges_accu): a.append(r) if (rms_max_list_accu is None): rms_max_list_accu = [flex.double() for i in xrange(len(rms_max_list))] else: assert len(rms_max_list) == len(rms_max_list_accu) for r,a in zip(rms_max_list, rms_max_list_accu): a.append(r) print >> out, "Accumulated results:" print >> out for sim_label,accu in zip(sim_labels, relative_ranges_accu): print >> out, "relative ranges %s:" % sim_label accu.min_max_mean().show(out=out, prefix=" ") print >> out for sim_label,accu in zip(sim_labels[1:], rms_max_list_accu): print >> out, "rms max %s" % sim_labels[0] print >> out, " vs. %s:" % sim_label accu.min_max_mean().show(out=out, prefix=" ") print >> out if (out is not sys.stdout): for accu in relative_ranges_accu: assert flex.max(accu) < {6:1.e-4, 5:1.e-3}[dof] for i,accu in enumerate(rms_max_list_accu): assert flex.max(accu) < {6:1.e-4, 5:[1.e-1,1.e-2][int(i==2)]}[dof]
4b070858dfa551c88e585e48c5efe26e045ca9a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/4b070858dfa551c88e585e48c5efe26e045ca9a5/tst_free_motion_hard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 9812, 6234, 12, 659, 16, 741, 74, 16, 290, 67, 17493, 87, 16, 290, 67, 31129, 2102, 67, 8986, 16, 3622, 67, 88, 33, 20, 18, 11664, 4672, 312, 414, 275, 4644, 67, 11246, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 9812, 6234, 12, 659, 16, 741, 74, 16, 290, 67, 17493, 87, 16, 290, 67, 31129, 2102, 67, 8986, 16, 3622, 67, 88, 33, 20, 18, 11664, 4672, 312, 414, 275, 4644, 67, 11246, ...
cmd = '"%(bjam)s" "-sBOOST_BUILD_PATH=%(bb)s" "-sBOOST_ROOT=%(boost)s" "--boost=%(boost)s" %(arg)s' % {
cmd = '"%(bjam)s"' +\ ' "-sBOOST_BUILD_PATH=%(bbpath)s"' +\ ' "-sBOOST_ROOT=%(boost)s"' +\ ' "--boost=%(boost)s"' +\ ' "--boost-build=%(bb)s"' +\ ' "--debug-configuration"' +\ ' %(arg)s' cmd %= {
def bjam_cmd( self, toolsets, args = '', *rest ): build_path = self.regression_root if build_path[-1] == '\\': build_path += '\\' if self.timeout > 0: args += ' -l%s' % (self.timeout*60)
bfe8094d18632907e6a371720f8b9bf6536bfe41 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7959/bfe8094d18632907e6a371720f8b9bf6536bfe41/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 78, 301, 67, 4172, 12, 365, 16, 5226, 4424, 16, 833, 273, 10226, 380, 8792, 262, 30, 1361, 67, 803, 273, 365, 18, 1574, 16345, 67, 3085, 309, 1361, 67, 803, 18919, 21, 65, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 78, 301, 67, 4172, 12, 365, 16, 5226, 4424, 16, 833, 273, 10226, 380, 8792, 262, 30, 1361, 67, 803, 273, 365, 18, 1574, 16345, 67, 3085, 309, 1361, 67, 803, 18919, 21, 65, 422, ...
departure_cols[1].contents[0].split()[1],
get_col1(departure_row, 'date$').split()[1],
def parse_connection(self, departure_row, arrival_row): departure_cols = departure_row.findAll('td', recursive=False) arrival_cols = arrival_row.findAll('td', recursive=False)
6b018c8fab3f81686d4ba4af67f0bd492f6318a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2719/6b018c8fab3f81686d4ba4af67f0bd492f6318a3/ghafasclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4071, 12, 2890, 16, 26000, 594, 67, 492, 16, 2454, 5162, 67, 492, 4672, 26000, 594, 67, 6842, 273, 26000, 594, 67, 492, 18, 4720, 1595, 2668, 4465, 2187, 5904, 33, 8381, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4071, 12, 2890, 16, 26000, 594, 67, 492, 16, 2454, 5162, 67, 492, 4672, 26000, 594, 67, 6842, 273, 26000, 594, 67, 492, 18, 4720, 1595, 2668, 4465, 2187, 5904, 33, 8381, 13, ...
self.bubbleRect.setText(head+body) self.bubbleRect.setPos(e.scenePos().x(),e.scenePos().y()) if body!="": self.bubbleRect.show() self.update()
QToolTip.showText(e.screenPos(), head+body, e.widget(), toolTipRect)
def mouseMoveEvent(self, e):
8831277dc381559aa4de7aa848bba2c91b0d2e4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/8831277dc381559aa4de7aa848bba2c91b0d2e4c/OWHierarchicalClustering.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7607, 1133, 12, 2890, 16, 425, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7607, 1133, 12, 2890, 16, 425, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
root = SubElement(doc, utils.toTag('Station Control Header'))
sub = SubElement(doc, utils.toTag('Station Control Header'))
def getXSEED(self, version=DEFAULT_XSEED_VERSION, split_stations=False): """ Returns a XML representation of all headers of a SEED volume.
92ca6c6a5f622775d2315fbc075a01a83fec844b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/92ca6c6a5f622775d2315fbc075a01a83fec844b/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6538, 1090, 2056, 12, 2890, 16, 1177, 33, 5280, 67, 60, 1090, 2056, 67, 5757, 16, 1416, 67, 31478, 33, 8381, 4672, 3536, 2860, 279, 3167, 4335, 434, 777, 1607, 434, 279, 3174, 2056, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6538, 1090, 2056, 12, 2890, 16, 1177, 33, 5280, 67, 60, 1090, 2056, 67, 5757, 16, 1416, 67, 31478, 33, 8381, 4672, 3536, 2860, 279, 3167, 4335, 434, 777, 1607, 434, 279, 3174, 2056, 39...
file_read = open('../data/service_record.xml','r')
file_read = open('/usr/share/remoko/data/service_record.xml','r')
def __init__(self):
225754373a246456c0494e9cc053ba0500ec5891 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4221/225754373a246456c0494e9cc053ba0500ec5891/remoko_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print 'Check_buy'
def check_buy(self, cr, uid, ids, context=None): print 'Check_buy' for procurement in self.browse(cr, uid, ids): for line in procurement.product_id.flow_pull_ids: print line.location_src_id.name, line.location_id.name, line.type_proc if line.location_id==procurement.location_id: return line.type_proc=='buy' print 'Check_buy parent' return super(mrp_procurement, self).check_buy(cr, uid, ids)
08d47ef29ff511841dc03781ea6d891a014b3d39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/08d47ef29ff511841dc03781ea6d891a014b3d39/mrp_pull.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 70, 9835, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 364, 5418, 594, 475, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 364, 980, 316, 5418,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 70, 9835, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 364, 5418, 594, 475, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 364, 980, 316, 5418,...
else: p = 'win'
else: s = p else: p = options.platformID
def buildDistributionImage(mode, options): if options.platformID == 'iosx': p = 'osx' s = p if options.platformSubID == 'leopard': s = options.platformSubID else: if options.platformID == 'linux': p = 'linux' s = p if options.platformSubID == 'gutsy': s = options.platformSubID else: p = 'win' s = p if mode == 'release': manifestFile = os.path.join(options.sourceDir, 'distrib', p, 'manifest.%s' % s) else: manifestFile = os.path.join(options.sourceDir, 'distrib', p, 'manifest.debug.%s' % s) options.distribName = buildDistribName(mode, options) options.distribDir = os.path.join(options.buildDir, options.distribName) # yep - we are removing the directory we are # about ready to create - but we want to ensure # it's truly empty if os.access(options.distribDir, os.F_OK): rmdirs(options.distribDir) os.makedirs(options.distribDir) # when we make an osx distribution, we actually need to put it # in a subdirectory (which has a .app extension). So we set # distribDir locally to that .app dir so that handleManifest() # puts things in the right place. if options.platformID == 'iosx' or options.platformID == 'osx': distribDir = os.path.join(options.distribDir, '%s.app' % options.distribName) else: distribDir = options.distribDir result = handleManifest(options.buildDir, options.outputDir, distribDir, manifestFile, options.platformID) if result and options.platformID == 'win': convertLineEndings(distribDir) return result
10e7702ecbf2ea8ceef418e4e5b54f328c0374e7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/10e7702ecbf2ea8ceef418e4e5b54f328c0374e7/distribute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 9003, 2040, 12, 3188, 16, 702, 4672, 309, 702, 18, 9898, 734, 422, 296, 7441, 92, 4278, 293, 273, 296, 538, 92, 11, 272, 273, 293, 225, 309, 702, 18, 9898, 1676, 734, 422, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 9003, 2040, 12, 3188, 16, 702, 4672, 309, 702, 18, 9898, 734, 422, 296, 7441, 92, 4278, 293, 273, 296, 538, 92, 11, 272, 273, 293, 225, 309, 702, 18, 9898, 1676, 734, 422, 296,...