rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None):
def http_error_401(self, url, fp, errcode, errmsg, headers, data=None): """Error 401 -- authentication required. See this URL for a description of the basic authentication scheme: http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-v10-spec-00.txt""" if headers.has_key('www-authenticate'): stuff = headers['www-authenticate'] import re match = re.match('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', stuff) if match: scheme, realm = match.groups() if string.lower(scheme) == 'basic': name = 'retry_' + self.type + '_basic_auth' if data is None: return getattr(self,name)(url, realm) else: return getattr(self,name)(url, realm, data)
b49f88bfc122440e6b056b3c051ac3f928a1df92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b49f88bfc122440e6b056b3c051ac3f928a1df92/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 27002, 12, 2890, 16, 880, 16, 4253, 16, 393, 710, 16, 17460, 16, 1607, 16, 501, 33, 7036, 4672, 3536, 668, 14052, 1493, 5107, 1931, 18, 2164, 333, 1976, 364, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 27002, 12, 2890, 16, 880, 16, 4253, 16, 393, 710, 16, 17460, 16, 1607, 16, 501, 33, 7036, 4672, 3536, 668, 14052, 1493, 5107, 1931, 18, 2164, 333, 1976, 364, 279, ...
coding_name = coding.text return coding_name
return coding.text
def _find_file_coding(self): coding_name = '' if lisp.fboundp(lisp['coding-system-name']): coding = lisp('(coding-system-name' ' buffer-file-coding-system)') else: coding = lisp['buffer-file-coding-system'] if isinstance(coding, str): coding_name = coding elif coding is not None and hasattr(coding, 'text'): coding_name = coding.text return coding_name
743c0101e56508d22e82dd1da9a2d6604cc0152a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8283/743c0101e56508d22e82dd1da9a2d6604cc0152a/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 768, 67, 2014, 12, 2890, 4672, 14848, 67, 529, 273, 875, 309, 328, 23831, 18, 74, 3653, 84, 12, 80, 23831, 3292, 2014, 17, 4299, 17, 529, 3546, 4672, 14848, 273, 328, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 67, 768, 67, 2014, 12, 2890, 4672, 14848, 67, 529, 273, 875, 309, 328, 23831, 18, 74, 3653, 84, 12, 80, 23831, 3292, 2014, 17, 4299, 17, 529, 3546, 4672, 14848, 273, 328, ...
self.ShowNotificationPerFolder = gtk.CheckButton() self.ShowNotificationPerFolder.set_label(_("Show notification popup in tray after each folder\n(requires python-notify and notification-daemon)")) self.ShowNotificationPerFolder.show() self.vbox96.pack_start(self.ShowNotificationPerFolder, False, True, 0)
def __init__(self, create = True, accel_group = None, tooltips = None): if accel_group is None: self.accel_group = gtk.AccelGroup() else: self.accel_group = accel_group if tooltips is None: self.tooltips = gtk.Tooltips() else: self.tooltips = tooltips self.tooltips.enable() if create: self.EventsFrame = gtk.Window() self.EventsFrame.set_title(_("Events")) self.EventsFrame.add_accel_group(self.accel_group) self.EventsFrame.show()
998988b926b4f5588a8fa459c61e9654c5e889e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8738/998988b926b4f5588a8fa459c61e9654c5e889e4/settings_glade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 752, 273, 1053, 16, 15153, 67, 1655, 273, 599, 16, 358, 4397, 7146, 273, 599, 4672, 309, 15153, 67, 1655, 353, 599, 30, 365, 18, 30737, 67, 1655, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 752, 273, 1053, 16, 15153, 67, 1655, 273, 599, 16, 358, 4397, 7146, 273, 599, 4672, 309, 15153, 67, 1655, 353, 599, 30, 365, 18, 30737, 67, 1655, 273, ...
os.system('svn --set-depth infinity up %s/trunk/l10n-kde4/scripts' % localsvnroot)
os.system('svn --set-depth infinity up "%s/trunk/l10n-kde4/scripts"' % localsvnroot)
def validatePage(self): if self.existing.isChecked(): return True if os.system('which svn')!=0: KMessageBox.error(self,i18n("Please install 'subversion' package\nto have Lokalize download KDE translation files."),i18n("Subversion client not found")) return False
8656db64abbfe8e85055d82856dd6d64c5e780fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1688/8656db64abbfe8e85055d82856dd6d64c5e780fd/newprojectwizard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 1964, 12, 2890, 4672, 309, 365, 18, 11711, 18, 291, 11454, 13332, 327, 1053, 309, 1140, 18, 4299, 2668, 12784, 5893, 82, 6134, 5, 33, 20, 30, 1475, 27647, 18, 1636, 12, 2890, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 1964, 12, 2890, 4672, 309, 365, 18, 11711, 18, 291, 11454, 13332, 327, 1053, 309, 1140, 18, 4299, 2668, 12784, 5893, 82, 6134, 5, 33, 20, 30, 1475, 27647, 18, 1636, 12, 2890, 16,...
self.weightSpin.setEnabled(id == 1)
self.weightSpin.control.setEnabled(id == 1)
def coveringAlgButtonPressed(self,id=0): self.CoveringButton = id for i in range(len(self.coveringAlgBG.buttons)): self.coveringAlgBG.buttons[i].setChecked(id == i) self.weightSpin.setEnabled(id == 1)
177640c296b89c31b202718b4ed5c461f9860f81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/177640c296b89c31b202718b4ed5c461f9860f81/OWCN2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5590, 310, 21883, 3616, 24624, 12, 2890, 16, 350, 33, 20, 4672, 365, 18, 8084, 310, 3616, 273, 612, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 3165, 310, 21883, 30098, 18, 16016, 371...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5590, 310, 21883, 3616, 24624, 12, 2890, 16, 350, 33, 20, 4672, 365, 18, 8084, 310, 3616, 273, 612, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 3165, 310, 21883, 30098, 18, 16016, 371...
if isinstance(real, str):
if isinstance(real, (str, unicode)):
def _init(self, real=0.0, imag=None): if isinstance(real, str): if imag is not None: msg = "complex() can't take second arg if first is a string" raise TypeError, msg re, im = self._makeComplexFromString(real) elif isinstance(real, complex): re = real.real im = real.imag else: re = float(real) im = 0.0
ecb2a68dd75732bd5ebb698b986385913ef2a4eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ecb2a68dd75732bd5ebb698b986385913ef2a4eb/app_complex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 12, 2890, 16, 2863, 33, 20, 18, 20, 16, 8902, 33, 7036, 4672, 309, 1549, 12, 7688, 16, 261, 701, 16, 5252, 3719, 30, 309, 8902, 353, 486, 599, 30, 1234, 273, 315, 14259, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 12, 2890, 16, 2863, 33, 20, 18, 20, 16, 8902, 33, 7036, 4672, 309, 1549, 12, 7688, 16, 261, 701, 16, 5252, 3719, 30, 309, 8902, 353, 486, 599, 30, 1234, 273, 315, 14259, ...
Checks wether this line is typed in the normal prompt or in a breakpoint command list definition
Checks whether this line is typed at the normal prompt or in a breakpoint command list definition.
def onecmd(self, line): """Interpret the argument as though it had been typed in response to the prompt.
b0fcf117295f2e29b1174d7a1c44e4d9e1571ab2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0fcf117295f2e29b1174d7a1c44e4d9e1571ab2/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1245, 4172, 12, 2890, 16, 980, 4672, 3536, 2465, 15089, 326, 1237, 487, 11376, 518, 9323, 2118, 9092, 316, 766, 358, 326, 6866, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1245, 4172, 12, 2890, 16, 980, 4672, 3536, 2465, 15089, 326, 1237, 487, 11376, 518, 9323, 2118, 9092, 316, 766, 358, 326, 6866, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
debug.DebugPrint.critical('%s not found' % (self.dotVistrails + '/startup.py')) debug.DebugPrint.critical('Will not run an initialization ' 'file - there will only be the ' 'default modules') else: debug.DebugPrint.critical('%s not found' % (self.dotVistrails + '/startup.py')) debug.DebugPrint.critical('Will not run an initialization ' 'file - there will only be the ' 'default modules')
if tried_once: debug.critical("""Still cannot find default file. Something has gone wrong. Please make sure ~/.vistrails exists, is writable, and ~/.vistrails/startup.py does not exist.""") sys.exit(1) debug.critical('%s not found' % (self.dotVistrails + '/startup.py')) debug.critical('Will try to install default' + 'startup file') install_default_startup() execDotVistrails(True) elif not os.path.lexists(self.dotVistrails): debug.critical('%s not found' % self.dotVistrails) create_default_directory() install_default_startup() execDotVistrails(True)
def execDotVistrails(): """ execDotVistrails() -> None Actually execute the Vistrail initialization """ # if it is file, then must move old-style .vistrails to # directory. if os.path.isfile(self.dotVistrails): debug.warning("Old-style initialization hooks. Will try to set things correctly.") (fd, name) = tempfile.mkstemp() os.close(fd) shutil.copyfile(self.dotVistrails, name) try: os.unlink(self.dotVistrails) except: debug.critical("""Failed to remove old initialization file.
f97bd195bc2b7ad4a133ba2550e300d36a7636e8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/f97bd195bc2b7ad4a133ba2550e300d36a7636e8/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 10412, 3282, 313, 15208, 13332, 3536, 1196, 10412, 3282, 313, 15208, 1435, 317, 599, 4603, 3452, 1836, 326, 776, 3337, 671, 10313, 225, 3536, 468, 309, 518, 353, 585, 16, 1508, 1297,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 10412, 3282, 313, 15208, 13332, 3536, 1196, 10412, 3282, 313, 15208, 1435, 317, 599, 4603, 3452, 1836, 326, 776, 3337, 671, 10313, 225, 3536, 468, 309, 518, 353, 585, 16, 1508, 1297,...
os.path.join("bin", "ligolw_veto"), os.path.join("bin", "ligolw_cbc_hardware_inj_page"), os.path.join("bin", "ligolw_fr_to_science"),
os.path.join("bin", "ligolw_veto"), os.path.join("bin", "ligolw_cbc_hardware_inj_page"), os.path.join("bin", "ligolw_fr_to_science"),
def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass
bcb90cae6607140da1a5438dff867e4a1731aa08 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/bcb90cae6607140da1a5438dff867e4a1731aa08/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 1206, 326, 6635, 4374, 729, 1550, 8873, 364, 2728, 316, 8247, 2074, 80, 287, 17, 1355, 17, 3074, 18, 674, 3113, 315, 2074, 80, 287, 17, 1355, 17, 3074, 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, 1086, 12, 2890, 4672, 468, 1206, 326, 6635, 4374, 729, 1550, 8873, 364, 2728, 316, 8247, 2074, 80, 287, 17, 1355, 17, 3074, 18, 674, 3113, 315, 2074, 80, 287, 17, 1355, 17, 3074, 18, ...
val[0] = -bernoulli(k) / (2*k) R = QQ[['q']]
val[0] = a0 R = K[['q']]
def eisenstein_series_qexp(k, prec=10, K=QQ): r""" Return the $q$-expansion of the weight $k$ Eisenstein series to precision prec in the field $K$. Here's a rough description of how the algorithm works: we know $E_k = const + \sum_n sigma(n,k-1) q^n$. Now, we basically just compute all the $\sigma(n,k-1)$ simultaneously, as $\sigma$ is multiplicative. INPUT: k -- even positive integer prec -- nonnegative integer K -- a ring in which B_k/(2*k) is invertible EXAMPLES: sage: eisenstein_series_qexp(2,5) -1/24 + q + 3*q^2 + 4*q^3 + 7*q^4 + O(q^5) sage: eisenstein_series_qexp(2,0) O(q^0) AUTHORS: -- William Stein: original implementation -- Craig Citro (2007-06-01): rewrote for massive speedup """ k = Integer(k) if k%2 or k < 2: raise ValueError, "k (=%s) must be an even positive integer"%k prec = int(prec) if prec < 0: raise ValueError, "prec (=%s) must be an even nonnegative integer"%prec if (prec == 0): R = QQ[['q']] return R(0).add_bigoh(0) one = Integer(1) val = [one] * prec expt = k - one for p in prime_range(1,prec): int_p = int(p) ppow = int_p mult = p**expt term = mult*mult last = mult while (ppow < prec): ind = ppow while (ind < prec): val[ind] = (val[ind]*(term-one)).divide_knowing_divisible_by(last - one) ind += ppow ppow *= int_p last = term term *= mult val[0] = -bernoulli(k) / (2*k) R = QQ[['q']] return R(val, prec=prec, check=False)
8035eaf0fc82a0dd3cf223fafe7678647ce4cd1d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8035eaf0fc82a0dd3cf223fafe7678647ce4cd1d/eis_series.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 291, 275, 334, 13685, 67, 10222, 67, 85, 2749, 12, 79, 16, 13382, 33, 2163, 16, 1475, 33, 53, 53, 4672, 436, 8395, 2000, 326, 271, 85, 8, 17, 2749, 12162, 434, 326, 3119, 271, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 291, 275, 334, 13685, 67, 10222, 67, 85, 2749, 12, 79, 16, 13382, 33, 2163, 16, 1475, 33, 53, 53, 4672, 436, 8395, 2000, 326, 271, 85, 8, 17, 2749, 12162, 434, 326, 3119, 271, ...
str(task.get_closed_date()),
def task_to_TaskStr(self, task): return self.TaskStr(task.get_title(), str(task.get_text()), [], task.get_status(), str(task.get_modified()), str(task.get_due_date()), str(task.get_start_date()), str(task.get_days_left()), str(task.get_closed_date()), map(lambda t: t.get_name(), task.get_tags()))
b59e749fa2098e0494bfacf3e0d3352dd387f77a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/b59e749fa2098e0494bfacf3e0d3352dd387f77a/export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 869, 67, 2174, 1585, 12, 2890, 16, 1562, 4672, 327, 365, 18, 2174, 1585, 12, 4146, 18, 588, 67, 2649, 9334, 609, 12, 4146, 18, 588, 67, 955, 1435, 3631, 5378, 16, 1562, 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, 1562, 67, 869, 67, 2174, 1585, 12, 2890, 16, 1562, 4672, 327, 365, 18, 2174, 1585, 12, 4146, 18, 588, 67, 2649, 9334, 609, 12, 4146, 18, 588, 67, 955, 1435, 3631, 5378, 16, 1562, 18,...
Get the configured auditing lifeteime as a datetime.timedelta instance.
Get the configured auditing lifetime as a datetime.timedelta instance.
def _get_lifetime(): """ Get the configured auditing lifeteime as a datetime.timedelta instance. @return: dateteime.timedelta instance """ days = config.config.getint('auditing', 'lifetime') return datetime.timedelta(days=days)
1175a6d10113bfa5db1a3c3fa80b9342aca10b1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/1175a6d10113bfa5db1a3c3fa80b9342aca10b1c/auditing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 17155, 13332, 3536, 968, 326, 4351, 8215, 310, 12486, 487, 279, 3314, 18, 31295, 791, 18, 632, 2463, 30, 1150, 12865, 494, 18, 31295, 791, 3536, 4681, 273, 642, 18, 1425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 17155, 13332, 3536, 968, 326, 4351, 8215, 310, 12486, 487, 279, 3314, 18, 31295, 791, 18, 632, 2463, 30, 1150, 12865, 494, 18, 31295, 791, 3536, 4681, 273, 642, 18, 1425, ...
fillTemplate("%s.template" % filename, filename, **self.templateVars)
fillTemplate("%s.template" % filename, filename, xml = xml, **self.templateVars)
def fillTemplate(self, filename): assert self.templateVars, \ "Must call makeAppConfig before fillTemplate" fillTemplate("%s.template" % filename, filename, **self.templateVars)
df2e0c1aa4d663c3424ed410f6384b90c1d861d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/df2e0c1aa4d663c3424ed410f6384b90c1d861d1/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 2283, 12, 2890, 16, 1544, 4672, 1815, 365, 18, 3202, 5555, 16, 521, 315, 10136, 745, 1221, 31904, 1865, 3636, 2283, 6, 3636, 2283, 27188, 87, 18, 3202, 6, 738, 1544, 16, 1544, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 2283, 12, 2890, 16, 1544, 4672, 1815, 365, 18, 3202, 5555, 16, 521, 315, 10136, 745, 1221, 31904, 1865, 3636, 2283, 6, 3636, 2283, 27188, 87, 18, 3202, 6, 738, 1544, 16, 1544, 16...
figure, areas_unused, drilldown_unused = _create_qual_histogram_helper( **params)
plot_info = QualificationHistogram( query=params['query'], filter_string=params['filter_string'], interval=params['interval'], drilldown_callback='') figure, areas_unused = _create_qual_histogram_helper(plot_info, extra_text)
def create_embedded_plot(model, update_time): """\ Given an EmbeddedGraphingQuery object, generate the PNG image for it. model: EmbeddedGraphingQuery object update_time: 'Last updated' time """ params = pickle.loads(model.params) params['extra_text'] = 'Last updated: %s' % update_time if model.graph_type == 'metrics': figure, areas_unused, drilldown_unused = _create_metrics_plot_helper( **params) elif model.graph_type == 'qual': figure, areas_unused, drilldown_unused = _create_qual_histogram_helper( **params) else: raise ValueError('Invalid graph_type %s' % model.graph_type) image, bounding_box_unused = _create_png(figure) return image
16d2357c9bbcbdca0fa047013c0f216b2f9c5e4f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/16d2357c9bbcbdca0fa047013c0f216b2f9c5e4f/graphing_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 20722, 67, 4032, 12, 2284, 16, 1089, 67, 957, 4672, 3536, 64, 16803, 392, 21829, 4137, 310, 1138, 733, 16, 2103, 326, 22476, 1316, 364, 518, 18, 225, 938, 30, 21829, 4137, 310...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20722, 67, 4032, 12, 2284, 16, 1089, 67, 957, 4672, 3536, 64, 16803, 392, 21829, 4137, 310, 1138, 733, 16, 2103, 326, 22476, 1316, 364, 518, 18, 225, 938, 30, 21829, 4137, 310...
"Handle a notation declaration event."
"Handle a notation declaration event."
def notationDecl(self, name, publicId, systemId):
84da8aa7e2f1bdaf8692dbfd9981430c84278038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/84da8aa7e2f1bdaf8692dbfd9981430c84278038/handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12155, 3456, 12, 2890, 16, 508, 16, 1071, 548, 16, 30083, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12155, 3456, 12, 2890, 16, 508, 16, 1071, 548, 16, 30083, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
fix_makefile(makefile, m32) makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
rc = os.system(r"ml64 -c -Foms\uptable.obj ms\uptable.asm") if rc: print("ml64 assembler has failed.") sys.exit(rc) shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") shutil.copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h") makeCommand = "nmake /nologo -f \"%s\"" % makefile
def main(): build_all = "-a" in sys.argv if sys.argv[1] == "Release": debug = False elif sys.argv[1] == "Debug": debug = True else: raise ValueError(str(sys.argv)) if sys.argv[2] == "Win32": arch = "x86" configure = "VC-WIN32" do_script = "ms\\do_nasm" makefile="ms\\nt.mak" m32 = makefile elif sys.argv[2] == "x64": arch="amd64" configure = "VC-WIN64A" do_script = "ms\\do_win64a" makefile = "ms\\nt64.mak" m32 = makefile.replace('64', '') #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON" else: raise ValueError(str(sys.argv)) make_flags = "" if build_all: make_flags = "-a" # perl should be on the path, but we also look in "\perl" and "c:\\perl" # as "well known" locations perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"]) perl = find_working_perl(perls) if perl is None: sys.exit(1) print("Found a working perl at '%s'" % (perl,)) sys.stdout.flush() # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live. ssl_dir = find_best_ssl_dir(("..\\..",)) if ssl_dir is None: sys.exit(1) old_cd = os.getcwd() try: os.chdir(ssl_dir) # rebuild makefile when we do the role over from 32 to 64 build if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile): os.unlink(m32) # If the ssl makefiles do not exist, we invoke Perl to generate them. # Due to a bug in this script, the makefile sometimes ended up empty # Force a regeneration if it is. if not os.path.isfile(makefile) or os.path.getsize(makefile)==0: print("Creating the makefiles...") sys.stdout.flush() # Put our working Perl at the front of our path os.environ["PATH"] = os.path.dirname(perl) + \ os.pathsep + \ os.environ["PATH"] run_configure(configure, do_script) if arch=="x86" and debug: # the do_masm script in openssl doesn't generate a debug # build makefile so we generate it here: os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile) if arch == "amd64": fix_makefile(makefile, m32) # Now run make. makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile) print("Executing ssl makefiles:", makeCommand) sys.stdout.flush() rc = os.system(makeCommand) if rc: print("Executing "+makefile+" failed") print(rc) sys.exit(rc) finally: os.chdir(old_cd) sys.exit(rc)
a043b1006a0ea02e45e1aa9bb877bf8b783bae10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/a043b1006a0ea02e45e1aa9bb877bf8b783bae10/build_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 1198, 273, 1083, 1327, 2589, 18, 19485, 63, 21, 65, 422, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 1198, 273, 1083, 1327, 2589, 18, 19485, 63, 21, 65, 422, 3...
if not script: return
def jsEndElement (self, tag): """parse generated html for scripts""" if not self.buffer: print >>sys.stderr, "empty buffer on </script>" return if self.buffer[-1][0]!=DATA: print >>sys.stderr, "missing data for </script>", self.buffer[-1:] return script = self.buffer[-1][1].strip() del self.buffer[-1] if not (self.buffer and self.buffer[-1][0]==STARTTAG and \ self.buffer[1][1]=='script'): # there was a <script src="..."> already return del self.buffer[-1] if not script: return if script.startswith("<!--"): script = script[4:].strip() self.jsEnv.attachListener(self) self.jsfilter = HtmlFilter(self.rules, self.document, comments=self.comments, javascript=self.javascript) self.jsEnv.executeScript(script, 0.0) self.jsEnv.detachListener(self) self.jsfilter.flush() self.buffer.append([DATA, self.jsfilter.flushbuf()]) self.buffer += self.jsfilter.buffer self.jsfilter = None
ac3470728f7e970a92ce929b4fa85ae2f5e5d4ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/ac3470728f7e970a92ce929b4fa85ae2f5e5d4ae/Rewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 1638, 1046, 261, 2890, 16, 1047, 4672, 3536, 2670, 4374, 1729, 364, 8873, 8395, 309, 486, 365, 18, 4106, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 5531, 1613, 603, 7765, 4263, 2984...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 1638, 1046, 261, 2890, 16, 1047, 4672, 3536, 2670, 4374, 1729, 364, 8873, 8395, 309, 486, 365, 18, 4106, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 5531, 1613, 603, 7765, 4263, 2984...
if valign != 'BOTTOM' or just != 'LEFT': W = [] w, h = _listCellGeom(cellval,colwidth,cellstyle,W=W)
W = [] H = [] w, h = _listCellGeom(cellval,colwidth,cellstyle,W=W, H=H) if valign=='TOP': y = rowpos + rowheight - cellstyle.topPadding elif valign=='BOTTOM': y = rowpos+cellstyle.bottomPadding + h
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: self.canv.setFillColor(cellstyle.color) if cur is None or cellstyle.leading != cur.leading or cellstyle.fontname != cur.fontname or cellstyle.fontsize != cur.fontsize: self.canv.setFont(cellstyle.fontname, cellstyle.fontsize, cellstyle.leading) self._curcellstyle = cellstyle
6d688252f8c20ac7342f18cb770cd48a8cc16d36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/6d688252f8c20ac7342f18cb770cd48a8cc16d36/tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 4020, 12, 2890, 16, 2484, 1125, 16, 2484, 4060, 16, 261, 1293, 917, 16, 1027, 917, 3631, 261, 1293, 2819, 16, 1027, 4210, 3719, 30, 309, 365, 6315, 1397, 3855, 4060, 353, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9446, 4020, 12, 2890, 16, 2484, 1125, 16, 2484, 4060, 16, 261, 1293, 917, 16, 1027, 917, 3631, 261, 1293, 2819, 16, 1027, 4210, 3719, 30, 309, 365, 6315, 1397, 3855, 4060, 353, 48...
if child['left'] <= left: raise Exception('Record (%d): left %d <= parent left %d' % \ (child['id'], child['left'], left)) if child['left'] >= child['right']: raise Exception('Record (%d): left %d >= right %d' % \ (child['id'], child['left'], child['right'])) if right != 0 and child['right'] >= right: raise Exception('Record (%d): right %d >= parent right %d' % \ (child['id'], child['right'], right))
assert child['left'] > left, \ 'Record (%d): left %d <= parent left %d' % \ (child['id'], child['left'], left) assert child['left'] < child['right'], \ 'Record (%d): left %d >= right %d' % \ (child['id'], child['left'], child['right']) assert right == 0 or child['right'] < right, \ 'Record (%d): right %d >= parent right %d' % \ (child['id'], child['right'], right)
def CheckTree(self, parent_id=False, left=0, right=0): child_ids = self.mptt.search([ ('parent', '=', parent_id), ], 0, None, None, CONTEXT) childs = self.mptt.read(child_ids, ['left', 'right'], CONTEXT) childs.sort(lambda x, y: cmp(child_ids.index(x['id']), child_ids.index(y['id']))) for child in childs: if child['left'] <= left: raise Exception('Record (%d): left %d <= parent left %d' % \ (child['id'], child['left'], left)) if child['left'] >= child['right']: raise Exception('Record (%d): left %d >= right %d' % \ (child['id'], child['left'], child['right'])) if right != 0 and child['right'] >= right: raise Exception('Record (%d): right %d >= parent right %d' % \ (child['id'], child['right'], right)) self.CheckTree(child['id'], left=child['left'], right=child['right']) next_left = 0 for child in childs: if child['left'] <= next_left: raise Exception('Record (%d): left %d <= next left %d' % \ (child['id'], child['left'], next_left)) next_left = child['right'] childs.reverse() previous_right = 0 for child in childs: if previous_right != 0 and child['right'] >= previous_right: raise Exception('Record (%d): right %d >= previous right %d' % \ (child['id'] , child['right'], previous_right)) previous_right = child['left']
2a4b1977cf90ff0b5c4f59abda66e9630089cd32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/2a4b1977cf90ff0b5c4f59abda66e9630089cd32/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2471, 12, 2890, 16, 982, 67, 350, 33, 8381, 16, 2002, 33, 20, 16, 2145, 33, 20, 4672, 1151, 67, 2232, 273, 365, 18, 81, 337, 88, 18, 3072, 3816, 7707, 2938, 2187, 15196, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2471, 12, 2890, 16, 982, 67, 350, 33, 8381, 16, 2002, 33, 20, 16, 2145, 33, 20, 4672, 1151, 67, 2232, 273, 365, 18, 81, 337, 88, 18, 3072, 3816, 7707, 2938, 2187, 15196, 2187, ...
self.pkgs.extend(self.pydb.searchPkgs([name, ]))
self.__handleBestPkg("remove", self.pydb.searchPkgs([name, ]))
def remove(self, name): self.pkgs.extend(self.pydb.searchPkgs([name, ]))
63c08f3d9e04ccf32583372dd5311f84d2b5343f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/63c08f3d9e04ccf32583372dd5311f84d2b5343f/yum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 508, 4672, 365, 18, 25376, 18, 14313, 12, 2890, 18, 2074, 1966, 18, 3072, 7789, 564, 3816, 529, 16, 308, 3719, 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, 0, 0, 0, 0, 0, 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, 1206, 12, 2890, 16, 508, 4672, 365, 18, 25376, 18, 14313, 12, 2890, 18, 2074, 1966, 18, 3072, 7789, 564, 3816, 529, 16, 308, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print "Connected via HTTS to: " + Config.get_SOAPHost()
def __connect(): global __connection global __connected if __connected == 0: if Config.get_UseSSL() == 0: __connection = httplib.HTTP(Config.get_SOAPHost()) DebugPrint(1, 'Connected via HTTP to: ' + Config.get_SOAPHost()) print "Connected via HTTS to: " + Config.get_SOAPHost() else: if Config.get_UseSSLCertificates() == 0: __connection = httplib.HTTPSConnection(Config.get_SSLHost(), cert_file = Config.get_CertificateFile(), key_file = Config.get_KeyFile()) else: __connection = httplib.HTTPSConnection(Config.get_SSLHost(), cert_file = Config.get_SSLCertificateFile(), key_file = Config.get_SSLKeyFile()) __connection.connect() print "Connected via HTTPS to: " + Config.get_SSLHost() __connected = 1
311ec54650c62807dcf0a6626a65b7b72ecf810e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/637/311ec54650c62807dcf0a6626a65b7b72ecf810e/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3612, 13332, 2552, 1001, 4071, 2552, 1001, 8537, 225, 309, 1001, 8537, 422, 374, 30, 309, 1903, 18, 588, 67, 3727, 6745, 1435, 422, 374, 30, 1001, 4071, 273, 15851, 6673, 18, 3693,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3612, 13332, 2552, 1001, 4071, 2552, 1001, 8537, 225, 309, 1001, 8537, 422, 374, 30, 309, 1903, 18, 588, 67, 3727, 6745, 1435, 422, 374, 30, 1001, 4071, 273, 15851, 6673, 18, 3693,...
" if (!xpc_qsJsvalToCharStr(cx, ${argPtr}, &${name})) ${failBlock}\n",
" if (!xpc_qsJsvalToCharStr(cx, ${argPtr}, &${name}))\n" " return JS_FALSE;\n",
def replacement(match): return vals[match.group(1)]
85ee3e89273f0ac0b9295128759b8ada04a837bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/85ee3e89273f0ac0b9295128759b8ada04a837bb/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6060, 12, 1916, 4672, 327, 5773, 63, 1916, 18, 1655, 12, 21, 25887, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6060, 12, 1916, 4672, 327, 5773, 63, 1916, 18, 1655, 12, 21, 25887, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Parse the SurfaceRacer output file which has the same mane as the input pdb, but with a txt extension. The output ends up un the same folser
Parse the SurfaceRacer output file which has the same nawe as the input pdb, but with a txt extension. The output ends up un the same folder
def parse_result( self, output ): """ Parse the SurfaceRacer output file which has the same mane as the input pdb, but with a txt extension. The output ends up un the same folser as the input. In addition a file called result.txt is created in the same directory as the binary. @param output: full path to input pdb-file @type output: str
c3f95c64f640872c83948414d31ac246cee7a35c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/482/c3f95c64f640872c83948414d31ac246cee7a35c/SurfaceRacer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2088, 12, 365, 16, 876, 262, 30, 3536, 2884, 326, 24354, 54, 10598, 876, 585, 1492, 711, 326, 1967, 9583, 1814, 487, 326, 810, 10892, 16, 1496, 598, 279, 6463, 2710, 18, 1021...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2088, 12, 365, 16, 876, 262, 30, 3536, 2884, 326, 24354, 54, 10598, 876, 585, 1492, 711, 326, 1967, 9583, 1814, 487, 326, 810, 10892, 16, 1496, 598, 279, 6463, 2710, 18, 1021...
'fiscalyear = %s ' \
'AND fiscalyear = %s ' \
def check_dates(self, cursor, user, ids): for period in self.browse(cursor, user, ids): cursor.execute('SELECT id ' \ 'FROM ' + self._table + ' ' \ 'WHERE ((start_date <= %s AND end_date >= %s) ' \ 'OR (start_date <= %s AND end_date >= %s) ' \ 'OR (start_date >= %s AND end_date <= %s)) ' \ 'fiscalyear = %s ' \ 'AND id != %s', (period.start_date, period.start_date, period.end_date, period.end_date, period.start_date, period.end_date, period.fiscalyear.id, period.id)) if cursor.rowcount: return False return True
60d573371058f14b7f09b3eef62b0b8de3f3bcad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/60d573371058f14b7f09b3eef62b0b8de3f3bcad/period.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9683, 12, 2890, 16, 3347, 16, 729, 16, 3258, 4672, 364, 3879, 316, 365, 18, 25731, 12, 9216, 16, 729, 16, 3258, 4672, 3347, 18, 8837, 2668, 4803, 612, 296, 521, 296, 11249, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9683, 12, 2890, 16, 3347, 16, 729, 16, 3258, 4672, 364, 3879, 316, 365, 18, 25731, 12, 9216, 16, 729, 16, 3258, 4672, 3347, 18, 8837, 2668, 4803, 612, 296, 521, 296, 11249, ...
pos, format = self.query_element.query_position (format)
pos, format = self.query_element.query_position(format)
def query_position (self, format = gst.FORMAT_TIME): try: pos, format = self.query_element.query_position (format) return pos except gst.QueryError: return 0
016aec4a85d3438c0d49f1f8b2012e23eb7805ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2207/016aec4a85d3438c0d49f1f8b2012e23eb7805ec/audio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 3276, 261, 2890, 16, 740, 273, 314, 334, 18, 7254, 67, 4684, 4672, 775, 30, 949, 16, 740, 273, 365, 18, 2271, 67, 2956, 18, 2271, 67, 3276, 12, 2139, 13, 327, 949, 1335, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 3276, 261, 2890, 16, 740, 273, 314, 334, 18, 7254, 67, 4684, 4672, 775, 30, 949, 16, 740, 273, 365, 18, 2271, 67, 2956, 18, 2271, 67, 3276, 12, 2139, 13, 327, 949, 1335, 3...
label = match.group(self.groups.initial.footnotelabel)
label = match.group('footnotelabel')
def footnote_reference(self, match, lineno): """ Handles `nodes.footnote_reference` and `nodes.citation_reference` elements. """ label = match.group(self.groups.initial.footnotelabel) refname = normalize_name(label) if match.group(self.groups.initial.citationlabel): refnode = nodes.citation_reference('[%s]_' % label, refname=refname) refnode += nodes.Text(label) self.document.note_citation_ref(refnode) else: refnode = nodes.footnote_reference('[%s]_' % label) if refname[0] == '#': refname = refname[1:] refnode['auto'] = 1 self.document.note_autofootnote_ref(refnode) elif refname == '*': refname = '' refnode['auto'] = '*' self.document.note_symbol_footnote_ref( refnode) else: refnode += nodes.Text(label) if refname: refnode['refname'] = refname self.document.note_footnote_ref(refnode) string = match.string matchstart = match.start(self.groups.initial.whole) matchend = match.end(self.groups.initial.whole) return (string[:matchstart], [refnode], string[matchend:], [])
72a0c19a34dcc90353f2d799116ebcadd510f22a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/72a0c19a34dcc90353f2d799116ebcadd510f22a/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14200, 7652, 67, 6180, 12, 2890, 16, 845, 16, 7586, 4672, 3536, 27020, 1375, 4690, 18, 10923, 7652, 67, 6180, 68, 471, 1375, 4690, 18, 71, 8773, 67, 6180, 68, 2186, 18, 3536, 1433, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14200, 7652, 67, 6180, 12, 2890, 16, 845, 16, 7586, 4672, 3536, 27020, 1375, 4690, 18, 10923, 7652, 67, 6180, 68, 471, 1375, 4690, 18, 71, 8773, 67, 6180, 68, 2186, 18, 3536, 1433, 273...
commento = wikipedia.translate(site, comm) commento2 = wikipedia.translate(site, comm2) ti_es_ti = wikipedia.translate(site, empty) unverf = wikipedia.translate(site, unver)
def checkbot(): # Command line configurable parameters repeat = True # Restart after having check all the images? limit = 80 # How many images check? time_sleep = 30 # How many time sleep after the check? skip_number = 0 # How many images to skip before checking? wait_number = 0 # How many time sleep before the check? commonsActive = False # Check if on commons there's an image with the same name? normal = False # Check the new images or use another generator? urlUsed = False # Use the url-related function instead of the new-pages generator regexGen = False # Use the regex generator untagged = False # Use the untagged generator skip_list = list() # Inizialize the skip list used below # Here below there are the parameters. for arg in wikipedia.handleArgs(): if arg.startswith('-limit'): if len(arg) == 7: limit = int(wikipedia.input(u'How many images do you want to check?')) else: limit = int(arg[7:]) if arg.startswith('-time'): if len(arg) == 5: time_sleep = int(wikipedia.input(u'How many seconds do you want runs to be apart?')) else: time_sleep = int(arg[6:]) elif arg == '-break': repeat = False elif arg == '-commons': commonsActive = True elif arg.startswith('-skip'): if len(arg) == 5: skip = True skip_number = int(wikipedia.input(u'How many images do you want to skip?')) elif len(arg) > 5: skip = True skip_number = int(arg[6:]) elif arg.startswith('-wait'): if len(arg) == 5: wait = True wait_number = int(wikipedia.input(u'How many time do you want to wait before checking the images?')) elif len(arg) > 5: wait = True wait_number = int(arg[6:]) elif arg.startswith('-start'): if len(arg) == 6: firstPageTitle = str(wikipedia.input(u'From witch page do you want to start?')) elif len(arg) > 6: firstPageTitle = str(arg[7:]) generator = wikipedia.getSite().allpages(start='Image:%s' % firstPageTitle) repeat = False elif arg.startswith('-page'): if len(arg) == 5: regexPageName = str(wikipedia.input(u'Which page do you want to use for the regex?')) elif len(arg) > 5: regexPageName = str(arg[6:]) repeat = False regexGen = True elif arg.startswith('-url'): if len(arg) == 4: regexPageUrl = str(wikipedia.input(u'Which url do you want to use for the regex?')) elif len(arg) > 4: regexPageUrl = str(arg[5:]) urlUsed = True repeat = False regexGen = True elif arg.startswith('-regex'): if len(arg) == 6: regexpToUse = str(wikipedia.input(u'Which regex do you want to use?')) elif len(arg) > 6: regexpToUse = str(arg[7:]) generator = 'regex' repeat = False elif arg.startswith('-cat'): if len(arg) == 4: catName = str(wikipedia.input(u'In which category do I work?')) elif len(arg) > 4: catName = str(arg[5:]) catSelected = catlib.Category(wikipedia.getSite(), 'Category:%s' % catName) generator = pagegenerators.CategorizedPageGenerator(catSelected) repeat = False elif arg.startswith('-untagged'): untagged = True if len(arg) == 9: projectUntagged = str(wikipedia.input(u'In which project should I work?')) elif len(arg) > 9: projectUntagged = str(arg[10:]) # Understand if the generator it's the default or not. try: generator except NameError: normal = True # Define the site. site = wikipedia.getSite() # In this way i find what language, project and what bot do you use. lang = config.mylang project = config.family # Block of text to translate the parameters set above. image_n = site.image_namespace() image_namespace = "%s:" % image_n # Example: "User_talk:" unvertext = wikipedia.translate(site, n_txt) commento = wikipedia.translate(site, comm) commento2 = wikipedia.translate(site, comm2) ti_es_ti = wikipedia.translate(site, empty) unverf = wikipedia.translate(site, unver) di = wikipedia.translate(site, delete_immediately) dih = wikipedia.translate(site, delete_immediately_head) din = wikipedia.translate(site, delete_immediately_notification) nh = wikipedia.translate(site, nothing_head) nn = wikipedia.translate(site, nothing_notification) dels = wikipedia.translate(site, del_comm) botolist = wikipedia.translate(site, bot_list) smwl = wikipedia.translate(site, second_message_without_license) settings = wikipedia.translate(site, page_with_settings) rep_page = wikipedia.translate(site, report_page) rep_text = wikipedia.translate(site, report_text) com = wikipedia.translate(site, comm10) TextFind = wikipedia.translate(site, txt_find) hiddentemplate = wikipedia.translate(site, HiddenTemplate) # A template as {{en is not a license! Adding also them in the whitelist template... for langK in wikipedia.Family('wikipedia').knownlanguages: hiddentemplate.append('%s' % langK) # If the images to skip are 0, set the skip variable to False (the same for the wait time) if skip_number == 0: skip = False if wait_number == 0: wait = False # nothing = Defining an empty image description nothing = ['', ' ', ' ', ' ', '\n', '\n ', '\n ', '\n\n', '\n \n', ' \n', ' \n ', ' \n \n'] # something = Minimal requirements for an image description. # If this fits, no tagging will take place (if there aren't other issues) # MIT license is ok on italian wikipedia, let also this here something = ['{{', "'''MIT&nbsp;license'''"] # Don't put "}}" here, please. Useless and can give problems. # Unused file extensions. Does not contain PDF. notallowed = ("xcf", "xls", "sxw", "sxi", "sxc", "sxd", "djvu") # A little block-statement to ensure that the bot will not start with en-parameters if lang not in project_inserted: wikipedia.output(u"Your project is not supported by this script. You have to edit the script and add it!") wikipedia.stopme() # Some formatting for delete immediately template di = '\n%s' % di dels = dels % di # Reading the log of the new images if another generator is not given. if normal == True: if limit == 1: wikipedia.output(u"Retrieving the latest file for checking...") else: wikipedia.output(u"Retrieving the latest %d files for checking..." % limit) # Main Loop while 1: # Defing the Main Class. mainClass = main(site) # Untagged is True? Let's take that generator if untagged == True: generator = mainClass.untaggedGenerator(projectUntagged, rep_page, com) normal = False # Ensure that normal is False # Normal True? Take the default generator if normal == True: generator = pagegenerators.NewimagesPageGenerator(number = limit, site = site) # if urlUsed and regexGen, get the source for the generator if urlUsed == True and regexGen == True: textRegex = pagetext(regexPageUrl) # Not an url but a wiki page as "source" for the regex elif regexGen == True: pageRegex = wikipedia.Page(site, regexPageName) try: textRegex = pageRegex.get() except wikipedia.NoPage: wikipedia.output(u"%s doesn't exist!" % page.title()) textRegex = '' # No source, so the bot will quit later. # If generator is the regex' one, use your own Generator using an url or page and a regex. if generator == 'regex' and regexGen == True: generator = mainClass.regexGenerator(regexpToUse, textRegex) # Ok, We (should) have a generator, so let's go on. try: # Take the additional settings for the Project tupla_written = mainClass.takesettings(settings) except wikipedia.Error: # Error? Settings = None wikipedia.output(u'Problems with loading the settigs, run without them.') tupla_written = None some_problem = False # Ensure that if the list given is empty it will be converted to "None" # (but it should be already done in the takesettings() function) if tupla_written == []: tupla_written = None if tupla_written != None: wikipedia.output(u'\t >> Loaded the real-time page... <<') # Save the settings not to lose them (FixMe: Make that part better) filename = "settings.data" f = file(filename, 'w') cPickle.dump(tupla_written, f) f.close() else: # No settings found, No problem, continue. wikipedia.output(u'\t >> No additional settings found! <<') for image in generator: # If I don't inizialize the generator, wait part and skip part are useless if wait: printWithTimeZone(u'Waiting %s seconds before checking the images,' % wait_number) # Let's sleep... time.sleep(wait_number) # Never sleep again (we are in a loop) wait = False # If the generator returns something that is not an image, simply skip it. if normal == False and regexGen == False: if image_namespace.lower() not in image.title().lower() and \ 'image:' not in image.title().lower(): wikipedia.output(u'%s seems not an image, skip it...' % image.title()) continue imageName = image.title().split(image_namespace)[1] # Deleting the namespace (useless here) # Skip block if skip == True: # If the images to skip are more the images to check, make them the same number if skip_number > limit: skip_number = limit if skip_list == []: if skip_number == 1: wikipedia.output(u'Skipping the first image:\n') else: wikipedia.output(u'Skipping the first %s images:\n' % skip_number) if len(skip_list) < skip_number: wikipedia.output(u'Skipping %s...' % imageName) skip_list.append(imageName) if skip_number == 1: wikipedia.output('') skip = False continue else: wikipedia.output('1\n') skip = False elif skip_list == []: wikipedia.output(u'\t\t>> No images to skip...<<') skip_list.append('skip = Off') # Only to print it once if commonsActive == True: response = mainClass.checkImage(imageName) if response == False: continue if tupla_written != None: f = file(filename) tuplaList = cPickle.load(f) parentesi = False delete = False tagged = False extension = imageName.split('.')[-1] # Page => ImagePage p = wikipedia.ImagePage(site, image.title()) # Skip deleted images try: g = p.get() except wikipedia.NoPage: wikipedia.output(u"Skipping %s because it has been deleted." % imageName) continue except wikipedia.IsRedirectPage: wikipedia.output(u"The file description for %s is a redirect?!" % imageName ) continue for i in TextFind: if i.lower() in g: tagged = True for l in hiddentemplate: if tagged == False: res = re.findall(r'\{\{(?:[Tt]emplate:|)%s(?: \n|\||\n)' % l.lower(), g.lower()) if res != []: #print res wikipedia.output(u'A white template found, skipping the template...') # I don't delete the template, because if there is something to change the image page # will be reloaded. I delete it only for the next check part. if l != '' and l != ' ': g = g.lower().replace('{{%s' % l, '') for a_word in something: if a_word in g: parentesi = True for parl in notallowed: if parl.lower() in extension.lower(): delete = True some_problem = False if tupla_written != None: for tupla in tuplaList: name = tupla[1] find_tipe = tupla[2] find = tupla[3] find_list = mainClass.load(find) imagechanges = tupla[4] if imagechanges.lower() == 'false': imagestatus = False elif imagechanges.lower() == 'true': imagestatus = True else: wikipedia.output(u"Error! Imagechanges set wrongly!") tupla_written = None break summary = tupla[5] head_2 = tupla[6] text = tupla[7] text = text % imageName mexCatched = tupla[8] wikipedia.setAction(summary) del tupla[0:8] for k in find_list: if find_tipe.lower() == 'findonly': if k.lower() == g.lower(): some_problem = True text_used = text head_used = head_2 imagestatus_used = imagestatus name_used = name summary_used = summary mex_used = mexCatched break elif find_tipe.lower() == 'find': if k.lower() in g.lower(): some_problem = True text_used = text head_used = head_2 imagestatus_used = imagestatus name_used = name summary_used = summary mex_used = mexCatched continue if p.exists(): # Here begins the check block. if tagged == True: printWithTimeZone(u'%s is already tagged...' % imageName) continue if some_problem == True: if mex_used in g: wikipedia.output(u'Image already fixed. Skip.') continue wikipedia.output(u"The image description for %s contains %s..." % (imageName, name_used)) if mex_used.lower() == 'default': mex_used = unvertext if imagestatus_used == False: reported = mainClass.report_image(rep_page, imageName, com, rep_text) else: reported = True if reported == True: #if imagestatus_used == True: report(mex_used, imageName, text_used, "\n%s\n" % head_used, None, imagestatus_used, summary_used) else: wikipedia.output(u"Skipping the image...") some_problem = False continue elif parentesi == True: printWithTimeZone(u"%s seems ok," % imageName) # It works also without this... but i want only to be sure ^^ parentesi = False continue elif delete == True: wikipedia.output(u"%s is not a file!" % imageName) # Modify summary text wikipedia.setAction(dels) canctext = di % extension notification = din % imageName head = dih report(canctext, imageName, notification, head) delete = False continue elif g in nothing: wikipedia.output(u"The image description for %s does not contain a license template!" % imageName) if lang == 'commons': head = nh % imageName notification = nn else: notification = nn % imageName head = nh report(unvertext, imageName, notification, head, smwl) continue else: wikipedia.output(u"%s has only text and not the specific license..." % imageName) if lang == 'commons': head = nh % imageName notification = nn else: notification = nn % imageName head = nh report(unvertext, imageName, notification, head, smwl) continue # A little block to perform the repeat or to break. if repeat == True: printWithTimeZone(u"Waiting for %s seconds," % time_sleep) time.sleep(time_sleep) elif repeat == False: wikipedia.output(u"\t\t\t>> STOP! <<") break
352bd40f77ebca67f4233fd74590cdc344dc4736 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/352bd40f77ebca67f4233fd74590cdc344dc4736/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 4819, 13332, 468, 3498, 980, 14593, 1472, 7666, 273, 1053, 468, 20709, 1839, 7999, 866, 777, 326, 4602, 35, 1800, 273, 8958, 468, 9017, 4906, 4602, 866, 35, 813, 67, 19607, 273, 519...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4819, 13332, 468, 3498, 980, 14593, 1472, 7666, 273, 1053, 468, 20709, 1839, 7999, 866, 777, 326, 4602, 35, 1800, 273, 8958, 468, 9017, 4906, 4602, 866, 35, 813, 67, 19607, 273, 519...
def __cmp__(left, right): """ EXAMPLES: sage: B3 = WeylCharacterRing(['B',3]) sage: fw = [B3(w) for w in B3.lattice().fundamental_weights()] sage: sorted(fw) [B3(1/2,1/2,1/2), B3(1,0,0), B3(1,1,0)] """ return left._hdict.__cmp__(right._hdict)
def __cmp__(self, right): """ EXAMPLES: sage: B3 = WeylCharacterRing(['B',3]) sage: fw = [B3(w) for w in B3.lattice().fundamental_weights()] sage: sorted(fw) [B3(1/2,1/2,1/2), B3(1,0,0), B3(1,1,0)] sage: b = B3(1,0,0) sage: b == b True """ return cmp(self._hdict, right._hdict)
def __cmp__(left, right): """ EXAMPLES: sage: B3 = WeylCharacterRing(['B',3]) sage: fw = [B3(w) for w in B3.lattice().fundamental_weights()] sage: sorted(fw) [B3(1/2,1/2,1/2), B3(1,0,0), B3(1,1,0)] """ return left._hdict.__cmp__(right._hdict)
0a30ee9b10542e4dc66149f6ffe87504cb679b84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0a30ee9b10542e4dc66149f6ffe87504cb679b84/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 4482, 16, 2145, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069, 10369, 12, 3292, 38, 2187, 23, 5717, 272, 410, 30, 7600, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 4482, 16, 2145, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069, 10369, 12, 3292, 38, 2187, 23, 5717, 272, 410, 30, 7600, 273, ...
try: total_vertices = len (self.vertex_list) except: print "ERROR: len ( ) exception 2" total_vertices = 0 self.vertex_list = [ ]
total_vertices = len (self.vertex_list)
def add_vertex (self, vertex_id, vertex_function, context):
a32d54b41aac78b3a450827c2f818ce73bb60b4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/a32d54b41aac78b3a450827c2f818ce73bb60b4e/MotionTrail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 15281, 261, 2890, 16, 5253, 67, 350, 16, 5253, 67, 915, 16, 819, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 15281, 261, 2890, 16, 5253, 67, 350, 16, 5253, 67, 915, 16, 819, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.hboxlayout19 = QtGui.QHBoxLayout() self.hboxlayout19.setMargin(0) self.hboxlayout19.setSpacing(6) self.hboxlayout19.setObjectName("hboxlayout19") spacerItem22 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) self.hboxlayout19.addItem(spacerItem22)
self.hboxlayout22 = QtGui.QHBoxLayout() self.hboxlayout22.setMargin(0) self.hboxlayout22.setSpacing(6) self.hboxlayout22.setObjectName("hboxlayout22") spacerItem24 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) self.hboxlayout22.addItem(spacerItem24)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,609,642).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
30deb2219e016847d91b37e801c50b75fbd1c3cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/30deb2219e016847d91b37e801c50b75fbd1c3cf/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
assert res.code == 201, (res.code, res)
assert res.status == 201, (res.status, res)
def __exit__(self, exc_type, exc_value, traceback): if self.result: print self.result if exc_type is None: assert False, 'expecting exception %s' % self.klass.__name__ elif issubclass(exc_type, self.klass): for (k, v) in self.kwargs.items(): if getattr(exc_value, k, None)!=v: return False return True
dab938f43cc9e2d9b6c4311724fbb11ba5f93070 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3443/dab938f43cc9e2d9b6c4311724fbb11ba5f93070/test_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8593, 972, 12, 2890, 16, 3533, 67, 723, 16, 3533, 67, 1132, 16, 10820, 4672, 309, 365, 18, 2088, 30, 1172, 365, 18, 2088, 309, 3533, 67, 723, 353, 599, 30, 1815, 1083, 16, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8593, 972, 12, 2890, 16, 3533, 67, 723, 16, 3533, 67, 1132, 16, 10820, 4672, 309, 365, 18, 2088, 30, 1172, 365, 18, 2088, 309, 3533, 67, 723, 353, 599, 30, 1815, 1083, 16, 296,...
security.declareProtected(ChangeTopics, 'listSubtopics')
security.declareProtected(CMFCorePermissions.View, 'listSubtopics')
def listAvailableFields(self): """Return a list of available fields for new criteria. """ current = [ crit.Field() for crit in self.listCriteria() ] fields = self.listFields() val = [ field for field in fields if field[0] not in current ] return val
9f51673a3885014bda7d82bf4a9410238ecc1f6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/9f51673a3885014bda7d82bf4a9410238ecc1f6a/topic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 5268, 2314, 12, 2890, 4672, 3536, 990, 279, 666, 434, 2319, 1466, 364, 394, 3582, 18, 3536, 783, 282, 273, 306, 7921, 18, 974, 1435, 364, 7921, 316, 365, 18, 1098, 7231, 1435, 308...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 5268, 2314, 12, 2890, 4672, 3536, 990, 279, 666, 434, 2319, 1466, 364, 394, 3582, 18, 3536, 783, 282, 273, 306, 7921, 18, 974, 1435, 364, 7921, 316, 365, 18, 1098, 7231, 1435, 308...
heights=heights).show(**kwds)
heights=heights, edge_style=edge_style).show(**kwds)
def show(self, pos=None, layout=None, vertex_labels=True, edge_labels=False, vertex_size=200, graph_border=False, vertex_colors=None, edge_colors=None, partition=None, scaling_term=0.05, talk=False, iterations=50, loop_size=.1, color_by_label=False, heights=None, **kwds): """ Shows the (di)graph.
3323af5b44fb141acb0df020218a8dabe24fcfb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3323af5b44fb141acb0df020218a8dabe24fcfb9/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 16, 949, 33, 7036, 16, 3511, 33, 7036, 16, 5253, 67, 5336, 33, 5510, 16, 3591, 67, 5336, 33, 8381, 16, 5253, 67, 1467, 33, 6976, 16, 2667, 67, 8815, 33, 8381, 16, 5...
if sys.platform == 'aix4': python_lib = get_python_lib(standard_lib=1) ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') python_exp = os.path.join(python_lib, 'config', 'python.exp') g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) elif sys.platform == 'beos': python_lib = get_python_lib(standard_lib=1) linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) linkerscript = os.path.join(python_lib, 'config', linkerscript_name) g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % (linkerscript, PREFIX, sys.version[0:3]))
if python_build: g['LDSHARED'] = g['BLDSHARED']
def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" g = {} # load the installed Makefile: try: filename = get_makefile_filename() parse_makefile(filename, g) except IOError, msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_msg + " (%s)" % msg.strerror raise DistutilsPlatformError, my_msg # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory. if sys.platform == 'aix4': # what about AIX 3.x ? # Linker script is in the config directory, not in Modules as the # Makefile says. python_lib = get_python_lib(standard_lib=1) ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') python_exp = os.path.join(python_lib, 'config', 'python.exp') g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) elif sys.platform == 'beos': # Linker script is in the config directory. In the Makefile it is # relative to the srcdir, which after installation no longer makes # sense. python_lib = get_python_lib(standard_lib=1) linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0]) linkerscript = os.path.join(python_lib, 'config', linkerscript_name) # XXX this isn't the right place to do this: adding the Python # library to the link, if needed, should be in the "build_ext" # command. (It's also needed for non-MS compilers on Windows, and # it's taken care of for them by the 'build_ext.get_libraries()' # method.) g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % (linkerscript, PREFIX, sys.version[0:3])) global _config_vars _config_vars = g
1a020868857cc58be9c2f36400b6e1c178750a49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1a020868857cc58be9c2f36400b6e1c178750a49/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 24463, 13332, 3536, 7520, 326, 1605, 487, 5505, 364, 13803, 31773, 14908, 12123, 314, 273, 2618, 468, 1262, 326, 5876, 4344, 768, 30, 775, 30, 1544, 273, 336, 67, 6540, 76...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 24463, 13332, 3536, 7520, 326, 1605, 487, 5505, 364, 13803, 31773, 14908, 12123, 314, 273, 2618, 468, 1262, 326, 5876, 4344, 768, 30, 775, 30, 1544, 273, 336, 67, 6540, 76...
nodeIdxs = proxInfo[::2] wordIdxs = proxInfo[1::2]
proxInfo2 = [(proxInfo[x], proxInfo[x+1]) for x in range(0, len(proxInfo), 2)] proxInfo2.sort() nodeIdxs = [x[0] for x in proxInfo2] wordIdxs = [x[1] for x in proxInfo2]
def display_summary(self, rec, paramDict, proxInfo=None, highlight=1): global nonAsciiRe, asciiFriendly, overescapedAmpRe, unescapeCharent recid = rec.id self.logger.log('Summary requested for record: %s' % (recid)) # highlight search terms in rec.sax if (proxInfo) and highlight: nodeIdxs = proxInfo[::2] wordIdxs = proxInfo[1::2] xps = {} tree = rec.dom.getroottree() walker = rec.dom.getiterator() for x, n in enumerate(walker): if x in nodeIdxs: xps[x] = tree.getpath(n) for x, ni in enumerate(nodeIdxs): wi = wordIdxs[x] wordCount = 0 xp = xps[ni] el = rec.dom.xpath(xp)[0] located = None for c in el.getiterator(): if c.text: spaceline = punctuationRe.sub(' ', c.text) spaceline = spaceline.replace('\'s', ' s') # Words ending in 's are treated as 2 words in proximityInfo - make it so! words = wordRe.findall(spaceline) try: start = sum(map(len, words[:wi - wordCount])) end = start + len(words[wi - wordCount]) except IndexError: wordCount += len(words) else: located = 'text' break if c.tail: spaceline = punctuationRe.sub(' ', c.tail) spaceline = spaceline.replace('\'s', ' s') # Words ending in 's are treated as 2 words in proximityInfo - make it so! words = wordRe.findall(spaceline) try: start = sum(map(len, words[:wi - wordCount])) end = start + len(words[wi - wordCount]) except IndexError: wordCount += len(words) else: located = 'tail' break if located: wp = 0 while words[wi - wordCount][wp] == ' ': wp += 1 start += wp if located == 'text': c.text = c.text[:start] + 'HGHLGHT' + c.text[start:end] + 'THGLHGH' + c.text[end:] elif located == 'tail': c.tail = c.tail[:start] + 'HGHLGHT' + c.tail[start:end] + 'THGLHGH' + c.tail[end:] else: # woops something went seriously wrong raise ValueError(located)
51c4864bb9efdde7305f1cca91b49e2220b7771c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11263/51c4864bb9efdde7305f1cca91b49e2220b7771c/eadSearchHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 7687, 12, 2890, 16, 1950, 16, 579, 5014, 16, 8617, 966, 33, 7036, 16, 8839, 33, 21, 4672, 2552, 1661, 21363, 426, 16, 11384, 19730, 16, 1879, 16502, 26895, 426, 16, 15568, 78...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 7687, 12, 2890, 16, 1950, 16, 579, 5014, 16, 8617, 966, 33, 7036, 16, 8839, 33, 21, 4672, 2552, 1661, 21363, 426, 16, 11384, 19730, 16, 1879, 16502, 26895, 426, 16, 15568, 78...
event = events.SocialEvent("unkown.png", "assets/characters/teacher.png", "health_check", _("Control médico"), 5.0, 30, probability, u"¿Este año fuiste al doctor?", 100)
event = events.SocialEvent("unkown.png", "assets/characters/teacher.png", "health_check", _("Control médico"), 5.0, 30, probability, u"¿Este año fuiste al doctor?", None, 100)
def __load_events(self, bars_controller): #Events constructor params: #picture, kid_animation_path, id, description, appereance_probability, time_span, kind, event_status, effect, kid_message, #preferred_mood=9, message_time_span = time_span) _events = [] # Personal Events # probabiliy configuration: (bar, type, threshold, probability_percentaje) probability = [("v_frutas", "indirect", 10.0, 30.0)] effect = effects.Effect(bars_controller, [("energy", -1.0), ("fun", -0.5)]) event = events.PersonalEvent("ill.jpg", None, "constipation", _("Constipation"), 5, 15, "personal", probability, effect, u"Me duele la panza y no \n puedo ir al baño", 2, 50) _events.append(event) probability = [("w_hands", "indirect", 25.0, 30.0)] effect = effects.Effect(bars_controller, [("energy", -1.0), ("fun", -0.5), ("agua", -1.0), ("defenses", -0.5)]) event = events.PersonalEvent("ill.jpg", None, "diarrhea", _("Diarrhea"), 5, 15, "personal", probability, effect, "Tengo diarrea", 2, 50) _events.append(event) probability = [("nutrition", "indirect", 100.0, 20.0), ("relaxing", "indirect", 100.0, 20.0)] effect = effects.Effect(bars_controller, [("energy", -1.0), ("fun", -0.5), ("relaxing", -0.5)]) event = events.PersonalEvent("ill.jpg", None, "headache", _("Headache"), 5, 15, "personal", probability, effect, "Me duele la cabeza", 2, 50) _events.append(event) probability = [("b_teeth", "indirect", 25.0, 50.0), ("dulces", "direct", 75.0, 20.0)] effect = effects.Effect(bars_controller, [("energy", -1.0), ("defenses", -1.0), ("fun", -1.0), ("relaxing", -1.0)]) event = events.PersonalEvent("caries.jpg", None, "caries", _("Caries"), 5, 15, "personal", probability, effect, "Me duele una muela", 5, 50) _events.append(event) probability = [("overall_bar", "constant", 100.0, 15.0)] effect = effects.Effect(bars_controller, [("nutrition", -0.3), ("energy", -1.0), ("resistencia", -0.9), ("fat", -0.5)]) event = events.PersonalEvent("ill.jpg", "assets/events/stomach_ache", "stomach_ache", _("Stomach ache"), 5, 15, "personal", probability, effect, "Me duele la panza! :(", 2, 50) _events.append(event) #Social events #(picture, person_path, name, description, appereance_probability, time_span, condicioned_bars, message, message_time_span) probability = [("b_teeth", "indirect", 50.0, 70.0), ("dulces", "direct", 75.0, 30.0)] #editar parametros: event = events.SocialEvent("caries.jpg", "assets/characters/teacher.png", "p_caries", _("Prevenir caries"), 5.0, 15, probability, u"Deberías lavarte los \ndientes", None, 100) _events.append(event)
42c6e205cc48cdae4d1b3b4803d1c831e453bd59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3492/42c6e205cc48cdae4d1b3b4803d1c831e453bd59/app_init.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 945, 67, 5989, 12, 2890, 16, 22252, 67, 5723, 4672, 468, 3783, 3885, 859, 30, 468, 21126, 16, 17395, 67, 30822, 67, 803, 16, 612, 16, 2477, 16, 513, 457, 73, 1359, 67, 22390, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 67, 5989, 12, 2890, 16, 22252, 67, 5723, 4672, 468, 3783, 3885, 859, 30, 468, 21126, 16, 17395, 67, 30822, 67, 803, 16, 612, 16, 2477, 16, 513, 457, 73, 1359, 67, 22390, 1...
os.system('cp %s %s 2>/dev/null'%(f, pyx_inst_file))
def compile_cmd(f, m): """ Command line to compile file f as part of module m """ if f.endswith('.pyx'): # process cython file pyx_inst_file = '%s/%s'%(SITE_PACKAGES, f) print "%s --> %s"%(f, pyx_inst_file) os.system('cp %s %s 2>/dev/null'%(f, pyx_inst_file)) outfile = f[:-4] if m.language == 'c++': outfile += ".cpp" else: outfile += ".c" cmd = "python2.5 `which cython` --embed-positions --incref-local-binop -I%s -o %s %s"%(os.getcwd(), outfile, f) elif f.endswith(('.c','.cc','.cpp')): # process C/C++ file cmd = "touch %s"%f return cmd #"NEED TO COMPILE file " + f + " in module " + m.name
a057995c3073deec4edd13a89bef470338f4f38a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/a057995c3073deec4edd13a89bef470338f4f38a/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 4172, 12, 74, 16, 312, 4672, 3536, 3498, 980, 358, 4074, 585, 284, 487, 1087, 434, 1605, 312, 3536, 309, 284, 18, 5839, 1918, 2668, 18, 2074, 92, 11, 4672, 468, 1207, 6143, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 4172, 12, 74, 16, 312, 4672, 3536, 3498, 980, 358, 4074, 585, 284, 487, 1087, 434, 1605, 312, 3536, 309, 284, 18, 5839, 1918, 2668, 18, 2074, 92, 11, 4672, 468, 1207, 6143, ...
return '<FilePermission uid:%d gid:%d mode:%o' % (self.uid, self.gid, self.mode)
return '<FilePermission uid:%d gid:%d mode:%o>' % (self.uid, self.gid, self.mode)
def __str__(self): return '<FilePermission uid:%d gid:%d mode:%o' % (self.uid, self.gid, self.mode)
a5a44a09432273ec07271b6038d51d0254fea21b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/a5a44a09432273ec07271b6038d51d0254fea21b/filepermission.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 2368, 812, 5041, 4555, 5319, 72, 11399, 5319, 72, 1965, 5319, 83, 11, 738, 261, 2890, 18, 1911, 16, 365, 18, 15780, 16, 365, 18, 3188, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 2368, 812, 5041, 4555, 5319, 72, 11399, 5319, 72, 1965, 5319, 83, 11, 738, 261, 2890, 18, 1911, 16, 365, 18, 15780, 16, 365, 18, 3188, 13, 2, -10...
global before_update_called before_update_called += 1
record_event('before_update_called')
def pre_update(self): global before_update_called before_update_called += 1
a86386040cf0d103d8140304c5281f7ee220a218 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11921/a86386040cf0d103d8140304c5281f7ee220a218/test_events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 67, 2725, 12, 2890, 4672, 2552, 1865, 67, 2725, 67, 11777, 1865, 67, 2725, 67, 11777, 1011, 404, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 67, 2725, 12, 2890, 4672, 2552, 1865, 67, 2725, 67, 11777, 1865, 67, 2725, 67, 11777, 1011, 404, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib', '/usr/lib/lib64']
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
c686a992b4beb8f3ae8ee57e41fa863e95f147bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c686a992b4beb8f3ae8ee57e41fa863e95f147bc/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
if type(ids) == int:
if isinstance(ids, (int, long)):
def write(self, cr, uid, ids, vals, context=None): resource_calendar_obj = self.pool.get('resource.calendar') resource_obj = self.pool.get('resource.resource') uom_obj = self.pool.get('product.uom') if context is None: context = {} if context.get('scheduler',False): return super(project_phase, self).write(cr, uid, ids, vals, context=context) # Consider calendar and efficiency if the phase is performed by a resource # otherwise consider the project's working calendar if type(ids) == int: ids = [ids] phase = self.browse(cr, uid, ids[0], context=context) calendar_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False resource_id = resource_obj.search(cr, uid, [('user_id', '=', phase.responsible_id.id)],context=context) if resource_id: cal_id = resource_obj.browse(cr, uid, resource_id[0], context=context).calendar_id.id if cal_id: calendar_id = cal_id default_uom_id = self._get_default_uom_id(cr, uid) avg_hours = uom_obj._compute_qty(cr, uid, phase.product_uom.id, phase.duration, default_uom_id)
ac56c74c8cbb3293ac937849c7f6b905b69fbd30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ac56c74c8cbb3293ac937849c7f6b905b69fbd30/project_long_term.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 1058, 67, 11650, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 3146, 18, 11650, 6134, 1058, 67, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 1058, 67, 11650, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 3146, 18, 11650, 6134, 1058, 67, 2603, ...
pgPoint = func.transform(pgPoint, self.epsg)
geom = func.transform(geom, epsg)
def buildExpression(self, request): id = None path = request.path_info.split("/") if len(path) > 1: path_pieces = path[-1].split(".") if len(path_pieces) > 1 and path_pieces[0].isdigit(): id = int(path_pieces[0])
dabae3938e989166d341def039b4e869a824d986 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11978/dabae3938e989166d341def039b4e869a824d986/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2300, 12, 2890, 16, 590, 4672, 612, 273, 599, 589, 273, 590, 18, 803, 67, 1376, 18, 4939, 2932, 4898, 13, 309, 562, 12, 803, 13, 405, 404, 30, 589, 67, 31016, 273, 589, 18919, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2300, 12, 2890, 16, 590, 4672, 612, 273, 599, 589, 273, 590, 18, 803, 67, 1376, 18, 4939, 2932, 4898, 13, 309, 562, 12, 803, 13, 405, 404, 30, 589, 67, 31016, 273, 589, 18919, ...
self.settings["CFLAGS"]="-O2 -mtune=common -fno-strict-aliasing -pipe"
self.settings["CFLAGS"]="-O2 -mcpu=common -mtune=common -fno-strict-aliasing -pipe"
def __init__(self,myspec): generic_ppc.__init__(self,myspec) self.settings["CFLAGS"]="-O2 -mtune=common -fno-strict-aliasing -pipe"
7e86939d1a46a2f73dfb4fc7a8cd0046dde53dd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/7e86939d1a46a2f73dfb4fc7a8cd0046dde53dd7/ppc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 81, 1900, 705, 4672, 5210, 67, 84, 2436, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 8955, 6552, 55, 11929, 1546, 17, 51, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 81, 1900, 705, 4672, 5210, 67, 84, 2436, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 8955, 6552, 55, 11929, 1546, 17, 51, 2...
ensemble=NetworkArray(name,[self.make('%d'%i,neurons,1,add_to_network=False,**args) for i in range(length)])
ensemble=NetworkArray(name,[self.make('%d'%i,neurons,dimensions,add_to_network=False,**args) for i in range(length)])
def make_array(self,name,neurons,length,**args): """Create and return an array of ensembles. Each ensemble will be 1-dimensional. All of the parameters from Network.make() can be used.""" #ensemble=EnsembleArray(name,[self.make('%d'%i,neurons,1,add_to_network=False,**args) for i in range(length)]) ensemble=NetworkArray(name,[self.make('%d'%i,neurons,1,add_to_network=False,**args) for i in range(length)]) self.network.addNode(ensemble) ensemble.mode=ensemble.nodes[0].mode return ensemble
d1c8e658675600fbe3f6a8d1bdf05818896b7b1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9336/d1c8e658675600fbe3f6a8d1bdf05818896b7b1a/nef.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 1126, 12, 2890, 16, 529, 16, 4644, 295, 7008, 16, 2469, 16, 636, 1968, 4672, 3536, 1684, 471, 327, 392, 526, 434, 570, 5747, 1040, 18, 225, 8315, 24385, 903, 506, 404, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1126, 12, 2890, 16, 529, 16, 4644, 295, 7008, 16, 2469, 16, 636, 1968, 4672, 3536, 1684, 471, 327, 392, 526, 434, 570, 5747, 1040, 18, 225, 8315, 24385, 903, 506, 404, 17, ...
EXAMPLES:
EXAMPLES::
def get_minmax_data(self): """ Returns a dictionary with the bounding box data.
a05db2e3e6dc042c9ec2f03aee45c0216d1b0ac9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a05db2e3e6dc042c9ec2f03aee45c0216d1b0ac9/disk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1154, 1896, 67, 892, 12, 2890, 4672, 3536, 2860, 279, 3880, 598, 326, 7552, 3919, 501, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1154, 1896, 67, 892, 12, 2890, 4672, 3536, 2860, 279, 3880, 598, 326, 7552, 3919, 501, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if encoding != None:
print '_'+encoding+'_' print type(encoding) if encoding != None and encoding != "None": print 'ENTROU......'
def GetEncoding(self): """ Return the dicom encoding DICOM standard tag (0x0008, 0x0005) was used. """ tag = gdcm.Tag(0x0008, 0x0005) ds = self.gdcm_reader.GetFile().GetDataSet() if ds.FindDataElement(tag): encoding = str(ds.GetDataElement(tag).GetValue()) if encoding != None: #Problem with 0051 anonymized if (encoding.split(":"))[0] == "Loaded": return 'ISO_IR 100' else: return encoding return 'ISO_IR 100'
a71f4599e7d0fdd3a153d4584261ea43d49c8afd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/a71f4599e7d0fdd3a153d4584261ea43d49c8afd/dicom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4705, 12, 2890, 4672, 3536, 2000, 326, 29357, 2688, 30530, 4529, 1047, 261, 20, 92, 3784, 28, 16, 374, 92, 3784, 25, 13, 1703, 1399, 18, 3536, 1047, 273, 314, 7201, 81, 18, 1805, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4705, 12, 2890, 4672, 3536, 2000, 326, 29357, 2688, 30530, 4529, 1047, 261, 20, 92, 3784, 28, 16, 374, 92, 3784, 25, 13, 1703, 1399, 18, 3536, 1047, 273, 314, 7201, 81, 18, 1805, ...
if agent=="*":
if agent=='*':
def applies_to(self, useragent): "check if this entry applies to the specified agent" for agent in self.useragents: if agent=="*": return 1 if re.match(agent, useragent): return 1 return 0
5bba231d1e78b60c9886405476df92992fb4e349 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5bba231d1e78b60c9886405476df92992fb4e349/robotparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10294, 67, 869, 12, 2890, 16, 22649, 4672, 315, 1893, 309, 333, 1241, 10294, 358, 326, 1269, 4040, 6, 364, 4040, 316, 365, 18, 1355, 23560, 30, 309, 4040, 18920, 4035, 30, 225, 327, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10294, 67, 869, 12, 2890, 16, 22649, 4672, 315, 1893, 309, 333, 1241, 10294, 358, 326, 1269, 4040, 6, 364, 4040, 316, 365, 18, 1355, 23560, 30, 309, 4040, 18920, 4035, 30, 225, 327, 40...
self.zdstatus()
self.get_status()
def do_stop(self, arg): self.zdstatus() if not self.zd_up: print "daemon manager not running" elif not self.zd_pid: print "daemon not running" else: self.zdcommand("stop") self.zdstatus() while self.zd_pid: sys.stdout.write(". ") sys.stdout.flush() time.sleep(1) self.zdstatus() print "daemon stopped"
62025f58079f2271c5bf6a4bc0455b164c06d413 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9782/62025f58079f2271c5bf6a4bc0455b164c06d413/zdctl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5681, 12, 2890, 16, 1501, 4672, 365, 18, 588, 67, 2327, 1435, 309, 486, 365, 18, 94, 72, 67, 416, 30, 1172, 315, 21511, 3301, 486, 3549, 6, 1327, 486, 365, 18, 94, 72, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5681, 12, 2890, 16, 1501, 4672, 365, 18, 588, 67, 2327, 1435, 309, 486, 365, 18, 94, 72, 67, 416, 30, 1172, 315, 21511, 3301, 486, 3549, 6, 1327, 486, 365, 18, 94, 72, 67,...
l = [file] * size
l = [object] * size
def basic_test_extend(self, size): l = [file] * size l.extend(l) self.assertEquals(len(l), size * 2) self.failUnless(l[0] is l[-1]) self.failUnless(l[size - 1] is l[size + 1])
b0ebbdcb18417c47102e75e0467c8f28159ad54e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/b0ebbdcb18417c47102e75e0467c8f28159ad54e/test_bigmem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5337, 67, 3813, 67, 14313, 12, 2890, 16, 963, 4672, 328, 273, 306, 1612, 65, 380, 963, 328, 18, 14313, 12, 80, 13, 365, 18, 11231, 8867, 12, 1897, 12, 80, 3631, 963, 380, 576, 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, 5337, 67, 3813, 67, 14313, 12, 2890, 16, 963, 4672, 328, 273, 306, 1612, 65, 380, 963, 328, 18, 14313, 12, 80, 13, 365, 18, 11231, 8867, 12, 1897, 12, 80, 3631, 963, 380, 576, 13, ...
def __init__(self, title="Working...", maxval=100, label="", id=263):
def __init__(self, title="Working...", maxval=0, label="", id=263):
def __init__(self, title="Working...", maxval=100, label="", id=263): self.w = None self.d = None self.maxval = maxval self.curval = -1 self.d = GetNewDialog(id, -1) self.w = self.d.GetDialogWindow() self.label(label) self._update(0) self.d.AutoSizeDialog() self.title(title) self.w.ShowWindow() self.d.DrawDialog()
911e87de6f283e2326422c6746dd296511368a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/911e87de6f283e2326422c6746dd296511368a76/EasyDialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2077, 1546, 14836, 7070, 16, 30443, 33, 20, 16, 1433, 1546, 3113, 612, 33, 22, 4449, 4672, 365, 18, 91, 273, 599, 365, 18, 72, 273, 599, 365, 18, 1896,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2077, 1546, 14836, 7070, 16, 30443, 33, 20, 16, 1433, 1546, 3113, 612, 33, 22, 4449, 4672, 365, 18, 91, 273, 599, 365, 18, 72, 273, 599, 365, 18, 1896,...
'a' + a.path(), 'b' + b.path()))
'a' + apath, 'b' + b.path()))
def diff(self, commit): try: path, filename = os.path.split(self._blob.path()) a_ci = c.app.repo.commit(commit) a_tree = a_ci.tree() a = a_tree.get_blob(filename, path[1:].split('/')) except: a = [] b = self._blob la = list(a) lb = list(b) diff = ''.join(patience.unified_diff( la, lb, 'a' + a.path(), 'b' + b.path())) return dict( a=a, b=b, diff=diff)
a278d1f3298b67a4767dc78eb1c54d2de061827c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/a278d1f3298b67a4767dc78eb1c54d2de061827c/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 12, 2890, 16, 3294, 4672, 775, 30, 589, 16, 1544, 273, 1140, 18, 803, 18, 4939, 12, 2890, 6315, 10721, 18, 803, 10756, 279, 67, 8450, 273, 276, 18, 2910, 18, 7422, 18, 7371, 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, 3122, 12, 2890, 16, 3294, 4672, 775, 30, 589, 16, 1544, 273, 1140, 18, 803, 18, 4939, 12, 2890, 6315, 10721, 18, 803, 10756, 279, 67, 8450, 273, 276, 18, 2910, 18, 7422, 18, 7371, 12...
lines[i:i] = ["\end_deeper","","","\\end_inset","",""]
lines[i:i] = ["\end_deeper",""]
def convert_comment(lines): i = 0 comment = "\\layout Comment" while 1: i = find_token(lines, comment, i) if i == -1: return lines[i:i+1] = ["\\layout Standard","","", "\\begin_inset Comment", "collapsed true","", "\\layout Standard"] i = i + 7 while 1: old_i = i i = find_token(lines, "\\layout", i) if i == -1: i = len(lines) - 1 lines[i:i] = ["\\end_inset","",""] return j = find_token(lines, '\\begin_deeper', old_i, i) if j == -1: j = i + 1 k = find_token(lines, '\\begin_inset', old_i, i) if k == -1: k = i + 1 if j < i and j < k: i = j del lines[i] i = find_end_of( lines, i, "\\begin_deeper","\\end_deeper") if i == -1: #This case should not happen #but if this happens deal with it greacefully adding #the missing \end_deeper. i = len(lines) - 1 lines[i:i] = ["\end_deeper","","","\\end_inset","",""] return else: del lines[i] continue if k < i: i = k i = find_end_of( lines, i, "\\begin_inset","\\end_inset") if i == -1: #This case should not happen #but if this happens deal with it greacefully adding #the missing \end_inset. i = len(lines) - 1 lines[i:i] = ["\\end_inset","","","\\end_inset","",""] return else: i = i + 1 continue if find(lines[i], comment) == -1: lines[i:i] = ["\\end_inset"] i = i + 1 break lines[i:i+1] = ["\\layout Standard"] i = i + 1
9d87888cf5caaf4dde469849610950b5db30d8a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/9d87888cf5caaf4dde469849610950b5db30d8a3/lyx_1_4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 3469, 12, 3548, 4672, 277, 273, 374, 2879, 273, 8422, 6741, 9821, 6, 1323, 404, 30, 277, 273, 1104, 67, 2316, 12, 3548, 16, 2879, 16, 277, 13, 309, 277, 422, 300, 21, 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, 1765, 67, 3469, 12, 3548, 4672, 277, 273, 374, 2879, 273, 8422, 6741, 9821, 6, 1323, 404, 30, 277, 273, 1104, 67, 2316, 12, 3548, 16, 2879, 16, 277, 13, 309, 277, 422, 300, 21, 30, ...
event.arguments['Enable'] = len(self.contents) > 0
event.arguments['Enable'] = self.contents is not None and len(self.contents) > 0
def onSelectAllEventUpdateUI(self, event): event.arguments['Enable'] = len(self.contents) > 0
ed9a5c796496766a9472a71cf848f4d2274f3b63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ed9a5c796496766a9472a71cf848f4d2274f3b63/CollectionCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3391, 1595, 1133, 1891, 5370, 12, 2890, 16, 871, 4672, 871, 18, 7099, 3292, 8317, 3546, 273, 225, 562, 12, 2890, 18, 3980, 13, 405, 374, 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, 603, 3391, 1595, 1133, 1891, 5370, 12, 2890, 16, 871, 4672, 871, 18, 7099, 3292, 8317, 3546, 273, 225, 562, 12, 2890, 18, 3980, 13, 405, 374, 2, -100, -100, -100, -100, -100, -100, -10...
editor = config_parser.get(SECTION_HEADER, 'pdf_editor')
editor = config_parser.safe_get(SECTION_HEADER, 'pdf_editor')
def get_editor(doctype_label, config_parser): """Return editor for file based on entry type and preferences file. Editor is determined in an order of preference: 1) Try to load the editor for the specific type (spreadsheet, document, etc.) 2) If no specification, try to load the "editor" option from config file. 3) If no default editor, try to load the EDITOR environment variable. 4) If no EDITOR variable, return None. Keyword arguments: doctype_label: A string representing the type of document to edit. Returns: Editor to use to edit the document. """ LOG.debug('In get_editor, doctype_label: ' + str(doctype_label)) editor = None if doctype_label == SPREADSHEET_LABEL: editor = config_parser.get(SECTION_HEADER, 'spreadsheet_editor') elif doctype_label == DOCUMENT_LABEL: editor = config_parser.get(SECTION_HEADER, 'document_editor') elif doctype_label == PDF_LABEL: editor = config_parser.get(SECTION_HEADER, 'pdf_editor') elif doctype_label == PRESENTATION_LABEL: editor = config_parser.get(SECTION_HEADER, 'presentation_editor') elif doctype_label is not None: LOG.error('Unknown document type label: %s' % doctype_label) if not editor: editor = config_parser.safe_get(SECTION_HEADER, 'editor') if not editor: editor = os.getenv('EDITOR') return editor
266c861e7b5fdbf8d6ff0cbcf313b29b0b0c3ff9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/266c861e7b5fdbf8d6ff0cbcf313b29b0b0c3ff9/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9177, 12, 2896, 12387, 67, 1925, 16, 642, 67, 4288, 4672, 3536, 990, 4858, 364, 585, 2511, 603, 1241, 618, 471, 12750, 585, 18, 225, 18451, 353, 11383, 316, 392, 1353, 434, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9177, 12, 2896, 12387, 67, 1925, 16, 642, 67, 4288, 4672, 3536, 990, 4858, 364, 585, 2511, 603, 1241, 618, 471, 12750, 585, 18, 225, 18451, 353, 11383, 316, 392, 1353, 434, 11...
def __changeTextQuietly(self, control, text):
def __changeTextQuietly(self, control, text, isSample=False, alreadyChanged=False):
def onTextChanged(self, event): if not getattr(self, "ignoreTextChanged", False): control = event.GetEventObject() if getattr(self, 'sampleText', None) is not None: logger.debug("StringAE.onTextChanged: not ignoring.") currentText = control.GetValue() if self.showingSample: logger.debug("onTextChanged: removing sample") if currentText != self.sampleText: self.showingSample = False elif len(currentText) == 0: self.__setSampleText(control, self.sampleText) else: logger.debug("StringAE.onTextChanged: ignoring (no sample text)") else: logger.debug("StringAE.onTextChanged: ignoring (self-changed)")
bb63d6a70f99d068c2a0defadc56dfa5c6766916 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/bb63d6a70f99d068c2a0defadc56dfa5c6766916/AttributeEditors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1528, 5033, 12, 2890, 16, 871, 4672, 309, 486, 3869, 12, 2890, 16, 315, 6185, 1528, 5033, 3113, 1083, 4672, 3325, 273, 871, 18, 967, 1133, 921, 1435, 309, 3869, 12, 2890, 16, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1528, 5033, 12, 2890, 16, 871, 4672, 309, 486, 3869, 12, 2890, 16, 315, 6185, 1528, 5033, 3113, 1083, 4672, 3325, 273, 871, 18, 967, 1133, 921, 1435, 309, 3869, 12, 2890, 16, 296,...
slave_fd = _slave_open(slave_name)
slave_fd = slave_open(slave_name)
def openpty(): """openpty() -> (master_fd, slave_fd) Open a pty master/slave pair, using os.openpty() if possible.""" try: return os.openpty() except (AttributeError, OSError): pass master_fd, slave_name = _open_terminal() slave_fd = _slave_open(slave_name) return master_fd, slave_fd
0ea1fc8acf33bdbfe578d8ccaba6e030da6bde40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0ea1fc8acf33bdbfe578d8ccaba6e030da6bde40/pty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 825, 13332, 3536, 3190, 825, 1435, 317, 261, 7525, 67, 8313, 16, 11735, 67, 8313, 13, 3502, 279, 293, 4098, 4171, 19, 27352, 3082, 16, 1450, 1140, 18, 3190, 825, 1435, 309, 3323, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 825, 13332, 3536, 3190, 825, 1435, 317, 261, 7525, 67, 8313, 16, 11735, 67, 8313, 13, 3502, 279, 293, 4098, 4171, 19, 27352, 3082, 16, 1450, 1140, 18, 3190, 825, 1435, 309, 3323, ...
self.cb.evt('filetype', number, self.check_mime(name))
def cb_switchbuffer(self, notebook, page, number): nuber = int(number) if len(self.editor.wins) != len(self.bufferlist): self.edit_getbufferlist() for i, name in self.bufferlist: if i == number: if i != self.currentbufnum: self.currentbufnum = i self.cb.evt('filetype', number, self.check_mime(name)) self.cb.evt('bufferchange', number, name) break
48716b9937fdc3a7d3294d75c77ee2618f9daa48 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/48716b9937fdc3a7d3294d75c77ee2618f9daa48/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 9610, 4106, 12, 2890, 16, 14718, 16, 1363, 16, 1300, 4672, 290, 373, 264, 273, 509, 12, 2696, 13, 309, 562, 12, 2890, 18, 9177, 18, 91, 2679, 13, 480, 562, 12, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 67, 9610, 4106, 12, 2890, 16, 14718, 16, 1363, 16, 1300, 4672, 290, 373, 264, 273, 509, 12, 2696, 13, 309, 562, 12, 2890, 18, 9177, 18, 91, 2679, 13, 480, 562, 12, 2890, 18, ...
self.sel_startX = int(ev.pos().x()) self.sel_startY = int(ev.pos().y())
self.sel_startX = int(ev.scenePos().x()) self.sel_startY = int(ev.scenePos().y())
def mousePressEvent(self, ev): self.sel_startX = int(ev.pos().x()) self.sel_startY = int(ev.pos().y()) master = self.master master.sel_colmin = master.sel_colmax = self.sel_startX / master.cellwidth master.sel_rowmin = master.sel_rowmax = self.sel_startY / master.cellheight self.draw() master.updateRuleList()
342c5c7a1be28b9c05dadefc8d2f5fbc7e82781f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/342c5c7a1be28b9c05dadefc8d2f5fbc7e82781f/OWAssociationRulesViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 11840, 1133, 12, 2890, 16, 2113, 4672, 365, 18, 1786, 67, 1937, 60, 273, 509, 12, 14965, 18, 23694, 1616, 7675, 92, 10756, 365, 18, 1786, 67, 1937, 61, 273, 509, 12, 14965, 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, 7644, 11840, 1133, 12, 2890, 16, 2113, 4672, 365, 18, 1786, 67, 1937, 60, 273, 509, 12, 14965, 18, 23694, 1616, 7675, 92, 10756, 365, 18, 1786, 67, 1937, 61, 273, 509, 12, 14965, 18, ...
build_dir.makedirs()
build_dir.makedirs(mode=0755)
def make_catalogs(): '''Compile all message catalogs for release''' options.order('i18n', add_rest=True) for po_file in glob.glob('po/*.po'): locale, ext = os.path.splitext(os.path.basename(po_file)) build_dir = paver_path(os.path.join(options.builddir, locale, 'LC_MESSAGES'))
42f0a0a3dd75c444119dccb7b0a2b66af7803782 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9952/42f0a0a3dd75c444119dccb7b0a2b66af7803782/pavement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2574, 287, 14072, 13332, 9163, 9937, 777, 883, 26455, 364, 3992, 26418, 702, 18, 1019, 2668, 77, 2643, 82, 2187, 527, 67, 8792, 33, 5510, 13, 364, 8275, 67, 768, 316, 4715, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2574, 287, 14072, 13332, 9163, 9937, 777, 883, 26455, 364, 3992, 26418, 702, 18, 1019, 2668, 77, 2643, 82, 2187, 527, 67, 8792, 33, 5510, 13, 364, 8275, 67, 768, 316, 4715, 1...
self.annotation = Annotation()
self.annotation = Annotation(self)
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
85e69b65134313ec3f3db57e106088fcd5133b18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/85e69b65134313ec3f3db57e106088fcd5133b18/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
If `allowcomments' is non-zero, embedded RFC-822 comments are allowed within the parsed fragment.
If `allowcomments' is non-zero, embedded RFC 2822 comments are allowed within the parsed fragment.
def getdelimited(self, beginchar, endchars, allowcomments = 1): """Parse a header fragment delimited by special characters.
78ec6245fafc8ef7e28921a1951782be3b00e371 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/78ec6245fafc8ef7e28921a1951782be3b00e371/_parseaddr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3771, 1038, 329, 12, 2890, 16, 2376, 3001, 16, 679, 7549, 16, 1699, 9231, 273, 404, 4672, 3536, 3201, 279, 1446, 5481, 18609, 635, 4582, 3949, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 3771, 1038, 329, 12, 2890, 16, 2376, 3001, 16, 679, 7549, 16, 1699, 9231, 273, 404, 4672, 3536, 3201, 279, 1446, 5481, 18609, 635, 4582, 3949, 18, 2, -100, -100, -100, -100, -100, ...
images : selction of the images for plotting, use object default if None
plotImSelect : selction of the images for plotting, use object default if None
def plotImages(self, images = None): """Plots the selcted images
bfbdd2e8064443b22004604cd5b400540dc815db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8436/bfbdd2e8064443b22004604cd5b400540dc815db/plotter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 8946, 12, 2890, 16, 4602, 273, 599, 4672, 3536, 29311, 326, 357, 299, 329, 4602, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3207, 8946, 12, 2890, 16, 4602, 273, 599, 4672, 3536, 29311, 326, 357, 299, 329, 4602, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
thetam = 2*math.pi*0.5*(theta1+theta2) x += expl*math.cos(thetam) y += expl*math.sin(thetam) color = self.palette.getColor(label) w = Wedge((x,y), radius, 360.*theta1, 360.*theta2, facecolor=color, lw = pixelToPoint(0.5,self.dpi), edgecolor=' slices.append(w) self.ax.add_patch(w) w.set_label(label)
thetam = 2 * math.pi * 0.5 * ( theta1 + theta2 ) x += expl * math.cos( thetam ) y += expl * math.sin( thetam ) color = self.palette.getColor( label ) w = Wedge( ( x, y ), radius, 360. * theta1, 360. * theta2, facecolor = color, lw = pixelToPoint( 0.5, self.dpi ), edgecolor = ' slices.append( w ) self.ax.add_patch( w ) w.set_label( label )
def pie(self, explode=None, colors=None, autopct=None, pctdistance=0.6, shadow=False ): start = time.time() labels = self.pdata.getLabels(use_plotdata=True) #labels.reverse() values = [l[1] for l in labels] x = numpy.array(values, numpy.float64) self.legendData = labels
423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf/PieGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1385, 12, 2890, 16, 3172, 33, 7036, 16, 5740, 33, 7036, 16, 2059, 556, 299, 33, 7036, 16, 19857, 8969, 33, 20, 18, 26, 16, 10510, 33, 8381, 262, 30, 225, 787, 273, 813, 18, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1385, 12, 2890, 16, 3172, 33, 7036, 16, 5740, 33, 7036, 16, 2059, 556, 299, 33, 7036, 16, 19857, 8969, 33, 20, 18, 26, 16, 10510, 33, 8381, 262, 30, 225, 787, 273, 813, 18, 95...
r = unittest.TextTestRunner()
def test_main(): #import gc import sys r = unittest.TextTestRunner() s = test_suite() lastrc = None while True: r.run(s) if 1: # change to 0, under a debug build, for some leak detection break gc.collect() if gc.garbage: raise SystemError("gc.garbage not empty after test run: %r" % gc.garbage) if hasattr(sys, 'gettotalrefcount'): thisrc = sys.gettotalrefcount() print >> sys.stderr, '*' * 10, 'total refs:', thisrc, if lastrc: print >> sys.stderr, 'delta:', thisrc - lastrc else: print >> sys.stderr lastrc = thisrc
77e1ba6032f1265e638167301083e14a8d7d8924 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6753/77e1ba6032f1265e638167301083e14a8d7d8924/test_datetime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 468, 5666, 8859, 1930, 2589, 225, 272, 273, 1842, 67, 30676, 1435, 27596, 313, 71, 273, 599, 1323, 1053, 30, 436, 18, 2681, 12, 87, 13, 309, 404, 30, 4202, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 468, 5666, 8859, 1930, 2589, 225, 272, 273, 1842, 67, 30676, 1435, 27596, 313, 71, 273, 599, 1323, 1053, 30, 436, 18, 2681, 12, 87, 13, 309, 404, 30, 4202, 468, ...
builder.append(unichr(code))
builder.append(UNICHR(code))
def str_decode_unicode_escape(s, size, errors, final=False, errorhandler=False, unicodedata_handler=None): if errorhandler is None: errorhandler = raise_unicode_exception_decode if size == 0: return u'', 0 builder = UnicodeBuilder(size) pos = 0 while pos < size: ch = s[pos] # Non-escape characters are interpreted as Unicode ordinals if ch != '\\': builder.append(unichr(ord(ch))) pos += 1 continue # - Escapes pos += 1 if pos >= size: message = "\\ at end of string" res, pos = errorhandler(errors, "unicodeescape", message, s, pos-1, size) builder.append(res) continue ch = s[pos] pos += 1 # \x escapes if ch == '\n': pass elif ch == '\\': builder.append(u'\\') elif ch == '\'': builder.append(u'\'') elif ch == '\"': builder.append(u'\"') elif ch == 'b' : builder.append(u'\b') elif ch == 'f' : builder.append(u'\f') elif ch == 't' : builder.append(u'\t') elif ch == 'n' : builder.append(u'\n') elif ch == 'r' : builder.append(u'\r') elif ch == 'v' : builder.append(u'\v') elif ch == 'a' : builder.append(u'\a') elif '0' <= ch <= '7': x = ord(ch) - ord('0') if pos < size: ch = s[pos] if '0' <= ch <= '7': pos += 1 x = (x<<3) + ord(ch) - ord('0') if pos < size: ch = s[pos] if '0' <= ch <= '7': pos += 1 x = (x<<3) + ord(ch) - ord('0') builder.append(unichr(x)) # hex escapes # \xXX elif ch == 'x': digits = 2 message = "truncated \\xXX escape" pos = hexescape(builder, s, pos, digits, "unicodeescape", errorhandler, message, errors) # \uXXXX elif ch == 'u': digits = 4 message = "truncated \\uXXXX escape" pos = hexescape(builder, s, pos, digits, "unicodeescape", errorhandler, message, errors) # \UXXXXXXXX elif ch == 'U': digits = 8 message = "truncated \\UXXXXXXXX escape" pos = hexescape(builder, s, pos, digits, "unicodeescape", errorhandler, message, errors) # \N{name} elif ch == 'N': message = "malformed \\N character escape" look = pos if unicodedata_handler is None: message = ("\\N escapes not supported " "(can't load unicodedata module)") res, pos = errorhandler(errors, "unicodeescape", message, s, pos-1, size) builder.append(res) continue if look < size and s[look] == '{': # look for the closing brace while look < size and s[look] != '}': look += 1 if look < size and s[look] == '}': # found a name. look it up in the unicode database message = "unknown Unicode character name" name = s[pos+1:look] code = unicodedata_handler.call(name) if code < 0: res, pos = errorhandler(errors, "unicodeescape", message, s, pos-1, look+1) builder.append(res) continue pos = look + 1 if code <= MAXUNICODE: builder.append(unichr(code)) else: code -= 0x10000L builder.append(unichr(0xD800 + (code >> 10))) builder.append(unichr(0xDC00 + (code & 0x03FF))) else: res, pos = errorhandler(errors, "unicodeescape", message, s, pos-1, look+1) builder.append(res) else: res, pos = errorhandler(errors, "unicodeescape", message, s, pos-1, look+1) builder.append(res) else: builder.append(u'\\') builder.append(unichr(ord(ch))) return builder.build(), pos
4b7cda27b028f6294e3089272cf6ea1eab2275f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/4b7cda27b028f6294e3089272cf6ea1eab2275f7/runicode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 3922, 67, 9124, 67, 6939, 12, 87, 16, 963, 16, 1334, 16, 727, 33, 8381, 16, 555, 4176, 33, 8381, 16, 5252, 892, 67, 4176, 33, 7036, 4672, 309, 555, 4176, 353, 599, 30, 555...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 3922, 67, 9124, 67, 6939, 12, 87, 16, 963, 16, 1334, 16, 727, 33, 8381, 16, 555, 4176, 33, 8381, 16, 5252, 892, 67, 4176, 33, 7036, 4672, 309, 555, 4176, 353, 599, 30, 555...
if (len(glob.glob(THIRDPARTYLIBS + pkg.lower() + "/lib/libpanda%.*" % libname)) > 0 and len(glob.glob(THIRDPARTYLIBS + pkg.lower() + "/lib/lib%.*" % libname)) == 0):
if (len(glob.glob(THIRDPARTYLIBS + pkg.lower() + "/lib/libpanda%s.*" % libname)) > 0 and len(glob.glob(THIRDPARTYLIBS + pkg.lower() + "/lib/lib%s.*" % libname)) == 0):
def PkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None, framework = None, tool = "pkg-config"): global PKG_LIST_ALL if (pkgconfig == ""): pkgconfig = None if (framework == ""): framework = None if (libs == None or libs == ""): libs = () elif (isinstance(libs, str)): libs = (libs, ) if (incs == None or incs == ""): incs = () elif (isinstance(incs, str)): incs = (incs, ) if (defs == None or defs == "" or len(defs) == 0): defs = {} elif (isinstance(incs, str)): defs = {defs : ""} elif (isinstance(incs, list) or isinstance(incs, tuple) or isinstance(incs, set)): olddefs = defs defs = {} for d in olddefs: defs[d] = "" if (os.path.isdir(THIRDPARTYLIBS + pkg.lower())): IncDirectory(pkg, THIRDPARTYLIBS + pkg.lower() + "/include") LibDirectory(pkg, THIRDPARTYLIBS + pkg.lower() + "/lib") for l in libs: libname = l if (l.startswith("lib")): libname = l[3:] # This is for backward compatibility - in the thirdparty dir, we kept some libs with "panda" prefix, like libpandatiff. if (len(glob.glob(THIRDPARTYLIBS + pkg.lower() + "/lib/libpanda%.*" % libname)) > 0 and len(glob.glob(THIRDPARTYLIBS + pkg.lower() + "/lib/lib%.*" % libname)) == 0): libname = "panda" + libname LibName(pkg, libname) for d, v in defs.values(): DefSymbol(pkg, d, v) elif (sys.platform == "darwin" and framework != None): if (os.path.isdir("/Library/Frameworks/%s.framework" % framework) or os.path.isdir("/System/Library/Frameworks/%s.framework" % framework) or os.path.isdir("/Developer/Library/Frameworks/%s.framework" % framework) or os.path.isdir("/Users/%s/System/Library/Frameworks/%s.framework" % (getpass.getuser(), framework))): LibName(pkg, "-framework " + framework) for d, v in defs.values(): DefSymbol(pkg, d, v) elif (pkg in PkgListGet()): print "%sWARNING:%s Could not locate framework %s, excluding from build" % (GetColor("red"), GetColor(), framework) PkgDisable(pkg) else: print "%ERROR:%s Could not locate framework %s, aborting build" % (GetColor("red"), GetColor(), framework) exit() elif (LocateBinary("pkg-config") != None and pkgconfig != None): if (isinstance(pkgconfig, str)): if (PkgConfigHavePkg(pkgconfig, tool)): return PkgConfigEnable(pkg, pkgconfig, tool) else: have_all_pkgs = True for pc in pkgconfig: if (PkgConfigHavePkg(pc, tool)): PkgConfigEnable(pkg, pc, tool) else: have_all_pkgs = False if (have_all_pkgs): return elif (pkgconfig != None and libs == None): if (pkg in PkgListGet()): print "%sWARNING:%s Could not locate package %s, excluding from build" % (GetColor("red"), GetColor(), pkgconfig) PkgDisable(pkg) else: print "%ERROR:%s Could not locate package %s, aborting build" % (GetColor("red"), GetColor(), pkgconfig) exit() else: # Okay, our pkg-config attempts failed. Let's try locating the libs by ourselves. have_pkg = True for l in libs: if (l in GetLdCache()): LibName(pkg, "-l" + l) else: if (VERBOSE): print GetColor("cyan") + "Couldn't find library lib" + l + GetColor() have_pkg = False for i in incs: incdir = None if (len(glob.glob("/usr/include/" + i)) > 0): incdir = sorted(glob.glob("/usr/include/" + i))[-1] elif (len(glob.glob("/usr/local/include/" + i)) > 0): incdir = sorted(glob.glob("/usr/local/include/" + i))[-1] elif (platform.uname()[1]=="pcbsd" and len(glob.glob("/usr/PCBSD/local/include/" + i)) > 0): incdir = sorted(glob.glob("/usr/PCBSD/local/include/" + i))[-1] else: if (VERBOSE and i.endswith(".h")): print GetColor("cyan") + "Couldn't find header file " + i + GetColor() have_pkg = False # Note: It's possible to specify a file instead of a dir, for the sake of checking if it exists. if (incdir != None and os.path.isdir(incdir)): IncDirectory(pkg, incdir) if (not have_pkg): if (pkg in PkgListGet()): print "%sWARNING:%s Could not locate thirdparty package %s, excluding from build" % (GetColor("red"), GetColor(), pkg.lower()) PkgDisable(pkg) else: print "%ERROR:%s Could not locate thirdparty package %s, aborting build" % (GetColor("red"), GetColor(), pkg.lower()) exit()
e1cd2f3d84fc486b06b9a210bf38ec40a3df8fa2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/e1cd2f3d84fc486b06b9a210bf38ec40a3df8fa2/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 453, 14931, 8317, 12, 10657, 16, 3475, 1425, 273, 599, 16, 15042, 273, 599, 16, 316, 2143, 273, 599, 16, 17588, 273, 599, 16, 8257, 273, 599, 16, 5226, 273, 315, 10657, 17, 1425, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 453, 14931, 8317, 12, 10657, 16, 3475, 1425, 273, 599, 16, 15042, 273, 599, 16, 316, 2143, 273, 599, 16, 17588, 273, 599, 16, 8257, 273, 599, 16, 5226, 273, 315, 10657, 17, 1425, 6, ...
linelen += len(c)
def write(s, output=output, lineEnd='\n'): # RFC 1521 requires that the line ending in a space or tab must have # that trailing character encoded. if s and s[-1:] in ' \t': output.write(s[:-1] + quote(s[-1]) + lineEnd) else: output.write(s + lineEnd)
dac67ac8bf994b336748283fa25602639c6a9bf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dac67ac8bf994b336748283fa25602639c6a9bf4/quopri.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 87, 16, 876, 33, 2844, 16, 980, 1638, 2218, 64, 82, 11, 4672, 468, 8372, 4711, 5340, 4991, 716, 326, 980, 11463, 316, 279, 3476, 578, 3246, 1297, 1240, 468, 716, 7341, 3351, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 87, 16, 876, 33, 2844, 16, 980, 1638, 2218, 64, 82, 11, 4672, 468, 8372, 4711, 5340, 4991, 716, 326, 980, 11463, 316, 279, 3476, 578, 3246, 1297, 1240, 468, 716, 7341, 3351, ...
res = self.getCounters('TransformationTasks',['ExternalStatus'],{'TransformationID':res['Value']},connection=connection)
res = self.getCounters( 'TransformationTasks', ['ExternalStatus'], {'TransformationID':res['Value']}, connection = connection )
def getTransformationTaskStats(self,transName='',connection=False): """ Returns dictionary with number of jobs per status for the given production. """ connection = self.__getConnection(connection) if transName: res = self._getTransformationID(transName,connection=connection) if not res['OK']: gLogger.error("Failed to get ID for transformation",res['Message']) return res res = self.getCounters('TransformationTasks',['ExternalStatus'],{'TransformationID':res['Value']},connection=connection) else: res = self.getCounters('TransformationTasks',['ExternalStatus','TransformationID'],{},connection=connection) if not res['OK']: return res if not res['Value']: return S_ERROR('No records found') statusDict = {} total = 0 for attrDict,count in res['Value']: status = attrDict['ExternalStatus'] statusDict[status] = count total+=count created = statusDict.get('Created',0) statusDict['Created'] = total statusDict['Submitted'] = (total-created) return S_OK(statusDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15292, 2174, 4195, 12, 2890, 16, 2338, 461, 2218, 2187, 4071, 33, 8381, 4672, 3536, 2860, 3880, 598, 1300, 434, 6550, 1534, 1267, 364, 326, 864, 12449, 18, 3536, 1459, 273, 365, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15292, 2174, 4195, 12, 2890, 16, 2338, 461, 2218, 2187, 4071, 33, 8381, 4672, 3536, 2860, 3880, 598, 1300, 434, 6550, 1534, 1267, 364, 326, 864, 12449, 18, 3536, 1459, 273, 365, 161...
self.index = npy.asarray(indices, int)
self.index = np.asarray(indices, int)
def __init__(self, atoms, indices=None, mask=None): """Filter atoms.
56bb90af6cdb34a67cf793d22cfe7c3089a8af39 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/56bb90af6cdb34a67cf793d22cfe7c3089a8af39/constraints.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9006, 16, 4295, 33, 7036, 16, 3066, 33, 7036, 4672, 3536, 1586, 9006, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 9006, 16, 4295, 33, 7036, 16, 3066, 33, 7036, 4672, 3536, 1586, 9006, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'Entry created "%s".' % result
print 'Entry created "%s".' % result[0] if result[1] is not None: print 'Your password: %s' % result[1]
def main (): import getopt # TODO usage = __desc__ + """\n\n%s [action] [data] [options] action: add|read|update|delete|search|edit - defaults to read options: -n|--name name - entry name (required) -l|--login login - login (required) -p|--password password - password (required) -d|--desc some desc - some additional info (WARNING: \\n string is replaced with new line character!) -r|--root path - directory where store entries files (defaults to ~/.passwd) -w|--show-password - display plain text password (without this password is starred) -v|--version - version info -h|--help - this help data: For action 'read' or 'search' it can be name/pattern for some entry (instead of -n option). For action 'update' it must be name of entry to update (value for -n option means _new name_ of entry)""" % (os.path.basename (sys.argv[0]), ) # calling getopt opts_short = 'hvn:d:l:p:r:w' opts_long = ('help', 'version', 'name=', 'desc=', 'login=', 'password=', 'root=', '--show-password',) try: opts, args = getopt.gnu_getopt (sys.argv[1:], opts_short, opts_long) except getopt.GetoptError, e: print >>sys.stderr, e raise SystemExit (1) # parsing data from getopt params = dict ( action = 'read', show_passwd = False, ) for o, a in opts: if o in ('-h', '--help'): print usage raise SystemExit (0) elif o in ('-v', '--version'): print '%s (%s)' % (__version__, __date__) raise SystemExit (0) elif o in ('-n', '--name'): params['name'] = a elif o in ('-d', '--desc'): params['desc'] = a elif o in ('-l', '--login'): params['login'] = a elif o in ('-p', '--password'): params['passwd'] = a elif o in ('-r', '--root'): params['root'] = a elif o in ('-w', '--show-password'): params['show_passwd'] = True # additional validaton of parameters - getopt can't do it # if there is no -r parameter, we try to find root if 'root' not in params: try: params['root'] = os.environ['HOME'] except KeyError: params['root'] = os.path.expanduser ('~') if not params['root']: params['root'] = os.getcwd () params['root'] = os.path.join (params['root'], '.passwd') # change action if valid if args and args[0] in ('add', 'read', 'update', 'delete', 'search', 'edit'): params['action'] = args.pop (0) if params['action'] in ('update', 'edit'): params['path'] = os.path.join (params['root'], args.pop (0)) if 'name' not in params and args: params['name'] = args try: result = getattr (PwdActions (), 'action__' + params['action']) (params) except Exception, e: print 'Some error ocured:', e if params['action'] in ('read', 'search'): if result: for name, data in result.items (): print os.path.join (params['root'], os.path.dirname (name)), '::', os.path.basename (name) print 'Login:', data['login'] print 'Password:', data['passwd'] if params['show_passwd'] else '***' print if data['desc']: print data['desc'] print print else: print 'Nothing found' elif params['action'] == 'add': print 'Entry created "%s".' % result elif params['action'] == 'update': print 'Entry "%s" updated.' % os.path.basename (params['path']) if params['path'] != result: print 'Entry renamed to: "%s".' % result elif params['action'] == 'delete': if result: print 'Entry "%s" deleted.' % os.path.basename (params['name'])
d5107d69c90f97317db041d4692c00aabd5c7cf9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13309/d5107d69c90f97317db041d4692c00aabd5c7cf9/pdmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 1832, 30, 1930, 336, 3838, 225, 468, 2660, 4084, 273, 1001, 5569, 972, 397, 3536, 64, 82, 64, 82, 9, 87, 306, 1128, 65, 306, 892, 65, 306, 2116, 65, 1301, 30, 527, 96, 896, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 1832, 30, 1930, 336, 3838, 225, 468, 2660, 4084, 273, 1001, 5569, 972, 397, 3536, 64, 82, 64, 82, 9, 87, 306, 1128, 65, 306, 892, 65, 306, 2116, 65, 1301, 30, 527, 96, 896, 9...
sage: a(40) Traceback (most recent call last): ... IndexError: list index out of range sage: a.list(8) [3, 7, 31, 127, 8191, 131071, 524287, 2147483647] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self):
INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000668;a Mersenne primes (of form 2^p - 1 where p is a prime). (See A000043 for the values of p.) sage: a(1) 3 sage: a(2) 7 sage: a(12) 170141183460469231731687303715884105727 Warning: a(39) has 4,053,946 digits! sage: a(40) Traceback (most recent call last): ... IndexError: list index out of range sage: a.list(8) [3, 7, 31, 127, 8191, 131071, 524287, 2147483647] AUTHOR: -- Jaap Spies (2007-01-25) """
def _eval(self, n): try: return Integer(self._b[n-1]) except (AttributeError, IndexError): self._b = [2,3,5,7,13,17,19,31,61,89,107,127,521,607,1279,2203,2281,3217,4253,4423,9689,9941,11213,19937,21701,23209,44497,86243,110503,132049,216091,756839,859433,1257787,1398269,2976221,3021377,6972593,13466917] return Integer(self._b[n-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, 775, 30, 327, 2144, 12, 2890, 6315, 70, 63, 82, 17, 21, 5717, 1335, 261, 1499, 668, 16, 10195, 4672, 365, 6315, 70, 273, 306, 22, 16, 23, 16, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 775, 30, 327, 2144, 12, 2890, 6315, 70, 63, 82, 17, 21, 5717, 1335, 261, 1499, 668, 16, 10195, 4672, 365, 6315, 70, 273, 306, 22, 16, 23, 16, 25...
cmd = [ 'glite-ce-job-status','-L','2','%s' % pilotRef,
cmd = [ 'glite-ce-job-status', '-L', '2', '%s' % pilotRef,
def __resolveOutputURL(self,pilotRef): """ Resolve the URL of the pilot output files """ cmd = [ 'glite-ce-job-status','-L','2','%s' % pilotRef, '| grep -i osb' ] result = executeGridCommand(self.proxy,cmd,self.gridEnv) url = '' if result['OK']: if not result['Value'][0]: output = result['Value'][1] for line in output.split('\n'): line = line.strip() if line.find('OSB') != -1: match = re.search('\[(.*)\]',line) if match: url = match.group(1) if url: return S_OK(url) else: return S_ERROR('output URL not found for %s' % pilotRef) else: return S_ERROR('Failed to retrieve long status for %s' % pilotRef)
45afa08b7552c5b79d1cfd9cac53e65115f5e15a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/45afa08b7552c5b79d1cfd9cac53e65115f5e15a/CREAMComputingElement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 1447, 1785, 12, 2890, 16, 84, 22797, 1957, 4672, 3536, 9910, 326, 1976, 434, 326, 293, 22797, 876, 1390, 3536, 225, 1797, 273, 306, 296, 7043, 1137, 17, 311, 17, 4688, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10828, 1447, 1785, 12, 2890, 16, 84, 22797, 1957, 4672, 3536, 9910, 326, 1976, 434, 326, 293, 22797, 876, 1390, 3536, 225, 1797, 273, 306, 296, 7043, 1137, 17, 311, 17, 4688, 17, ...
elif self.category_clist.get_text(row,0)== "X Configuration":
elif self.category_clist.get_text(row,0)== "Firewall Configuration":
def select_category(self, event, row, column, data): if self.category_clist.get_text(row,0)== "Basic Configuration": #change notebook tab self.options_notebook.set_page(0) return elif self.category_clist.get_text(row,0)== "Installation Method": self.options_notebook.set_page(1) return elif self.category_clist.get_text(row,0)== "Partition Information": self.options_notebook.set_page(2) return elif self.category_clist.get_text(row,0)== "Network Configuration": self.options_notebook.set_page(3) return elif self.category_clist.get_text(row,0)== "Authentication": self.options_notebook.set_page(4) return elif self.category_clist.get_text(row,0)== "Firewall Configuration": self.options_notebook.set_page(5) return elif self.category_clist.get_text(row,0)== "X Configuration": self.options_notebook.set_page(6) return elif self.category_clist.get_text(row,0)== "Package Selection": self.options_notebook.set_page(7) return elif self.category_clist.get_text(row,0)== "Pre-Installation Script": self.options_notebook.set_page(8) return elif self.category_clist.get_text(row,0)== "Post-Installation Script": self.options_notebook.set_page(9) return
670901cae1d7c7052675a7ab4c0b846af01c40d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5376/670901cae1d7c7052675a7ab4c0b846af01c40d6/ksconfig_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 4743, 12, 2890, 16, 871, 16, 1027, 16, 1057, 16, 501, 4672, 309, 365, 18, 4743, 67, 830, 376, 18, 588, 67, 955, 12, 492, 16, 20, 13, 631, 315, 8252, 4659, 6877, 468, 3427...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 4743, 12, 2890, 16, 871, 16, 1027, 16, 1057, 16, 501, 4672, 309, 365, 18, 4743, 67, 830, 376, 18, 588, 67, 955, 12, 492, 16, 20, 13, 631, 315, 8252, 4659, 6877, 468, 3427...
assert (text1[-x - 1] == text2[-y - 1], "No diagonal. Can't happen. (diff_path2)")
assert text1[-x - 1] == text2[-y - 1], ("No diagonal. " + "Can't happen. (diff_path2)")
def diff_path2(self, v_map, text1, text2): """Work from the middle back to the end to determine the path.
f1324e5c0a34217eb6cd70ea19854d3b2071bd8b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7125/f1324e5c0a34217eb6cd70ea19854d3b2071bd8b/diff_match_patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 67, 803, 22, 12, 2890, 16, 331, 67, 1458, 16, 977, 21, 16, 977, 22, 4672, 3536, 2421, 628, 326, 7689, 1473, 358, 326, 679, 358, 4199, 326, 589, 18, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 67, 803, 22, 12, 2890, 16, 331, 67, 1458, 16, 977, 21, 16, 977, 22, 4672, 3536, 2421, 628, 326, 7689, 1473, 358, 326, 679, 358, 4199, 326, 589, 18, 2, -100, -100, -100, -100, ...
def assert_equals_file_content(reference_file, fixture, filetype='xml'):
def assert_equals_file_content(reference_file, fixture, filetype = 'xml'):
def assert_equals_file_content(reference_file, fixture, filetype='xml'): if os.path.isfile(fixture): with open(fixture) as fixture_file: fixture_content = fixture_file.read() else: fixture_content = fixture with open(reference_file) as expected_file: expected_content = expected_file.read() if filetype == 'xml': print fixture_content fixture_content = fromstring(fixture_content) pretty_indent(fixture_content) temp = StringIO() ElementTree(fixture_content).write(temp) fixture_content = temp.getvalue() expected_content = fromstring(expected_content) pretty_indent(expected_content) temp = StringIO() ElementTree(expected_content).write(temp) expected_content = temp.getvalue() fixture_lines = fixture_content.split('\n') expected_lines = expected_content.split('\n') differences = list(difflib.unified_diff(expected_lines, fixture_lines)) if differences: temp = StringIO() pprint(differences, stream=temp) assert False, 'Differences found : %s' % temp.getvalue()
2f91f278ccfb5e2a91b746aa648b3b571226f944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13008/2f91f278ccfb5e2a91b746aa648b3b571226f944/helper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 67, 14963, 67, 768, 67, 1745, 12, 6180, 67, 768, 16, 16678, 16, 18902, 273, 296, 2902, 11, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 904, 10970, 4672, 598, 1696, 12, 904, 109...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 67, 14963, 67, 768, 67, 1745, 12, 6180, 67, 768, 16, 16678, 16, 18902, 273, 296, 2902, 11, 4672, 309, 1140, 18, 803, 18, 291, 768, 12, 904, 10970, 4672, 598, 1696, 12, 904, 109...
pt = PersistentTemporaryFile('_user_stylesheet.css') pt.write(raw.encode('utf-8')) pt.close() self.settings().setUserStyleSheetUrl(QUrl.fromLocalFile(pt.name))
data = 'data:text/css;charset=utf-8;base64,' data += b64encode(raw.encode('utf-8')) self.settings().setUserStyleSheetUrl(QUrl(data))
def set_user_stylesheet(self): raw = config().parse().user_css pt = PersistentTemporaryFile('_user_stylesheet.css') pt.write(raw.encode('utf-8')) pt.close() self.settings().setUserStyleSheetUrl(QUrl.fromLocalFile(pt.name))
5bc129360da117c639cb93c1c2caf95d71b16726 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/5bc129360da117c639cb93c1c2caf95d71b16726/documentview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1355, 67, 19403, 12, 2890, 4672, 1831, 273, 642, 7675, 2670, 7675, 1355, 67, 5212, 5818, 273, 11049, 23808, 2668, 67, 1355, 67, 19403, 18, 5212, 6134, 5818, 18, 2626, 12, 1899, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1355, 67, 19403, 12, 2890, 4672, 1831, 273, 642, 7675, 2670, 7675, 1355, 67, 5212, 5818, 273, 11049, 23808, 2668, 67, 1355, 67, 19403, 18, 5212, 6134, 5818, 18, 2626, 12, 1899, ...
def set_colors(self, colors):
def _set_colors(self, colors):
def set_colors(self, colors): self._stroke = colors[0] self._fill = colors[1]
3abdde2d4415b99e072401aa95cc310d13046e05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7609/3abdde2d4415b99e072401aa95cc310d13046e05/gencards.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 9724, 12, 2890, 16, 5740, 4672, 365, 6315, 16181, 273, 5740, 63, 20, 65, 365, 6315, 5935, 273, 5740, 63, 21, 65, 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, 0, 0, 0, 0, 0, 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, 542, 67, 9724, 12, 2890, 16, 5740, 4672, 365, 6315, 16181, 273, 5740, 63, 20, 65, 365, 6315, 5935, 273, 5740, 63, 21, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
name="long range distance %i-%i (%s)" % (id + (tag,)),
name="long range distance %i-%i" % id,
def distance(id, tag): s0 = self.add(Select, id[0]) s1 = self.add(Select, id[1]) e = self.add(Delta, s1, s0) d = self.add( Distance, e, name="long range distance %i-%i (%s)" % (id + (tag,)), id=id ) return d
1688fd6453a932f4536672a83da72a51dfe1e12e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11053/1688fd6453a932f4536672a83da72a51dfe1e12e/internal_coordinates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3888, 12, 350, 16, 1047, 4672, 272, 20, 273, 365, 18, 1289, 12, 3391, 16, 612, 63, 20, 5717, 272, 21, 273, 365, 18, 1289, 12, 3391, 16, 612, 63, 21, 5717, 425, 273, 365, 18, 1289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3888, 12, 350, 16, 1047, 4672, 272, 20, 273, 365, 18, 1289, 12, 3391, 16, 612, 63, 20, 5717, 272, 21, 273, 365, 18, 1289, 12, 3391, 16, 612, 63, 21, 5717, 425, 273, 365, 18, 1289, ...
def __init__(self, name=None, email=None, attendee_status=None, attendee_type=None, rel=None, extension_elements=None,
def __init__(self, name=None, email=None, attendee_status=None, attendee_type=None, rel=None, extension_elements=None,
def __init__(self, extension_elements=None, extension_attributes=None, text=None): UriEnumElement.__init__(self, tag='eventStatus', enum_map=EventStatus.status_enum, extension_elements=extension_elements, extension_attributes=extension_attributes, text=text)
220fb3846b34b52b462236a865acc3580b5bf99c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/220fb3846b34b52b462236a865acc3580b5bf99c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 10693, 3572, 1046, 16186, 2738, 972, 12, 2890, 16, 1047, 2218, 2575, 148...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 10693, 3572, 1046, 16186, 2738, 972, 12, 2890, 16, 1047, 2218, 2575, 148...
if base.direct.camera.getName() != 'persp': self.prevHit.assign(self.hitPt)
def xlate1D(self, state): # Constrained 1D Translation along widget axis # Compute nearest hit point along axis and try to keep # that point as close to the current mouse position as possible # what point on the axis is the mouse pointing at? self.hitPt.assign(self.objectHandles.getAxisIntersectPt( self.constraint[:1])) # use it to see how far to move the widget if self.fHitInit: # First time through, just record that point self.fHitInit = 0 self.prevHit.assign(self.hitPt) else: # Move widget to keep hit point as close to mouse as possible offset = self.hitPt - self.prevHit
e6d5ec494707be9dddb9b6144cebc352a9bae73c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/e6d5ec494707be9dddb9b6144cebc352a9bae73c/DirectManipulation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15643, 340, 21, 40, 12, 2890, 16, 919, 4672, 468, 735, 31142, 404, 40, 17427, 7563, 3604, 2654, 468, 8155, 11431, 6800, 1634, 7563, 2654, 471, 775, 358, 3455, 468, 716, 1634, 487, 1746, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15643, 340, 21, 40, 12, 2890, 16, 919, 4672, 468, 735, 31142, 404, 40, 17427, 7563, 3604, 2654, 468, 8155, 11431, 6800, 1634, 7563, 2654, 471, 775, 358, 3455, 468, 716, 1634, 487, 1746, ...
{1}\over{s}
{1 \\over s}
def tex(self, use_over = False): """TeX math mode representation. >>> print Exponents({'m':1,'s':-2}).tex() m/s^2 >>> print Exponents({'s':-1}).tex(use_over = True) {1}\over{s} """ pos, neg = self._posneg() pospart,negpart=[],[] for part,d in [(pospart,pos),(negpart,neg)]: for s,n in d: if n==1: part.append(s) else: n = str(n) if len(n)>1: n="{%s}"%n part.append(unicode(s)+"^"+n) if use_over and negpart: pospart = pospart or ["1"] return r"{%s}\over{%s}"%(" ".join(pospart)," ".join(negpart)) else: r = " ".join(pospart) if negpart: r += "/" if len(negpart)>1: r+= r"\left(" r += " ".join(negpart) if len(negpart)>1: r+= r"\right)" return r.strip()
8cbe382d979b7a8d71df74c9055c6f4591e5ef90 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/174/8cbe382d979b7a8d71df74c9055c6f4591e5ef90/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16573, 12, 2890, 16, 999, 67, 1643, 273, 1083, 4672, 3536, 21575, 60, 4233, 1965, 4335, 18, 225, 4080, 1172, 29770, 87, 12590, 11, 81, 4278, 21, 11189, 87, 4278, 17, 22, 97, 2934, 2176...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16573, 12, 2890, 16, 999, 67, 1643, 273, 1083, 4672, 3536, 21575, 60, 4233, 1965, 4335, 18, 225, 4080, 1172, 29770, 87, 12590, 11, 81, 4278, 21, 11189, 87, 4278, 17, 22, 97, 2934, 2176...
return self.config.get('bitten', 'htdocs_dir')
return self.config.get('bitten', 'htdocs_dir') or self.htdocs_dir
def get_htdocs_dir(self): return self.config.get('bitten', 'htdocs_dir')
09ccd1787876ae409cf4e19feb0f95d37f1f3494 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4547/09ccd1787876ae409cf4e19feb0f95d37f1f3494/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 647, 8532, 67, 1214, 12, 2890, 4672, 327, 365, 18, 1425, 18, 588, 2668, 3682, 2253, 2187, 296, 647, 8532, 67, 1214, 6134, 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, 0, 0, 0, 0, 0, 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, 647, 8532, 67, 1214, 12, 2890, 4672, 327, 365, 18, 1425, 18, 588, 2668, 3682, 2253, 2187, 296, 647, 8532, 67, 1214, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
TixWidget.__init__(self, master, 'tixScrolledWindow', ['options'], cnf, kw) self.subwidget_list['window'] = _dummyFrame(self, 'window') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
TixWidget.__init__(self, master, 'tixScrolledWindow', ['options'], cnf, kw) self.subwidget_list['window'] = _dummyFrame(self, 'window') self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb') self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
def __init__(self, master, cnf={}, **kw):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 23118, 28793, 2826, 9987, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 23118, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if not force: self.check_localchanges(repo)
commitfiles = [] (c, a, r, d, u) = repo.changes(None, None) if c or a or d or r: if not force: raise util.Abort(_("Local changes found, refresh first")) else: commitfiles = c + a + r
def new(self, repo, patch, msg=None, force=None): if not force: self.check_localchanges(repo) self.check_toppatch(repo) wlock = repo.wlock() insert = self.series_end() if msg: n = repo.commit([], "[mq]: %s" % msg, force=True, wlock=wlock) else: n = repo.commit([], "New patch: %s" % patch, force=True, wlock=wlock) if n == None: self.ui.warn("repo commit failed\n") sys.exit(1) self.full_series[insert:insert] = [patch] self.applied.append(revlog.hex(n) + ":" + patch) self.read_series(self.full_series) self.series_dirty = 1 self.applied_dirty = 1 p = self.opener(patch, "w") if msg: msg = msg + "\n" p.write(msg) p.close() wlock = None r = self.qrepo() if r: r.add([patch])
8ff9ad20f862eb3ccd7502572c69d258f999962a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/8ff9ad20f862eb3ccd7502572c69d258f999962a/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 16, 3538, 16, 4729, 16, 1234, 33, 7036, 16, 2944, 33, 7036, 4672, 3294, 2354, 273, 5378, 261, 71, 16, 279, 16, 436, 16, 302, 16, 582, 13, 273, 3538, 18, 6329, 12, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 16, 3538, 16, 4729, 16, 1234, 33, 7036, 16, 2944, 33, 7036, 4672, 3294, 2354, 273, 5378, 261, 71, 16, 279, 16, 436, 16, 302, 16, 582, 13, 273, 3538, 18, 6329, 12, 70...
res[m.id] = release.version.rsplit('.', 1)[0] + '.' + \ self.get_module_info(m.name).get('version', '')
res[m.id] = self.get_module_info(m.name).get('version', '')
def _get_installed_version(self, cr, uid, ids, field_name=None, arg=None, context={}): res = {} for m in self.browse(cr, uid, ids): if m.state in ('installed', 'to upgrade', 'to remove'): res[m.id] = release.version.rsplit('.', 1)[0] + '.' + \ self.get_module_info(m.name).get('version', '') else: res[m.id] = '' return res
a4bf53589f253bc861741ae9349f6f01cd135df1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12853/a4bf53589f253bc861741ae9349f6f01cd135df1/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 13435, 67, 1589, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 33, 7036, 16, 1501, 33, 7036, 16, 819, 12938, 4672, 400, 273, 2618, 364, 312, 316, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 13435, 67, 1589, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 33, 7036, 16, 1501, 33, 7036, 16, 819, 12938, 4672, 400, 273, 2618, 364, 312, 316, 365, 18, ...
>>> m.year 1952
>>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <span class="gray">Ultimate Taboo</span> \ </div>') >>> m.runtime >>> m.title_original u'Ultimate Taboo'
def parse(self, object, content): ''' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, <span class="year"><a href="/level/10/m_act[year]/1952/">1952</a></span></p> \ <span class="gray">Title original original, 90 мин</span> \ <span class="gray">США, <i class="director">реж. <a class="lined" href="/level/4/people/28795/">Эрик Бросс</a></i> \ <br />(триллер, комедия) \ </span> \ <span class="gray"><a class="lined" href="/level/4/people/28798/">МакКензи Эстин</a>, <a class="lined" href="/level/4/people/3497/">Тодд Филд</a></span> \ </div>') >>> m.title u'Title' >>> m.id 179805 >>> m.runtime 90 >>> m.year 1952 >>> m.title_original u'Title original original' >>> m = Movie() >>> m.parse('link', u'<div class="element width_2"> \ <p class="pic"><a href="/level/1/film/179805/sr/1/"><img src="/images/sm_film/6505.jpg" alt="Title" title="Title" /></a></p> \ <div class="info"> \ <p class="name"><a href="/level/1/film/179805/sr/1/">Title</a>, <span class="year"><a href="/level/10/m_act[year]/1952/">1952</a></span></p> \ <span class="gray"></span> \ <span class="gray">США, <i class="director">реж. <a class="lined" href="/level/4/people/28795/">Эрик Бросс</a></i> \ <br />(триллер, комедия) \ </span> \ <span class="gray"><a class="lined" href="/level/4/people/28798/">МакКензи Эстин</a>, <a class="lined" href="/level/4/people/3497/">Тодд Филд</a></span> \ </div>') >>> m.title u'Title' >>> m.id 179805 >>> m.runtime >>> m.title_original >>> m.year 1952 ''' link = re.compile(r'<p class="name"><a href="/level/1/film/(\d+)/[^"]*">(.+?)</a>').findall(content) if link: object.id = self.prepare_int(link[0][0]) object.title = self.prepare_str(link[0][1])
1b51037afe78e8c83f80540581474846acc6ae2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14915/1b51037afe78e8c83f80540581474846acc6ae2b/movie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 733, 16, 913, 4672, 9163, 4080, 312, 273, 26963, 1435, 4080, 312, 18, 2670, 2668, 1232, 2187, 582, 11, 32, 2892, 667, 1546, 2956, 1835, 67, 22, 6441, 521, 411, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 733, 16, 913, 4672, 9163, 4080, 312, 273, 26963, 1435, 4080, 312, 18, 2670, 2668, 1232, 2187, 582, 11, 32, 2892, 667, 1546, 2956, 1835, 67, 22, 6441, 521, 411, 84, ...
def test_unicode_mixed_unknown_encoding(self): text = u"foo ${bar}" mapping = {u'bar': 'd\xe9j\xe0'} expected = u"foo d\\xe9j\\xe0" self.assertEqual(interpolate(text, mapping), expected)
def test_unicode_mixed_unknown_encoding(self): # This test assumes that sys.getdefaultencoding is ascii... text = u"foo ${bar}" mapping = {u'bar': 'd\xe9j\xe0'} expected = u"foo d\\xe9j\\xe0" self.assertEqual(interpolate(text, mapping), expected)
7a4a610b6943a4f0e0eff9fe7a51800ee82104d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/7a4a610b6943a4f0e0eff9fe7a51800ee82104d5/test_talinterpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9124, 67, 19562, 67, 8172, 67, 5999, 12, 2890, 4672, 468, 1220, 1842, 13041, 716, 2589, 18, 588, 1886, 5999, 353, 11384, 2777, 977, 273, 582, 6, 11351, 3531, 3215, 1532, 2874, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9124, 67, 19562, 67, 8172, 67, 5999, 12, 2890, 4672, 468, 1220, 1842, 13041, 716, 2589, 18, 588, 1886, 5999, 353, 11384, 2777, 977, 273, 582, 6, 11351, 3531, 3215, 1532, 2874, ...
xml += '<'+info+' label="'+lang+'">'+item.info[info][lang]+'</'+info+'>'
xml += '<'+info+' lang="'+lang+'">'+item.info[info][lang]+'</'+info+'>'
def writem(items): xml = u'' for item in items.values(): if isinstance(item,Group): xml += '<group' if item.id: xml += ' id="'+item.id+'"' xml += '>' for info in ('name','description'): if info in item.info: for lang in item.info[info]: if lang == 0: xml += '<'+info+'>'+item.info[info][0]+'</'+info+'>' else: xml += '<'+info+' label="'+lang+'">'+item.info[info][lang]+'</'+info+'>' xml += sbxml.writem(item.items) xml += '</group>' elif isinstance(item,Color): xml += '<color' if item.id: xml += ' id="'+str(item.id)+'"' if 'spot' in item.attr: xml += ' spot="1"' xml += '>' for info in ('name','description'): if info in item.info: for lang in item.info[info]: if lang == 0: xml += '<'+info+'>'+item.info[info][0]+'</'+info+'>' else: xml += '<'+info+' label="'+lang+'">'+item.info[info][lang]+'</'+info+'>' for model in item.values: if isinstance(model,tuple): xml += '<'+model[0]+' space="'+model[1]+'">'+' '.join(str(round(x,4)) for x in item.values[model])+'</'+model[0]+'>' else: xml += '<'+model+'>'+' '.join(str(round(x,4)) for x in item.values[model])+'</'+model+'>' xml += '</color>' elif isinstance(item,Spacer): xml += '<spacer />' elif isinstance(item,Break): xml += '<break />' return xml.encode('utf-8')
c50385b506271deb37b1851aa1e27dfafaca9040 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9936/c50385b506271deb37b1851aa1e27dfafaca9040/codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 351, 12, 3319, 4672, 2025, 273, 582, 6309, 364, 761, 316, 1516, 18, 2372, 13332, 309, 1549, 12, 1726, 16, 1114, 4672, 2025, 1011, 2368, 1655, 11, 309, 761, 18, 350, 30, 2025, 101...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 351, 12, 3319, 4672, 2025, 273, 582, 6309, 364, 761, 316, 1516, 18, 2372, 13332, 309, 1549, 12, 1726, 16, 1114, 4672, 2025, 1011, 2368, 1655, 11, 309, 761, 18, 350, 30, 2025, 101...
value += self._safe_read(chunk_left)
value.append(self._safe_read(chunk_left))
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = b""
10def068cb2957d319b77f5465de2d1f38df3989 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/10def068cb2957d319b77f5465de2d1f38df3989/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 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, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, -100, -100, -100, ...
'VARIANT_BOOL', 'WCHAR', 'WIN32_FIND_DATAA', 'WIN32_FIND_DATAW',
'WCHAR', 'WIN32_FIND_DATAA', 'WIN32_FIND_DATAW',
def RGB(red, green, blue): return red + (green << 8) + (blue << 16)
0968fd679b134b8939ce40a183b15027eaca716d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/0968fd679b134b8939ce40a183b15027eaca716d/wintypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11510, 12, 1118, 16, 10004, 16, 8024, 4672, 327, 1755, 397, 261, 11571, 2296, 1725, 13, 397, 261, 14081, 2296, 2872, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 11510, 12, 1118, 16, 10004, 16, 8024, 4672, 327, 1755, 397, 261, 11571, 2296, 1725, 13, 397, 261, 14081, 2296, 2872, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
f = os.path.join(guake_globals.GLADE_DIR, x)
f = os.path.join(guake.globals.GLADE_DIR, x)
def gladefile(x): f = os.path.join(guake_globals.GLADE_DIR, x) if not os.path.exists(f): raise IOError('No such file or directory: %s' % f) return os.path.abspath(f)
13d36c109af00771d651a8d956aad3dba4ea275f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11147/13d36c109af00771d651a8d956aad3dba4ea275f/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5118, 69, 536, 398, 12, 92, 4672, 284, 273, 1140, 18, 803, 18, 5701, 12, 6891, 911, 18, 16227, 18, 43, 2534, 1639, 67, 4537, 16, 619, 13, 309, 486, 1140, 18, 803, 18, 1808, 12, 74,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5118, 69, 536, 398, 12, 92, 4672, 284, 273, 1140, 18, 803, 18, 5701, 12, 6891, 911, 18, 16227, 18, 43, 2534, 1639, 67, 4537, 16, 619, 13, 309, 486, 1140, 18, 803, 18, 1808, 12, 74,...
if reset:
if reset or not hasattr(self, 'db_book_title_cache'): if not hasattr(self, 'library_view') or self.library_view is None: return
def set_books_in_library(self, booklists, reset=False): if reset: # First build a cache of the library, so the search isn't On**2 self.db_book_title_cache = {} self.db_book_uuid_cache = {} db = self.library_view.model().db for id in db.data.iterallids(): mi = db.get_metadata(id, index_is_id=True) title = re.sub('(?u)\W|[_]', '', mi.title.lower()) if title not in self.db_book_title_cache: self.db_book_title_cache[title] = \ {'authors':{}, 'author_sort':{}, 'db_ids':{}} if mi.authors: authors = authors_to_string(mi.authors).lower() authors = re.sub('(?u)\W|[_]', '', authors) self.db_book_title_cache[title]['authors'][authors] = mi if mi.author_sort: aus = mi.author_sort.lower() aus = re.sub('(?u)\W|[_]', '', aus) self.db_book_title_cache[title]['author_sort'][aus] = mi self.db_book_title_cache[title]['db_ids'][mi.application_id] = mi self.db_book_uuid_cache[mi.uuid] = mi.application_id
8a71ef735f3f430b683fa8406fd5a597ffa42804 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/8a71ef735f3f430b683fa8406fd5a597ffa42804/device.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 12567, 67, 267, 67, 12083, 12, 2890, 16, 6978, 9772, 16, 2715, 33, 8381, 4672, 309, 2715, 30, 468, 5783, 1361, 279, 1247, 434, 326, 5313, 16, 1427, 326, 1623, 5177, 1404, 2755...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 12567, 67, 267, 67, 12083, 12, 2890, 16, 6978, 9772, 16, 2715, 33, 8381, 4672, 309, 2715, 30, 468, 5783, 1361, 279, 1247, 434, 326, 5313, 16, 1427, 326, 1623, 5177, 1404, 2755...
if self.data.domain.classVar: self.graph.setData(attr, self.data) if hasattr(self, "discretizers"): self.graph.setSplits(self.discretizers[attrIndex] and self.discretizers[attrIndex].getValueFrom.transformer.points or [])
self.graph.setData(attr, self.data) if hasattr(self, "discretizers"): self.graph.setSplits(self.discretizers[attrIndex] and self.discretizers[attrIndex].getValueFrom.transformer.points or [])
def individualSelected(self, i): if not self.data: return
ae83bc8e1038df87b0fe497ddb634614447ce035 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/ae83bc8e1038df87b0fe497ddb634614447ce035/OWDiscretize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7327, 7416, 12, 2890, 16, 277, 4672, 309, 486, 365, 18, 892, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7327, 7416, 12, 2890, 16, 277, 4672, 309, 486, 365, 18, 892, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.assertRaises(IndexError, x.__getitem__, 16) self.assertRaises(IndexError, x.__getitem__, -16)
self.assertRaises(IndexError, x.__getitem__, 17) self.assertRaises(IndexError, x.__getitem__, -18)
def test_xrange_indexing(self): x = xrange(0,33,2) self.assertEquals(x[7], 14) self.assertEquals(x[-7], 20) self.assertRaises(IndexError, x.__getitem__, 16) self.assertRaises(IndexError, x.__getitem__, -16) self.assertRaises(TypeError, x.__getitem__, slice(0,3,1))
e3b7748a2770191778131ba72fe92a72389f42f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/e3b7748a2770191778131ba72fe92a72389f42f8/test_builtin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 92, 3676, 67, 1615, 310, 12, 2890, 4672, 619, 273, 12314, 12, 20, 16, 3707, 16, 22, 13, 365, 18, 11231, 8867, 12, 92, 63, 27, 6487, 5045, 13, 365, 18, 11231, 8867, 12, 92...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 92, 3676, 67, 1615, 310, 12, 2890, 4672, 619, 273, 12314, 12, 20, 16, 3707, 16, 22, 13, 365, 18, 11231, 8867, 12, 92, 63, 27, 6487, 5045, 13, 365, 18, 11231, 8867, 12, 92...
splittable = True
# def _updateChangeSet -- body starts here
ee4de86bc27832efbeef6e6900e90a53ec4212b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/ee4de86bc27832efbeef6e6900e90a53ec4212b4/update.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1652, 389, 2725, 21565, 1493, 1417, 2542, 2674, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1652, 389, 2725, 21565, 1493, 1417, 2542, 2674, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
f.write(" rv = self->%s(%s);\n" % (comName, args)) f.write(" if (NS_FAILED(rv))\n") if isMethod: if haveCcx: f.write(" return xpc_qsThrowMethodFailedWithCcx(ccx, rv);\n")
if not rvdeclared: f.write(" nsresult rv;\n") rvdeclared = True f.write(" rv = %s->%s(%s);\n" % (selfname, comName, args)) if customMethodCall is None: f.write(" if (NS_FAILED(rv))\n") if isMethod: if haveCcx: f.write(" return xpc_qsThrowMethodFailedWithCcx(" "ccx, rv);\n") else: f.write(" return xpc_qsThrowMethodFailed(" "cx, rv, vp);\n")
def pfail(msg): raise UserError( member.iface.name + '.' + member.name + ": " "parameter " + param.name + ": " + msg)
ff779f91c85a5fbb1f57868d70359366fb6c4a65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/ff779f91c85a5fbb1f57868d70359366fb6c4a65/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 6870, 12, 3576, 4672, 1002, 2177, 668, 12, 3140, 18, 31479, 18, 529, 397, 2611, 397, 3140, 18, 529, 397, 6398, 315, 315, 6775, 315, 397, 579, 18, 529, 397, 6398, 315, 397, 1234, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 6870, 12, 3576, 4672, 1002, 2177, 668, 12, 3140, 18, 31479, 18, 529, 397, 2611, 397, 3140, 18, 529, 397, 6398, 315, 315, 6775, 315, 397, 579, 18, 529, 397, 6398, 315, 397, 1234, ...
plot(structure)
plot(structure,'/home/jbk/atomEye/A.i686')
def toCygwin(winpath): drive,path=os.path.splitdrive(winpath) path = path.replace('\\', '/') if drive.endswith(':'): drive = drive[:-1] return "/cygdrive/%s/%s"%(drive,path)
92453df8e93637144c438876a31770d1df04a2cd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/578/92453df8e93637144c438876a31770d1df04a2cd/atomeyecontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 39, 4338, 8082, 12, 8082, 803, 4672, 14316, 16, 803, 33, 538, 18, 803, 18, 4939, 25431, 12, 8082, 803, 13, 589, 273, 589, 18, 2079, 2668, 1695, 2187, 2023, 13, 309, 14316, 18, 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, 358, 39, 4338, 8082, 12, 8082, 803, 4672, 14316, 16, 803, 33, 538, 18, 803, 18, 4939, 25431, 12, 8082, 803, 13, 589, 273, 589, 18, 2079, 2668, 1695, 2187, 2023, 13, 309, 14316, 18, 5...
self.__generateForMobigen = val
self.__generateForKindle = val
def fset(self, val): self.__generateForMobigen = val
073710f405f291eedc7992694a78db2be7983d10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/073710f405f291eedc7992694a78db2be7983d10/catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30141, 12, 2890, 16, 1244, 4672, 365, 16186, 7163, 1290, 49, 947, 30577, 273, 1244, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30141, 12, 2890, 16, 1244, 4672, 365, 16186, 7163, 1290, 49, 947, 30577, 273, 1244, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.child.child.set_from_pixbuf( gtk.gdk.pixbuf_new_from_file_at_size( cover.name, *self.__size)) self.__albumfn = cover.name self.show()
try: pixbuf = gtk.gdk.pixbuf_new_from_file_at_size( cover.name, *self.__size) except gobject.GError: self.hide() else: self.child.child.set_from_pixbuf(pixbuf) self.__albumfn = cover.name self.show()
def set_song(self, song): self.__song = song if song is None: self.child.child.set_from_pixbuf(None) self.__albumfn = None self.hide() else: cover = song.find_cover() if cover is None: self.__albumfn = None self.child.child.set_from_pixbuf(None) self.hide() elif cover.name != self.__albumfn: self.child.child.set_from_pixbuf( gtk.gdk.pixbuf_new_from_file_at_size( cover.name, *self.__size)) self.__albumfn = cover.name self.show()
c82fb36406e970524570e542bf80ca7c412bd5b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/c82fb36406e970524570e542bf80ca7c412bd5b6/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 816, 75, 12, 2890, 16, 17180, 4672, 365, 16186, 816, 75, 273, 17180, 309, 17180, 353, 599, 30, 365, 18, 3624, 18, 3624, 18, 542, 67, 2080, 67, 14861, 4385, 12, 7036, 13, 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, 444, 67, 816, 75, 12, 2890, 16, 17180, 4672, 365, 16186, 816, 75, 273, 17180, 309, 17180, 353, 599, 30, 365, 18, 3624, 18, 3624, 18, 542, 67, 2080, 67, 14861, 4385, 12, 7036, 13, 365...
for FILE in request.FILES.keys():
for FILE in request.FILES.iterkeys():
def qsd(request, branch, name, section, action): READ_VERB = 'V/Flags/Public' EDIT_VERB = 'V/Administer/Edit/QSD' # Pages are global per-user (not unique per-user) cache_id = '%s_%s' % (branch.id, name) if action == 'read': base_url = request.path[:-5] else: base_url = request.path[:(-len(action)-6)] # Detect edit authorizations have_edit = UserBit.UserHasPerms(request.user, branch, EDIT_VERB) if have_edit: have_read = True else: have_read = UserBit.UserHasPerms(request.user, branch, READ_VERB) if not have_read and action == 'read': raise Http403, "You do not have permission to access this page." # Fetch the QSD object try: qsd_rec = QuasiStaticData.objects.get_by_path__name(branch, name) if qsd_rec.disabled: raise QuasiStaticData.DoesNotExist except QuasiStaticData.DoesNotExist: if have_edit: if action in ('edit','create',): qsd_rec = QuasiStaticData() qsd_rec.path = branch qsd_rec.name = name qsd_rec.title = 'New Page' qsd_rec.content = 'Please insert your text here' qsd_rec.create_date = datetime.now() qsd_rec.keywords = '' qsd_rec.description = '' action = 'edit' if (action == 'read'): edit_link = base_url+'.edit.html' return render_to_response('qsd/nopage_edit.html', request, (branch, section), {'edit_link': edit_link}) else: if action == 'read': raise Http404, 'This page does not exist.' else: raise Http403, 'Sorry, you can not modify <tt>%s</tt>.' % request.path if action == 'create': action = 'edit' # Detect the standard read verb if action == 'read': if not have_read: raise Http403, 'You do not have permission to read this page.' # This caching code is commented out # My guess (Alex Dehnert, speaking as somebody who started work # on ESP after this had happened) is that this was commented out # when the render_qsd template tag started getting cached #cached_html = cache.get('quasistaticdata_html:' + cache_id) #if cached_html == None: cached_html = qsd_rec.html() # cache.set('quasistaticdata_html:' + cache_id, cached_html) # Render response return render_to_response('qsd/qsd.html', request, (branch, section), { 'title': qsd_rec.title, 'content': cached_html, 'qsdrec': qsd_rec, 'have_edit': have_edit, 'edit_url': base_url + ".edit.html" }) # Detect POST if request.POST.has_key('post_edit'): if not have_edit: raise Http403, "Sorry, you do not have permission to edit this page." # Arguably, this should retrieve the DB object, use the .copy() # method, and then update it. Doing it this way saves a DB call # (and requires me to make fewer changes). qsd_rec_new = QuasiStaticData() qsd_rec_new.path = branch qsd_rec_new.name = name qsd_rec_new.author = request.user qsd_rec_new.content = request.POST['content'] qsd_rec_new.title = request.POST['title'] qsd_rec_new.description = request.POST['description'] qsd_rec_new.keywords = request.POST['keywords'] qsd_rec_new.save(user=request.user) qsd_rec = qsd_rec_new # If any files were uploaded, save them for FILE in request.FILES.keys(): m = Media() # Strip "media/" from FILE, and strip the file name; just return the path path = dirname(FILE[9:]) if path == '': m.anchor = qsd_rec.path else: m.anchor = GetNode('Q/' + dirname(FILE)) m.mime_type = request.FILES[FILE]['content-type'] # Do we want a better/manual mechanism for setting friendly_name? m.friendly_name = basename(FILE) m.size = len(request.FILES[FILE]['content']) splitname = basename(FILE).split('.') if len(splitname) > 1: m.file_extension = splitname[-1] else: m.file_extension = '' m.format = '' local_filename = FILE if FILE[:9] == 'qsdmedia/': local_filename = FILE[9:] m.save_target_file_file(local_filename, request.FILES[FILE]['content']) m.save() cache.delete(urlencode('quasistaticdata:' + cache_id)) cache.delete(urlencode('quasistaticdata_html:' + cache_id)) # Detect the edit verb if action == 'edit': # Enforce authorizations (FIXME: SHOW A REAL ERROR!) if not have_edit: raise ESPError(False), "You don't have permission to edit this page." m = ESPMarkdown(qsd_rec.content, media={}) m.toString()
e6e624596aa50084caf15a544b13b083db3e8a14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/e6e624596aa50084caf15a544b13b083db3e8a14/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 6427, 12, 2293, 16, 3803, 16, 508, 16, 2442, 16, 1301, 4672, 225, 10746, 67, 2204, 38, 273, 296, 58, 19, 5094, 19, 4782, 11, 21307, 67, 2204, 38, 273, 296, 58, 19, 4446, 1249, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1043, 6427, 12, 2293, 16, 3803, 16, 508, 16, 2442, 16, 1301, 4672, 225, 10746, 67, 2204, 38, 273, 296, 58, 19, 5094, 19, 4782, 11, 21307, 67, 2204, 38, 273, 296, 58, 19, 4446, 1249, ...