rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
print "Calculate maximas:"
print "--------------------------------- ", RT_c
def main(): if len(argv) != 3: print "to few arguments in call to %s" %argv[0] print "usage: %s input.png output.png" %argv[0] exit(-1) init_gamera() from gamera.toolkits import tss input_image = argv[1] output_image = argv[2] image0 = load_image(r"%s"%input_image) onebit0 = image0.to_onebit() print "Performing area ratio filter:" ccs = onebit0.area_ratio_filter() avg_height = calcAvgHeight(ccs) print "Average Heigth of all remaining ccs = ", avg_height R = 0.2 * avg_height count = 0 print "R = ", R print "Performing hough transformation:" args = [] floatImage = tss.plugins.TextStringSep.hough_transform(ccs, args, [0.0,5.0,85.0,95.0,175.0,180.0],R,1.0,onebit0.ncols,onebit0.nrows) RT_c = 20
69b5bb9017bd106b070f14f72121ba350eb10df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2794/69b5bb9017bd106b070f14f72121ba350eb10df5/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 562, 12, 19485, 13, 480, 890, 30, 1172, 315, 869, 11315, 1775, 316, 745, 358, 738, 87, 6, 738, 19485, 63, 20, 65, 1172, 315, 9167, 30, 738, 87, 810, 18, 6446, 876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 309, 562, 12, 19485, 13, 480, 890, 30, 1172, 315, 869, 11315, 1775, 316, 745, 358, 738, 87, 6, 738, 19485, 63, 20, 65, 1172, 315, 9167, 30, 738, 87, 810, 18, 6446, 876, ...
'lambda': ('ref/lambda', 'FUNCTIONS'),
'lambda': ('ref/lambdas', 'FUNCTIONS'),
def writedocs(dir, pkgpath='', done=None): """Write out HTML documentation for all modules in a directory tree.""" if done is None: done = {} for file in os.listdir(dir): path = os.path.join(dir, file) if ispackage(path): writedocs(path, pkgpath + file + '.', done) elif os.path.isfile(path): modname = inspect.getmodulename(path) if modname: if modname == '__init__': modname = pkgpath[:-1] # remove trailing period else: modname = pkgpath + modname if modname not in done: done[modname] = 1 writedoc(modname)
9fbf287241e4561acb33255cfb71cba124e273ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9fbf287241e4561acb33255cfb71cba124e273ee/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 329, 22280, 12, 1214, 16, 3475, 803, 2218, 2187, 2731, 33, 7036, 4672, 3536, 3067, 596, 3982, 7323, 364, 777, 4381, 316, 279, 1867, 2151, 12123, 309, 2731, 353, 599, 30, 2731, 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, 2518, 329, 22280, 12, 1214, 16, 3475, 803, 2218, 2187, 2731, 33, 7036, 4672, 3536, 3067, 596, 3982, 7323, 364, 777, 4381, 316, 279, 1867, 2151, 12123, 309, 2731, 353, 599, 30, 2731, 273,...
elif errorType == errors.cONNECTION_REFUSED_ERROR:
elif errorType == errors.CONNECTION_REFUSED_ERROR:
def __recordError(self, err): """Helper method to record the errors to the mailMessage object"""
cef967a6d43a00540ac228d8184cfc58413d8394 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cef967a6d43a00540ac228d8184cfc58413d8394/smtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3366, 668, 12, 2890, 16, 393, 4672, 3536, 2276, 707, 358, 1409, 326, 1334, 358, 326, 4791, 1079, 733, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3366, 668, 12, 2890, 16, 393, 4672, 3536, 2276, 707, 358, 1409, 326, 1334, 358, 326, 4791, 1079, 733, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if len(args) != 3:
if len(args) != 2:
def main(): #IGNORE:R0911 """ Creates installers for selected platforms. """ parser = OptionParser("%prog <platform> " + "<installation directory> <source directory>") parser.add_option("-v", "--verbose", action="store_true", default=False, help="Show verbose output", dest="VERBOSE") options, args = parser.parse_args() if len(args) != 3: parser.error("Incorrect number of arguments") return 1 platform, installdir = args global VERBOSE #IGNORE:W0603 VERBOSE = options.VERBOSE if VERBOSE: print "Platform:", platform print "Installation directory:", installdir if platform == "Win32": return win32_post_build(installdir) if platform == "Win64": return do_nothing(platform) if platform == "Linux32": return linux32_post_build(installdir) if platform == "Linux64": return linux64_post_build(installdir) if platform == "FreeBSD32": return do_nothing(platform) if platform == "PowerMAC": return mac_post_build(installdir) if platform == "SunOSSparc": return do_nothing(platform) if platform == "SunOSx86": return do_nothing(platform) print >> sys.stderr, "Unknown OS identifier: " + platform print >> sys.stderr, "Exiting post build script." return 2
204b7a8e07d34404490e11b63475e8de796acfa2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/310/204b7a8e07d34404490e11b63475e8de796acfa2/make_installers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 20118, 30, 54, 5908, 2499, 3536, 10210, 3799, 414, 364, 3170, 17422, 18, 3536, 2082, 273, 18862, 27188, 14654, 411, 9898, 34, 315, 397, 3532, 5425, 367, 1867, 34, 411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 20118, 30, 54, 5908, 2499, 3536, 10210, 3799, 414, 364, 3170, 17422, 18, 3536, 2082, 273, 18862, 27188, 14654, 411, 9898, 34, 315, 397, 3532, 5425, 367, 1867, 34, 411, ...
known_directives = ['StatsDupWindow', 'StatsIgnoreIP', 'StatsPreFilter', 'StatsCount', 'StatsPostFilter']
known_directives = ['StatsDupWindow', 'StatsIgnoreIP', 'StatsIgnoreMask', 'StatsPreFilter', 'StatsCount', 'StatsPostFilter']
def readconf(filename): """we'd need Apache's config parser here...""" known_directives = ['StatsDupWindow', 'StatsIgnoreIP', 'StatsPreFilter', 'StatsCount', 'StatsPostFilter'] known_directives_lower = [ i.lower() for i in known_directives ] parse_2_in_quotes = re.compile(r'"(.*)"\s+"(.*)"') # create a dictionary to hold the config # each item is a list (because the directives could occur more than once) # each list item will correspond to one directive occurrence conf = {} for i in known_directives_lower: conf[i] = list() for line in open(filename): # remove trailing and leading whitespace and newlines line = line.strip() # ignore comment lines if line.startswith('#'): continue # split line into 1st word plus rest # will fail if it's not a valid config line try: word, val = line.split(None, 1) except ValueError: continue if word.lower() not in known_directives_lower: sys.exit('unknown config directive: %r' % word) continue directive = word.lower() val = val # this is just a single integer if directive in ['statsdupwindow']: conf[directive] = int(val) # these come with two args: a regexp and a substitution rule elif directive in ['statsprefilter', 'statscount', 'statspostfilter']: m = parse_2_in_quotes.match(val) #print 'substitute %s by %s' % (m.group(1), m.group(2)) regex = m.group(1).replace('\\"', '"') subst = m.group(2).replace('\\"', '"') regex_compiled = re.compile(regex) conf[directive].append((regex_compiled, subst, regex)) #print conf['statsprefilter'][i] elif directive in ['statsignoreip']: conf[directive].append(val) else: sys.exit('unparsed directive (implementation needed)', directive) #for i, item in enumerate(conf['statsprefilter']): return conf
2b9071a393dec422daf756734def5941ac102c37 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3613/2b9071a393dec422daf756734def5941ac102c37/dlcount.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 3923, 12, 3459, 4672, 3536, 1814, 14271, 1608, 24840, 1807, 642, 2082, 2674, 7070, 3660, 4846, 67, 30850, 273, 10228, 4195, 30419, 3829, 2187, 296, 4195, 3777, 2579, 2187, 296, 4195, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 3923, 12, 3459, 4672, 3536, 1814, 14271, 1608, 24840, 1807, 642, 2082, 2674, 7070, 3660, 4846, 67, 30850, 273, 10228, 4195, 30419, 3829, 2187, 296, 4195, 3777, 2579, 2187, 296, 4195, ...
magic = unpack('<i', buf[:4])[0]
magic = unpack('<i', buf[:4])[0] & MASK
def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} buf = fp.read() # Are we big endian or little endian? magic = unpack('<i', buf[:4])[0] if magic == self.LE_MAGIC: version, msgcount, masteridx, transidx = unpack('<4i', buf[4:20]) ii = '<ii' elif magic == self.BE_MAGIC: version, msgcount, masteridx, transidx = unpack('>4i', buf[4:20]) ii = '>ii' else: raise IOError(0, 'Bad magic number', filename) # # Now put all messages from the .mo file buffer into the catalog # dictionary. for i in xrange(0, msgcount): mlen, moff = unpack(ii, buf[masteridx:masteridx+8]) mend = moff + mlen tlen, toff = unpack(ii, buf[transidx:transidx+8]) tend = toff + tlen if mend < len(buf) and tend < len(buf): tmsg = buf[toff:tend] catalog[buf[moff:mend]] = tmsg else: raise IOError(0, 'File is corrupt', filename) # See if we're looking at GNU .mo conventions for metadata if mlen == 0 and tmsg.lower().startswith('project-id-version:'): # Catalog description for item in tmsg.split('\n'): item = item.strip() if not item: continue k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v if k == 'content-type': self._charset = v.split('charset=')[1] # advance to next entry in the seek tables masteridx += 8 transidx += 8
eabd0a01156dcd11b352baf6d6d05cfcf36e1a3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/eabd0a01156dcd11b352baf6d6d05cfcf36e1a3f/gettext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 12, 2890, 16, 4253, 4672, 3536, 6618, 333, 707, 358, 2865, 10355, 263, 8683, 6449, 12123, 6167, 273, 1958, 18, 17309, 1544, 273, 3869, 12, 7944, 16, 296, 529, 2187, 28707, 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, 389, 2670, 12, 2890, 16, 4253, 4672, 3536, 6618, 333, 707, 358, 2865, 10355, 263, 8683, 6449, 12123, 6167, 273, 1958, 18, 17309, 1544, 273, 3869, 12, 7944, 16, 296, 529, 2187, 28707, 468...
self.resp_body = resp_body
self.body = resp_body
def __init__(self, title, resp_code, check_cseq=True, include=[], exclude=[], cmds=[], resp_hdr=[], resp_body=None, expect=""): self.title = title self.cmds = cmds self.include = include self.exclude = exclude self.resp_code = resp_code self.resp_hdr = resp_hdr self.resp_body = resp_body self.expect = expect
05beb772142d55a390d3224343808c13cac47ff5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8531/05beb772142d55a390d3224343808c13cac47ff5/inc_sip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2077, 16, 1718, 67, 710, 16, 866, 67, 71, 5436, 33, 5510, 16, 2341, 22850, 6487, 4433, 22850, 6487, 13446, 22850, 6487, 1718, 67, 16587, 22850, 6487, 1718,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 1718, 67, 710, 16, 866, 67, 71, 5436, 33, 5510, 16, 2341, 22850, 6487, 4433, 22850, 6487, 13446, 22850, 6487, 1718, 67, 16587, 22850, 6487, 1718,...
if self._listenerDict.has_key((port_, interface_)): self._listenerDict[port_,interface_].stopListening()
if self._listenerDict.has_key((port, interface)): self._listenerDict[(port, interface)].stopListening()
def unlistenTCP(self, port, interface=''): toRemove = [] for t in self.tcpPorts: port_, factory_, backlog_, interface_ = t if port == port_ and interface == interface_: toRemove.append(t) if toRemove: for t in toRemove: self.tcpPorts.remove(t) if self._listenerDict.has_key((port_, interface_)): self._listenerDict[port_,interface_].stopListening() else: raise error.NotListeningError, (interface, port)
cbb1fcb77c58ed1f30a25eb5b464bb0f256c355a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/cbb1fcb77c58ed1f30a25eb5b464bb0f256c355a/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 18085, 13891, 12, 2890, 16, 1756, 16, 1560, 2218, 11, 4672, 23511, 273, 5378, 364, 268, 316, 365, 18, 14832, 11107, 30, 1756, 67, 16, 3272, 67, 16, 1473, 1330, 67, 16, 1560, 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, 640, 18085, 13891, 12, 2890, 16, 1756, 16, 1560, 2218, 11, 4672, 23511, 273, 5378, 364, 268, 316, 365, 18, 14832, 11107, 30, 1756, 67, 16, 3272, 67, 16, 1473, 1330, 67, 16, 1560, 67, ...
unittest.main()
pass
def testLocal(self):
325d2261e88a32263f42167f948b70d0dfd69ac8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/325d2261e88a32263f42167f948b70d0dfd69ac8/TestLocalAttrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2042, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2042, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.needed_locks[locking.LEVEL_NODE] = [remote_node]
self.needed_locks[locking.LEVEL_NODE] = [self.op.remote_node]
def ExpandNames(self): self.op.node_name = self.cfg.ExpandNodeName(self.op.node_name) if self.op.node_name is None: raise errors.OpPrereqError("Node '%s' not known" % self.op.node_name, errors.ECODE_NOENT)
cf26a87a6f249091d1b4e39d90b027e0ab688d45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/cf26a87a6f249091d1b4e39d90b027e0ab688d45/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16429, 1557, 12, 2890, 4672, 365, 18, 556, 18, 2159, 67, 529, 273, 365, 18, 7066, 18, 12271, 18948, 12, 2890, 18, 556, 18, 2159, 67, 529, 13, 309, 365, 18, 556, 18, 2159, 67, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16429, 1557, 12, 2890, 4672, 365, 18, 556, 18, 2159, 67, 529, 273, 365, 18, 7066, 18, 12271, 18948, 12, 2890, 18, 556, 18, 2159, 67, 529, 13, 309, 365, 18, 556, 18, 2159, 67, 529, ...
'generic_cblas1.pyf'])
'generic_cblas1.pyf', 'interface_gen.py'])
def generate_pyf(extension, build_dir): name = extension.name.split('.')[-1] target = join(build_dir,target_dir,name+'.pyf') if name[0]=='c' and atlas_version is None and newer(__file__,target): f = open(target,'w') f.write('python module '+name+'\n') f.write('usercode void empty_module(void) {}\n') f.write('interface\n') f.write('subroutine empty_module()\n') f.write('intent(c) empty_module\n') f.write('end subroutine empty_module\n') f.write('end interface\nend python module'+name+'\n') f.close() return target if newer_group(extension.depends,target): generate_interface(name, extension.depends[0], target, skip_names[name]) return target
d22345c4009069cb0d5194f7bcc58445d8409832 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/d22345c4009069cb0d5194f7bcc58445d8409832/setup_linalg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2074, 74, 12, 6447, 16, 1361, 67, 1214, 4672, 508, 273, 2710, 18, 529, 18, 4939, 2668, 1093, 13, 18919, 21, 65, 1018, 273, 1233, 12, 3510, 67, 1214, 16, 3299, 67, 1214, 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, 2103, 67, 2074, 74, 12, 6447, 16, 1361, 67, 1214, 4672, 508, 273, 2710, 18, 529, 18, 4939, 2668, 1093, 13, 18919, 21, 65, 1018, 273, 1233, 12, 3510, 67, 1214, 16, 3299, 67, 1214, 16,...
return re.sub(r'^\s*[^\n]*\n', '', docstring, 1)
return self._SIGNATURE_RE.sub('', docstring, 1)
def _init_signature(self, func): """ Construct the signature for a function or method from its docstring and/or argspec. If the docstring uses the standard convention of including a signature in the first line of the docstring (and formats that signature according to standard conventions), then it will be used to extract a signature. Otherwise, if an argspec is available, then it will be used to initialize the signature; otherwise, the signature will be set to a single varargs variable named C{"..."}.
ebffa39fe4dbb09255ac99754e1182465ab1ba41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/ebffa39fe4dbb09255ac99754e1182465ab1ba41/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 8195, 12, 2890, 16, 1326, 4672, 3536, 14291, 326, 3372, 364, 279, 445, 578, 707, 628, 2097, 14525, 471, 19, 280, 23837, 18, 225, 971, 326, 14525, 4692, 326, 4529, 15797, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8195, 12, 2890, 16, 1326, 4672, 3536, 14291, 326, 3372, 364, 279, 445, 578, 707, 628, 2097, 14525, 471, 19, 280, 23837, 18, 225, 971, 326, 14525, 4692, 326, 4529, 15797, ...
element = getattr(self, key, None) if element and shasattr(element, 'isBinary'): return element.isBinary()
field = self.getField(key) if IFileField.isImplementedBy(field): value = field.getBaseUnit(self) return value.isBinary()
def isBinary(self, key): """Return wether a field contains binary data. """ element = getattr(self, key, None) if element and shasattr(element, 'isBinary'): return element.isBinary() mimetype = self.getContentType(key) if mimetype and shasattr(mimetype, 'binary'): return mimetype.binary elif mimetype and mimetype.find('text') >= 0: return 0 return 1
56f6b1260d5873dd658af8e135ec431779bf3a40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/56f6b1260d5873dd658af8e135ec431779bf3a40/BaseObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 5905, 12, 2890, 16, 498, 4672, 3536, 990, 341, 2437, 279, 652, 1914, 3112, 501, 18, 3536, 652, 273, 365, 18, 588, 974, 12, 856, 13, 309, 467, 812, 974, 18, 291, 8644, 858, 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, 353, 5905, 12, 2890, 16, 498, 4672, 3536, 990, 341, 2437, 279, 652, 1914, 3112, 501, 18, 3536, 652, 273, 365, 18, 588, 974, 12, 856, 13, 309, 467, 812, 974, 18, 291, 8644, 858, 12, ...
if self.flash_atimes.get(filepath) != None and atime:
if (self.flash_atimes.get(filepath) != None and self.flash_atimes.get(filepath) != atime): logging.info("Caffeine has detected that Flash video is playing, and will auto-activate") activate = True self.status_string = _("Activated for Flash.")
def _check_for_Flash(self): print "_check_for_Flash" try: tmp = "/tmp" activate = False ## look for filenames that begin with 'Flash' for file in os.listdir(tmp): if file.startswith("Flash"): filepath = os.path.join(tmp, file) ## Time of last access. atime = os.stat(filepath).st_atime ### see if user is buffering a flash video if self.flash_atimes.get(filepath) != None and atime: self.timedActivation(5*60, note=False) self.preventedForFlash = True
20e13bcc824bd4fbac04a2ef7c172843354bf8a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7152/20e13bcc824bd4fbac04a2ef7c172843354bf8a9/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 1884, 67, 11353, 12, 2890, 4672, 1172, 4192, 1893, 67, 1884, 67, 11353, 6, 775, 30, 1853, 273, 2206, 5645, 6, 10235, 273, 1083, 7541, 2324, 364, 9066, 716, 2376, 598, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 67, 1884, 67, 11353, 12, 2890, 4672, 1172, 4192, 1893, 67, 1884, 67, 11353, 6, 775, 30, 1853, 273, 2206, 5645, 6, 10235, 273, 1083, 7541, 2324, 364, 9066, 716, 2376, 598, 29...
if mode.configMode.value == "simple" and mode.diseqcMode.value == "positioner":
nimHaveRotor = mode.configMode.value == "simple" and mode.diseqcMode.value == "positioner" if not nimHaveRotor and mode.configMode.value == "advanced": for x in range(3601, 3605): lnb = int(mode.advanced.sat[x].lnb.value) if lnb != 0: nimHaveRotor = True break if nimHaveRotor:
def canDependOn(self, slotid): type = self.getNimType(slotid) if self.getNimConfig(slotid) == "DVB-S2": type = "DVB-S" nimList = self.getNimListOfType(type, slotid) positionerList = [] for nim in nimList[:]: mode = self.getNimConfig(nim) if mode.configMode.value == "simple" and mode.diseqcMode.value == "positioner": alreadyConnected = False for testnim in nimList: testmode = self.getNimConfig(testnim) if testmode.configMode.value == "satposdepends" and int(testmode.connectedTo.value) == int(nim): alreadyConnected = True break if not alreadyConnected: positionerList.append(nim) return positionerList
89236c8de2e26b3724e39eba22b211608d79d272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/89236c8de2e26b3724e39eba22b211608d79d272/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 4584, 1398, 12, 2890, 16, 4694, 350, 4672, 618, 273, 365, 18, 588, 50, 381, 559, 12, 14194, 350, 13, 309, 365, 18, 588, 50, 381, 809, 12, 14194, 350, 13, 422, 315, 30199, 38, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 4584, 1398, 12, 2890, 16, 4694, 350, 4672, 618, 273, 365, 18, 588, 50, 381, 559, 12, 14194, 350, 13, 309, 365, 18, 588, 50, 381, 809, 12, 14194, 350, 13, 422, 315, 30199, 38, ...
self.item_info = item_info self._item_name.set_text(util.clampText(item_info.name, 100)) if item_info.has_sharable_url: self._share_link.show() else: self._share_link.hide() if item_info.is_external: self._comments_link.hide() self._permalink_link.hide() self._expiration_label.hide() self._keep_link.hide() self._dash.hide() self._channel_name.set_text("") else: channels = app.tab_list_manager.feed_list.get_feeds() channels = [ci for ci in channels if ci.id == item_info.feed_id] if len(channels) == 0: self._channel_name.set_text("") else: self._channel_name.set_text(util.clampText(channels[0].name, 100)) self._add_to_library_link.hide() if item_info.commentslink: self._comments_link.show() self._comments_link.set_text(_("COMMENTS")) else: self._comments_link.hide() if item_info.permalink: self._permalink_link.show() self._permalink_link.set_text(_("PERMALINK")) else: self._permalink_link.hide()
def set_video_details(self, item_info): """This gets called when the item is set to play. It should make no assumptions about the state of the video details prior to being called. """ self.item_info = item_info self._item_name.set_text(util.clampText(item_info.name, 100))
5ed3be55d0dbdfaaa87e8b22a22480179901a001 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/5ed3be55d0dbdfaaa87e8b22a22480179901a001/video.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 9115, 67, 6395, 12, 2890, 16, 761, 67, 1376, 4672, 3536, 2503, 5571, 2566, 1347, 326, 761, 353, 444, 358, 6599, 18, 225, 2597, 1410, 1221, 1158, 6287, 573, 2973, 326, 919, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 9115, 67, 6395, 12, 2890, 16, 761, 67, 1376, 4672, 3536, 2503, 5571, 2566, 1347, 326, 761, 353, 444, 358, 6599, 18, 225, 2597, 1410, 1221, 1158, 6287, 573, 2973, 326, 919, 434...
shutil.rmtree(ge_final)
if sys.platform == 'win32': sh("rd /S /Q %s" % ge_final ) else: shutil.rmtree(ge_final)
def move(): ''' Move all of the GeoExplorer file into a folder in source ... ''' ge_final = path.joinpath(source_path,path("geoexplorer")) if ge_final.exists(): shutil.rmtree(ge_final) shutil.copytree(geoexplorer_path,ge_final)
d55e4b1b9a8d4af37f92a326013c5a5b46f96e43 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3279/d55e4b1b9a8d4af37f92a326013c5a5b46f96e43/pavement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 13332, 9163, 9933, 777, 434, 326, 9385, 20938, 585, 1368, 279, 3009, 316, 1084, 1372, 9163, 8244, 67, 6385, 273, 589, 18, 5701, 803, 12, 3168, 67, 803, 16, 803, 2932, 12376, 338, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 13332, 9163, 9933, 777, 434, 326, 9385, 20938, 585, 1368, 279, 3009, 316, 1084, 1372, 9163, 8244, 67, 6385, 273, 589, 18, 5701, 803, 12, 3168, 67, 803, 16, 803, 2932, 12376, 338, ...
pin = jack.pins[jack.pins.index(pinnum)]
pin = realjack.pins[realjack.pins.index(pinnum)]
def addPins(line): """create pins (and auto-lines) for a given line""" for jacknum, pinnum in zip(line.jacknums, line.pinnums): #find jack and perform some consistency checks try: jack = containers[-1].jacks[containers[-1].jacks.index(jacknum)] except ValueError: raise Failure("unrecognized jack: %s"%jacknum) lineend = 'box' if jack.placeholder: #jack is placeholder in direct-connected pair jack = jack.mate #use the real jack...its mate lineend = 'cable' try: #test pin number if jack.conn.flags['alpha'] == 'N' and ((int(pinnum) > jack.conn.count \ and jack.conn.count > 0) or int(pinnum) <= 0): raise Failure("invalid pin number: %s"%pinnum) except ValueError: raise Failure("unexpected non-numeric pin: %s"%pinnum) if jack.mate is None: #unmated, add a dangling pin (no cline yet) newpin = Pin(pinnum, line.desc, jack, line, None) if newpin not in jack.pins: jack.pins.append(newpin) else: #already mated, need to add extra stuff try: #see if pin has already been generated pin = jack.pins[jack.pins.index(pinnum)] except ValueError: #pin not yet generated newline = Line(line.desc, "(%s,%s)"%(jack.mate.ref,pinnum)) newline.autogen = True if jack.cable is None: #no cable if lineend == 'box': newpin = Pin(pinnum, line.desc, jack, line, newline) newline.owner = jack.mate.location jack.mate.location.lines.append(newline) else: newpin = Pin(pinnum, line.desc, jack, newline, line) newline.owner = jack.location jack.location.lines.append(newline) else: #using a cable, make another new line and pin if lineend == 'cable': raise Failure('inconsistent state') cableline = Line(line.desc, "") cableline.autogen = True cableline.owner = jack.cable newpin = Pin(pinnum, line.desc, jack, line, cableline) newerpin = Pin(pinnum, line.desc, jack.mate, newline, cableline) jack.cable.lines.append(cableline) if newerpin not in jack.mate.pins: jack.mate.pins.append(newerpin) jack.pins.append(newpin) else: #pin exists if not pin.lines[lineend].autogen: raise Failure("line conflicts for pin (%s,%s)"%(jacknum,pinnum)) jack.parent.lines.remove(pin.lines[lineend]) pin.desc = line.desc pin.lines[lineend] = line #other lines exist already (?), so this case is done if line in containers[-1].lines: raise Failure("line overlaps existing one") containers[-1].lines.append(line)
4d7794e176655980479c9193da7e83bd5d0a676b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2109/4d7794e176655980479c9193da7e83bd5d0a676b/sedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 52, 2679, 12, 1369, 4672, 3536, 2640, 23391, 261, 464, 3656, 17, 3548, 13, 364, 279, 864, 980, 8395, 364, 525, 484, 2107, 16, 7092, 2107, 316, 3144, 12, 1369, 18, 78, 484, 21180, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 52, 2679, 12, 1369, 4672, 3536, 2640, 23391, 261, 464, 3656, 17, 3548, 13, 364, 279, 864, 980, 8395, 364, 525, 484, 2107, 16, 7092, 2107, 316, 3144, 12, 1369, 18, 78, 484, 21180, ...
andi t3, t3, 8 or reg, reg, t3
andi t4, t3, 8, flags=(EZF,) or reg, reg, t4 mov t1, t1, t3, flags=(nCEZF,)
def macroop BSF_R_M { mov t1, t1, t0, dataSize=8 ld t1, seg, sib, disp # Determine if the input was zero, and also move it to a temp reg. and t1, t1, t1, flags=(ZF,) bri t0, label("end"), flags=(CZF,) # Zero out the result register mov reg, reg, t0 subi t2, t1, 1 xor t1, t2, t1 # Bit 6 srli t3, t1, 32, dataSize=8 andi t3, t3, 32 or reg, reg, t3 # Bit 5 srli t3, t1, 16, dataSize=8 andi t3, t3, 16 or reg, reg, t3 # Bit 4 srli t3, t1, 8, dataSize=8 andi t3, t3, 8 or reg, reg, t3 # Bit 3 srli t3, t1, 4, dataSize=8 andi t3, t3, 4 or reg, reg, t3 # Bit 2 srli t3, t1, 2, dataSize=8 andi t3, t3, 2 or reg, reg, t3 # Bit 1 srli t3, t1, 1, dataSize=8 andi t3, t3, 1 or reg, reg, t3
3e7c07fe3694f0322ad14a3f78d57cc10c7ca6f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7385/3e7c07fe3694f0322ad14a3f78d57cc10c7ca6f6/bit_scan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 605, 22395, 67, 54, 67, 49, 288, 225, 5730, 268, 21, 16, 268, 21, 16, 268, 20, 16, 30216, 33, 28, 16916, 268, 21, 16, 2291, 16, 12092, 16, 16232, 225, 468, 10229, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 605, 22395, 67, 54, 67, 49, 288, 225, 5730, 268, 21, 16, 268, 21, 16, 268, 20, 16, 30216, 33, 28, 16916, 268, 21, 16, 2291, 16, 12092, 16, 16232, 225, 468, 10229, 309, ...
using this prefix and some letters (default: ``'C'``).
using this prefix and some letters (default: ``'PY'``).
@Can[def ]@Cax[foo](bar): @Can[pass]
c1ff3dec7399c0b88356f268039128c6a6e8dc7a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6148/c1ff3dec7399c0b88356f268039128c6a6e8dc7a/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 632, 2568, 63, 536, 308, 36, 39, 651, 63, 11351, 29955, 3215, 4672, 632, 2568, 63, 5466, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 632, 2568, 63, 536, 308, 36, 39, 651, 63, 11351, 29955, 3215, 4672, 632, 2568, 63, 5466, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
linkName += ":&nbsp;" + values[2]
linkName += ":&nbsp;" + str(values[2])
def send_to_graph(results_server, results_link, title, date, browser_config, results): tbox = title url_format = "http://%s/%s" link_format= "<a href = \"%s\">%s</a>" #value, testname, tbox, timeval, date, branch, buildid, type, data result_format = "%.2f,%s,%s,%d,%d,%s,%s,%s,%s,\n" result_format2 = "%.2f,%s,%s,%d,%d,%s,%s,%s,\n" links = '' for res in results: browser_dump, counter_dump = results[res] utils.debug("Working with test: " + res) utils.debug("Sending results: " + " ".join(browser_dump)) filename = tempfile.mktemp() tmpf = open(filename, "w") if res in ('ts', 'twinopen'): i = 0 for val in browser_dump: val_list = val.split('|') for v in val_list: tmpf.write(result_format % (float(v), res, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", "ms")) i += 1 else: # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n name = '' if ((res == 'tp') or (res == 'tp_js')): name = '_loadtime' for bd in browser_dump: bd.rstrip('\n') page_results = bd.splitlines() i = 0 for mypage in page_results: r = mypage.split(';') #skip this line if it isn't the correct format if len(r) == 1: continue r[1] = r[1].rstrip('/') if r[1].find('/') > -1 : page = r[1].split('/')[1] else: page = r[1] try: val = float(r[2]) except ValueError: print 'WARNING: value error for median in tp' val = 0 tmpf.write(result_format % (val, res + name, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", page)) i += 1 tmpf.flush() tmpf.close() links += post_chunk(results_server, results_link, res, filename) os.remove(filename) for cd in counter_dump: for count_type in cd: val_list = cd[count_type] chunks = chunk_list(val_list) chunk_link = '' i = 0 for chunk in chunks: filename = tempfile.mktemp() tmpf = open(filename, "w") for val in chunk: tmpf.write(result_format2 % (float(val), res + "_" + count_type.replace("%", "Percent"), tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete")) i += 1 tmpf.flush() tmpf.close() chunk_link = post_chunk(results_server, results_link, '%s_%s (%d values)' % (res, count_type, len(chunk)), filename) os.remove(filename) links += chunk_link first_results = '' last_results = '' full_results = 'RETURN:<p style="font-size:smaller;">Details:<br>' lines = links.split('\n') for line in lines: if line == "": continue values = line.split(":") linkName = values[1] if linkName in ('tp_pbytes', 'tp_%cpu'): continue if float(values[2]) > 0: linkName += ":&nbsp;" + values[2] url = url_format % (results_server, values[0]) link = link_format % (url, linkName) first_results = first_results + "RETURN:" + link + '<br>' else: url = url_format % (results_server, values[0]) link = link_format % (url, linkName) last_results = last_results + '| ' + link + ' ' full_results = first_results + full_results + last_results + '|</p>' print full_results
f1b8f77bc5615ce42c2b970a9041ba56c2dfd1d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/f1b8f77bc5615ce42c2b970a9041ba56c2dfd1d0/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
dialog = wx.MessageDialog(self, message, "About Prompter", wx.OK)
dialog = wx.MessageDialog(self, message, "About pyprompter", wx.OK)
def __ShowAboutDialogBox(self): name = 'Prompter' version = self.version copyright = '(C) 2008 Matteo Vescovi' description = '''This program is intended as a demonstration of Presage ONLY.
2bb6cc4b4c63e09584d390e3acf8ac985742b3b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2145/2bb6cc4b4c63e09584d390e3acf8ac985742b3b5/prompter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5706, 24813, 6353, 3514, 12, 2890, 4672, 508, 273, 296, 15967, 264, 11, 1177, 273, 365, 18, 1589, 22245, 273, 7747, 39, 13, 4044, 28, 14493, 736, 83, 776, 742, 83, 522, 11, 2477,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5706, 24813, 6353, 3514, 12, 2890, 4672, 508, 273, 296, 15967, 264, 11, 1177, 273, 365, 18, 1589, 22245, 273, 7747, 39, 13, 4044, 28, 14493, 736, 83, 776, 742, 83, 522, 11, 2477,...
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])
7b02e5455d5d52d6dcc7f2314cdd56803031a1c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b02e5455d5d52d6dcc7f2314cdd56803031a1c6/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...
if False:
if True:
def register(): if False: for op in object_ops: bpy.types.unregister(op) for op in pose_ops: bpy.types.unregister(op) for op in object_ops: bpy.types.register(op) for op in pose_ops: bpy.types.register(op) #bpy.types.unregister(VIEW3D_MT_copypopup) #bpy.types.unregister(VIEW3D_MT_posecopypopup) #bpy.types.register(VIEW3D_MT_copypopup) #bpy.types.register(VIEW3D_MT_posecopypopup) km = bpy.context.manager.keyconfigs['Blender'].keymaps['Object Mode'] kmi = km.items.new('wm.call_menu','C','PRESS',ctrl=True) kmi.properties.name = 'VIEW3D_MT_copypopup' km = bpy.context.manager.keyconfigs['Blender'].keymaps['Pose'] try: kmi = km.items['pose.copy'] kmi.idname='wm.call_menu' except KeyError: kmi = km.items.new('wm.call_menu','C','PRESS',ctrl=True) kmi.properties.name = 'VIEW3D_MT_posecopypopup'
46c2ac94fe2afaedc5478f7ef8da7a98dc06b478 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11963/46c2ac94fe2afaedc5478f7ef8da7a98dc06b478/space_view3d_copy_attributes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 13332, 225, 309, 1053, 30, 364, 1061, 316, 733, 67, 4473, 30, 324, 2074, 18, 2352, 18, 318, 4861, 12, 556, 13, 364, 1061, 316, 26948, 67, 4473, 30, 324, 2074, 18, 2352, 18, 318...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 13332, 225, 309, 1053, 30, 364, 1061, 316, 733, 67, 4473, 30, 324, 2074, 18, 2352, 18, 318, 4861, 12, 556, 13, 364, 1061, 316, 26948, 67, 4473, 30, 324, 2074, 18, 2352, 18, 318...
else:
else:
def _getScheduledRecordedProgramList(self): '''Find all Scheduled and Recorded programs return array of found programs, if none then empty array is returned ''' programs=[]
6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 10660, 426, 3850, 785, 9459, 682, 12, 2890, 4672, 9163, 3125, 777, 17286, 471, 868, 3850, 785, 25038, 327, 526, 434, 1392, 25038, 16, 309, 6555, 1508, 1008, 526, 353, 2106, 916...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 10660, 426, 3850, 785, 9459, 682, 12, 2890, 4672, 9163, 3125, 777, 17286, 471, 868, 3850, 785, 25038, 327, 526, 434, 1392, 25038, 16, 309, 6555, 1508, 1008, 526, 353, 2106, 916...
"""%(new_attr, new, table, table, table, new_attr))
"""%(new_attr, new, table_name, table_name, table_name, new_attr))
def drop_primary_key(self, table, col_name): """ WORD ON THE STREET IS THAT SQLITE IS RETARDED ABOUT *ALTER TABLE* COMMANDS... SO MEANWHILE WE ACCOMPLISH THIS BY CREATING A TEMPORARY TABLE. SUGGESTIONS FOR SPEEDUP ARE WELCOME. (OR JUST SEND A PATCH...)
85d02cb25b26fc015382d67ed0b0b5b5529e5568 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/85d02cb25b26fc015382d67ed0b0b5b5529e5568/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 67, 8258, 67, 856, 12, 2890, 16, 1014, 16, 645, 67, 529, 4672, 3536, 21464, 6229, 12786, 2347, 862, 1584, 4437, 7662, 789, 3063, 5398, 4437, 10366, 985, 7660, 10336, 5069, 380, 188...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 67, 8258, 67, 856, 12, 2890, 16, 1014, 16, 645, 67, 529, 4672, 3536, 21464, 6229, 12786, 2347, 862, 1584, 4437, 7662, 789, 3063, 5398, 4437, 10366, 985, 7660, 10336, 5069, 380, 188...
\t as a timestamp of the run ('timestamp' by default)
\t as a timestamp of the run ("timestamp" by default)
def usage(): print 'Usage: %s [options]' % os.path.basename( sys.argv[0] ) print '''
be3f88370211b230c8e140655147b4b71f821774 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/be3f88370211b230c8e140655147b4b71f821774/collect_and_upload_logs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 2116, 3864, 738, 1140, 18, 803, 18, 13909, 12, 2589, 18, 19485, 63, 20, 65, 262, 1172, 565, 9163, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 2116, 3864, 738, 1140, 18, 803, 18, 13909, 12, 2589, 18, 19485, 63, 20, 65, 262, 1172, 565, 9163, 2, -100, -100, -100, -100, -100, -100,...
str += I+'<TH CLASS="navbar">&nbsp;&nbsp;&nbsp;'+\ '<A CLASS="navbar" HREF="tree.html">Trees</A>'+\ '&nbsp;&nbsp;&nbsp;</TH>\n'
str += I+'<th class="navbar">&nbsp;&nbsp;&nbsp;' str += '<a class="navbar" href="' if self._show_both and self._show_private: str += '../' str += 'epydoc-tree.html">Trees</a>' str += '&nbsp;&nbsp;&nbsp;</th>\n'
def _navbar(self, where, uid=None): """ @param where: What page the navbar is being displayed on.. """ str = self._start_of('Navbar') str += '<TABLE CLASS="navbar" BORDER="0" WIDTH="100%"' str += ' CELLPADDING="0" BGCOLOR="#a0c0ff" CELLSPACING="0">\n' str += ' <TR>\n' str += ' <TD WIDTH="100%">\n' str += ' <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">\n' str += ' <TR VALIGN="top">\n'
1b52b16120989cc834166571a9a1e9b8676d968f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1b52b16120989cc834166571a9a1e9b8676d968f/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
elif isinstance(refex, DrtUtterVariableExpression): """In case there is no location time referent that has not yet been used to relate some eventuality to utterance time, use utter time as loc time.""" return [Reading([(trail[-1], DrtFindUtterTimeExpression.VariableReplacer(self.argument.variable, refex))])], True
def _readings(self, trail=[]): utter_time_search = False
1b0f4a2511e2a071b0fa2cdc7ee662d98266d7c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2768/1b0f4a2511e2a071b0fa2cdc7ee662d98266d7c6/temporaldrt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 899, 12, 2890, 16, 15569, 33, 8526, 4672, 22963, 67, 957, 67, 3072, 273, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 899, 12, 2890, 16, 15569, 33, 8526, 4672, 22963, 67, 957, 67, 3072, 273, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.bottom_handle.setPos(0.0, self.height)
def __init__(self, item, name): QtGui.QGraphicsItem.__init__(self) Draggable.__init__(self, QtGui.QGraphicsItem) self.item = item
209851b2d1364216c548554d2acd6b23d272483e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10170/209851b2d1364216c548554d2acd6b23d272483e/clip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 761, 16, 508, 4672, 23425, 18, 53, 17558, 1180, 16186, 2738, 972, 12, 2890, 13, 28425, 8455, 16186, 2738, 972, 12, 2890, 16, 23425, 18, 53, 17558, 1180, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 761, 16, 508, 4672, 23425, 18, 53, 17558, 1180, 16186, 2738, 972, 12, 2890, 13, 28425, 8455, 16186, 2738, 972, 12, 2890, 16, 23425, 18, 53, 17558, 1180, ...
cleanup('wx', 'wxPython', 'wxPython.wx')
cleanup('wx', 'wxPython', 'wxPython.wx', 'shtoom.ui.wxshtoom')
def getWxInterface(fail=False): try: import wx import wxPython.wx except: cleanup('wx', 'wxPython', 'wxPython.wx') wx = None if fail: raise if wx is not None: from shtoom.ui.wxshtoom import main return main
4d444fd2c23ee8e2032e8949246d648385edbaaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1265/4d444fd2c23ee8e2032e8949246d648385edbaaa/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13876, 92, 1358, 12, 6870, 33, 8381, 4672, 775, 30, 1930, 7075, 1930, 7075, 15774, 18, 27226, 1335, 30, 6686, 2668, 27226, 2187, 296, 27226, 15774, 2187, 296, 27226, 15774, 18, 27226, 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, 13876, 92, 1358, 12, 6870, 33, 8381, 4672, 775, 30, 1930, 7075, 1930, 7075, 15774, 18, 27226, 1335, 30, 6686, 2668, 27226, 2187, 296, 27226, 15774, 2187, 296, 27226, 15774, 18, 27226, 2187...
'admin': v.status,
'administrateur': v.status>COACH,
def menu(request): """View: displays administrator's menu. """ # v = utilisateur courant v = request.session['v'] return render_to_response('coaching/menu.html', {'visiteur': v.prenom_nom(), 'client': v.groupe.client, 'here': 'admin', 'admin': v.status, 'staff': v.status==STAFF })
5622003147f995391ac97c1031fcc18f24ef8d30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11552/5622003147f995391ac97c1031fcc18f24ef8d30/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 12, 2293, 4672, 3536, 1767, 30, 22461, 22330, 1807, 3824, 18, 3536, 468, 331, 273, 1709, 24954, 21833, 970, 331, 273, 590, 18, 3184, 3292, 90, 3546, 327, 1743, 67, 869, 67, 2740, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 12, 2293, 4672, 3536, 1767, 30, 22461, 22330, 1807, 3824, 18, 3536, 468, 331, 273, 1709, 24954, 21833, 970, 331, 273, 590, 18, 3184, 3292, 90, 3546, 327, 1743, 67, 869, 67, 2740, ...
subject = CGIescape(subject) author = CGIescape(author)
subject = CGIescape(subject, self.lang) author = CGIescape(author, self.lang)
def write_index_entry(self, article): subject = self.get_header("subject", article) author = self.get_header("author", article) if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS: author = re.sub('@', _(' at '), author) subject = CGIescape(subject) author = CGIescape(author)
469b12e8cfc912874019fdd0ddc95060d27b98f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/469b12e8cfc912874019fdd0ddc95060d27b98f4/HyperArch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1615, 67, 4099, 12, 2890, 16, 7559, 4672, 3221, 273, 365, 18, 588, 67, 3374, 2932, 7857, 3113, 7559, 13, 2869, 273, 365, 18, 588, 67, 3374, 2932, 4161, 3113, 7559, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1615, 67, 4099, 12, 2890, 16, 7559, 4672, 3221, 273, 365, 18, 588, 67, 3374, 2932, 7857, 3113, 7559, 13, 2869, 273, 365, 18, 588, 67, 3374, 2932, 4161, 3113, 7559, 13, 309, ...
A=self.copy().transitive_closure().am() return len(set(A.nonzero_positions()) & set(A.transpose().nonzero_positions())-set([(i,i) for i in xrange(self.order())]))==0
if not self.is_directed(): if self.size()-len(self.loop_edges())>0: return False else: return True gpaths=self.copy().multiple_edges(False).loops(False).transitive_closure().edges(labels=False) for e in gpaths: if (e[1],e[0]) in gpaths: return False return True
def antisymmetric(self): r""" Returns True if the relation given by the graph is antisymmetric and False otherwise.
951646f007938314e04fe4ab322062c54f6ad448 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/951646f007938314e04fe4ab322062c54f6ad448/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17841, 291, 2942, 6899, 12, 2890, 4672, 436, 8395, 2860, 1053, 309, 326, 2533, 864, 635, 326, 2667, 353, 17841, 291, 2942, 6899, 471, 1083, 3541, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17841, 291, 2942, 6899, 12, 2890, 4672, 436, 8395, 2860, 1053, 309, 326, 2533, 864, 635, 326, 2667, 353, 17841, 291, 2942, 6899, 471, 1083, 3541, 18, 2, -100, -100, -100, -100, -100, -10...
gLogger.verbose( "CAs location is %s" % casPath )
gLogger.debug( "CAs location is %s" % casPath )
def __createContext( self ): # Initialize context self.sslContext = SSL.Context( SSL.SSLv23_METHOD ) self.sslContext.set_verify( SSL.VERIFY_PEER|SSL.VERIFY_FAIL_IF_NO_PEER_CERT, self.verifyCallback ) # Demand a certificate casPath = GridCert.getCAsLocation() if not casPath: DIRAC.abort( 10, "No valid CAs location found" ) gLogger.verbose( "CAs location is %s" % casPath ) self.sslContext.load_verify_locations_path( casPath )
a273155ed5de8f7a2726d0bf130a010c8a582b17 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/a273155ed5de8f7a2726d0bf130a010c8a582b17/SocketInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 1042, 12, 365, 262, 30, 468, 9190, 819, 365, 18, 8157, 1042, 273, 7419, 18, 1042, 12, 7419, 18, 6745, 90, 4366, 67, 5327, 262, 365, 18, 8157, 1042, 18, 542, 67, 8705, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 1042, 12, 365, 262, 30, 468, 9190, 819, 365, 18, 8157, 1042, 273, 7419, 18, 1042, 12, 7419, 18, 6745, 90, 4366, 67, 5327, 262, 365, 18, 8157, 1042, 18, 542, 67, 8705, 12,...
logger.notifyChannel("web-service", netsvc.LOG_ERROR,
logger.notifyChannel("web-services", netsvc.LOG_ERROR,
def dump(self, password, db_name): security.check_super(password) logger = netsvc.Logger()
5f216f4b791497211f858fa80ca1a22013367cfe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/5f216f4b791497211f858fa80ca1a22013367cfe/web_services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 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, 4657, 12, 2890, 16, 2201, 16, 1319, 67, 529, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 1194, 273, 21954, 4227, 18, 3328, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.app.child.wait()
while self.mode == 'play' and self.app.isAlive(): time.sleep(0.5) print('Game_Thread::run: GAME OVER') self.app.kill()
def run(self): while 1: if self.mode == 'idle': self.mode_flag.wait() self.mode_flag.clear() elif self.mode == 'play':
79c680d1dfb1a5738792479b2c65143c3e3bcc5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/79c680d1dfb1a5738792479b2c65143c3e3bcc5b/game.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 404, 30, 309, 365, 18, 3188, 422, 296, 20390, 4278, 365, 18, 3188, 67, 6420, 18, 7048, 1435, 365, 18, 3188, 67, 6420, 18, 8507, 1435, 225, 1327, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1323, 404, 30, 309, 365, 18, 3188, 422, 296, 20390, 4278, 365, 18, 3188, 67, 6420, 18, 7048, 1435, 365, 18, 3188, 67, 6420, 18, 8507, 1435, 225, 1327, 365, 18, ...
if time.time()-self.timeout > self.lasttime:
if time.time()-int(self.timeout) > self.lasttime:
def cached_result(self2, cr, *args, **kwargs): if time.time()-self.timeout > self.lasttime: self.lasttime = time.time() t = time.time()-self.timeout old_keys = [key for key in self.cache if self.cache[key][1] < t] for key in old_keys: del self.cache[key]
468ee97f5cf62a01706bdb62981274dfc943e414 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/468ee97f5cf62a01706bdb62981274dfc943e414/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3472, 67, 2088, 12, 2890, 22, 16, 4422, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 813, 18, 957, 1435, 17, 474, 12, 2890, 18, 4538, 13, 405, 365, 18, 2722, 957, 30, 365, 18, 2722, 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, 3472, 67, 2088, 12, 2890, 22, 16, 4422, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 813, 18, 957, 1435, 17, 474, 12, 2890, 18, 4538, 13, 405, 365, 18, 2722, 957, 30, 365, 18, 2722, 9...
if func.GetInfo('expection') == False: test = self._remove_expected_call_re.sub('', test)
def WriteValidUnitTest(self, func, file, test, extra = {}): """Writes a valid unit test.""" if func.GetInfo('expection') == False: test = self._remove_expected_call_re.sub('', test) name = func.name arg_strings = [] count = 0 for arg in func.GetOriginalArgs(): arg_strings.append(arg.GetValidArg(count, 0)) count += 1 gl_arg_strings = [] count = 0 for arg in func.GetOriginalArgs(): gl_arg_strings.append(arg.GetValidGLArg(count, 0)) count += 1 gl_func_name = func.GetGLTestFunctionName() vars = { 'test_name': 'GLES2DecoderTest%d' % file.file_num, 'name':name, 'gl_func_name': gl_func_name, 'args': ", ".join(arg_strings), 'gl_args': ", ".join(gl_arg_strings), } vars.update(extra) file.Write(test % vars)
85c6d6739a81098c35cb35c3430f038ed4f5ddab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85c6d6739a81098c35cb35c3430f038ed4f5ddab/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1556, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 16, 1842, 16, 2870, 273, 2618, 4672, 3536, 8368, 279, 923, 2836, 1842, 12123, 508, 273, 1326, 18, 529, 1501, 67, 10219, 273, 5378, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1556, 2802, 4709, 12, 2890, 16, 1326, 16, 585, 16, 1842, 16, 2870, 273, 2618, 4672, 3536, 8368, 279, 923, 2836, 1842, 12123, 508, 273, 1326, 18, 529, 1501, 67, 10219, 273, 5378, ...
''' iterate and return a new HTMLItem '''
""" iterate and return a new HTMLItem """
def __iter__(self): ''' iterate and return a new HTMLItem ''' return self.viewableGenerator(self._value)
16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 7401, 471, 327, 279, 394, 3982, 1180, 3536, 327, 365, 18, 1945, 429, 3908, 12, 2890, 6315, 1132, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 2165, 972, 12, 2890, 4672, 3536, 7401, 471, 327, 279, 394, 3982, 1180, 3536, 327, 365, 18, 1945, 429, 3908, 12, 2890, 6315, 1132, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes"""
def perform_checkwebcollstatus(colID, ln, confirm=0, callback='yes'): """Check status of the collection tables with respect to the webcoll cache."""
def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = "" collection_web_update_time = "" res = run_sql("SHOW TABLE STATUS LIKE 'collection'") if res: if str(res[0][11])[-3:] == ".00": collection_table_update_time = str(res[0][11])[:-3] else: collection_table_update_time = str(res[0][11]) output += "Collection table last updated: %s<br>" % collection_table_update_time try: file = open("%s/collections/1/last-updated-ln=en.html" % cachedir) collection_web_update_time = str(file.readline()) output += "Collection webpage last updated: %s<br>" % collection_web_update_time file.close() except StandardError, e: pass tabletime = time.strptime(collection_table_update_time, "%Y-%m-%d %H:%M:%S") try: webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S %Z") except ValueError, e: collection_web_update_time[0:string.rfind(collection_web_update_time, " ")] webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S") if tabletime > webtime: output += """<br><b><span class="info">Warning: The collections has been modified since last time Webcoll was executed, to process the changes, Webcoll must be executed.</span></b><br>""" header = ['ID', 'Name', 'Time', 'Status', 'Progress'] actions = [] output += """<br><b>Last BibSched tasks:</b><br>""" res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'webcoll', '', '', 'Not executed yet']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime< now() ORDER by runtime") if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[len(res) - 1] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) else: actions.append(['', 'bibindex', '', '', 'Not executed yet']) output += tupletotable(header=header, tuple=actions) output += """<br><b>Next scheduled BibSched run:</b><br>""" actions = [] res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='webcoll' and runtime > now() ORDER by runtime") webcoll_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] webcoll__update_time = runtime actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) webcoll_future = "yes" else: actions.append(['', 'webcoll', '', '', 'Not scheduled']) res = run_sql("select id, proc, host, user, runtime, sleeptime, arguments, status, progress from schTASK where proc='bibindex' and runtime > now() ORDER by runtime") bibindex_future = "" if len(res) > 0: (id, proc, host, user, runtime, sleeptime, arguments, status, progress) = res[0] actions.append([id, proc, runtime, (status !="" and status or ''), (progress !="" and progress or '')]) bibindex_future = "yes" else: actions.append(['', 'bibindex', '', '', 'Not scheduled']) output += tupletotable(header=header, tuple=actions) if webcoll_future == "": output += """<br><b><span class="info">Warning: Webcoll is not scheduled for a future run by bibsched, any updates to the collection will not be processed.</span></b><br>""" if bibindex_future == "": output += """<br><b><span class="info">Warning: Bibindex is not scheduled for a future run by bibsched, any updates to the records will not be processed.</span></b><br>""" try: body = [output, extra] except NameError: body = [output] if callback: return perform_index(colID, ln, "perform_runwebcoll", addadminbox(subtitle, body)) else: return addadminbox(subtitle, body)
c77c596171df6d0086ebd1a934cf45e91f22634e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/c77c596171df6d0086ebd1a934cf45e91f22634e/websearchadminlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1893, 4875, 12910, 2327, 12, 1293, 734, 16, 7211, 16, 6932, 33, 20, 16, 1348, 2218, 9707, 11, 4672, 3536, 1564, 1267, 434, 326, 1849, 4606, 598, 8762, 358, 326, 3311, 12910, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1893, 4875, 12910, 2327, 12, 1293, 734, 16, 7211, 16, 6932, 33, 20, 16, 1348, 2218, 9707, 11, 4672, 3536, 1564, 1267, 434, 326, 1849, 4606, 598, 8762, 358, 326, 3311, 12910, ...
cmd = "%s -e" % (coverage) utils.system_output(cmd)
cmd = "%s -e" % (coverage) utils.system_output(cmd)
def main(): coverage = os.path.join(root, "contrib/coverage.py") unittest_suite = os.path.join(root, "unittest_suite.py") # remove preceeding coverage data cmd = "%s -e" % (coverage) utils.system_output(cmd) # run unittest_suite through coverage analysis cmd = "%s -x %s" % (coverage, unittest_suite) utils.system_output(cmd) # now walk through directory grabbing lits of files module_strings = [] for dirpath, dirnames, files in os.walk(root): if is_valid_directory(dirpath): for f in files: if is_valid_filename(f): temp = os.path.join(dirpath, f) module_strings.append(temp) # analyze files cmd = "%s -r -m %s" % (coverage, " ".join(module_strings)) utils.system(cmd)
704a919034059a2da38ec659c001ea77a5e336ae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/704a919034059a2da38ec659c001ea77a5e336ae/coverage_suite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 11196, 273, 1140, 18, 803, 18, 5701, 12, 3085, 16, 315, 26930, 19, 16356, 18, 2074, 7923, 2836, 3813, 67, 30676, 273, 1140, 18, 803, 18, 5701, 12, 3085, 16, 315, 4873, 381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11196, 273, 1140, 18, 803, 18, 5701, 12, 3085, 16, 315, 26930, 19, 16356, 18, 2074, 7923, 2836, 3813, 67, 30676, 273, 1140, 18, 803, 18, 5701, 12, 3085, 16, 315, 4873, 381...
sage: G = graphs.PetersenGraph()
def edge_boundary(self, vertices1, vertices2=None, labels=True): """ Returns a list of edges `(u,v,l)` with `u` in ``vertices1`` and `v` in ``vertices2``. If ``vertices2`` is ``None``, then it is set to the complement of ``vertices1``. In a digraph, the external boundary of a vertex `v` are those vertices `u` with an arc `(v, u)`. INPUT: - ``labels`` - if ``False``, each edge is a tuple `(u,v)` of vertices. EXAMPLES:: sage: K = graphs.CompleteBipartiteGraph(9,3) sage: len(K.edge_boundary( [0,1,2,3,4,5,6,7,8], [9,10,11] )) 27 sage: K.size() 27 Note that the edge boundary preserves direction:: sage: K = graphs.CompleteBipartiteGraph(9,3).to_directed() sage: len(K.edge_boundary( [0,1,2,3,4,5,6,7,8], [9,10,11] )) 27 sage: K.size() 54 :: sage: D = DiGraph({0:[1,2], 3:[0]}) sage: D.edge_boundary([0]) [(0, 1, None), (0, 2, None)] sage: D.edge_boundary([0], labels=False) [(0, 1), (0, 2)]
808b5a15ac3fb6dc169df27472da46433ab17eae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/808b5a15ac3fb6dc169df27472da46433ab17eae/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 16604, 12, 2890, 16, 6928, 21, 16, 6928, 22, 33, 7036, 16, 3249, 33, 5510, 4672, 3536, 2860, 279, 666, 434, 5231, 1375, 12, 89, 16, 90, 16, 80, 22025, 598, 1375, 89, 68, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3591, 67, 16604, 12, 2890, 16, 6928, 21, 16, 6928, 22, 33, 7036, 16, 3249, 33, 5510, 4672, 3536, 2860, 279, 666, 434, 5231, 1375, 12, 89, 16, 90, 16, 80, 22025, 598, 1375, 89, 68, ...
def get_lsubdirs(dir):
def get_lsubdirs(directory):
def get_lsubdirs(dir): if shortlist: return shortlist return get_subdirs(dir)
a56e45efe3e36af770832bdc39b7ca99be6f3d8f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3042/a56e45efe3e36af770832bdc39b7ca99be6f3d8f/import_step1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 80, 1717, 8291, 12, 5149, 4672, 309, 3025, 1098, 30, 327, 3025, 1098, 327, 336, 67, 1717, 8291, 12, 1214, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 80, 1717, 8291, 12, 5149, 4672, 309, 3025, 1098, 30, 327, 3025, 1098, 327, 336, 67, 1717, 8291, 12, 1214, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
memcpy(%(dest_name)s, str.c_str(), max_size); %(dest_name)s[max_size] = '\\0';
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" code = """%(return_type)s %(func_name)s(%(args)s) {
1f35d386075e8cecf4b328e98191a11effa0fd1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/1f35d386075e8cecf4b328e98191a11effa0fd1a/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 981, 273, 3536, 17105, 2463, 67, 723, 13, 87, 8975, 644, 67, 529, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 981, 273, 3536, 17105, 2463, 67, 723, 13, 87, 8975, 644, 67, 529, 1...
sql = "SELECT * FROM slice_instantiations"
sql = "SELECT instantiation FROM slice_instantiations"
def __init__(self, api): sql = "SELECT * FROM slice_instantiations"
79b72b20a74ab20f66f69bcfd9947ccb191736fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/79b72b20a74ab20f66f69bcfd9947ccb191736fd/SliceInstantiations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1536, 4672, 1847, 273, 315, 4803, 380, 4571, 2788, 67, 24628, 77, 1012, 6, 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, 1536, 4672, 1847, 273, 315, 4803, 380, 4571, 2788, 67, 24628, 77, 1012, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
[-1, 1], NEIGH_MODE['zero'])
[-1, 2], NEIGH_MODE['zero']) assert_array_equal(l, r) x = np.array([1, 2, 3], dtype=dt) r = [np.array([1, 2, 3, 3], dtype=dt)] l = test_neighborhood_iterator_oob(x, [1, 1], NEIGH_MODE['zero'], [-1, 2], NEIGH_MODE['mirror']) assert_array_equal(l, r) x = np.array([1, 2, 3], dtype=dt) r = [np.array([1, 2, 3, 1], dtype=dt)] l = test_neighborhood_iterator_oob(x, [1, 1], NEIGH_MODE['zero'], [-1, 2], NEIGH_MODE['circular'])
def test_simple_strict_within(self): dt = np.float64 # Stacking zero on top of mirror x = np.array([1, 2, 3], dtype=dt) r = [np.array([1, 2, 3], dtype=dt)] l = test_neighborhood_iterator_oob(x, [1, 1], NEIGH_MODE['zero'], [-1, 1], NEIGH_MODE['zero']) assert_array_equal(l, r)
1f9788da60bfee39e5b95f67d08a2b52cd842498 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/1f9788da60bfee39e5b95f67d08a2b52cd842498/test_multiarray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 67, 13948, 67, 25850, 12, 2890, 4672, 3681, 273, 1130, 18, 5659, 1105, 468, 7283, 310, 3634, 603, 1760, 434, 15593, 619, 273, 1130, 18, 1126, 3816, 21, 16, 576, 16, 890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9647, 67, 13948, 67, 25850, 12, 2890, 4672, 3681, 273, 1130, 18, 5659, 1105, 468, 7283, 310, 3634, 603, 1760, 434, 15593, 619, 273, 1130, 18, 1126, 3816, 21, 16, 576, 16, 890...
doebuild(inforoot+"/"+self.pkg+".ebuild","preinst")
a=doebuild(inforoot+"/"+self.pkg+".ebuild","preinst") if a: print "!!! pkg_preinst() script failed; exiting." sys.exit(a)
def merge(self,mergeroot,inforoot,mergestart=None,outfile=None): if mergestart==None: origdir=os.getcwd() if not os.path.exists(self.dbdir): self.create() #open contents file if it isn't already open mergestart=mergeroot print ">>> Updating mtimes..." #before merging, it's *very important* to touch all the files !!! os.system("(cd "+mergeroot+"; for x in `find`; do touch -c $x; done)") print ">>> Merging",self.cat+"/"+self.pkg,"to",root if not os.path.exists(root): print "!!! Error: ROOT setting points to a non-existent directory. Exiting." return elif not os.path.isdir(root): print "!!! Error: ROOT setting points to a non-directory. Exiting." return #get old contents info for later unmerging oldcontents=self.getcontents() doebuild(inforoot+"/"+self.pkg+".ebuild","preinst") outfile=open(self.dbdir+"/CONTENTS","w") mergestart=mergestart os.chdir(mergestart) cpref=os.path.commonprefix([mergeroot,mergestart]) relstart=mergestart[len(cpref):] myfiles=os.listdir(mergestart) for x in myfiles: relfile=relstart+"/"+x rootfile=os.path.normpath(root+relfile) #symbolic link if os.path.islink(x): myto=os.readlink(x) if os.path.exists(rootfile): if (not os.path.islink(rootfile)) and (os.path.isdir(rootfile)): print "!!!",rootfile,"->",myto else: os.unlink(rootfile) try: os.symlink(myto,rootfile) print "<<<",rootfile,"->",myto outfile.write("sym "+relfile+" -> "+myto+" "+getmtime(rootfile)+"\n") except: print "!!!",rootfile,"->",myto #directory elif os.path.isdir(x): mystat=os.stat(x) if not os.path.exists(rootfile): os.mkdir(rootfile) os.chmod(rootfile,mystat[0]) os.chown(rootfile,mystat[4],mystat[5]) print "<<<",rootfile+"/" else: print "---",rootfile+"/" outfile.write("dir "+relfile+"\n") #enter directory, recurse os.chdir(x) self.merge(mergeroot,inforoot,mergestart+"/"+x,outfile) #return to original path os.chdir(mergestart) elif os.path.isfile(x): mymd5=md5(x) if movefile(x,rootfile): zing="<<<" else: zing="!!!" print zing+" "+rootfile print "md5",mymd5 outfile.write("obj "+relfile+" "+mymd5+" "+getmtime(rootfile)+"\n") elif isfifo(x): zing="!!!" if not os.path.exists(rootfile): if movefile(x,rootfile): zing="<<<" elif isfifo(rootfile): os.unlink(rootfile) if movefile(x,rootfile): zing="<<<" print zing+" "+rootfile outfile.write("fif "+relfile+"\n") else: if movefile(x,rootfile): zing="<<<" else: zing="!!!" print zing+" "+rootfile outfile.write("dev "+relfile+"\n")
5d26ba23f00cd6e9ae56fdb0fe5b5c8a7145e78d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/5d26ba23f00cd6e9ae56fdb0fe5b5c8a7145e78d/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 6592, 693, 1632, 16, 267, 1884, 1632, 16, 6592, 17592, 485, 33, 7036, 16, 26050, 33, 7036, 4672, 225, 309, 4045, 17592, 485, 631, 7036, 30, 1647, 1214, 33, 538, 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, 2691, 12, 2890, 16, 6592, 693, 1632, 16, 267, 1884, 1632, 16, 6592, 17592, 485, 33, 7036, 16, 26050, 33, 7036, 4672, 225, 309, 4045, 17592, 485, 631, 7036, 30, 1647, 1214, 33, 538, 18,...
- Oscar Lazo, William Cauchois (2009-2010): Adding coordinate transformations
- Oscar Lazo, William Cauchois, Jason Grout (2009-2010): Adding coordinate transformations
sage: def f(x,y): return math.exp(x/5)*math.cos(y)
ae9bf5e0d28a56cbf9d189e5545c9a8340d806de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ae9bf5e0d28a56cbf9d189e5545c9a8340d806de/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 284, 12, 92, 16, 93, 4672, 327, 4233, 18, 2749, 12, 92, 19, 25, 17653, 15949, 18, 14445, 12, 93, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 272, 410, 30, 1652, 284, 12, 92, 16, 93, 4672, 327, 4233, 18, 2749, 12, 92, 19, 25, 17653, 15949, 18, 14445, 12, 93, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for i in range(100):
for i in range(50):
def sendNumbers(socket,natcon): num = 0 for i in range(100): socket.send(str(num)) new_num = int(socket.recv(1024)) if new_num != num+1: print "Recieved incorrect response from server expected: "+str(num+1)+" actual: "+str(new_num) num = new_num # if this loop was exited we got all response back, the test passed stop_test()
ca66f3cff46d947da38eb0d80800fb3da6163e29 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/ca66f3cff46d947da38eb0d80800fb3da6163e29/test_forwarder_3_2clients_1server_buffering.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 10072, 12, 7814, 16, 18757, 591, 4672, 818, 273, 374, 364, 277, 316, 1048, 12, 3361, 4672, 2987, 18, 4661, 12, 701, 12, 2107, 3719, 394, 67, 2107, 273, 509, 12, 7814, 18, 18334, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 10072, 12, 7814, 16, 18757, 591, 4672, 818, 273, 374, 364, 277, 316, 1048, 12, 3361, 4672, 2987, 18, 4661, 12, 701, 12, 2107, 3719, 394, 67, 2107, 273, 509, 12, 7814, 18, 18334, ...
FORMAT_VERSION = 0x00070700
FORMAT_VERSION = 0x00070800
def purgeValue(self, txn, counter, uItem, uValue):
2e11df80e3b64cac64d8e5cfc157fe5e57c26d54 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/2e11df80e3b64cac64d8e5cfc157fe5e57c26d54/DBContainer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 620, 12, 2890, 16, 7827, 16, 3895, 16, 582, 1180, 16, 582, 620, 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, ...
[ 1, 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, 11668, 620, 12, 2890, 16, 7827, 16, 3895, 16, 582, 1180, 16, 582, 620, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.header = re.compile('^\s*\d+\w?\s*:\xa0\s*')
self.header = re.compile('^.*?:\xa0')
def __init__(self, config=None, ns='madcow', dir=None): self.enabled = True self.pattern = re.compile('^\s*define\s+(\w+)(?:\s+(\d+))?$') self.requireAddressing = True self.thread = True self.wrap = True self.help = 'define <word/phrase> [#] - get a definition from merriam-webster'
9ca224f3f3366e514f89b4614e75585e563320b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10942/9ca224f3f3366e514f89b4614e75585e563320b2/dictionary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 33, 7036, 16, 3153, 2218, 81, 361, 71, 543, 2187, 1577, 33, 7036, 4672, 365, 18, 5745, 273, 1053, 365, 18, 4951, 273, 283, 18, 11100, 2668, 17134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 642, 33, 7036, 16, 3153, 2218, 81, 361, 71, 543, 2187, 1577, 33, 7036, 4672, 365, 18, 5745, 273, 1053, 365, 18, 4951, 273, 283, 18, 11100, 2668, 17134, ...
if vc_type not in ('svn', 'git'):
if vc_type not in ('svn', 'git', 'hg'):
def parse_editable(editable_req): """Parses svn+http://blahblah@rev#egg=Foobar into a requirement (Foobar) and a URL""" url = editable_req if os.path.isdir(url) and os.path.exists(os.path.join(url, 'setup.py')): # Treating it as code that has already been checked out url = filename_to_url(url) if url.lower().startswith('file:'): return None, url if url.lower().startswith('svn:'): url = 'svn+' + url if url.lower().startswith('git:'): url = 'git+' + url if '+' not in url: if default_vcs: url = default_vcs + '+' + url else: raise InstallationError( '--editable=%s should be formatted with svn+URL or git+URL' % editable_req) vc_type = url.split('+', 1)[0].lower() if vc_type not in ('svn', 'git'): raise InstallationError( 'For --editable=%s only svn (svn+URL) and Git (git+URL) is currently supported' % editable_req) match = re.search(r'(?:#|#.*?&)egg=([^&]*)', editable_req) if (not match or not match.group(1)) and vc_type in ('svn', 'git'): parts = [p for p in editable_req.split('#', 1)[0].split('/') if p] if parts[-2] in ('tags', 'branches', 'tag', 'branch'): req = parts[-3] elif parts[-1] == 'trunk': req = parts[-2] else: raise InstallationError( '--editable=%s is not the right format; it must have #egg=Package' % editable_req) else: req = match.group(1) ## FIXME: use package_to_requirement? match = re.search(r'^(.*?)(?:-dev|-\d.*)', req) if match: # Strip off -dev, -0.2, etc. req = match.group(1) return req, url
07705cd47355a1a10042b18aab154e5eeeafcbcd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12982/07705cd47355a1a10042b18aab154e5eeeafcbcd/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 19653, 12, 19653, 67, 3658, 4672, 3536, 6656, 5893, 82, 15, 2505, 2207, 3083, 9795, 3083, 9795, 36, 9083, 7, 23171, 33, 42, 83, 947, 297, 1368, 279, 12405, 261, 42, 83, 947, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19653, 12, 19653, 67, 3658, 4672, 3536, 6656, 5893, 82, 15, 2505, 2207, 3083, 9795, 3083, 9795, 36, 9083, 7, 23171, 33, 42, 83, 947, 297, 1368, 279, 12405, 261, 42, 83, 947, ...
for e in xdata.getchildren(): if e.tag not in self.__containers__: self.StoreRecord(('Global','all'), e)
for entry in xdata.getchildren(): if entry.tag not in self.__containers__: self.StoreRecord(('Global','all'), entry)
def Index(self): try: xdata = XML(self.data) except: syslog(LOG_ERR, "Failed to parse %s"%(self.name)) return self.store = {} for e in xdata.getchildren(): if e.tag not in self.__containers__: self.StoreRecord(('Global','all'), e) else: m = (e.tag, e.attrib['name']) for entry in e.getchildren(): self.StoreRecord(m, entry) # now to build the __provides__ table self.__provides__ = {} for key in self.store.keys(): self.__provides__[key] = {} for j in self.store[key].keys(): self.__provides__[key][j] = self.FetchRecord # also need to sort all leaf node lists self.store[key][j].sort(self.Sort)
031ad9ffba438e5c9a32a212c15bc9cc88ee0a25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/031ad9ffba438e5c9a32a212c15bc9cc88ee0a25/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3340, 12, 2890, 4672, 775, 30, 25363, 273, 3167, 12, 2890, 18, 892, 13, 1335, 30, 16718, 12, 4842, 67, 9712, 16, 315, 2925, 358, 1109, 738, 87, 6, 17105, 2890, 18, 529, 3719, 327, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3340, 12, 2890, 4672, 775, 30, 25363, 273, 3167, 12, 2890, 18, 892, 13, 1335, 30, 16718, 12, 4842, 67, 9712, 16, 315, 2925, 358, 1109, 738, 87, 6, 17105, 2890, 18, 529, 3719, 327, 36...
% (codim0.offset, len(entry.cells), \ codim1.offset, len(entry.faces)), 1)
% (codim0.offset, len(mc33_case.cells), \ codim1.offset, len(mc33_case.faces)), 1)
def create_mc33_tables(self, offsets, codim0, codim1, mc33_offsets, mc33_tests): offsets.append(" /* MC 33 cases follow */\n", 0) for entry in self.lg.all_cases: base_case_number = self.lg.base_case_numbers[entry.base_case.case] if self.lg.mc33_tests[base_case_number] != []: mc33_offsets.append(" /* %s / %i */ " \ % (entry.case, mc33_offsets.offset), 0) mc33_offsets.append("%i,\n" \ % (mc33_tests.offset), 1) # Generate tests table mc33_tests.append("\n /* %i / %s */" \ % (mc33_tests.offset, entry.case), 0) i = 0 for test in self.lg.mc33_tests[base_case_number]: i = i + 1 if math.log(i)/math.log(2.0) == round(math.log(i)/math.log(2.0)): mc33_tests.append("\n ", 0) # regular (non mc 33) case or test center if test == CASE_IS_REGULAR or test == TEST_CENTER: mc33_tests.append(face_tests[test] + ", ", 1) # all other negative tests are face tests elif test < 0: testnumber = test # permute faces for cube 3D if self.lg.basicType == "cube" and self.lg.dim == 3: # Regain face numbers, face 0 is stored as -6 testnumber = (-1 * testnumber) % 6; testnumber = -1 * get_cube3d_face(self, testnumber, entry.permutation) # store face 0 again as -6 if testnumber == 0: testnumber = -6 mc33_tests.append(face_tests[testnumber] + ", ", 1) # case number otherwise else: mc33_tests.append(str(offsets.offset + test) + ", ", 1) # Case tables for mc 33 cases for mc33_case in self.lg.mc33_cases[base_case_number]: offsets.append(" /* %d test index:%d */ " \ % (base_case_number, i) +"{%i, %i, %i, %i, 0},\n" \ % (codim0.offset, len(entry.cells), \ codim1.offset, len(entry.faces)), 1) create_codim_line(codim0, entry, mc33_case.permute_cells(entry.permutation)) create_codim_line(codim1, entry, mc33_case.permute_faces(entry.permutation)) else: mc33_offsets.append(" /* %s / %i */ " \ % (entry.case, mc33_offsets.offset), 0) mc33_offsets.append("255,\n", 1) mc33_tests.append("\n", 0)
4108afba51e58dc846bdb490043ba576aeb8bd22 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1786/4108afba51e58dc846bdb490043ba576aeb8bd22/dunecode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 13952, 3707, 67, 9373, 12, 2890, 16, 8738, 16, 11012, 381, 20, 16, 11012, 381, 21, 16, 6108, 3707, 67, 16542, 16, 6108, 3707, 67, 16341, 4672, 8738, 18, 6923, 2932, 1377, 1748...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13952, 3707, 67, 9373, 12, 2890, 16, 8738, 16, 11012, 381, 20, 16, 11012, 381, 21, 16, 6108, 3707, 67, 16542, 16, 6108, 3707, 67, 16341, 4672, 8738, 18, 6923, 2932, 1377, 1748...
if val.lower() == 'true' or val.lower() == 'false': return bool(val)
if val.lower() == 'true': return True elif val.lower() == 'false': return False
def parseOption(self, node): hasElements = False sameElements = True ptag = None
a865f576f0571eee0f94adf997b46b60825481fe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6671/a865f576f0571eee0f94adf997b46b60825481fe/ScOptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1895, 12, 2890, 16, 756, 4672, 711, 3471, 273, 1083, 1967, 3471, 273, 1053, 293, 2692, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 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, 1109, 1895, 12, 2890, 16, 756, 4672, 711, 3471, 273, 1083, 1967, 3471, 273, 1053, 293, 2692, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
print "Node data:", args
def node_data( self, path, args, types ): self.dnosc.data_for_node( args[0], args[1:] ) print "Node data:", args
1cac18f12b1b91166cc9cec5d8fe119bffa40e08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10633/1cac18f12b1b91166cc9cec5d8fe119bffa40e08/pydon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 756, 67, 892, 12, 365, 16, 589, 16, 833, 16, 1953, 262, 30, 365, 18, 5176, 538, 71, 18, 892, 67, 1884, 67, 2159, 12, 833, 63, 20, 6487, 833, 63, 21, 26894, 262, 1172, 315, 907, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 756, 67, 892, 12, 365, 16, 589, 16, 833, 16, 1953, 262, 30, 365, 18, 5176, 538, 71, 18, 892, 67, 1884, 67, 2159, 12, 833, 63, 20, 6487, 833, 63, 21, 26894, 262, 1172, 315, 907, 5...
if format == 'MSEED':
if format in ('MSEED', 'GSE2'):
def test_readAndWriteAllInstalledWaveformPlugins(self): """ Tests read and write methods for all installed waveform plug-ins. """ data = np.arange(0, 2000) start = UTCDateTime(2009, 1, 13, 12, 1, 2, 999000) formats = _getPlugins('obspy.plugin.waveform', 'writeFormat') for format in formats: for native_byteorder in ['<', '>']: for byteorder in ['<', '>', '=']: # new trace object in native byte order dt = np.dtype("int").newbyteorder(native_byteorder) if format == 'MSEED': # MiniSEED cannot write int64, enforce type dt = "int32" tr = Trace(data=data.astype(dt)) tr.stats.network = "BW" tr.stats.station = "MANZ1" tr.stats.location = "00" tr.stats.channel = "EHE" tr.stats.calib = 0.199999 tr.stats.delta = 0.005 tr.stats.starttime = start # create waveform file with given format and byte order outfile = NamedTemporaryFile().name tr.write(outfile, format=format, byteorder=byteorder) if format == 'Q': outfile += '.QHD' # read in again using auto detection st = read(outfile) self.assertEquals(len(st), 1) self.assertEquals(st[0].stats._format, format) # read in using format argument st = read(outfile, format=format) self.assertEquals(len(st), 1) self.assertEquals(st[0].stats._format, format) # check byte order self.assertEquals(st[0].data.dtype.byteorder, '=') # check meta data # MSEED and WAV do not contain the calibration factor if format not in ['MSEED', 'WAV']: self.assertAlmostEquals(st[0].stats.calib, 0.199999, 5) else: self.assertEquals(st[0].stats.calib, 1.0) if format not in ['WAV']: self.assertEquals(st[0].stats.starttime, start) self.assertEquals(st[0].stats.endtime, start + 9.995) self.assertAlmostEquals(st[0].stats.delta, 0.005, 7) self.assertAlmostEquals(st[0].stats.sampling_rate, 200.0, 5) # network/station/location/channel codes if format in ['Q', 'SH_ASC', 'GSE2']: # no network or location code in Q, SH_ASC, GSE2 self.assertEquals(st[0].id, ".MANZ1..EHE") elif format not in ['WAV']: self.assertEquals(st[0].id, "BW.MANZ1.00.EHE") # remove temporary files # XXX: temporary SAC file is locked on Windows ?!? try: os.remove(outfile) except: pass if format == 'Q': os.remove(outfile[:-4] + '.QBN') os.remove(outfile[:-4])
906cd640bd68763f1c9d6739013e37f90ac8bb6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/906cd640bd68763f1c9d6739013e37f90ac8bb6c/test_waveform_plugins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 1876, 3067, 1595, 16747, 22368, 687, 9461, 12, 2890, 4672, 3536, 7766, 87, 855, 471, 1045, 2590, 364, 777, 5876, 31511, 15852, 17, 2679, 18, 3536, 501, 273, 1130, 18, 297,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 1876, 3067, 1595, 16747, 22368, 687, 9461, 12, 2890, 4672, 3536, 7766, 87, 855, 471, 1045, 2590, 364, 777, 5876, 31511, 15852, 17, 2679, 18, 3536, 501, 273, 1130, 18, 297,...
* Automatic shader generation is enabled by default for the main camera. You can override this by setting shaders on individual nodes, or on the root of your scene graph, but if you do, your own shaders need to generate the outputs that the filter manager is expecting.
* Automatic shader generation NOT enabled. If you have a filter that depends on a render target from the auto-shader, you either need to set an auto-shader attrib on the main camera or scene, or, you need to provide these outputs in your own shader.
def renderSceneInto(self, depthtex=None, colortex=None, auxtex=None, auxbits=0, textures=None):
213976bd9719ddd8459f519577c86be34bb69490 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/213976bd9719ddd8459f519577c86be34bb69490/FilterManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 14370, 5952, 12, 2890, 16, 443, 337, 647, 338, 33, 7036, 16, 645, 20873, 33, 7036, 16, 9397, 21763, 33, 7036, 16, 9397, 6789, 33, 20, 16, 977, 1823, 33, 7036, 4672, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 14370, 5952, 12, 2890, 16, 443, 337, 647, 338, 33, 7036, 16, 645, 20873, 33, 7036, 16, 9397, 21763, 33, 7036, 16, 9397, 6789, 33, 20, 16, 977, 1823, 33, 7036, 4672, 2, -100, -1...
self.write(cr, uid, ids, {'state':'invoice_except', 'invoice_ids':False})
self.write(cr, uid, ids, {'state': 'invoice_except', 'invoice_ids': False})
def action_invoice_cancel(self, cr, uid, ids, context={}): for sale in self.browse(cr, uid, ids): for line in sale.order_line: invoiced=False for iline in line.invoice_lines: if iline.invoice_id and iline.invoice_id.state == 'cancel': continue else: invoiced=True self.pool.get('sale.order.line').write(cr, uid, [line.id], {'invoiced': invoiced}) self.write(cr, uid, ids, {'state':'invoice_except', 'invoice_ids':False}) return True
fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 16119, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 272, 5349, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 364, 980, 316, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 16119, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 272, 5349, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 364, 980, 316, 272, ...
for host in delhosts:
for host in toremove:
def _form_delallowed (hosts): if hasattr(hosts, "value"): # single host delhosts = [hosts.value.strip()] else: # multiple delhosts = [ host.value.strip() for host in hosts ] hosts = ip.map2hosts(config['allowedhosts']) removed = 0 for host in delhosts: if host in hosts: hosts.remove(host) removed += 1 if removed > 0: config['allowedhosts'] = ip.hosts2map(hosts) config['allowedhostlist'] = sort_seq(hosts) if removed == 1: info.append(i18n._("Allowed host successfully removed")) else: info.append(i18n._("%d allowed hosts successfully removed") % \ removed)
98aca97370c8fe2057b4b424343b612a4590773e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/98aca97370c8fe2057b4b424343b612a4590773e/config_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 687, 67, 3771, 8151, 261, 11588, 4672, 309, 3859, 12, 11588, 16, 315, 1132, 6, 4672, 468, 2202, 1479, 1464, 11588, 273, 306, 11588, 18, 1132, 18, 6406, 1435, 65, 469, 30, 468, 322...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 687, 67, 3771, 8151, 261, 11588, 4672, 309, 3859, 12, 11588, 16, 315, 1132, 6, 4672, 468, 2202, 1479, 1464, 11588, 273, 306, 11588, 18, 1132, 18, 6406, 1435, 65, 469, 30, 468, 322...
clusterDaemonClient.replace('\n', '')
clusterDaemonClient = clusterDaemonClient.replace('\n', '')
def __init__(self, configList, clusterSyncFlag): # First start up servers using direct daemon # What is the name of the client machine? clusterDaemonClient = os.popen('uname -n').read() clusterDaemonClient.replace('\n', '') # What daemon port are we using to communicate between client/servers clusterDaemonPort = base.config.GetInt( 'cluster-daemon-port', CLUSTER_DAEMON_PORT) # Create a daemon self.daemon = DirectD() # Start listening for the response self.daemon.listenTo(clusterDaemonPort) # Contact server daemons and start up remote server application for serverConfig in configList: serverCommand = (SERVER_STARTUP_STRING % (serverConfig.serverPort, clusterSyncFlag, clusterDaemonClient, clusterDaemonPort)) self.daemon.clientReady(serverConfig.serverName, clusterDaemonPort, serverCommand) if not self.daemon.waitForServers(len(configList)): print 'Cluster Client, no response from servers' self.qcm=QueuedConnectionManager() self.serverList = [] self.msgHandler = ClusterMsgHandler(ClusterClient.MGR_NUM, self.notify) for serverConfig in configList: server = DisplayConnection(self.qcm,serverConfig.serverName, serverConfig.serverPort,self.msgHandler) if server == None: self.notify.error('Could not open %s on %s port %d' % (serverConfig.serverConfigName, serverConfig.serverName, serverConfig.serverPort)) else: server.sendCamOffset(serverConfig.xyz,serverConfig.hpr) if serverConfig.fFrustum: server.sendCamFrustum(serverConfig.focalLength, serverConfig.filmSize, serverConfig.filmOffset) self.serverList.append(server) self.startMoveCamTask() self.startMoveSelectedTask()
0dfd7bf7f7977345e234d89aafa3d8ce867d6436 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/0dfd7bf7f7977345e234d89aafa3d8ce867d6436/ClusterClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 642, 682, 16, 2855, 4047, 4678, 4672, 468, 5783, 787, 731, 7084, 1450, 2657, 8131, 468, 18734, 353, 326, 508, 434, 326, 1004, 5228, 35, 2855, 12858, 1227, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 642, 682, 16, 2855, 4047, 4678, 4672, 468, 5783, 787, 731, 7084, 1450, 2657, 8131, 468, 18734, 353, 326, 508, 434, 326, 1004, 5228, 35, 2855, 12858, 1227, ...
pManager.manager.DebugStr('cProxyHandler '+ __version__ +': Skipping Click (Status: '+str(self.ClickStatus)+')', 4)
pManager.manager.DebugStr('cProxyHandler '+ __version__ +': Skipping Click (Status: '+str(self.ClickStatus)+')', 5)
def IsExplicit(self): """True if we handle an explicit click
f7a1f909a389beb813d25e051137326969180659 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/f7a1f909a389beb813d25e051137326969180659/cProxyHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 17186, 12, 2890, 4672, 3536, 5510, 309, 732, 1640, 392, 5515, 4682, 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, 2585, 17186, 12, 2890, 4672, 3536, 5510, 309, 732, 1640, 392, 5515, 4682, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = 'Failure.' self.update(status='Failure.')
self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Failure.') self.update(status=DV.l('Failure.'))
def run(self): self.uris = self.getURI(self.sourceuri) self.abort = False if not self.abort: if True: Damnlog('Conversion routine starting, URI is', self.uris[0]) self.uri = self.uris[0] self.update(0) self.parent.thisvideo.append(self.parent.videos[self.parent.converting]) self.filename = unicodedata.normalize('NFKD', DamnUnicode(REGEX_FILE_CLEANUP_FILENAME.sub('', self.parent.meta[self.parent.videos[self.parent.converting]]['name']))).encode('utf8', 'ignore').replace('/', '').replace('\\', '').strip() # Heck of a line! self.profile = int(self.parent.meta[self.parent.videos[self.parent.converting]]['profile']) if os.path.exists(self.uri): Damnlog('We\'re dealing with a file stream here.') self.stream = self.uri # Despite setting this, ffmpeg will still be fed the file via stdin rather than letting it read the file itself # Fixes some accents-in-pathnames problems if self.outdir is None: self.outdir = DV.prefs.get('defaultoutdir') else: Damnlog('We\'re dealing with a network stream here.') self.stream = '-' # It's another stream, spawn a downloader thread to take care of it and pipe the content to ffmpeg via stdin if self.outdir is None: self.outdir = DV.prefs.get('defaultweboutdir') if self.outdir[-1:] == DV.sep: self.outdir = self.outdir[0:-1] if not os.path.exists(self.outdir): os.makedirs(self.outdir) elif not os.path.isdir(self.outdir): os.remove(self.outdir) os.makedirs(self.outdir) self.outdir = self.outdir + DV.sep Damnlog('Profile is', self.profile, '; Output directory is', self.outdir) if self.profile == -1: # Do not encode, just copy Damnlog('We\'re in raw copy mode') if True: failed = False if self.stream == '-': # Spawn a downloader src = DamnURLPicker(self.uris) total = int(src.info()['Content-Length']) Damnlog('Total bytes:', total) ext = 'avi' try: if src.info()['Content-Type'].lower().find('audio') != -1: ext = 'mp3' except: ext = 'avi' try: tmpuri = src.info()['Content-Disposition'][src.info()['Content-Disposition'].find('filename=') + 9:] except: tmpuri = 'Video.' + ext # And pray for the best! Damnlog('Temp URI is', tmpuri) else: # Just copy the file, lol total = int(os.lstat(self.stream).st_size) src = DamnOpenFile(self.stream, 'rb') tmpuri = self.stream Damnlog('Total is', total, '; Temp URI is', tmpuri) if REGEX_URI_EXTENSION_EXTRACT.search(tmpuri): ext = '.' + REGEX_URI_EXTENSION_EXTRACT.sub('\\1', tmpuri) else: ext = '.avi' # And pray for the best again! self.filename = self.getfinalfilename(self.outdir, self.filename, ext) Damnlog('Filename is', self.filename, '; opening local stream.') dst = DamnOpenFile(self.outdir + self.filename + ext, 'wb') Damnlog(self.outdir + self.filename + ext, 'opened.') keepgoing = True copied = 0.0 lasttime = 0.0 self.update(statustext=DV.l('Copying ') + DamnUnicode(self.parent.meta[self.parent.videos[self.parent.converting]]['name']) + DV.l('...')) Damnlog('Starting raw download of stream', src) while keepgoing and not self.abort: i = src.read(4096) if len(i): dst.write(i) copied += 4096.0 else: copied = float(total) keepgoing = False progress = min((100.0, copied / total * 100.0)) nowtime = float(time.time()) if lasttime + .5 < nowtime or not keepgoing: # Do not send a progress update more than 2 times per second, otherwise the event queue can get overloaded. On some platforms, time() is an int, but that doesn't matter; the progress will be updated once a second instead of 2 times, which is still acceptable. self.update(progress, status=self.parent.meta[self.parent.videos[self.parent.converting]]['status'] + ' [' + str(int(progress)) + '%]') lasttime = nowtime Damnlog('Done downloading!') else: Damnlog('Raw download failed. Aborted?', self.abort) failed = True self.grabberrun = False if self.abort or failed: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = 'Failure.' self.update(status='Failure.') else: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = 'Success!' self.update(status='Success!') self.parent.resultlist.append((self.filename + ext, self.outdir, self.parent.meta[self.parent.videos[self.parent.converting]]['icon'])) self.update(go=self.abort) return Damnlog('We\'re in on-the-fly conversion mode.') os_exe_ext = '' if DV.os == 'nt': os_exe_ext = '.exe' elif DV.os == 'mac': os_exe_ext = 'osx' if DV.bit64: os_exe_ext = '64' + os_exe_ext self.passes = 1 cmd = [DV.bin_path + 'ffmpeg' + os_exe_ext, '-i', '?DAMNVID_VIDEO_STREAM?', '-y', '-passlogfile', DV.tmp_path + 'pass'] for i in DV.preferences.keys(): if i[0:25] == 'damnvid-profile:encoding_': i = i[16:] pref = DV.prefs.getp(self.profile, i) if pref: if type(DV.preferences['damnvid-profile:' + i]['kind']) in (type(''), type(u'')): if DV.preferences['damnvid-profile:' + i]['kind'][0] == '%': pref = str(round(float(pref), 0)) # Round if i == 'encoding_pass': pref = '?DAMNVID_VIDEO_PASS?' if i[9:] == 'b' and pref == 'sameq': cmd.append('-sameq') else: cmd.extend(['-' + i[9:], pref]) self.encodevideo = DamnUnicode(DV.prefs.getp(self.profile, 'video')) == u'True' self.encodeaudio = DamnUnicode(DV.prefs.getp(self.profile, 'audio')) == u'True' if self.encodevideo: Damnlog('Encoding video.') else: Damnlog('Not encoding video.') cmd.append('-vn') if self.encodeaudio: Damnlog('Encoding audio.') else: Damnlog('Not encoding audio.') cmd.append('-an') vidformat = DV.prefs.getp(self.profile, 'Encoding_f') self.vcodec = DV.prefs.getp(self.profile, 'Encoding_vcodec') self.acodec = DV.prefs.getp(self.profile, 'Encoding_acodec') self.totalpasses = DV.prefs.getp(self.profile, 'Encoding_pass') if not self.totalpasses: self.totalpasses = 1 else: self.totalpasses = int(self.totalpasses) if vidformat and DV.file_ext.has_key(vidformat): ext = '.' + DV.file_ext[vidformat] else: if self.vcodec and self.encodevideo and DV.file_ext_by_codec.has_key(self.vcodec): ext = '.' + DV.file_ext_by_codec[self.vcodec] elif self.encodeaudio and not self.encodevideo: if DV.file_ext_by_codec.has_key(self.acodec): ext = '.' + DV.file_ext_by_codec[self.acodec] else: ext = '.mp3' else: ext = '.avi' flags = [] if self.vcodec and DV.codec_advanced_cl.has_key(self.vcodec): for o in DV.codec_advanced_cl[self.vcodec]: if type(o) in (type(''), type(u'')): if o not in flags: # If the flag is already there, don't add it again flags.append(o) else: if '-' + o[0] not in cmd: # If the option is already there, don't overwrite it cmd.extend(['-' + o[0], o[1]]) if len(flags): cmd.extend(['-flags', ''.join(flags)]) self.filename = DamnUnicode(self.getfinalfilename(self.outdir, self.filename, ext)) self.filenamenoext = self.filename self.tmpfilename = DamnUnicode(self.gettmpfilename(DV.tmp_path, self.filenamenoext, ext)) cmd.append('?DAMNVID_OUTPUT_FILE?') if len(self.moduleextraargs): cmd.extend(self.moduleextraargs) Damnlog('ffmpeg call has been generated:', cmd) self.filename = self.filenamenoext + ext self.duration = None self.update(statustext=DV.l('Converting ') + DamnUnicode(self.parent.meta[self.parent.videos[self.parent.converting]]['name']) + DV.l('...')) while int(self.passes) <= int(self.totalpasses) and not self.abort: Damnlog('Starting pass', self.passes, 'out of', self.totalpasses) if self.totalpasses != 1: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Pass ') + str(self.passes) + '/' + str(self.totalpasses) + DV.l('...') self.update(status=DV.l('Pass ') + str(self.passes) + '/' + str(self.totalpasses) + DV.l('...')) if self.stream == '-': if self.passes == 1: self.tmppassfile = DV.tmp_path + self.gettmpfilename(DV.tmp_path, self.filenamenoext, ext) else: self.stream = self.tmppassfile if self.passes != 1: self.tmpfilename = self.gettmpfilename(DV.tmp_path, self.filenamenoext, ext) self.process = DamnSpawner(self.cmd2str(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, cwd=os.path.dirname(DV.tmp_path)) if self.stream == '-': if self.totalpasses != 1: self.feeder = DamnDownloader(self.uris, self.process.stdin, self.tmppassfile) else: self.feeder = DamnDownloader(self.uris, self.process.stdin) self.feeder.start() else: self.feeder = DamnStreamCopy(self.stream, self.process.stdin) self.feeder.start() curline = '' Damnlog('Starting ffmpeg polling.') while self.process.poll() == None and not self.abort: c = self.process.stderr.read(1) curline += c if c == '\r' or c == '\n': self.parseLine(curline) curline = '' Damnlog('Stopping ffmpeg polling. Abort?', self.abort) try: commun = self.process.communicate() curline += commun Damnlog('Grabbed additional ffmpeg stuff:', commun) except: Damnlog('Couldn\'t grab additional ffmpeg stuff.') if curline: self.parseLine(curline) self.passes += 1 Damnlog('And we\'re done converting!') self.update(100) result = self.process.poll() # The process is complete, but .poll() still returns the process's return code time.sleep(.25) # Wait a bit self.grabberrun = False # That'll make the DamnConverterGrabber wake up just in case if result and os.path.exists(DV.tmp_path + self.tmpfilename): os.remove(DV.tmp_path + self.tmpfilename) # Delete the output file if ffmpeg has exitted with a bad return code Damnlog('All the routine completed successfully.') else: result = 1 Damnlog('Error in main conversion routine.') Damnlog('Cleaning up after conversion.') for i in os.listdir(os.path.dirname(DV.tmp_path)): if i == self.tmpfilename and not result and not self.abort: try: os.rename(DV.tmp_path + i, self.outdir + self.filename) except: # Maybe the file still isn't unlocked, it happens... Wait moar and retry try: time.sleep(2) os.rename(DV.tmp_path + i, self.outdir + self.filename) except: # Now this is really bad, alert the user try: # Manual copy, might be needed if we're working on two different filesystems on a non-Windows platform src = DamnOpenFile(DV.tmp_path + i, 'rb') dst = DamnOpenFile(self.outdir + self.filename, 'wb') for fileline in src.readlines(): dst.write(fileline) try: # Another try block in order to avoid raising the huge except block with the dialog src.close() dst.close() os.remove(DV.tmp_path + i) except: pass except: self.update(dialog=(DV.l('Cannot move file!'), DV.l('locale:successfully-converted-file-but-ioerror') + '\n' + DV.tmp_path + i, wx.OK | wx.ICON_EXCLAMATION)) else: try: os.remove(DV.tmp_path + i) except: pass Damnlog('End cleanup, returning. Result?', result, '; Abort?', self.abort) if not result and not self.abort: self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Success!') self.parent.resultlist.append((self.filename, self.outdir, self.parent.meta[self.parent.videos[self.parent.converting]]['icon'])) self.update(status=DV.l('Success!'), go=self.abort) return self.parent.meta[self.parent.videos[self.parent.converting]]['status'] = DV.l('Failure.') self.update(status=DV.l('Failure.'), go=self.abort)
8ae8d8657ce96e7f9c5e2a08dc82bbe3d5e8d3ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/8ae8d8657ce96e7f9c5e2a08dc82bbe3d5e8d3ed/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 23510, 273, 365, 18, 588, 3098, 12, 2890, 18, 3168, 1650, 13, 365, 18, 18623, 273, 1083, 309, 486, 365, 18, 18623, 30, 309, 1053, 30, 463, 301, 82, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 365, 18, 23510, 273, 365, 18, 588, 3098, 12, 2890, 18, 3168, 1650, 13, 365, 18, 18623, 273, 1083, 309, 486, 365, 18, 18623, 30, 309, 1053, 30, 463, 301, 82, 133...
from zlib import crc32
from zlib import crc32 as zlib_crc32
def commit(sync=False, atomic=False): tmp_sync, dst_path = False, path # localize vars try: tmp.flush() # to ensure that next read gets all data except ValueError: if not atomic: cp_cat(tmp_path, dst_path, sync=sync) # tmp was closed already tmp_sync = True # to indicate that we're done with it if atomic: tmp.close() st = cp_stat(dst_path, tmp_path, attrz=True, deference=True) if stat.S_ISLNK(st): dst_path = os.path.readlink(path) mv(tmp_path, dst_path) # atomic for same fs, a bit dirty otherwise elif not tmp_sync: # file is still opened tmp.seek(0) with open(dst_path, 'w') as src: cat(tmp, src) if sync: src.flush() tmp.close() rm(tmp_path, onerror=False)
60a498c1ab332b31bfc0a6e0cdbc7f6100485ea0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11594/60a498c1ab332b31bfc0a6e0cdbc7f6100485ea0/sh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 8389, 33, 8381, 16, 7960, 33, 8381, 4672, 1853, 67, 8389, 16, 3046, 67, 803, 273, 1083, 16, 589, 468, 26407, 4153, 775, 30, 1853, 18, 11330, 1435, 468, 358, 3387, 716, 1024, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 8389, 33, 8381, 16, 7960, 33, 8381, 4672, 1853, 67, 8389, 16, 3046, 67, 803, 273, 1083, 16, 589, 468, 26407, 4153, 775, 30, 1853, 18, 11330, 1435, 468, 358, 3387, 716, 1024, ...
f1 = f2 = f3 = f4 = f5 = 1
f1 = f2 = f3 = f4 = f5 = h = 1
def beam2g(ex,ey,ep,N,eq=None): """ Compute the element stiffness matrix for a two dimensional beam element with respect to geometric nonlinearity. Parameters: ex = [x1, x2] ey = [y1, y2] element node coordinates ep = [E,A,I] element properties; E: Young's modulus A: cross section area I: moment of inertia N axial force in the beam eq distributed transverse load Returns: Ke element stiffness matrix (6 x 6) fe element load vector (6 x 1) """ if eq != None: if size(eq) > 1: print "eq should be a scalar !!!" return else: eq = 0 b = mat([ [ex[1]-ex[0]], [ey[1]-ey[0]] ]) L = asscalar(sqrt(b.T*b)) n = asarray(b/L).reshape(2,) E,A,I = ep rho = -N*L**2/(pi**2*E*I) eps = 2.2204e-16 kL = pi*sqrt(abs(rho))+eps if rho > 0: f1 = (kL/2)/tan(kL/2) f2 = (1/12)*kL**2/(1-f1) f3 = f1/4+3*f2/4 f4 = -f1/2+3*f2/2 f5 = f1*f2 h = 6*(2/kL**2-(1+cos(kL))/(kL*sin(kL))) elif rho < 0: f1 = (kL/2)/tanh(kL/2) f2 = -(1/12)*kL**2/(1-f1) f3 = f1/4+3*f2/4 f4 = -f1/2+3*f2/2 f5 = f1*f2 h = -6*(2/kL**2-(1+cosh(kL))/(kL*sinh(kL))) else: f1 = f2 = f3 = f4 = f5 = 1 Kle = mat([ [ E*A/L, 0, 0, -E*A/L, 0, 0 ], [ 0, 12*E*I*f5/L**3, 6*E*I*f2/L**2, 0, -12*E*I*f5/L**3, 6*E*I*f2/L**2], [ 0, 6*E*I*f2/L**2, 4*E*I*f3/L, 0, -6*E*I*f2/L**2, 2*E*I*f4/L ], [-E*A/L, 0, 0, E*A/L, 0, 0 ], [ 0, -12*E*I*f5/L**3,-6*E*I*f2/L**2, 0, 12*E*I,f5/L**3,-6*E*I*f2/L**2], [ 0, 6*E*I*f2/L**2, 2*E*I*f4/L, 0, -6*E*I*f2/L**2, 4*E*I*f3/L ] ]) fle = eq*L*mat([0,1/2,L*h/12,0,1/2,-L*h/12]).T G = mat([ [ n[0], n[1], 0, 0, 0, 0], [-n[1], n[0], 0, 0, 0, 0], [ 0, 0, 1, 0, 0, 0], [ 0, 0, 0, n[0], n[1], 0], [ 0, 0, 0,-n[1], n[0], 0], [ 0, 0, 0, 0, 0, 1] ]) Ke = G.T*Kle*G fe = G.T*fle if eq != None: return Ke,fe else: return Ke
cfe7bf300b6aacb3bf5e60147e09727b9113eed7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1235/cfe7bf300b6aacb3bf5e60147e09727b9113eed7/pycalfem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16751, 22, 75, 12, 338, 16, 402, 16, 881, 16, 50, 16, 11253, 33, 7036, 4672, 3536, 8155, 326, 930, 384, 3048, 4496, 3148, 364, 279, 2795, 17469, 16751, 930, 598, 8762, 358, 7364, 1591,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16751, 22, 75, 12, 338, 16, 402, 16, 881, 16, 50, 16, 11253, 33, 7036, 4672, 3536, 8155, 326, 930, 384, 3048, 4496, 3148, 364, 279, 2795, 17469, 16751, 930, 598, 8762, 358, 7364, 1591,...
while currentFileInfo :
while currentFileInfo :
def __init__(self, fileInfo, fileInfoList) : self._fileInfoList = fileInfoList currentFileInfo = fileInfo self._fileInfoListSorted = [] while currentFileInfo : if not(self._fileInfoList._minSize) or currentFileInfo.totalSize() >= self._fileInfoList._minSize : self._fileInfoListSorted.append(currentFileInfo) currentFileInfo = currentFileInfo.next() self._sort() self._index = -1
7d24eb563acbdf95537060f92a52d5efea584294 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2277/7d24eb563acbdf95537060f92a52d5efea584294/FileInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 12538, 16, 12538, 682, 13, 294, 365, 6315, 768, 17914, 273, 12538, 682, 783, 11995, 273, 12538, 365, 6315, 768, 17914, 11739, 273, 5378, 1323, 783, 11995, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12538, 16, 12538, 682, 13, 294, 365, 6315, 768, 17914, 273, 12538, 682, 783, 11995, 273, 12538, 365, 6315, 768, 17914, 11739, 273, 5378, 1323, 783, 11995, ...
testoattuale = talk_page.get() lang = site.lang
testoattuale = talk_page.get()
def put_talk(self, notification, head, notification2 = None, commx = None): commento2 = wikipedia.translate(self.site, comm2) talk_page = self.talk_page notification = self.notification if notification2 == None: notification2 = notification else: notification2 = notification2 % self.image head = self.head second_text = False # Getting the talk page's history, to check if there is another advise... # The try block is used to prevent error if you use an old wikipedia.py's version. edit_to_load = 10 if talk_page.exists(): try: history = talk_page.getVersionHistory(False, False, False, edit_to_load) except TypeError: history = talk_page.getVersionHistory(False, False, False) latest_edit = history[0] latest_user = latest_edit[2] wikipedia.output(u'The latest user that has written something is: %s' % latest_user) else: wikipedia.output(u'The user page is blank')
c5288ef59b106b566e2f4173570416f7837a336c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/c5288ef59b106b566e2f4173570416f7837a336c/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 88, 2960, 12, 2890, 16, 3851, 16, 910, 16, 3851, 22, 273, 599, 16, 1543, 92, 273, 599, 4672, 2879, 83, 22, 273, 21137, 18, 13929, 12, 2890, 18, 4256, 16, 1543, 22, 13, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 88, 2960, 12, 2890, 16, 3851, 16, 910, 16, 3851, 22, 273, 599, 16, 1543, 92, 273, 599, 4672, 2879, 83, 22, 273, 21137, 18, 13929, 12, 2890, 18, 4256, 16, 1543, 22, 13, 26...
self.add_argument('-p', '--pages', dest='pages', action='store', default=None, help='pages to convert')
self.add_argument('-p', '--pages', dest='pages', action='store', default=None, help='pages to process')
def __init__(self): usage = '%(prog)s [options] FILE' version = '%(prog) ' + __version__ argparse.ArgumentParser.__init__(self, usage=usage, version=version) saver_group = self.add_argument_group(title='arguments controlling output') for saver_type in self.savers: options = saver_type.options try: init_args, _, _, _ = inspect.getargspec(saver_type.__init__) n_args = len(init_args) - 1 except TypeError: n_args = 0 metavar = None if n_args == 1: metavar = 'FILE' saver_group.add_argument( *options, **dict( metavar=metavar, action=self.set_output, saver_type=saver_type, nargs=n_args, help=saver_type.__doc__ ) ) self.add_argument('--engine', dest='engine', nargs=1, action=self.set_engine, default=self.default_engine, help=argparse.SUPPRESS or 'set OCR engine') self.add_argument('--list-engines', action=self.list_engines, nargs=0, help=argparse.SUPPRESS or 'print list of available OCR engines') self.add_argument('--ocr-only', dest='ocr_only', action='store_true', default=False, help='''don't save pages without OCR''') self.add_argument('--clear-text', dest='clear_text', action='store_true', default=False, help='remove existing hidden text') self.add_argument('--language', dest='language', help='set recognition language') self.add_argument('--list-languages', action=self.list_languages, nargs=0, help='print list of available languages') self.add_argument('-p', '--pages', dest='pages', action='store', default=None, help='pages to convert') self.add_argument('-D', '--debug', dest='debug', action='store_true', default=False, help='''don't delete intermediate files''') self.add_argument('path', metavar='FILE', help='DjVu file to process') group = self.add_argument_group(title='text segmentation options') group.add_argument('-t', '--details', dest='details', choices=('lines', 'words', 'chars'), action='store', default='words', help='amount of text details to extract') group.add_argument('--word-segmentation', dest='word_segmentation', choices=('simple', 'uax29'), default='space', help='word segmentation algorithm')
addc9d0b619d50952c1c385c1993628de6bd8b81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3685/addc9d0b619d50952c1c385c1993628de6bd8b81/_ocrodjvu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 4084, 273, 21063, 14654, 13, 87, 306, 2116, 65, 7527, 11, 1177, 273, 21063, 14654, 13, 296, 397, 1001, 1589, 972, 12436, 18, 1379, 2678, 16186, 2738, 972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 4084, 273, 21063, 14654, 13, 87, 306, 2116, 65, 7527, 11, 1177, 273, 21063, 14654, 13, 296, 397, 1001, 1589, 972, 12436, 18, 1379, 2678, 16186, 2738, 972...
"object": "object()"
"object": "object()",
def hasItemStartingWith(p_seq, p_start): for item in p_seq: if isinstance(item, STR_TYPES) and item.startswith(p_start): return True return False
f30d9d36024702597d77a49a54ce0e27a74969d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12157/f30d9d36024702597d77a49a54ce0e27a74969d8/generator3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 1180, 11715, 1190, 12, 84, 67, 5436, 16, 293, 67, 1937, 4672, 364, 761, 316, 293, 67, 5436, 30, 309, 1549, 12, 1726, 16, 7128, 67, 10564, 13, 471, 761, 18, 17514, 1918, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 1180, 11715, 1190, 12, 84, 67, 5436, 16, 293, 67, 1937, 4672, 364, 761, 316, 293, 67, 5436, 30, 309, 1549, 12, 1726, 16, 7128, 67, 10564, 13, 471, 761, 18, 17514, 1918, 12, 84, ...
from nt import _getfinalpathname except (NotImplementedError, ImportError):
if sys.getwindowsversion()[:2] >= (6, 0): from nt import _getfinalpathname else: raise ImportError except (AttributeError, ImportError):
def relpath(path, start=curdir): """Return a relative version of a path""" sep = _get_sep(path) if start is curdir: start = _get_dot(path) if not path: raise ValueError("no path specified") start_abs = abspath(normpath(start)) path_abs = abspath(normpath(path)) start_drive, start_rest = splitdrive(start_abs) path_drive, path_rest = splitdrive(path_abs) if start_drive != path_drive: error = "path is on mount '{0}', start on mount '{1}'".format( path_drive, start_drive) raise ValueError(error) start_list = [x for x in start_rest.split(sep) if x] path_list = [x for x in path_rest.split(sep) if x] # Work out how much of the filepath is shared by start and path. i = 0 for e1, e2 in zip(start_list, path_list): if e1 != e2: break i += 1 if isinstance(path, bytes): pardir = b'..' else: pardir = '..' rel_list = [pardir] * (len(start_list)-i) + path_list[i:] if not rel_list: return _get_dot(path) return join(*rel_list)
f54e50abd0c0dc603877856708c7ca74e0ff8a11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f54e50abd0c0dc603877856708c7ca74e0ff8a11/ntpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14614, 12, 803, 16, 787, 33, 1397, 1214, 4672, 3536, 990, 279, 3632, 1177, 434, 279, 589, 8395, 5478, 273, 389, 588, 67, 10814, 12, 803, 13, 225, 309, 787, 353, 662, 1214, 30, 787, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14614, 12, 803, 16, 787, 33, 1397, 1214, 4672, 3536, 990, 279, 3632, 1177, 434, 279, 589, 8395, 5478, 273, 389, 588, 67, 10814, 12, 803, 13, 225, 309, 787, 353, 662, 1214, 30, 787, 2...
self.lshwinfo["system"] = "%s %s" % (temp_final2, tempa1)
else: temp_final2 = "" tempa1 = "" if not temp_final2: self.lshwinfo["core"] = self.unknown else: self.lshwinfo["core"] = "%s %s" % (temp_final2, tempa1)
def lshw(self): """ Runs lshw and sets self.lshwxml variable if not already set """ if not self.lshwinfo: if not self.lshwxml: self.lshwxml = self.runcommand(["sudo", "lshw", "-xml"]) # Fix bug: https://bugs.launchpad.net/bugs/512251 lines = self.lshwxml.split("\n") for l in lines: if re.search(r'id="lastmountpoint"', l): lines.remove(l) self.lshwxml = '\n'.join(lines) doc = xml.dom.minidom.parseString(self.lshwxml) nodes = doc.getElementsByTagName("node") found_motherboard = False # Use alternative motherboard recognition data for n in nodes: if n.hasAttribute("class") and n.getAttribute("class") == "system": #<product>MS-7235</product><vendor>MICRO-STAR INTERNATIONAL CO.,LTD</vendor> #product: G31M-S2L - vendor: Gigabyte Technology Co., Ltd. tempa1 = n.getElementsByTagName("product")[0].childNodes[0].nodeValue tempa2 = n.getElementsByTagName("vendor")[0].childNodes[0].nodeValue if re.match(r'MICRO-STAR INTERNATIONAL', tempa2, re.IGNORECASE): temp_final2 = "MSI" elif re.match(r'Gigabyte Technology Co\., Ltd\.', tempa2, re.IGNORECASE): temp_final2 = "Gigabyte" else: temp_final2 = tempa2 if temp_final2 != "To Be Filled By O.E.M.": found_motherboard = True self.lshwinfo["system"] = "%s %s" % (temp_final2, tempa1) #print("MOO: %s %s" % (tempa1, tempa2)) if n.hasAttribute("id"): if n.getAttribute("id") == "core": #if not found_motherboard: #<product>MS-7235</product><vendor>MICRO-STAR INTERNATIONAL CO.,LTD</vendor> #product: G31M-S2L - vendor: Gigabyte Technology Co., Ltd. tempa1 = n.getElementsByTagName("product")[0].childNodes[0].nodeValue tempa2 = n.getElementsByTagName("vendor")[0].childNodes[0].nodeValue if re.match(r'MICRO-STAR INTERNATIONAL', tempa2, re.IGNORECASE): temp_final2 = "MSI" elif re.match(r'Gigabyte Technology', tempa2, re.IGNORECASE): temp_final2 = "Gigabyte" else: temp_final2 = tempa2 if temp_final2 != "To Be Filled By O.E.M.": found_motherboard = True self.lshwinfo["core"] = "%s %s" % (temp_final2, tempa1) #print("MOO: %s %s" % (tempa1, tempa2)) elif n.getAttribute("id") == "cpu": tempa = n.getElementsByTagName("product")[0].childNodes[0].nodeValue if tempa[0:5] == "Intel": # Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz tempb = re.sub(r'\((?:R|TM)\)|CPU|@', ' ', tempa) temp_final = re.sub('\s{2,}', ' ' , tempb) elif tempa[0:3] == "AMD": # AMD Sempron(tm) Processor LE-1250, AMD Phenom(tm) II X2 550 Processor tempb = re.sub(r'(?i)\((?:r|tm)\)|Processor', ' ', tempa) temp_final = re.sub(r'\s{2,}', ' ' , tempb) else: temp_final = tempa self.lshwinfo["cpu"] = temp_final elif n.getAttribute("id") == "display": tempa1 = n.getElementsByTagName("product")[0].childNodes[0].nodeValue # G73 [GeForce 7300 GT], Radeon R350 [Radeon 9800 Pro] tempa2 = n.getElementsByTagName("vendor")[0].childNodes[0].nodeValue # nVidia Corporation, ATI Technologies Inc if tempa2[0:6] == "nVidia": temp_final2 = re.sub(r'(?i)\sCorporation', '', tempa2) elif tempa2[0:3] == "ATI": temp_final2 = re.sub(r'(?i)\sTechnologies\sInc', '', tempa2) else: temp_final2 = tempa2 self.lshwinfo["display"] = "%s %s" % (temp_final2, tempa1) elif n.getAttribute("id") == "memory": tempa = n.getElementsByTagName("size")[0].childNodes[0].nodeValue temp_final = int(tempa) / 1024**2 # Size in bytes, divide by 1024**2, result in MiB self.lshwinfo["memory"] = temp_final
20fb39d86c935c862264737a61758ade376031d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13895/20fb39d86c935c862264737a61758ade376031d3/ubuntu-gr_forum_signature.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 674, 91, 12, 2890, 4672, 3536, 1939, 87, 328, 674, 91, 471, 1678, 365, 18, 80, 674, 91, 2902, 2190, 309, 486, 1818, 444, 3536, 309, 486, 365, 18, 80, 674, 91, 1376, 30, 309, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 674, 91, 12, 2890, 4672, 3536, 1939, 87, 328, 674, 91, 471, 1678, 365, 18, 80, 674, 91, 2902, 2190, 309, 486, 1818, 444, 3536, 309, 486, 365, 18, 80, 674, 91, 1376, 30, 309, 4...
result = self.get_etag(cr) return str(result) class node_calendar(nodes.node_class): our_type = 'collection'
result = self.get_etag(cr) return str(result) class node_calendar(nodes.node_class): our_type = 'collection'
def _get_dav_getctag(self, cr): result = self.get_etag(cr) return str(result)
fe0ee384c7b5a64c12f8725027352df173701456 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fe0ee384c7b5a64c12f8725027352df173701456/caldav_node.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 20752, 67, 588, 299, 346, 12, 2890, 16, 4422, 4672, 563, 273, 365, 18, 588, 67, 20788, 12, 3353, 13, 327, 609, 12, 2088, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 20752, 67, 588, 299, 346, 12, 2890, 16, 4422, 4672, 563, 273, 365, 18, 588, 67, 20788, 12, 3353, 13, 327, 609, 12, 2088, 13, 225, 2, -100, -100, -100, -100, -100, -100,...
def fl_set_pixmap_data(ob, bits): """ fl_set_pixmap_data(ob, bits) """ _fl_set_pixmap_data(ob, bits) _fl_set_pixmap_file = cfuncproto(so_libforms, "fl_set_pixmap_file", None, [cty.POINTER(FL_OBJECT), STRING],
def fl_set_pixmap_data(pObject, bits): """ fl_set_pixmap_data(pObject, bits) """ _fl_set_pixmap_data(pObject, bits) _fl_set_pixmap_file = cfuncproto(so_libforms, "fl_set_pixmap_file", None, [cty.POINTER(FL_OBJECT), STRING],
def fl_set_pixmap_data(ob, bits): """ fl_set_pixmap_data(ob, bits) """ _fl_set_pixmap_data(ob, bits)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 14861, 1458, 67, 892, 12, 947, 16, 4125, 4672, 3536, 1183, 67, 542, 67, 14861, 1458, 67, 892, 12, 947, 16, 4125, 13, 3536, 225, 389, 2242, 67, 542, 67, 14861, 1458...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 14861, 1458, 67, 892, 12, 947, 16, 4125, 4672, 3536, 1183, 67, 542, 67, 14861, 1458, 67, 892, 12, 947, 16, 4125, 13, 3536, 225, 389, 2242, 67, 542, 67, 14861, 1458...
install_requires=['zc.table >= 0.5', 'zc.catalog >= 0.1',
install_requires=['zc.resourcelibrary >= 0.5.1', 'zc.table >= 0.5', 'zc.catalog >= 0.1',
def get_version(): version_file = os.path.join('src', 'schooltool', 'version.txt') f = open(version_file, 'r') result = f.read() f.close() return result
c43e77c4a5e5d140e8a47222a3d4be8ca5c00d23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/c43e77c4a5e5d140e8a47222a3d4be8ca5c00d23/setup.eggs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 13332, 1177, 67, 768, 273, 1140, 18, 803, 18, 5701, 2668, 4816, 2187, 296, 28204, 1371, 6738, 2187, 296, 1589, 18, 5830, 6134, 284, 273, 1696, 12, 1589, 67, 768, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 13332, 1177, 67, 768, 273, 1140, 18, 803, 18, 5701, 2668, 4816, 2187, 296, 28204, 1371, 6738, 2187, 296, 1589, 18, 5830, 6134, 284, 273, 1696, 12, 1589, 67, 768, 16, 296...
conflicts = conflicts or w
def twm(self, diff, base, skip = None):
a67de324b6550ed8a3b892f25e8458e04b9f4282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a67de324b6550ed8a3b892f25e8458e04b9f4282/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2339, 81, 12, 2890, 16, 3122, 16, 1026, 16, 2488, 273, 599, 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, ...
[ 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, 2339, 81, 12, 2890, 16, 3122, 16, 1026, 16, 2488, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.list[slotidx] = (appname, 2, slot)
self.list[slotidx] = (appname, ConfigDummy(), 2, slot)
def updateState(self, slot): state = eDVBCI_UI.getInstance().getState(slot) self.state[slot] = state
eb2804ab0205fd9204cd745feb840fdb4bc56216 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/eb2804ab0205fd9204cd745feb840fdb4bc56216/Ci.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1119, 12, 2890, 16, 4694, 4672, 919, 273, 425, 30199, 38, 7266, 67, 5370, 18, 588, 1442, 7675, 588, 1119, 12, 14194, 13, 365, 18, 2019, 63, 14194, 65, 273, 919, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1119, 12, 2890, 16, 4694, 4672, 919, 273, 425, 30199, 38, 7266, 67, 5370, 18, 588, 1442, 7675, 588, 1119, 12, 14194, 13, 365, 18, 2019, 63, 14194, 65, 273, 919, 2, -100, -100, ...
else:
if not new_parent_category:
def fix_categories_starting_from(self, node, until):
bb7ae4b648dd353866c5a7ca343d4b4f69ef15d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8383/bb7ae4b648dd353866c5a7ca343d4b4f69ef15d4/fix_rc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 8995, 67, 18526, 67, 2080, 12, 2890, 16, 756, 16, 3180, 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, 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, 2917, 67, 8995, 67, 18526, 67, 2080, 12, 2890, 16, 756, 16, 3180, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
ds = drv.Create("tmp/tiff_write_60.tif", 10, 10, nbands, gdal_type, options = [ 'NBITS=%d' % nbits ])
ds = drv.Create("tmp/tiff_write_59.tif", 10, 10, nbands, gdal_type, options = [ 'NBITS=%d' % nbits ])
def tiff_write_59(): import struct ret = 'success' for nbands in (1,2): for nbits in (1,8,9,12,16,17,24,32): drv = gdal.GetDriverByName( 'GTiff' ) if nbits <= 8: gdal_type = gdal.GDT_Byte ctype = 'B' elif nbits <= 16: gdal_type = gdal.GDT_UInt16 ctype = 'h' else: gdal_type = gdal.GDT_UInt32 ctype = 'i' ds = drv.Create("tmp/tiff_write_60.tif", 10, 10, nbands, gdal_type, options = [ 'NBITS=%d' % nbits ]) ds.GetRasterBand(1).Fill(1) ds = None ds = gdal.Open("tmp/tiff_write_60.tif", gdal.GA_Update); data = struct.pack(ctype * 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) ds.GetRasterBand(1).WriteRaster(0, 0, 10, 1, data) ds = None ds = gdal.Open("tmp/tiff_write_60.tif"); data = ds.GetRasterBand(1).ReadRaster(0, 0, 10, 1) # We expect zeros got = struct.unpack(ctype * 10, data) for i in range(len(got)): if got[i] != 0: print 'nbands=%d, NBITS=%d' % (nbands, nbits) print got ret = 'fail' break ds = None drv.Delete( 'tmp/tiff_write_60.tif' ) return ret
a3f2bdca13ae2cffe7524731c0725ebfcffe3781 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10289/a3f2bdca13ae2cffe7524731c0725ebfcffe3781/tiff_write.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 3048, 67, 2626, 67, 6162, 13332, 1930, 1958, 225, 325, 273, 296, 4768, 11, 225, 364, 4264, 5708, 316, 261, 21, 16, 22, 4672, 364, 4264, 1282, 316, 261, 21, 16, 28, 16, 29, 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, 268, 3048, 67, 2626, 67, 6162, 13332, 1930, 1958, 225, 325, 273, 296, 4768, 11, 225, 364, 4264, 5708, 316, 261, 21, 16, 22, 4672, 364, 4264, 1282, 316, 261, 21, 16, 28, 16, 29, 16, ...
print self.__query_string__ print str(self.__param_tuple__)
""" __repr__ gets called when you type self and hit enter. It should return a string representing the object. Here, the current query string along with the parameter tuples are printed. """ s = "Query for sql database: " s += self.__database__ + "\n" s += "Query string: " s += self.__query_string__ + "\n" s += "Parameter tuple: " s += str(self.__param_tuple__) + "\n" return s
def __repr__(self): # stupid problem with this crap print self.__query_string__ print str(self.__param_tuple__)
6c8e0967fa0693f9c3d406ff1aabb899bb873597 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6c8e0967fa0693f9c3d406ff1aabb899bb873597/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 468, 384, 416, 350, 6199, 598, 333, 276, 1266, 8395, 1001, 12715, 972, 5571, 2566, 1347, 1846, 618, 365, 471, 6800, 6103, 18, 2597, 1410, 327, 279, 533,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 468, 384, 416, 350, 6199, 598, 333, 276, 1266, 8395, 1001, 12715, 972, 5571, 2566, 1347, 1846, 618, 365, 471, 6800, 6103, 18, 2597, 1410, 327, 279, 533,...
sage: HK.coleman_integral(w*x^3,S,P) 2*5^2 + 4*5^3 + 5^6 + 2*5^7 + O(5^8) sage: negP = HK(0,-3) sage: HK.coleman_integral(w, P,negP, algorithm='teichmuller') 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) sage: HK.coleman_integral(w, P, negP) 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) AUTHORS:
sage: HK.coleman_integral(w*x^3,S,P) 2*5^2 + 4*5^3 + 5^6 + 2*5^7 + O(5^8) sage: negP = HK(0,-3) sage: HK.coleman_integral(w, P,negP, algorithm='teichmuller') 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) sage: HK.coleman_integral(w, P, negP) 2*5^2 + 3*5^3 + 2*5^6 + 4*5^8 + O(5^9) AUTHORS:
def coleman_integral(self, w, P, Q, algorithm = 'None'): """ INPUT: - w differential (if one of P,Q is Weierstrass, w must be odd) - P point on self - Q point on self - algorithm (optional) = None (uses Frobenius) or teichmuller (uses Teichmuller points)
aeeebfda8d78e5e3ab59577b4a6c5022a19143dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/aeeebfda8d78e5e3ab59577b4a6c5022a19143dd/hyperelliptic_padic_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 790, 4728, 67, 14970, 23811, 12, 2890, 16, 341, 16, 453, 16, 2238, 16, 4886, 273, 296, 7036, 11, 4672, 3536, 12943, 30, 300, 341, 15221, 2001, 261, 430, 1245, 434, 453, 16, 53, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 790, 4728, 67, 14970, 23811, 12, 2890, 16, 341, 16, 453, 16, 2238, 16, 4886, 273, 296, 7036, 11, 4672, 3536, 12943, 30, 300, 341, 15221, 2001, 261, 430, 1245, 434, 453, 16, 53, ...
bio = BIO.openfile(filepath, 'wb')
bio = BIO.openfile(filename, 'wb')
def save_key(self, filename, cipher='aes_128_cbc', callback=util.passphrase_callback): """ Save the DSA key pair to a file. @type filename: str @param filename: Save the DSA key pair to this file. @type cipher: str @param cipher: name of symmetric key algorithm and mode to encrypt the private key. @return: 1 (true) if successful """ bio = BIO.openfile(filepath, 'wb') ret = self.save_key_bio(bio, cipher, callback) bio.close() return ret
e4ec01921fcc2d6a2fce49db5dd86c1b64a07ead /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/e4ec01921fcc2d6a2fce49db5dd86c1b64a07ead/DSA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 856, 12, 2890, 16, 1544, 16, 5867, 2218, 22335, 67, 10392, 67, 28409, 2187, 1348, 33, 1367, 18, 5466, 9429, 67, 3394, 4672, 3536, 7074, 326, 463, 5233, 498, 3082, 358, 279, 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, 1923, 67, 856, 12, 2890, 16, 1544, 16, 5867, 2218, 22335, 67, 10392, 67, 28409, 2187, 1348, 33, 1367, 18, 5466, 9429, 67, 3394, 4672, 3536, 7074, 326, 463, 5233, 498, 3082, 358, 279, 5...
f = file(fullname, "rU")
f = open(fullname, "rU")
def addpackage(sitedir, name, known_paths): """Add a new path to known_paths by combining sitedir and 'name' or execute sitedir if it starts with 'import'""" if known_paths is None: _init_pathinfo() reset = 1 else: reset = 0 fullname = os.path.join(sitedir, name) try: f = file(fullname, "rU") except IOError: return try: for line in f: if line.startswith("#"): continue if line.startswith("import"): exec line continue line = line.rstrip() dir, dircase = makepath(sitedir, line) if not dircase in known_paths and os.path.exists(dir): sys.path.append(dir) known_paths.add(dircase) finally: f.close() if reset: known_paths = None return known_paths
4d0bddfee66383e746a79d60cd64e40fc1ab1df7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4d0bddfee66383e746a79d60cd64e40fc1ab1df7/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5610, 12, 87, 16261, 481, 16, 508, 16, 4846, 67, 4481, 4672, 3536, 986, 279, 394, 589, 358, 4846, 67, 4481, 635, 29189, 10982, 23210, 471, 296, 529, 11, 578, 1836, 10982, 23210, 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, 527, 5610, 12, 87, 16261, 481, 16, 508, 16, 4846, 67, 4481, 4672, 3536, 986, 279, 394, 589, 358, 4846, 67, 4481, 635, 29189, 10982, 23210, 471, 296, 529, 11, 578, 1836, 10982, 23210, 3...
if container is not None and container == module_doc.canonical_name:
if ((container is not None and container == module_doc.canonical_name) or (public_names is not None and child_name in public_names)):
def introspect_module(module, module_doc, module_name=None, preliminary=False): """ Add API documentation information about the module C{module} to C{module_doc}. """ module_doc.specialize_to(ModuleDoc) # Record the module's docformat if hasattr(module, '__docformat__'): module_doc.docformat = unicode(module.__docformat__) # Record the module's filename if hasattr(module, '__file__'): try: module_doc.filename = unicode(module.__file__) except KeyboardInterrupt: raise except: pass if module_doc.filename is not UNKNOWN: try: module_doc.filename = py_src_filename(module_doc.filename) except ValueError: pass # If this is just a preliminary introspection, then don't do # anything else. (Typically this is true if this module was # imported, but is not included in the set of modules we're # documenting.) if preliminary: return # Record the module's docstring if hasattr(module, '__doc__'): module_doc.docstring = get_docstring(module) # If the module has a __path__, then it's (probably) a # package; so set is_package=True and record its __path__. if hasattr(module, '__path__'): module_doc.is_package = True try: module_doc.path = [unicode(p) for p in module.__path__] except KeyboardInterrupt: raise except: pass else: module_doc.is_package = False # Make sure we have a name for the package. dotted_name = module_doc.canonical_name if dotted_name is UNKNOWN: dotted_name = DottedName(module.__name__) # Record the module's parent package, if it has one. if len(dotted_name) > 1: package_name = str(dotted_name.container()) package = sys.modules.get(package_name) if package is not None: module_doc.package = introspect_docs(package) else: module_doc.package = None # Initialize the submodules property module_doc.submodules = [] # Add the module to its parent package's submodules list. if module_doc.package not in (None, UNKNOWN): module_doc.package.submodules.append(module_doc) # Record the module's variables. module_doc.variables = {} for child_name in dir(module): if child_name in UNDOCUMENTED_MODULE_VARS: continue child = getattr(module, child_name) # Create a VariableDoc for the child, and introspect its # value if it's defined in this module. container = get_containing_module(child) if container is not None and container == module_doc.canonical_name: # Local variable. child_val_doc = introspect_docs(child, context=module_doc, module_name=dotted_name) child_var_doc = VariableDoc(name=child_name, value=child_val_doc, is_imported=False, container=module_doc, docs_extracted_by='introspecter') elif container is None or module_doc.canonical_name is UNKNOWN: # Don't introspect stuff "from __future__" if is_future_feature(child): continue # Possibly imported variable. child_val_doc = introspect_docs(child, context=module_doc) child_var_doc = VariableDoc(name=child_name, value=child_val_doc, container=module_doc, docs_extracted_by='introspecter') else: # Imported variable. child_val_doc = _get_valuedoc(child) child_var_doc = VariableDoc(name=child_name, value=child_val_doc, is_imported=True, container=module_doc, docs_extracted_by='introspecter') module_doc.variables[child_name] = child_var_doc # Record the module's __all__ attribute (public names). if hasattr(module, '__all__'): try: public_names = set([str(name) for name in module.__all__]) for name, var_doc in module_doc.variables.items(): if name in public_names: var_doc.is_public = True if not isinstance(var_doc, ModuleDoc): var_doc.is_imported = False else: var_doc.is_public = False except KeyboardInterrupt: raise except: pass return module_doc
d280def57e42f4d9659c49ecad82dd67326d9ec8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11420/d280def57e42f4d9659c49ecad82dd67326d9ec8/docintrospecter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30165, 67, 2978, 12, 2978, 16, 1605, 67, 2434, 16, 1605, 67, 529, 33, 7036, 16, 675, 7091, 2101, 33, 8381, 4672, 3536, 1436, 1491, 7323, 1779, 2973, 326, 1605, 385, 95, 2978, 97, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30165, 67, 2978, 12, 2978, 16, 1605, 67, 2434, 16, 1605, 67, 529, 33, 7036, 16, 675, 7091, 2101, 33, 8381, 4672, 3536, 1436, 1491, 7323, 1779, 2973, 326, 1605, 385, 95, 2978, 97, 358, ...
pass
"""*shrug*""" if 'text/plain' in drag_context.targets: return srcwidget = drag_context.get_source_widget() if(isinstance(srcwidget, gtk.EventBox) and srcwidget == self.titlebar) or widget == srcwidget: return alloc = widget.allocation rect = gtk.gdk.Rectangle(0, 0, alloc.width, alloc.height) if self.config['use_theme_colors']: color = self.vte.get_style().text[gtk.STATE_NORMAL] else: color = gtk.gdk.color_parse(self.config['foreground_color']) pos = self.get_location(widget, x, y) topleft = (0,0) topright = (alloc.width,0) topmiddle = (alloc.width/2,0) bottomleft = (0, alloc.height) bottomright = (alloc.width,alloc.height) bottommiddle = (alloc.width/2, alloc.height) middle = (alloc.width/2, alloc.height/2) middleleft = (0, alloc.height/2) middleright = (alloc.width, alloc.height/2) coord = () if pos == "right": coord = (topright, topmiddle, bottommiddle, bottomright) elif pos == "top": coord = (topleft, topright, middleright , middleleft) elif pos == "left": coord = (topleft, topmiddle, bottommiddle, bottomleft) elif pos == "bottom": coord = (bottomleft, bottomright, middleright , middleleft) widget._expose_data = { 'color': color, 'coord' : coord } connec = widget.connect_after('expose-event', self.on_expose_event) widget.window.invalidate_rect(rect, True) widget.window.process_updates(True) widget.disconnect(connec) widget._expose_data = None def on_expose_event(self, widget, event): """Handle an expose event while dragging""" if not widget._expose_data: return(False) color = widget._expose_data['color'] coord = widget._expose_data['coord'] context = widget.window.cairo_create() context.set_source_rgba(color.red, color.green, color.blue, 0.5) if len(coord) > 0 : context.move_to(coord[len(coord)-1][0],coord[len(coord)-1][1]) for i in coord: context.line_to(i[0],i[1]) context.fill() return(False)
def on_drag_motion(self, widget, drag_context, x, y, time, data): # FIXME: Implement this pass
c647948a7fe81768afb7a383769e16ee7aac44bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6502/c647948a7fe81768afb7a383769e16ee7aac44bc/terminal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 81, 8240, 12, 2890, 16, 3604, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 813, 16, 501, 4672, 468, 9852, 30, 10886, 333, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 81, 8240, 12, 2890, 16, 3604, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 813, 16, 501, 4672, 468, 9852, 30, 10886, 333, 1342, 2, -100, -100, -100, -100, -100, -100...
is_line.__doc__ = Vrepresentation.is_line.__doc__
def is_line(self): """ Tests if the object is a line. By construction it must be.
84c90f627aa2eefd601a2ae3a4ad63f4e91ac1cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/84c90f627aa2eefd601a2ae3a4ad63f4e91ac1cc/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1369, 12, 2890, 4672, 3536, 7766, 87, 309, 326, 733, 353, 279, 980, 18, 225, 2525, 16171, 518, 1297, 506, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1369, 12, 2890, 4672, 3536, 7766, 87, 309, 326, 733, 353, 279, 980, 18, 225, 2525, 16171, 518, 1297, 506, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if view_statusbar == False: self.statusbar.hide()
if show_downloads == False: self.downloads_window.hide() if show_downloads == False and show_playlist == False: self.side_panel.hide()
def __init__(self, ampache_conn, audio_engine, db_session): """Constructor for the AmpacheGUI Class. Takes an AmpacheSession Object, an AudioEngine Object and a DatabaseSession Object.""" ################################# # Set Variables ################################# self.audio_engine = audio_engine self.ampache_conn = ampache_conn self.db_session = db_session
6da71b6c033549432907af16818123b3b63d0d8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11350/6da71b6c033549432907af16818123b3b63d0d8a/AmpacheGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 16946, 807, 67, 4646, 16, 7447, 67, 8944, 16, 1319, 67, 3184, 4672, 3536, 6293, 364, 326, 432, 1291, 807, 43, 5370, 1659, 18, 23004, 392, 432, 1291, 807,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16946, 807, 67, 4646, 16, 7447, 67, 8944, 16, 1319, 67, 3184, 4672, 3536, 6293, 364, 326, 432, 1291, 807, 43, 5370, 1659, 18, 23004, 392, 432, 1291, 807,...
req_type_priority) add_relation((prvpkg, CONFIG), config,
def add_relation(pred, succ, priority=MEDIUM): relations.append((pred, succ, priority))
f6e133a4d2de92c458ce692291251f51da37ec02 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8317/f6e133a4d2de92c458ce692291251f51da37ec02/pm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 5488, 12, 6510, 16, 21043, 16, 4394, 33, 15971, 2799, 4672, 7467, 18, 6923, 12443, 6510, 16, 21043, 16, 4394, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 5488, 12, 6510, 16, 21043, 16, 4394, 33, 15971, 2799, 4672, 7467, 18, 6923, 12443, 6510, 16, 21043, 16, 4394, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print " -s, --status " + _("Display current song info")
print " -i, --info " + _("Display current song info") print " -s, --status " + _("Display MPD status")
def print_usage(self): self.print_version() print "" print _("Usage: sonata [OPTION]") print "" print _("Options") + ":" print " -h, --help " + _("Show this help and exit") print " -v, --version " + _("Show version information and exit") print " -s, --status " + _("Display current song info") print " -t, --toggle " + _("Toggles whether the app is minimized") print " " + _("to tray or visible (requires D-Bus)")
3f692e67b189a3e5641a572222e3719913e5f679 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/3f692e67b189a3e5641a572222e3719913e5f679/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 9167, 12, 2890, 4672, 365, 18, 1188, 67, 1589, 1435, 1172, 1408, 1172, 389, 2932, 5357, 30, 18882, 396, 306, 7425, 4279, 13, 1172, 1408, 1172, 389, 2932, 1320, 7923, 397, 6153,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 9167, 12, 2890, 4672, 365, 18, 1188, 67, 1589, 1435, 1172, 1408, 1172, 389, 2932, 5357, 30, 18882, 396, 306, 7425, 4279, 13, 1172, 1408, 1172, 389, 2932, 1320, 7923, 397, 6153,...
raise ApplicationConfigurationError(None,"Not enough input files, got %i expected %i" % (len(inlfns),i))
raise ApplicationConfigurationError(None,"Not enough input files, got %i expected %i" % (len(inlfns),inputnumbers))
def configure(self,masterappconfig): # getting configuration for individual subjobs self.inputfiles=self.turls.keys() partition = self.getPartitionList()[0][0] # This function either throws an exception or returns at least one element job = self._getParent() # Returns job or subjob object (self.firstevt, self.Nevents_job) = self.getFirstEvent(partition, job.inputdata) logger.debug("partition %i, first event is %i, processing %i events" % (partition,self.firstevt, self.Nevents_job)) inputnumbers = self.getInputsForPartitions([partition], job._getRoot().inputdata) # getInputsForPartitions get the subset of inputfiles needed by partition i. So far so good. if inputnumbers: matchrange = (job._getRoot().inputdata.numbersToMatcharray(inputnumbers), False) else: matchrange = ([],False) logger.debug("partition %i using input partitions: %s as files: %s" % (partition, inputnumbers, matchrange[0]))
c8ea268baf4b708870bdec225b9d54d632780d65 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/c8ea268baf4b708870bdec225b9d54d632780d65/AthenaMC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 7525, 2910, 1425, 4672, 225, 468, 8742, 1664, 364, 7327, 720, 10088, 365, 18, 2630, 2354, 33, 2890, 18, 88, 10518, 18, 2452, 1435, 3590, 273, 365, 18, 588, 7003, 68...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 7525, 2910, 1425, 4672, 225, 468, 8742, 1664, 364, 7327, 720, 10088, 365, 18, 2630, 2354, 33, 2890, 18, 88, 10518, 18, 2452, 1435, 3590, 273, 365, 18, 588, 7003, 68...
half = half+1
half = half+1
def center(s, width): """center(s, width) -> string Return a center version of s, in a field of the specified width. padded with spaces as needed. The string is never truncated. """ n = width - len(s) if n <= 0: return s half = n/2 if n%2 and width%2: # This ensures that center(center(s, i), j) = center(s, j) half = half+1 return ' '*half + s + ' '*(n-half)
5c6813c5ba3e5df4b25e1aa4be5b9be13f19b6c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5c6813c5ba3e5df4b25e1aa4be5b9be13f19b6c8/string.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4617, 12, 87, 16, 1835, 4672, 3536, 5693, 12, 87, 16, 1835, 13, 317, 533, 225, 2000, 279, 4617, 1177, 434, 272, 16, 316, 279, 652, 434, 326, 1269, 1835, 18, 14426, 598, 7292, 487, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4617, 12, 87, 16, 1835, 4672, 3536, 5693, 12, 87, 16, 1835, 13, 317, 533, 225, 2000, 279, 4617, 1177, 434, 272, 16, 316, 279, 652, 434, 326, 1269, 1835, 18, 14426, 598, 7292, 487, 35...
alias = p[4][1:]
alias = p[4]
def p_classDeclaration(p): """classDeclaration : CLASS className '{' classFeatureList '}' ';' | CLASS className superClass '{' classFeatureList '}' ';' | CLASS className alias '{' classFeatureList '}' ';' | CLASS className alias superClass '{' classFeatureList '}' ';' | qualifierList CLASS className '{' classFeatureList '}' ';' | qualifierList CLASS className superClass '{' classFeatureList '}' ';' | qualifierList CLASS className alias '{' classFeatureList '}' ';' | qualifierList CLASS className alias superClass '{' classFeatureList '}' ';' """ superclass = None alias = None quals = [] if isinstance(p[1], basestring): # no class qualifiers cname = p[2] if p[3][0] == '$': # alias present alias = p[3][1:] if p[4] == '{': # no superclass cfl = p[5] else: # superclass superclass = p[4] cfl = p[6] else: # no alias if p[3] == '{': # no superclass cfl = p[4] else: # superclass superclass = p[3] cfl = p[5] else: # class qualifiers quals = p[1] cname = p[3] if p[4][0] == '$': # alias present alias = p[4][1:] if p[5] == '{': # no superclass cfl = p[6] else: # superclass superclass = p[5] cfl = p[7] else: # no alias if p[4] == '{': # no superclass cfl = p[5] else: # superclass superclass = p[4] cfl = p[6] quals = dict([(x.name, x) for x in quals]) methods = {} props = {} for item in cfl: item.class_origin = cname if isinstance(item, pywbem.CIMMethod): methods[item.name] = item else: props[item.name] = item p[0] = pywbem.CIMClass(cname, properties=props, methods=methods, superclass=superclass, qualifiers=quals) # TODO store alias.
b57e4134d5c4d753ca79d65a4ed90aec65ad0ee7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10648/b57e4134d5c4d753ca79d65a4ed90aec65ad0ee7/mof_compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 1106, 6094, 12, 84, 4672, 3536, 1106, 6094, 294, 7383, 2658, 9790, 667, 4595, 682, 9571, 7554, 571, 7383, 2658, 18846, 9790, 667, 4595, 682, 9571, 7554, 571, 7383, 2658, 2308, 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, 293, 67, 1106, 6094, 12, 84, 4672, 3536, 1106, 6094, 294, 7383, 2658, 9790, 667, 4595, 682, 9571, 7554, 571, 7383, 2658, 18846, 9790, 667, 4595, 682, 9571, 7554, 571, 7383, 2658, 2308, 9...
print "CONTEXT FOUND"
def openContext(self, widget, *arg, **argkw): if not hasattr(widget, self.localContextName): print "CONTEXT FOUND" if self.syncWithGlobal: print "TAKING GLOBAL" setattr(widget, self.localContextName, self.globalContexts) else: print "COPYING GLOBAL" setattr(widget, self.localContextName, copy.deepcopy(self.globalContexts))
7609944e8f8142ab701587cc775f15d2e5e31116 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/7609944e8f8142ab701587cc775f15d2e5e31116/OWBaseWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 1042, 12, 2890, 16, 3604, 16, 380, 3175, 16, 2826, 3175, 9987, 4672, 309, 486, 3859, 12, 6587, 16, 365, 18, 3729, 1042, 461, 4672, 309, 365, 18, 8389, 1190, 5160, 30, 1172, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1042, 12, 2890, 16, 3604, 16, 380, 3175, 16, 2826, 3175, 9987, 4672, 309, 486, 3859, 12, 6587, 16, 365, 18, 3729, 1042, 461, 4672, 309, 365, 18, 8389, 1190, 5160, 30, 1172, 315, ...
last_instr = hint(self.frame.last_instr, promote=True)
last_instr = jit.hint(self.frame.last_instr, promote=True)
def send_ex(self, w_arg, exc=False): space = self.space if self.running: raise OperationError(space.w_ValueError, space.wrap('generator already executing')) if self.frame.frame_finished_execution: raise OperationError(space.w_StopIteration, space.w_None) # XXX it's not clear that last_instr should be promoted at all # but as long as it is necessary for call_assembler, let's do it early last_instr = hint(self.frame.last_instr, promote=True) if last_instr == -1: if w_arg and not space.is_w(w_arg, space.w_None): msg = "can't send non-None value to a just-started generator" raise OperationError(space.w_TypeError, space.wrap(msg)) else: if not w_arg: w_arg = space.w_None self.running = True try: try: w_result = self.frame.execute_generator_frame(w_arg, exc) except OperationError: # errors finish a frame self.frame.frame_finished_execution = True raise # if the frame is now marked as finished, it was RETURNed from if self.frame.frame_finished_execution: raise OperationError(space.w_StopIteration, space.w_None) else: return w_result # YIELDed finally: self.frame.f_backref = jit.vref_None self.running = False
b36a90155dfc9f6df97d457189d8bb1d4ec3ca72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/b36a90155dfc9f6df97d457189d8bb1d4ec3ca72/generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 338, 12, 2890, 16, 341, 67, 3175, 16, 3533, 33, 8381, 4672, 3476, 273, 365, 18, 2981, 309, 365, 18, 8704, 30, 1002, 4189, 668, 12, 2981, 18, 91, 67, 23610, 16, 3476, 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, 1366, 67, 338, 12, 2890, 16, 341, 67, 3175, 16, 3533, 33, 8381, 4672, 3476, 273, 365, 18, 2981, 309, 365, 18, 8704, 30, 1002, 4189, 668, 12, 2981, 18, 91, 67, 23610, 16, 3476, 18, ...
if self.config['premium'] == True:
if bool(self.config['premium']):
def get_file_url(self): """ returns the absolute downloadable filepath """ if self.config['premium'] == True: return self.parent.url
51dfdc552fd474f20f0768818584e8b3c78a5e30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/51dfdc552fd474f20f0768818584e8b3c78a5e30/RapidshareCom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 718, 12, 2890, 4672, 3536, 1135, 326, 4967, 4224, 429, 3608, 3536, 309, 1426, 12, 2890, 18, 1425, 3292, 1484, 81, 5077, 3546, 4672, 327, 365, 18, 2938, 18, 718, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 718, 12, 2890, 4672, 3536, 1135, 326, 4967, 4224, 429, 3608, 3536, 309, 1426, 12, 2890, 18, 1425, 3292, 1484, 81, 5077, 3546, 4672, 327, 365, 18, 2938, 18, 718, 2, ...
assert len(raw) == imgwidth*imgheight*3, "Wrong amount of data for image"
assert len(raw) == imgwidth*imgheight*bpp, "Wrong amount of data for image"
def PIL_imagedata(self): image = self.image if image.format=='JPEG': fp=image.fp fp.seek(0) return self._jpg_imagedata(fp) self.source = 'PIL' zlib = import_zlib() if not zlib: return myimage = image.convert('RGB') imgwidth, imgheight = myimage.size
a66e61ca3657cadc56a2702cf390c5a917c3f5ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/a66e61ca3657cadc56a2702cf390c5a917c3f5ed/pdfimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29407, 67, 381, 11349, 396, 12, 2890, 4672, 1316, 273, 365, 18, 2730, 309, 1316, 18, 2139, 18920, 28698, 4278, 4253, 33, 2730, 18, 7944, 4253, 18, 16508, 12, 20, 13, 327, 365, 6315, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29407, 67, 381, 11349, 396, 12, 2890, 4672, 1316, 273, 365, 18, 2730, 309, 1316, 18, 2139, 18920, 28698, 4278, 4253, 33, 2730, 18, 7944, 4253, 18, 16508, 12, 20, 13, 327, 365, 6315, 14...
def describe_a_child_inheriting_an_attribute(): class Parent(object): parent_attr = inject(Data, annotation='old') class Child(Parent): child_attr = inject(Data, annotation='new') instance = Injector(Module()).get_instance(Child) def parent_attribute_should_be_set(): assert isinstance(instance.parent_attr, OldData) def child_attribute_should_be_set(): assert isinstance(instance.child_attr, NewData)
def describe_a_child_inheriting_an_attribute(): class Parent(object): parent_attr = inject(Data, annotation='old') class Child(Parent): child_attr = inject(Data, annotation='new') instance = Injector(Module()).get_instance(Child) def parent_attribute_should_be_set(): assert isinstance(instance.parent_attr, OldData) def child_attribute_should_be_set(): assert isinstance(instance.child_attr, NewData)
6666468ab1a47b02bb06d2e0c749cae07283f8d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4277/6666468ab1a47b02bb06d2e0c749cae07283f8d6/inheritance_spec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6401, 67, 69, 67, 3624, 67, 6018, 310, 67, 304, 67, 4589, 13332, 667, 9520, 12, 1612, 4672, 982, 67, 1747, 273, 4590, 12, 751, 16, 3204, 2218, 1673, 6134, 225, 667, 7451, 12, 3054, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6401, 67, 69, 67, 3624, 67, 6018, 310, 67, 304, 67, 4589, 13332, 667, 9520, 12, 1612, 4672, 982, 67, 1747, 273, 4590, 12, 751, 16, 3204, 2218, 1673, 6134, 225, 667, 7451, 12, 3054, 4...
assert ltrace('ldap', '| __init__().')
assert ltrace('ldap', '| __init__()')
def __init__(self, configuration, users=None, groups=None, warnings=True): """ Init the LDAP backend instance. """
b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/b6cd5454ed254d78f6ce9e40393d67f5a4f8a52c/ldap_backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1664, 16, 3677, 33, 7036, 16, 3252, 33, 7036, 16, 5599, 33, 5510, 4672, 3536, 4378, 326, 11916, 4221, 791, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 1664, 16, 3677, 33, 7036, 16, 3252, 33, 7036, 16, 5599, 33, 5510, 4672, 3536, 4378, 326, 11916, 4221, 791, 18, 3536, 2, -100, -100, -100, -100, -100, -10...
lines2 = lines2[2:]
lines2 = lines2[1:]
def main(): try: opts, args = getopt.getopt(sys.argv[1:], "f:g:o:hs") except getopt.GetoptError: print "Invalid options. Valid options are -f FILE1 -f FILE2 -o OUTPATh -h" sys.exit(1) in1 = None in2 = None outpath = None head = False scale = False for o, a in opts: if o == '-f': in1 = a if o == '-g': in2 = a if o == '-o': outpath = a if o == '-h': head = True if o == '-s': scale = True f1 = open(in1, 'r') f2 = open(in2, 'r') lines1 = f1.readlines() lines2 = f2.readlines() if head == True: lines1 = lines1[1:] lines2 = lines2[2:] f1.close() f2.close() outfile = open(outpath, 'w') L = min(len(lines1), len(lines2)) for i in range(L): one = lines1[i].rstrip('\n') two = lines2[i] if scale == True: two = str(unscale(eval(two))) output = one + '\t' + two outfile.write(output)
392343d1ab4e652fba90efb13841d372f676a08f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14113/392343d1ab4e652fba90efb13841d372f676a08f/join_by_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 74, 30, 75, 30, 83, 30, 4487, 7923, 1335, 336, 3838, 18, 967, 3838, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 74, 30, 75, 30, 83, 30, 4487, 7923, 1335, 336, 3838, 18, 967, 3838, ...
print block
def getDefinitionBlocks(text): """ Take a text and return a list of tuple (description, name-value). """ block = [] block_tmp = re.findall(r"/\*{2}\s*([^*]*\*(?:[^/*][^*]*\*+)*)/\s*#define\s+((?:[^/]*?/?)+)\s*?(?:/{2,3}[^<].*?)?$", text, re.MULTILINE) for comment, define in block_tmp: # Only the first element is needed block.append(([re.findall(r"^\s*\* *(.*?)$", line, re.MULTILINE)[0] for line in comment.splitlines()], define)) for comment, define in re.findall(r"/{3}\s*([^<].*?)\s*#define\s+((?:[^/]*?/?)+)\s*?(?:/{2,3}[^<].*?)?$", text, re.MULTILINE): block.append(([comment], define)) for define, comment in re.findall(r"#define\s*(.*?)\s*/{3}<\s*(.+?)\s*?(?:/{2,3}[^<].*?)?$", text, re.MULTILINE): block.append(([comment], define)) print block return block
80bf957ab4744d4974808000a23dab6515f02c86 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9114/80bf957ab4744d4974808000a23dab6515f02c86/newParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12762, 6450, 12, 955, 4672, 3536, 17129, 279, 977, 471, 327, 279, 666, 434, 3193, 261, 3384, 16, 508, 17, 1132, 2934, 3536, 1203, 273, 5378, 1203, 67, 5645, 273, 283, 18, 4720, 454, 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, 12762, 6450, 12, 955, 4672, 3536, 17129, 279, 977, 471, 327, 279, 666, 434, 3193, 261, 3384, 16, 508, 17, 1132, 2934, 3536, 1203, 273, 5378, 1203, 67, 5645, 273, 283, 18, 4720, 454, 12...