rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
apply(self.tk.call, (self._w, 'item', 'create', entry, col) + self._options(cnf, kw))
apply(self.tk.call, (self._w, 'item', 'create', entry, col) + self._options(cnf, kw))
def item_create(self, entry, col, cnf={}, **kw):
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 761, 67, 2640, 12, 2890, 16, 1241, 16, 645, 16, 23118, 28793, 2826, 9987, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 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, 761, 67, 2640, 12, 2890, 16, 1241, 16, 645, 16, 23118, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
while line:
while line and not did_timeout:
def RunSubprocess(proc, timeout=0, detach=False): """ Runs a subprocess, until it finishes or |timeout| is exceeded and the process is killed with taskkill. A |timeout| <= 0 means no timeout. Args: proc: list of process components (exe + args) timeout: how long to wait before killing, <= 0 means wait forever detach: Whether to pass the DETACHED_PROCESS argument to CreateProcess on Windows. This is used by Purify subprocesses on buildbot which seem to get confused by the parent console that buildbot sets up. """ logging.info("running %s" % (" ".join(proc))) if detach: # see MSDN docs for "Process Creation Flags" DETACHED_PROCESS = 0x8 p = subprocess.Popen(proc, creationflags=DETACHED_PROCESS) else: # For non-detached processes, manually read and print out stdout and stderr. # By default, the subprocess is supposed to inherit these from its parent, # however when run under buildbot, it seems unable to read data from a # grandchild process, so we have to read the child and print the data as if # it came from us for buildbot to read it. We're not sure why this is # necessary. # TODO(erikkay): should we buffer stderr and stdout separately? p = subprocess.Popen(proc, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) logging.info("started subprocess") # How long to wait (in seconds) before printing progress log messages. progress_delay = 300 progress_delay_time = time.time() + progress_delay did_timeout = False if timeout > 0: wait_until = time.time() + timeout while p.poll() is None and not did_timeout: if not detach: line = p.stdout.readline() while line: _print_line(line) line = p.stdout.readline() else: # When we detach, blocking on reading stdout doesn't work, so we sleep # a short time and poll. time.sleep(0.5) if time.time() >= progress_delay_time: # Force output on a periodic basis to avoid getting killed off by the # buildbot. # TODO(erikkay): I'd prefer a less obtrusive 'print ".",' with a flush # but because of how we're doing subprocesses, this doesn't appear to # work reliably. logging.info("%s still running..." % os.path.basename(proc[0])) progress_delay_time = time.time() + progress_delay if timeout > 0: did_timeout = time.time() > wait_until if did_timeout: logging.info("process timed out") else: logging.info("process ended, did not time out") if did_timeout: subprocess.call(["taskkill", "/T", "/F", "/PID", str(p.pid)]) logging.error("KILLED %d" % p.pid) # Give the process a chance to actually die before continuing # so that cleanup can happen safely. time.sleep(1.0) logging.error("TIMEOUT waiting for %s" % proc[0]) raise TimeoutError(proc[0]) elif not detach: for line in p.stdout.readlines(): _print_line(line, False) if sys.platform != 'darwin': # stdout flush fails on Mac logging.info("flushing stdout") p.stdout.flush() logging.info("collecting result code") result = p.poll() if result: logging.error("%s exited with non-zero result code %d" % (proc[0], result)) return result
50461c2a587ec8a883c1a61a49e0506a464faffc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/50461c2a587ec8a883c1a61a49e0506a464faffc/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 1676, 2567, 12, 9381, 16, 2021, 33, 20, 16, 10199, 33, 8381, 4672, 3536, 1939, 87, 279, 6652, 16, 3180, 518, 27609, 578, 571, 4538, 96, 353, 12428, 471, 326, 1207, 353, 24859, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 1676, 2567, 12, 9381, 16, 2021, 33, 20, 16, 10199, 33, 8381, 4672, 3536, 1939, 87, 279, 6652, 16, 3180, 518, 27609, 578, 571, 4538, 96, 353, 12428, 471, 326, 1207, 353, 24859, 59...
cmdclass = {"uninstall" : uninstall, "install" : install, "install_data" : install_data, "build_ext" : build_ext, "sdist" : sdist},
cmdclass = {"uninstall" : uninstall, "install" : install, "install_data" : install_data, "build_ext" : build_ext, "sdist" : sdist},
def add_defaults (self): _sdist.add_defaults (self) # Remove pyx source and add c source if os.path.exists ("src/compizconfig.pyx"): self.filelist.exclude_pattern ("src/compizconfig.pyx") self.filelist.append ("src/compizconfig.c")
33ec1e943aa7a6fdf3e75f0af3b7a55459ab8874 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7062/33ec1e943aa7a6fdf3e75f0af3b7a55459ab8874/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 7606, 261, 2890, 4672, 389, 87, 4413, 18, 1289, 67, 7606, 261, 2890, 13, 468, 3581, 2395, 92, 1084, 471, 527, 276, 1084, 309, 1140, 18, 803, 18, 1808, 7566, 4816, 19, 2919, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 7606, 261, 2890, 4672, 389, 87, 4413, 18, 1289, 67, 7606, 261, 2890, 13, 468, 3581, 2395, 92, 1084, 471, 527, 276, 1084, 309, 1140, 18, 803, 18, 1808, 7566, 4816, 19, 2919, ...
except (ConflictError, KeyboardInterrupt):
except ConflictError:
def _migrateGetValue(self, name, new_schema=None): """Try to get a value from an object using a variety of methods.""" schema = self.Schema() # Migrate pre-AT 1.3 schemas. schema = fixSchema(schema) # First see if the new field name is managed by the current schema field = schema.get(getattr(new_schema.get(name,None),'old_field_name',name), None) if field: # At very first try to use the BaseUnit itself try: if IFileField.isImplementedBy(field): return field.getBaseUnit(self)
460696da815e0d1149ab34005370b03bdbb656a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/460696da815e0d1149ab34005370b03bdbb656a6/BaseObject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 22083, 967, 620, 12, 2890, 16, 508, 16, 394, 67, 4821, 33, 7036, 4672, 3536, 7833, 358, 336, 279, 460, 628, 392, 733, 1450, 279, 1394, 14369, 434, 2590, 12123, 1963, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 22083, 967, 620, 12, 2890, 16, 508, 16, 394, 67, 4821, 33, 7036, 4672, 3536, 7833, 358, 336, 279, 460, 628, 392, 733, 1450, 279, 1394, 14369, 434, 2590, 12123, 1963, 273, 365, 18,...
Gets the current background colour/color setting of the Scene
Gets the current background color setting of the Scene
def getBackgroundClr(self): """ Gets the current background colour/color setting of the Scene """ if _debug: print "\t%s: Called Scene.getBackgroundClr()" % rendererName return
ad7eff3e1456337a19827a8d43fc14131548d4d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/ad7eff3e1456337a19827a8d43fc14131548d4d7/scene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 8199, 2009, 86, 12, 2890, 4672, 3536, 11881, 326, 783, 5412, 2036, 3637, 434, 326, 29347, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 29347, 18, 588, 8199, 2009, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 8199, 2009, 86, 12, 2890, 4672, 3536, 11881, 326, 783, 5412, 2036, 3637, 434, 326, 29347, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 29347, 18, 588, 8199, 2009, 8...
[jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix)
[jobIdType, jobId] = FindBestJobId(recordElement, namespace, prefix)
def StandardCheckXmldoc(xmlDoc,recordElem,external): "Fill in missing field in the xml document if needed" "If external is true, also check for ProbeName, SiteName, Grid and ResourceType" if external: # ProbeName and SiteName? ProbeNameNodes = usageRecord.getElementsByTagNameNS(namespace, 'ProbeName') if not ProbeNameNodes: node = xmlDoc.createElementNS(namespace, prefix + 'ProbeName') textNode = xmlDoc.createTextNode(Config.get_MeterName()) node.appendChild(textNode) usageRecord.appendChild(node) elif len(ProbeNameNodes) > 1: [jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix) DebugPrint(0, "Warning: too many ProbeName entities in " + jobIdType + " " + jobId + "(" + xmlFilename + ")") SiteNameNodes = usageRecord.getElementsByTagNameNS(namespace, 'SiteName') if not SiteNameNodes: node = xmlDoc.createElementNS(namespace, prefix + 'SiteName') textNode = xmlDoc.createTextNode(Config.get_SiteName()) node.appendChild(textNode) usageRecord.appendChild(node) elif len(SiteNameNodes) > 1: [jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix) DebugPrint(0, "Warning: too many SiteName entities in " + jobIdType + " " + jobId + "(" + xmlFilename + ")");
56bee758f7cfb2158e4bf6f00e2591f22068707b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/56bee758f7cfb2158e4bf6f00e2591f22068707b/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8263, 1564, 4432, 2434, 12, 2902, 1759, 16, 3366, 7498, 16, 9375, 4672, 315, 8026, 316, 3315, 652, 316, 326, 2025, 1668, 309, 3577, 6, 315, 2047, 3903, 353, 638, 16, 2546, 866, 364, 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, 8263, 1564, 4432, 2434, 12, 2902, 1759, 16, 3366, 7498, 16, 9375, 4672, 315, 8026, 316, 3315, 652, 316, 326, 2025, 1668, 309, 3577, 6, 315, 2047, 3903, 353, 638, 16, 2546, 866, 364, 25...
print self.text.resumeconnection
self.HandleWarning(self.text.resumeconnection)
def OnComputerResume(self, suspendType): print self.text.resumeconnection self.InitConnection()
557c0eeadf70bf4d431bf0cc1545dd9eec9af875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/557c0eeadf70bf4d431bf0cc1545dd9eec9af875/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 7703, 264, 20911, 12, 2890, 16, 20413, 559, 4672, 365, 18, 3259, 6210, 12, 2890, 18, 955, 18, 455, 379, 17181, 944, 13, 365, 18, 2570, 1952, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2755, 7703, 264, 20911, 12, 2890, 16, 20413, 559, 4672, 365, 18, 3259, 6210, 12, 2890, 18, 955, 18, 455, 379, 17181, 944, 13, 365, 18, 2570, 1952, 1435, 2, -100, -100, -100, -100, -100...
return [self._eval(i) for i in srange(Integer(1),n+1)]
return [self._eval(i) for i in srange(self.offset, n+self.offset)]
def list(self, n): return [self._eval(i) for i in srange(Integer(1),n+1)]
2c9ec0e9ee4b6a66dba3cad312fef1c27ffc8925 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/2c9ec0e9ee4b6a66dba3cad312fef1c27ffc8925/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 16, 290, 4672, 327, 306, 2890, 6315, 8622, 12, 77, 13, 364, 277, 316, 272, 3676, 12, 4522, 12, 21, 3631, 82, 15, 21, 25887, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 666, 12, 2890, 16, 290, 4672, 327, 306, 2890, 6315, 8622, 12, 77, 13, 364, 277, 316, 272, 3676, 12, 4522, 12, 21, 3631, 82, 15, 21, 25887, 2, -100, -100, -100, -100, -100, -100, -100...
self.sock.send('%8d' % size)
self.sock.send(str(size) + ' ')
def send(self, msg, exception=False, traceback=None): msg = cPickle.dumps([msg, traceback], protocol=2) size = len(msg) if self.ssl: self.ssl_sock.write('%8d' % size) else: self.sock.send('%8d' % size) if self.ssl: self.ssl_sock.write(exception and "1" or "0") else: self.sock.send(exception and "1" or "0") totalsent = 0 while totalsent < size: if self.ssl: sent = self.ssl_sock.write(msg[totalsent:]) else: sent = self.sock.send(msg[totalsent:]) if sent == 0: raise RuntimeError, "socket connection broken" totalsent = totalsent + sent
8c8e74b5ff642b18dabc6816f62143867533bd18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/8c8e74b5ff642b18dabc6816f62143867533bd18/pysocket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 1234, 16, 1520, 33, 8381, 16, 10820, 33, 7036, 4672, 1234, 273, 276, 17968, 298, 18, 13302, 1121, 3816, 3576, 16, 10820, 6487, 1771, 33, 22, 13, 963, 273, 562, 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, 1366, 12, 2890, 16, 1234, 16, 1520, 33, 8381, 16, 10820, 33, 7036, 4672, 1234, 273, 276, 17968, 298, 18, 13302, 1121, 3816, 3576, 16, 10820, 6487, 1771, 33, 22, 13, 963, 273, 562, 12, ...
self._rbuf = ""
self._rbuf = StringIO()
def __init__(self, sock, mode='rb', bufsize=-1, close=False): self._sock = sock self.mode = mode # Not actually used in this version if bufsize < 0: bufsize = self.default_bufsize self.bufsize = bufsize self.softspace = False if bufsize == 0: self._rbufsize = 1 elif bufsize == 1: self._rbufsize = self.default_bufsize else: self._rbufsize = bufsize self._wbufsize = bufsize self._rbuf = "" # A string self._wbuf = [] # A list of strings self._close = close
8f96b3937325bb2c07511f62915490ab796e078a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/8f96b3937325bb2c07511f62915490ab796e078a/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7313, 16, 1965, 2218, 6731, 2187, 1681, 1467, 29711, 21, 16, 1746, 33, 8381, 4672, 365, 6315, 15031, 273, 7313, 365, 18, 3188, 273, 1965, 468, 2288, 6013, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7313, 16, 1965, 2218, 6731, 2187, 1681, 1467, 29711, 21, 16, 1746, 33, 8381, 4672, 365, 6315, 15031, 273, 7313, 365, 18, 3188, 273, 1965, 468, 2288, 6013, ...
dst_dir = dir
def registerDoc(self, source_path, to_cache): """Register the document at path ``to_cache`` generated from ``source_path``.
0808fc19f9b15585779c57479923836f374ad9a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9481/0808fc19f9b15585779c57479923836f374ad9a8/cachemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 1759, 12, 2890, 16, 1084, 67, 803, 16, 358, 67, 2493, 4672, 3536, 3996, 326, 1668, 622, 589, 12176, 869, 67, 2493, 10335, 4374, 628, 12176, 3168, 67, 803, 68, 8338, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 1759, 12, 2890, 16, 1084, 67, 803, 16, 358, 67, 2493, 4672, 3536, 3996, 326, 1668, 622, 589, 12176, 869, 67, 2493, 10335, 4374, 628, 12176, 3168, 67, 803, 68, 8338, 2, -100, -100...
departure_cols = departure_row.findAll('td', recursive=False) arrival_cols = arrival_row.findAll('td', recursive=False)
def get_col1(row, s): return row.find('td', attrs = {'class' : re.compile(s)}).string.strip() def get_col2(row, s): return row.find('td', attrs = {'class' : re.compile(s)}).div.string.strip()
def parse_connection(self, departure_row, arrival_row): departure_cols = departure_row.findAll('td', recursive=False) arrival_cols = arrival_row.findAll('td', recursive=False)
6b018c8fab3f81686d4ba4af67f0bd492f6318a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2719/6b018c8fab3f81686d4ba4af67f0bd492f6318a3/ghafasclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4071, 12, 2890, 16, 26000, 594, 67, 492, 16, 2454, 5162, 67, 492, 4672, 26000, 594, 67, 6842, 273, 26000, 594, 67, 492, 18, 4720, 1595, 2668, 4465, 2187, 5904, 33, 8381, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 4071, 12, 2890, 16, 26000, 594, 67, 492, 16, 2454, 5162, 67, 492, 4672, 26000, 594, 67, 6842, 273, 26000, 594, 67, 492, 18, 4720, 1595, 2668, 4465, 2187, 5904, 33, 8381, 13, ...
list = re.findall("<tr>\s*<td (?:colspan='3' bgcolor='
list = re.findall("<tr>\s*<td (?:colspan='3' bgcolor='
def ParseSelCteePage(fr, gp): if gp == "selctee0100_2006-09-29.html": return "SKIPTHIS", None else: frupdated = re.search('<td class="lastupdated">\s*Updated (.*?)(?:&nbsp;| )(.*?)\s*</td>', fr) lsudate = re.match("(\d\d)/(\d\d)/(\d\d\d\d)$", frupdated.group(1)) if lsudate: sudate = "%s-%s-%s" % (lsudate.group(3), lsudate.group(2), lsudate.group(1)) else: lsudate = re.match("(\d\d)/(\d\d)/(\d\d)$", frupdated.group(1)) y2k = int(lsudate.group(3)) < 50 and "20" or "19" sudate = "%s%s-%s-%s" % (y2k, lsudate.group(3), lsudate.group(2), lsudate.group(1)) sutime = frupdated.group(2) # extract the date on the document frdate = re.search("Select Committee\s+Membership at\s+(.*?)\s*<(?i)", fr) if frdate: msdate = mx.DateTime.DateTimeFrom(frdate.group(1)).date if sudate != msdate: if sudate in ['2006-05-19', '2006-07-05', '2006-11-17']: sudate = msdate elif msdate in ['2007-02-08']: sudate = msdate elif sudate > '2007-01-26': print "mismatch of dates;", msdate, "updated:", sudate sdate = sudate stime = sutime res = [ ] committees = re.findall("<a\s+href=(?:'|\")(?:http://hcl2\.hclibrary/sections/hcio/mmc/selcom\.asp)?#\d+(?:'|\")>(.*?)</a></I>", fr, re.I | re.S) committees = map(lambda x: re.sub("\s+", " ", x).replace("&amp;", "&"), committees) found = { } # XXX: This is slow, speed it up! list = re.findall("<tr>\s*<td (?:colspan='3' bgcolor='#F1ECE4'|bgcolor=#f1ece4 colSpan=3)(?: height=\"\d+\")?>(?:<b>)?<font size=\+1>(?:<b>)?(?:<I>)?<A\s+NAME='?\d+'?></a>\s*([^<]*?)\s*(?:</b>)?</font>.*?</tr>\s*((?:<tr>\s*<td(?: height=\"19\")?>.*?</td>\s*<td(?: height=\"19\")?>.*?</td>\s*<td(?: height=\"19\")?>.*?</td>\s*</tr>\s*)+)<tr>\s*<td colspan='?3'?(?: height=\"19\")?>&nbsp;?</td>\s*</tr>", fr, re.I | re.S) for committee in list: cteename = re.sub("\s+", " ", committee[0]).replace("&amp;", "&") members = committee[1] if cteename not in committees: print "Committee title not in list: ", cteename else: found[cteename] = 1 for member in re.findall("<tr>\s*<td(?: height=\"19\")?>\s*(.*?)\s*</td>\s*<td(?: height=\"19\")?>\s*(.*?)\s*</td>\s*<td(?: height=\"19\")?>\s*(.*?)\s*</td>\s*</tr>(?i)", members): name = member[0] const = member[1] party = member[2] ec = protooffice() ec.SelCteeproto((sdate, stime), name, const, cteename) res.append(ec) for i in committees: if i not in found: print "Argh:", i return (sdate, stime), res
5924e987d2902c2f7caa2dbf3d95b57d8cf40610 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8428/5924e987d2902c2f7caa2dbf3d95b57d8cf40610/minpostparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1877, 39, 22579, 1964, 12, 4840, 16, 4178, 4672, 309, 4178, 422, 315, 1786, 299, 1340, 1611, 713, 67, 6976, 26, 17, 5908, 17, 5540, 18, 2620, 6877, 327, 315, 11129, 45, 22561, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1877, 39, 22579, 1964, 12, 4840, 16, 4178, 4672, 309, 4178, 422, 315, 1786, 299, 1340, 1611, 713, 67, 6976, 26, 17, 5908, 17, 5540, 18, 2620, 6877, 327, 315, 11129, 45, 22561, 51...
db = dbhash.open(DBFILE, 'c')
db = dbhash.open(dbfile, 'c')
def create(mlist, cgi=0): # Acquire the global list database lock lock = makelock() lock.lock() lockfp = None try: # First, open the dbhash file using built-in open so we can acquire an # exclusive lock on it. See the discussion above for why we do it # this way instead of specifying the `l' option to dbhash.open() lockfp = open(DBFILE) fcntl.flock(lockfp.fileno(), fcntl.LOCK_EX) db = dbhash.open(DBFILE, 'c') # Crack open the plain text file try: fp = open(TEXTFILE, 'r+') except IOError, e: if e.errno <> errno.ENOENT: raise omask = os.umask(007) try: fp = open(TEXTFILE, 'w+') finally: os.umask(omask) addlist(mlist, db, fp) # And flush everything out to disk db.sync() fp.close() finally: if lockfp: fcntl.flock(lockfp.fileno(), fcntl.LOCK_UN) lockfp.close() lock.unlock(unconditionally=1)
0f74c78c0fe989ebf5c2a1c7fe6b1a538f381ac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/0f74c78c0fe989ebf5c2a1c7fe6b1a538f381ac5/Postfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 781, 376, 16, 276, 10052, 33, 20, 4672, 468, 28822, 326, 2552, 666, 2063, 2176, 2176, 273, 29796, 292, 975, 1435, 2176, 18, 739, 1435, 2176, 7944, 273, 599, 775, 30, 468, 5783...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 781, 376, 16, 276, 10052, 33, 20, 4672, 468, 28822, 326, 2552, 666, 2063, 2176, 2176, 273, 29796, 292, 975, 1435, 2176, 18, 739, 1435, 2176, 7944, 273, 599, 775, 30, 468, 5783...
accuracy = prop.float("accuracy", default=1.0e-6) tole_compressibility = prop.float("tole_compressibility", default=1.0e-7)
accuracy = prop.float("accuracy", default=1.0e-4)
def setProperties(self, stream): from CitcomSLib import Incompressible_set_properties Incompressible_set_properties(self.all_variables, self.inventory, stream) return
2ba507e295e3f1ab2e9611303e964e65550b1a2f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8488/2ba507e295e3f1ab2e9611303e964e65550b1a2f/Incompressible.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23126, 12, 2890, 16, 1407, 4672, 628, 385, 305, 832, 4559, 495, 1930, 657, 14706, 1523, 67, 542, 67, 4738, 657, 14706, 1523, 67, 542, 67, 4738, 12, 2890, 18, 454, 67, 7528, 16, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23126, 12, 2890, 16, 1407, 4672, 628, 385, 305, 832, 4559, 495, 1930, 657, 14706, 1523, 67, 542, 67, 4738, 657, 14706, 1523, 67, 542, 67, 4738, 12, 2890, 18, 454, 67, 7528, 16, 365, ...
""" Returns the width, height, descent and leading of the rendered text. """ fm = self.gc.fontMetrics() rect = fm.boundingRect(text) return rect.width(), rect.height(), -fm.descent(), fm.leading()
""" Backwards compatibility API over .get_text_extent() for Enable """ x1, y1, x2, y2 = self.get_text_extent(text) return x2, y2, y1, x1
def get_full_text_extent(self, text): """ Returns the width, height, descent and leading of the rendered text. """ fm = self.gc.fontMetrics() rect = fm.boundingRect(text) return rect.width(), rect.height(), -fm.descent(), fm.leading()
08ff1c69e2ca9e72fb4097983cfc8501407d0ec8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/08ff1c69e2ca9e72fb4097983cfc8501407d0ec8/backend_qpainter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2854, 67, 955, 67, 18181, 12, 2890, 16, 977, 4672, 3536, 4297, 6397, 8926, 1491, 1879, 263, 588, 67, 955, 67, 18181, 1435, 364, 9677, 3536, 619, 21, 16, 677, 21, 16, 619, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2854, 67, 955, 67, 18181, 12, 2890, 16, 977, 4672, 3536, 4297, 6397, 8926, 1491, 1879, 263, 588, 67, 955, 67, 18181, 1435, 364, 9677, 3536, 619, 21, 16, 677, 21, 16, 619, 22...
"H2": atom_info("H", 0, "H'"), "H1": atom_info("H", 0, "H'"),
"H2": atom_info("H", 0, "H"), "H1": atom_info("H", 0, "H"),
def keys(self): return ("element_symbol", "ionic_state", "scattering_label")
46b20303e8ed53745807da84c39cb29f25aa3911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/46b20303e8ed53745807da84c39cb29f25aa3911/residue_info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1311, 12, 2890, 4672, 327, 7566, 2956, 67, 7175, 3113, 315, 285, 335, 67, 2019, 3113, 315, 31320, 310, 67, 1925, 7923, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1311, 12, 2890, 4672, 327, 7566, 2956, 67, 7175, 3113, 315, 285, 335, 67, 2019, 3113, 315, 31320, 310, 67, 1925, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Series and Episode name
Series and Episode name
def verifySeriesExists(self): """Verify that a: Series or Series and Season or Series and Season and Episode number or Series and Episode name passed by the user exists on thetvdb.com return False and display an appropriate error if the TV data was not found return an tvdb_api instance of the TV show/season/episode data if it was found """ sid=self.config['sid'] series_name=self.config['series_name'] season=self.config['season_num'] episode=self.config['episode_num'] episode_name=self.config['episode_name'] try: self.config['log'].debug(u'Checking for series(%s), sid(%s), season(%s), episode(%s), episode name(%s)' % (series_name, sid, season, episode, episode_name)) if episode_name: # Find an exact match for the series and episode name series_sid='' if sid: seriesfound=self._searchforSeries(sid).search(episode_name) else: seriesfound=self._searchforSeries(series_name).search(episode_name) if len(seriesfound) != 0: for ep in seriesfound: if (ep['episodename'].lower()).startswith(episode_name.lower()): if len(ep['episodename']) > (len(episode_name)+1): # Skip episodes the are not part of a set of (1), (2) ... etc if ep['episodename'][len(episode_name):len(episode_name)+2] != ' (': continue series_sid = ep['seriesid'] self.config['sid'] = ep['seriesid'] self.config['season_num'] = ep['seasonnumber'] self.config['episode_num'] = ep['episodenumber'] return(ep) else: # Exact match series_sid = ep['seriesid'] self.config['sid'] = ep['seriesid'] self.config['season_num'] = ep['seasonnumber'] self.config['episode_num'] = ep['episodenumber'] return(ep) raise tvdb_episodenotfound # Search for the series or series & season or series & season & episode elif season: if episode: # series & season & episode seriesfound=self._searchforSeries(series_name)[int(season)][int(episode)] self.config['sid'] = seriesfound['seriesid'] self.config['episode_name'] = seriesfound['episodename'] else: # series & season seriesfound=self._searchforSeries(series_name)[int(season)] else: seriesfound=self._searchforSeries(series_name) # Series only except tvdb_shownotfound: # No such show found. # Use the show-name from the files name, and None as the ep name sys.stderr.write(u"\n! Warning: Series (%s) not found\n" % ( series_name ) ) return(False) except (tvdb_seasonnotfound, tvdb_episodenotfound, tvdb_attributenotfound): # The season, episode or name wasn't found, but the show was. # Use the corrected show-name, but no episode name. if series_name == None: series_name = sid if episode: sys.stderr.write(u"\n! Warning: For Series (%s), season (%s) or Episode (%s) not found \n" % (series_name, season, episode ) ) elif episode_name: sys.stderr.write(u"\n! Warning: For Series (%s), Episode (%s) not found \n" % (series_name, episode_name ) ) else: sys.stderr.write(u"\n! Warning: For Series (%s), season (%s) not found \n" % ( series_name, season) ) return(False) except tvdb_error, errormsg: # Error communicating with thetvdb.com if sid: # Maybe the 5 digit number was a series name (e.g. 90210) self.config['series_name']=self.config['sid'] self.config['sid'] = None return self.verifySeriesExists() sys.stderr.write( u"\n! Warning: Error contacting www.thetvdb.com:\n%s\n" % (errormsg) ) return(False) except tvdb_userabort, errormsg: # User aborted selection (q or ^c) print "\n", errormsg return(False) else: return(seriesfound)
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, 3929, 6485, 4002, 12, 2890, 4672, 3536, 8097, 716, 279, 30, 9225, 578, 9225, 471, 3265, 2753, 578, 9225, 471, 3265, 2753, 471, 512, 84, 11802, 1300, 578, 9225, 471, 512, 84, 11802, 508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 6485, 4002, 12, 2890, 4672, 3536, 8097, 716, 279, 30, 9225, 578, 9225, 471, 3265, 2753, 578, 9225, 471, 3265, 2753, 471, 512, 84, 11802, 1300, 578, 9225, 471, 512, 84, 11802, 508, ...
def_op('ROT_FOUR', 5)
def_op('DUP_TOP_TWO', 5)
def jabs_op(name, op): def_op(name, op) hasjabs.append(op)
c83c794daf437568919ac64eeb81141994d70bc0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/c83c794daf437568919ac64eeb81141994d70bc0/opcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 525, 5113, 67, 556, 12, 529, 16, 1061, 4672, 1652, 67, 556, 12, 529, 16, 1061, 13, 711, 78, 5113, 18, 6923, 12, 556, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 525, 5113, 67, 556, 12, 529, 16, 1061, 4672, 1652, 67, 556, 12, 529, 16, 1061, 13, 711, 78, 5113, 18, 6923, 12, 556, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if not self.__skeleton__.has_key(table): raise ValueError("Database has no table %s."%table) if not self.__skeleton__[table].has_key(col_name): raise ValueError("Table %s has no column %s."%(table,col_name))
if not self.__skeleton__.has_key(table_name): raise ValueError("Database has no table %s."%table_name) if not self.__skeleton__[table_name].has_key(col_name): raise ValueError("Table %s has no column %s."%(table_name,col_name))
def drop_column(self, table, col_name): """ Takes a while, thanks to SQLite... """ # Check input: if not self.__skeleton__.has_key(table): raise ValueError("Database has no table %s."%table) if not self.__skeleton__[table].has_key(col_name): raise ValueError("Table %s has no column %s."%(table,col_name))
12098d45ba68813e42a6a22032a2f2e6d360e158 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/12098d45ba68813e42a6a22032a2f2e6d360e158/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3640, 67, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 225, 3536, 468, 2073, 810, 30, 309, 486, 365, 16186, 7771, 12143, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 225, 3536, 468, 2073, 810, 30, 309, 486, 365, 16186, 7771, 12143, ...
client = createClient(user.login, user.password+"x")
client = createClientWithCerts(user.login, user.password+"x")
def testInvalidPass(self): user = USERDB[1] client = createClient(user.login, user.password+"x") self.assert_(not connectClient(client)) client.stop()
fc1e9d230fed7b56377c3dbda23b9a1d713ecef9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10929/fc1e9d230fed7b56377c3dbda23b9a1d713ecef9/test_plaintext_auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1941, 6433, 12, 2890, 4672, 729, 273, 7443, 2290, 63, 21, 65, 1004, 273, 30872, 1190, 16273, 12, 1355, 18, 5819, 16, 729, 18, 3664, 9078, 92, 7923, 365, 18, 11231, 67, 12, 902, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 1941, 6433, 12, 2890, 4672, 729, 273, 7443, 2290, 63, 21, 65, 1004, 273, 30872, 1190, 16273, 12, 1355, 18, 5819, 16, 729, 18, 3664, 9078, 92, 7923, 365, 18, 11231, 67, 12, 902, ...
*parameters* ------------ eigenmode_method: The name of the eigenmode search method. (string) f_rot_min: Size of the rotational force under which no rotation will be performed. (float) f_rot_max: Size of the rotational force under which only one rotation will be performed. (float) max_num_rot: Maximum number of rotations per optimizer step. (int) trial_angle: Trial angle for the finite difference estimate of the rotational angle. (float in rad) trial_trans_step: Trial step size for the MinModeTranslate optimizer. (float) maximum_translation: Maximum step size and forced step size when the curvature is still positive for the MinModeTranslate optimizer. (float) cg_translation: Conjugate Gradient for the MinModeTranslate optimizer. (bool) cg_rotation: Conjugate Gradient for the rotations. Not yet implemented. (bool) use_central_forces: Only calculate the forces at one end of the dimer and extrapolate the forces to the other. (bool) dimer_separation: Separation of the dimer's images (float) initial_eigenmode_method: How to construct the initial eigenmode of the dimer. If an eigenmode is given when creating the MinModeAtoms object, this will be ignored. ('gauss', 'displacement') extrapolate_forces: When more than one rotation is performed, an extrapolation scheme can be used to reduce the number of force evaluations. (bool) displacement_method: How to displace the atoms. ('gauss' or 'vector') gauss_std: The standard deviation of the gauss curve used when doing random displacement. (float) order: How many lowest eigenmodes will be inverted. (int) mask: Which atoms will be moved during displacement. (list of bools) displacement_center: The center of displacement, nearby atoms will be displaced. (int or [float, float, float]) displacement_radius: When choosing which atoms to displace with the *displacement_center* keyword, this decides how many nearby atoms to displace. (float) number_of_displacement_atoms: The amount of atoms near *displacement_center* to displace. (int)
Parameters: eigenmode_method: str The name of the eigenmode search method. f_rot_min: float Size of the rotational force under which no rotation will be performed. f_rot_max: float Size of the rotational force under which only one rotation will be performed. max_num_rot: int Maximum number of rotations per optimizer step. trial_angle: float Trial angle for the finite difference estimate of the rotational angle in radians. trial_trans_step: float Trial step size for the MinModeTranslate optimizer. maximum_translation: float Maximum step size and forced step size when the curvature is still positive for the MinModeTranslate optimizer. cg_translation: bool Conjugate Gradient for the MinModeTranslate optimizer. use_central_forces: bool Only calculate the forces at one end of the dimer and extrapolate the forces to the other. dimer_separation: float Separation of the dimer's images. initial_eigenmode_method: str How to construct the initial eigenmode of the dimer. If an eigenmode is given when creating the MinModeAtoms object, this will be ignored. Possible choices are: 'gauss' and 'displacement' extrapolate_forces: bool When more than one rotation is performed, an extrapolation scheme can be used to reduce the number of force evaluations. displacement_method: str How to displace the atoms. Possible choices are 'gauss' and 'vector'. gauss_std: float The standard deviation of the gauss curve used when doing random displacement. order: int How many lowest eigenmodes will be inverted. mask: list of bool Which atoms will be moved during displacement. displacement_center: int or [float, float, float] The center of displacement, nearby atoms will be displaced. displacement_radius: float When choosing which atoms to displace with the *displacement_center* keyword, this decides how many nearby atoms to displace. number_of_displacement_atoms: int The amount of atoms near *displacement_center* to displace.
def reset_all_counters(self): """Reset all counters.""" for key in self.counters.keys(): self.counters[key] = 0
20be32dc87646a1e58d9a8b4f565e6c6ac8bffe4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/20be32dc87646a1e58d9a8b4f565e6c6ac8bffe4/dimer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 67, 454, 67, 23426, 12, 2890, 4672, 3536, 7013, 777, 13199, 12123, 364, 498, 316, 365, 18, 23426, 18, 2452, 13332, 365, 18, 23426, 63, 856, 65, 273, 374, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2715, 67, 454, 67, 23426, 12, 2890, 4672, 3536, 7013, 777, 13199, 12123, 364, 498, 316, 365, 18, 23426, 18, 2452, 13332, 365, 18, 23426, 63, 856, 65, 273, 374, 2, -100, -100, -100, -10...
source = generate(source, self, name, filename, defer_init=defer_init)
source = self._generate(source, name, filename, defer_init=defer_init)
def compile(self, source, name=None, filename=None, raw=False, defer_init=False): """Compile a node or template source code. The `name` parameter is the load name of the template after it was joined using :meth:`join_path` if necessary, not the filename on the file system. the `filename` parameter is the estimated filename of the template on the file system. If the template came from a database or memory this can be omitted.
78efe7401b1f49fc1a72fc33ed6b6b97767cec44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14446/78efe7401b1f49fc1a72fc33ed6b6b97767cec44/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 2890, 16, 1084, 16, 508, 33, 7036, 16, 1544, 33, 7036, 16, 1831, 33, 8381, 16, 2220, 67, 2738, 33, 8381, 4672, 3536, 9937, 279, 756, 578, 1542, 1084, 981, 18, 225, 1021, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 2890, 16, 1084, 16, 508, 33, 7036, 16, 1544, 33, 7036, 16, 1831, 33, 8381, 16, 2220, 67, 2738, 33, 8381, 4672, 3536, 9937, 279, 756, 578, 1542, 1084, 981, 18, 225, 1021, 13...
self.__objects.append(GraphicPrimitive_Arrow(xmin, ymin, xmax, ymax, options)) self._extend_axes(xmin, xmax, ymin, ymax)
self.__objects.append(GraphicPrimitive_Arrow(xtail, ytail, xhead, yhead, options)) self._extend_axes(xtail, xhead, ytail, yhead)
def _arrow(self, xmin, ymin, xmax, ymax, options): """ Add an arrow with given bounding box to this graphics object.
9feabf5491f4dee6756eab6732cf107f17b213a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9feabf5491f4dee6756eab6732cf107f17b213a0/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7815, 12, 2890, 16, 13777, 16, 15763, 16, 14016, 16, 15275, 16, 702, 4672, 3536, 1436, 392, 12274, 598, 864, 7552, 3919, 358, 333, 17313, 733, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7815, 12, 2890, 16, 13777, 16, 15763, 16, 14016, 16, 15275, 16, 702, 4672, 3536, 1436, 392, 12274, 598, 864, 7552, 3919, 358, 333, 17313, 733, 18, 2, -100, -100, -100, -100, -100, ...
if value >= 0 or value <=3: os.popen(e_remote_path+" -border-shade-transition-set "+value) else: print "[error] Value between 0 and 3"
value=str(value) os.popen(e_remote_path+" -border-shade-transition-set "+value)
def set_trans_alg(value): if value >= 0 or value <=3: os.popen(e_remote_path+" -border-shade-transition-set "+value) else: print "[error] Value between 0 and 3"
201944b6c41a3a572eaf6575174a4d90ee0f4eac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2281/201944b6c41a3a572eaf6575174a4d90ee0f4eac/pyetun_bshade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2338, 67, 18413, 12, 1132, 4672, 225, 460, 33, 701, 12, 1132, 13, 1140, 18, 84, 3190, 12, 73, 67, 7222, 67, 803, 9078, 300, 8815, 17, 674, 2486, 17, 14936, 17, 542, 13773, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2338, 67, 18413, 12, 1132, 4672, 225, 460, 33, 701, 12, 1132, 13, 1140, 18, 84, 3190, 12, 73, 67, 7222, 67, 803, 9078, 300, 8815, 17, 674, 2486, 17, 14936, 17, 542, 13773, ...
import odtwriter_plugins plugin_mod = odtwriter_plugins
name = 'odtwriter_plugins' fp, pathname, description = imp.find_module(name) plugin_mod = imp.load_module(name, fp, pathname, description)
def load_plugins(): plugin_mod = None count = 0 try: import odtwriter_plugins plugin_mod = odtwriter_plugins except ImportError, e: pass if plugin_mod is None: return count klasses = inspect.getmembers(plugin_mod, inspect.isclass) for klass in klasses: if register_plugin(*klass): count += 1 return count
a986cb21272cdb52312c6d54aae78e903fe1af5f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1278/a986cb21272cdb52312c6d54aae78e903fe1af5f/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 8057, 13332, 1909, 67, 1711, 273, 599, 1056, 273, 374, 775, 30, 508, 273, 296, 369, 88, 6299, 67, 8057, 11, 4253, 16, 9806, 16, 2477, 273, 1646, 18, 4720, 67, 2978, 12, 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, 1262, 67, 8057, 13332, 1909, 67, 1711, 273, 599, 1056, 273, 374, 775, 30, 508, 273, 296, 369, 88, 6299, 67, 8057, 11, 4253, 16, 9806, 16, 2477, 273, 1646, 18, 4720, 67, 2978, 12, 529...
linktable = Table(valign='top')
linktable = Table(valign='top', width='100%')
def show_results(mlist, doc, category, category_suffix, cgidata): # Produce the results page adminurl = mlist.GetScriptURL('admin') categories = mlist.GetConfigCategories() label = _(categories[category][0]) # Set up the document's headers realname = mlist.real_name doc.SetTitle(_('%(realname)s Administration (%(label)s)')) doc.AddItem(Center(Header(2, _( '%(realname)s mailing list administration<br>%(label)s Section')))) doc.AddItem('<hr>') # This holds the two columns of links linktable = Table(valign='top') linktable.AddRow([Center(Bold(_("Configuration Categories"))), Center(Bold(_("Other Administrative Activities")))]) # The `other links' are stuff in the right column. otherlinks = UnorderedList() otherlinks.AddItem(Link(mlist.GetScriptURL('admindb'), _('Tend to pending moderator requests'))) otherlinks.AddItem(Link(mlist.GetScriptURL('listinfo'), _('Go to the general list information page'))) otherlinks.AddItem(Link(mlist.GetScriptURL('edithtml'), _('Edit the HTML for the public list pages'))) otherlinks.AddItem(Link(mlist.GetBaseArchiveURL(), _('Go to list archives')).Format() + '<br>&nbsp;<br>') if mm_cfg.OWNERS_CAN_DELETE_THEIR_OWN_LISTS: otherlinks.AddItem(Link(mlist.GetScriptURL('rmlist'), _('Delete this mailing list')).Format() + _(' (requires confirmation)<br>&nbsp;<br>')) otherlinks.AddItem(Link('%s/logout' % adminurl, # BAW: What I really want is a blank line, but # adding an &nbsp; won't do it because of the # bullet added to the list item. '<FONT SIZE="+2"><b>%s</b></FONT>' % _('Logout'))) # These are links to other categories and live in the left column categorylinks = UnorderedList() for k in categories.keys(): label = _(categories[k][0]) url = '%s/%s' % (adminurl, k) if k == category: # Handle subcategories subcats = mlist.GetConfigSubCategories(k) if subcats: subcat = Utils.GetPathPieces()[-1] for k, v in subcats: if k == subcat: break else: # The first subcategory in the list is the default subcat = subcats[0][0] subcat_items = [] for sub, text in subcats: if sub == subcat: text = Bold('[%s]' % text).Format() subcat_items.append(Link(url + '/' + sub, text)) categorylinks.AddItem( Bold(label).Format() + UnorderedList(*subcat_items).Format()) else: categorylinks.AddItem(Link(url, Bold('[%s]' % label))) else: categorylinks.AddItem(Link(url, label)) # Add all the links to the links table... linktable.AddRow([categorylinks, otherlinks]) linktable.AddRowInfo(max(linktable.GetCurrentRowIndex(), 0), valign='top') # ...and add the links table to the document. doc.AddItem(linktable) doc.AddItem('<hr>') # Now we need to craft the form that will be submitted, which will contain # all the variable settings, etc. This is a bit of a kludge because we # know that the autoreply and members categories supports file uploads. if category_suffix: encoding = None if category_suffix in ('autoreply', 'members'): # These have file uploads encoding = 'multipart/form-data' form = Form('%s/%s' % (adminurl, category_suffix), encoding=encoding) else: form = Form(adminurl) # The general category supports changing the password. if category == 'general': andpassmsg = _(' (You can change your password there, too.)') else: andpassmsg = '' form.AddItem( _('''Make your changes in the following section, then submit them using the <em>Submit Your Changes</em> button below.''') + andpassmsg + '<p>') if category == 'members': # Figure out which subcategory we should display subcat = Utils.GetPathPieces()[-1] if subcat not in ('list', 'add', 'remove'): subcat = 'list' # Add member category specific tables form.AddItem(membership_options(mlist, subcat, cgidata, doc, form)) form.AddItem(Center(submit_button())) form.AddItem('<hr>') # In "list" subcategory, we can also search for members if subcat == 'list': form.AddItem(_('''Find members by <a href="http://www.python.org/doc/current/lib/re-syntax.html">Python regular expression</a>:''')) form.AddItem(TextBox('findmember', value=cgidata.getvalue('findmember', ''), size='50%')) form.AddItem(SubmitButton('findmember_btn', _('Search...'))) form.AddItem('<hr>') else: form.AddItem(show_variables(mlist, category, cgidata, doc)) if category == 'general': form.AddItem(Center(password_inputs())) form.AddItem(Center(submit_button())) form.AddItem('<hr>') # And add the form doc.AddItem(form) doc.AddItem(linktable) doc.AddItem(mlist.GetMailmanFooter())
fa0e46b5bfa2180b822daee86334dd5980724324 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/fa0e46b5bfa2180b822daee86334dd5980724324/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4717, 12, 781, 376, 16, 997, 16, 3150, 16, 3150, 67, 8477, 16, 14947, 350, 396, 4672, 468, 23278, 326, 1686, 1363, 3981, 718, 273, 312, 1098, 18, 967, 3651, 1785, 2668, 3666,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4717, 12, 781, 376, 16, 997, 16, 3150, 16, 3150, 67, 8477, 16, 14947, 350, 396, 4672, 468, 23278, 326, 1686, 1363, 3981, 718, 273, 312, 1098, 18, 967, 3651, 1785, 2668, 3666,...
self.gridlayout36.addWidget(self.povdir_lineedit,4,1,1,1)
self.gridlayout32.addWidget(self.povdir_lineedit,4,1,1,1)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
cmd = '/bin/dd bs=512 count=3 if=/dev/zero of=' + part
cmd = 'dd bs=512 count=3 if=/dev/zero of=' + part
def killPartition(self, n): part = self.partitionPath(n)
a35c57a736086abaef5a82e2e117a12e3a79b273 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/a35c57a736086abaef5a82e2e117a12e3a79b273/Harddisk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 7003, 12, 2890, 16, 290, 4672, 1087, 273, 365, 18, 10534, 743, 12, 82, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 7003, 12, 2890, 16, 290, 4672, 1087, 273, 365, 18, 10534, 743, 12, 82, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print " %s trained." % (num_spam_trained)
print "\n %s trained." % (num_spam_trained)
def Train(self): if options["globals", "verbose"]: t = time.time()
beb651a01d24a9e56b5d5b9871540adfddc8a062 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/beb651a01d24a9e56b5d5b9871540adfddc8a062/sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2197, 267, 12, 2890, 4672, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30, 268, 273, 813, 18, 957, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2197, 267, 12, 2890, 4672, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30, 268, 273, 813, 18, 957, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
modcmds = dict.fromkeys([c.split('|', 1)[0] for c in mod.cmdtable])
modcmds = dict.fromkeys([c.split('|', 1)[0] for c in ct])
def helpext(name): try: mod = findext(name) except KeyError: raise UnknownCommand(name)
008ac4797156a17d14134155a85b5471dc8eed09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/008ac4797156a17d14134155a85b5471dc8eed09/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2809, 408, 12, 529, 4672, 775, 30, 681, 273, 574, 561, 88, 12, 529, 13, 1335, 4999, 30, 1002, 9077, 2189, 12, 529, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2809, 408, 12, 529, 4672, 775, 30, 681, 273, 574, 561, 88, 12, 529, 13, 1335, 4999, 30, 1002, 9077, 2189, 12, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
unregisteredActivities.append( acName )
def commitMarks( self, sourceId, activitiesDict ): """ Adds marks to activities """ gLogger.info( "Commiting marks", "From %s for %s" % ( sourceId, ", ".join( activitiesDict.keys() ) ) ) acCatalog = self.__createCatalog() rrdManager = self.__createRRDManager() unregisteredActivities = [] for acName in activitiesDict: gLogger.info( "Updating activity", acName) acData = activitiesDict[ acName ] rrdFile = acCatalog.getFilename( sourceId, acName ) if not rrdFile: unregisteredActivities.append( acName ) gLogger.error( "Cant find rrd filename for %s:%s activity" % ( sourceId, acName ) ) continue gLogger.info( "Updating activity", "%s -> %s" % ( acName, rrdFile ) ) timeList = acData.keys() timeList.sort() entries = [] for instant in timeList: entries.append( ( instant , acData[ instant ] ) ) if len( entries ) > 0: gLogger.verbose( "There are %s entries for %s" % ( len( entries ), acName ) ) retDict = rrdManager.update( rrdFile, entries ) if not retDict[ 'OK' ]: gLogger.error( "There was an error updating %s:%s activity [%s]" % ( sourceId, acName, rrdFile ) ) unregisteredActivities.append( acName ) return S_OK( unregisteredActivities )
301956cb054b896aa31bac0643e9961b72f02308 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/301956cb054b896aa31bac0643e9961b72f02308/ServiceInterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 20981, 12, 365, 16, 27572, 16, 17259, 5014, 262, 30, 3536, 15605, 13999, 358, 17259, 3536, 314, 3328, 18, 1376, 12, 315, 5580, 310, 13999, 3113, 315, 1265, 738, 87, 364, 738, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20981, 12, 365, 16, 27572, 16, 17259, 5014, 262, 30, 3536, 15605, 13999, 358, 17259, 3536, 314, 3328, 18, 1376, 12, 315, 5580, 310, 13999, 3113, 315, 1265, 738, 87, 364, 738, 87, ...
], CONTEXT)
], 0, None, None, CONTEXT)
def test0010boolean(self): ''' Test Boolean. ''' boolean1_id = self.boolean.create({ 'boolean': True, }, CONTEXT) self.assert_(boolean1_id)
52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 2163, 6494, 12, 2890, 4672, 9163, 7766, 3411, 18, 9163, 1250, 21, 67, 350, 273, 365, 18, 6494, 18, 2640, 12590, 296, 6494, 4278, 1053, 16, 19879, 13862, 13, 365, 18, 11231, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 2163, 6494, 12, 2890, 4672, 9163, 7766, 3411, 18, 9163, 1250, 21, 67, 350, 273, 365, 18, 6494, 18, 2640, 12590, 296, 6494, 4278, 1053, 16, 19879, 13862, 13, 365, 18, 11231, ...
if not rvdeclared: f.write(" nsresult rv;\n") rvdeclared = True f.write(" rv = %s->%s(%s);\n" % (selfname, comName, args)) if customMethodCall is None: f.write(" if (NS_FAILED(rv))\n") if isMethod: if haveCcx: f.write(" return xpc_qsThrowMethodFailedWithCcx(" "ccx, rv);\n") else: f.write(" return xpc_qsThrowMethodFailed(" "cx, rv, vp);\n")
f.write(" rv = self->%s(%s);\n" % (comName, args)) f.write(" if (NS_FAILED(rv))\n") if isMethod: if haveCcx: f.write(" return xpc_qsThrowMethodFailedWithCcx(ccx, rv);\n")
f.write("#ifdef DEBUG\n")
6f558ca9eddc5be4f0e7a99f5054cd7d74be2155 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/6f558ca9eddc5be4f0e7a99f5054cd7d74be2155/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 18, 2626, 2932, 7, 430, 536, 6369, 64, 82, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 18, 2626, 2932, 7, 430, 536, 6369, 64, 82, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
ci.id = self.name
ci.codec_id = self.name
def _cvt_to_pjsua(self): ci = _pjsua.Codec_Info() ci.id = self.name ci.priority = self.priority return ci
96bd20fdc0d5b621302534a66f338c5d4a91a468 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1549/96bd20fdc0d5b621302534a66f338c5d4a91a468/pjsua.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 71, 11734, 67, 869, 67, 84, 2924, 11886, 12, 2890, 4672, 9039, 273, 389, 84, 2924, 11886, 18, 11008, 67, 966, 1435, 9039, 18, 21059, 67, 350, 273, 365, 18, 529, 9039, 18, 8457, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 71, 11734, 67, 869, 67, 84, 2924, 11886, 12, 2890, 4672, 9039, 273, 389, 84, 2924, 11886, 18, 11008, 67, 966, 1435, 9039, 18, 21059, 67, 350, 273, 365, 18, 529, 9039, 18, 8457, ...
scfg.chan_umodes.friendly[old_infoindex], scfg.chan_umodes.friendly[new_infoindex]))
friendly_change))
def setChannelUserModes(self, whoset, u, changes): # changes: dict of {mode -> on_off} if u not in self.chanusers: LOG.error("setChannelUserModes: %r not in channel." % u) return
60e0660381798071adb49db869e44d85d664117c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4752/60e0660381798071adb49db869e44d85d664117c/bridge_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2909, 1299, 18868, 12, 2890, 16, 600, 538, 278, 16, 582, 16, 3478, 4672, 468, 3478, 30, 2065, 434, 288, 3188, 317, 603, 67, 3674, 97, 309, 582, 486, 316, 365, 18, 7472, 5577, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2909, 1299, 18868, 12, 2890, 16, 600, 538, 278, 16, 582, 16, 3478, 4672, 468, 3478, 30, 2065, 434, 288, 3188, 317, 603, 67, 3674, 97, 309, 582, 486, 316, 365, 18, 7472, 5577, 30...
if self.needs_subscription and (self.username is None or self.password is None): raise ValueError('The %s recipe needs a username and password.'%self.title)
if self.needs_subscription and (\ self.username is None or self.password is None or \ (not self.username and not self.password)): raise ValueError(_('The "%s" recipe needs a username and password.')%self.title)
def __init__(self, options, log, progress_reporter): ''' Initialize the recipe. :param options: Parsed commandline options :param parser: Command line option parser. Used to intelligently merge options. :param progress_reporter: A Callable that takes two arguments: progress (a number between 0 and 1) and a string message. The message should be optional. ''' self.log = log if not isinstance(self.title, unicode): self.title = unicode(self.title, 'utf-8', 'replace')
d74445922ed9b507d3c8b87f7d99701de367c79e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/d74445922ed9b507d3c8b87f7d99701de367c79e/news.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 613, 16, 4007, 67, 266, 7988, 4672, 9163, 9190, 326, 16100, 18, 294, 891, 702, 30, 19244, 28305, 702, 294, 891, 2082, 30, 225, 3498, 980, 1456, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 702, 16, 613, 16, 4007, 67, 266, 7988, 4672, 9163, 9190, 326, 16100, 18, 294, 891, 702, 30, 19244, 28305, 702, 294, 891, 2082, 30, 225, 3498, 980, 1456, ...
args.append('%s=%r' % (name, value))
args.append('%s=%r' % (name, utils.unic(value)))
def _set_variables(self, variables, arg_values): args = [] varargstr = '' if self._vararg: varargs = self._get_varargs(arg_values) variables[self._vararg] = varargs varargstr = ' | %s=%s' % (self._vararg, varargs) arg_values = arg_values[:len(self.names)] for name, value in zip(self.names, arg_values): args.append('%s=%r' % (name, value)) variables[name] = value return ' | '.join(args) + varargstr
a7e471b1d4d6fbd4721ee07c19ad063ffd3c07d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/a7e471b1d4d6fbd4721ee07c19ad063ffd3c07d9/arguments.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 7528, 12, 2890, 16, 3152, 16, 1501, 67, 2372, 4672, 833, 273, 5378, 19732, 313, 273, 875, 309, 365, 6315, 24823, 30, 19732, 273, 365, 6315, 588, 67, 1401, 1968, 12, 3175,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 67, 7528, 12, 2890, 16, 3152, 16, 1501, 67, 2372, 4672, 833, 273, 5378, 19732, 313, 273, 875, 309, 365, 6315, 24823, 30, 19732, 273, 365, 6315, 588, 67, 1401, 1968, 12, 3175,...
if len(items) == 0: return
def get_file_items(self, window, items): """ Menu activated with items selected. Nautilus also calls this function when rendering submenus, even though this is not needed since the entire menu has already been returned. Note that calling C{nautilusVFSFile.invalidate_extension_info()} will also cause get_file_items to be called. @type window: NautilusNavigationWindow @param window: @type items: list of NautilusVFSFile @param items: @rtype: list of MenuItems @return: The context menu entries to add to the menu. """ if len(items) == 0: return paths = [] for item in items: if item.get_uri().startswith("file://"): path = realpath(gnomevfs.get_local_path_from_uri(item.get_uri())) paths.append(path) self.nautilusVFSFile_table[path] = item #~ log.debug("NautilusSvn.get_file_items() called for %s" % paths) # Use the selected path to determine Nautilus's cwd # If more than one files are selected, make sure to use get_common_directory path_to_use = (len(paths) > 1 and get_common_directory(paths) or paths[0]) os.chdir(os.path.split(path_to_use)[0]) return MainContextMenu(paths, self).construct_menu()
74c4a4ca98296bf9062c9aa377714d4a0d695e92 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/74c4a4ca98296bf9062c9aa377714d4a0d695e92/NautilusSvn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 3319, 12, 2890, 16, 2742, 16, 1516, 4672, 3536, 9809, 14892, 598, 1516, 3170, 18, 16350, 1367, 407, 2546, 4097, 333, 445, 1347, 9782, 720, 26065, 16, 5456, 11376, 333, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 3319, 12, 2890, 16, 2742, 16, 1516, 4672, 3536, 9809, 14892, 598, 1516, 3170, 18, 16350, 1367, 407, 2546, 4097, 333, 445, 1347, 9782, 720, 26065, 16, 5456, 11376, 333, ...
def __init__(self, dest='html', stylename='sphinx', ):
def __init__(self, dest='html', stylename='sphinx'):
def __init__(self, dest='html', stylename='sphinx', ): self.dest = dest if not pygments: return if stylename == 'sphinx': style = SphinxStyle elif '.' in stylename: module, stylename = stylename.rsplit('.', 1) style = getattr(__import__(module, None, None, ['__name__']), stylename) else: style = get_style_by_name(stylename) if dest == 'html': self.fmter = {False: self.html_formatter(style=style), True: self.html_formatter(style=style, linenos=True)} else: self.fmter = {False: self.latex_formatter(style=style, commandprefix='PYG'), True: self.latex_formatter(style=style, linenos=True, commandprefix='PYG')}
3531bf6afac2b58adcf67aae65e0195d71878359 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/3531bf6afac2b58adcf67aae65e0195d71878359/highlighting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1570, 2218, 2620, 2187, 16253, 14724, 2218, 87, 15922, 11, 4672, 365, 18, 10488, 273, 1570, 309, 486, 2395, 75, 1346, 30, 327, 309, 16253, 14724, 422, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1570, 2218, 2620, 2187, 16253, 14724, 2218, 87, 15922, 11, 4672, 365, 18, 10488, 273, 1570, 309, 486, 2395, 75, 1346, 30, 327, 309, 16253, 14724, 422, 296,...
tb.AddLabelTool(10, "Execute", execbmp, shortHelp="Execute") self.Bind(wx.EVT_TOOL, self.OnToolClick, id=10) tb.AddLabelTool(20, "Step", stepbmp, shortHelp="Step") self.Bind(wx.EVT_TOOL, self.OnToolClick, id=20) tb.AddLabelTool(30, "Continue", contbmp, shortHelp="Continue") self.Bind(wx.EVT_TOOL, self.OnToolClick, id=30)
tb.AddLabelTool(0x01, "Quit Debugger", quitbmp, shortHelp="Quit Debugger") self.Bind(wx.EVT_TOOL, self.OnMiscClick, id=0x01) tb.AddSeparator() tb.AddLabelTool(0x10, "Execute", execbmp, shortHelp="Execute") self.Bind(wx.EVT_TOOL, self.OnExecClick, id=0x10) tb.AddLabelTool(0x20, "Step", stepbmp, shortHelp="Step") self.Bind(wx.EVT_TOOL, self.OnExecClick, id=0x20) tb.AddLabelTool(0x30, "Continue", contbmp, shortHelp="Continue") self.Bind(wx.EVT_TOOL, self.OnExecClick, id=0x30) tb.AddSeparator() tb.AddLabelTool(0x02, "Clear Breakpoints", cancelbmp, shortHelp="Clear Breakpoints") self.Bind(wx.EVT_TOOL, self.OnMiscClick, id=0x02) tb.AddSeparator() tb.AddLabelTool(0x57, "Reset All", dndbmp, shortHelp="Reset code, registers, and local store") self.Bind(wx.EVT_TOOL, self.OnResetClick, id=0x57) tb.AddLabelTool(0x51, "Reset Code", revertbmp, shortHelp="Reset code to initial stream") self.Bind(wx.EVT_TOOL, self.OnResetClick, id=0x51) tb.AddLabelTool(0x58, "Clear code", clearbmp, shortHelp="Clear all code") self.Bind(wx.EVT_TOOL, self.OnResetClick, id=0x58)
def __init__(self, app, parent, id): wx.Frame.__init__(self, parent, id, "SPU Debugger -- Editor")
4f7cf094f743cc1258da61338293d78c609f2898 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9699/4f7cf094f743cc1258da61338293d78c609f2898/ispugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 595, 16, 982, 16, 612, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 315, 3118, 57, 28645, 1493, 18451, 7923, 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, 1001, 2738, 972, 12, 2890, 16, 595, 16, 982, 16, 612, 4672, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 315, 3118, 57, 28645, 1493, 18451, 7923, 2, -100, -100, ...
('DECLINED', 'DECLINED'), ('TENTATIVE', 'TENTATIVE'), ('DELEGATED', 'DELEGATED')], 'PARTSTAT'), 'rsvp' : fields.boolean('RSVP'), 'delegated_to' : fields.char('DELEGATED-TO', size=124), 'delegated_from' : fields.char('DELEGATED-FROM', size=124), 'sent_by' : fields.char('SENT-BY', size=124), 'cn' : fields.char('CN', size=124), 'dir' : fields.char('DIR', size=124), 'language' : fields.char('LANGUAGE', size=124),
('DECLINED', 'DECLINED'), ('TENTATIVE', 'TENTATIVE'), ('DELEGATED', 'DELEGATED')], 'PARTSTAT'), 'rsvp' : fields.boolean('RSVP'), 'delegated_to' : fields.char('DELEGATED-TO', size=124), 'delegated_from' : fields.char('DELEGATED-FROM', size=124), 'sent_by' : fields.char('SENT-BY', size=124), 'cn' : fields.char('CN', size=124), 'dir' : fields.char('DIR', size=124), 'language' : fields.char('LANGUAGE', size=124),
def import_cal(self, cr, uid, ids, context={}): self.import_ical(cr, uid) # get all property of CalDAV
6ef425eb9ba53031aed0c6d62efd20dc99d4dc99 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/6ef425eb9ba53031aed0c6d62efd20dc99d4dc99/crm_calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 365, 18, 5666, 67, 1706, 12, 3353, 16, 4555, 13, 468, 336, 777, 1272, 434, 3596, 17735, 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, 1930, 67, 771, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 365, 18, 5666, 67, 1706, 12, 3353, 16, 4555, 13, 468, 336, 777, 1272, 434, 3596, 17735, 2, -100, -100, -1...
if not os.path.isabs(filename):
if filename and not os.path.isabs(filename):
def __init__(self, catTitle, catDB, filename = None, maxDepth = 10): self.catTitle = catTitle self.catDB = catDB if not os.path.isabs(filename): filename = wikipedia.config.datafilepath(filename) self.filename = filename # TODO: make maxDepth changeable with a parameter or config file entry self.maxDepth = maxDepth
c8ad98c6254615c42acf6a5e26746fcc58b8d0ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/c8ad98c6254615c42acf6a5e26746fcc58b8d0ea/category.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6573, 4247, 16, 6573, 2290, 16, 1544, 273, 599, 16, 22074, 273, 1728, 4672, 365, 18, 2574, 4247, 273, 6573, 4247, 365, 18, 2574, 2290, 273, 6573, 2290, 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, 1001, 2738, 972, 12, 2890, 16, 6573, 4247, 16, 6573, 2290, 16, 1544, 273, 599, 16, 22074, 273, 1728, 4672, 365, 18, 2574, 4247, 273, 6573, 4247, 365, 18, 2574, 2290, 273, 6573, 2290, 3...
for menu in ['add', 'replace', 'add2', 'replace2', 'rename', 'rm', 'pl', \
for menu in ['add', 'replace', 'playafter', 'rename', 'rm', 'pl', \
def update_menu_visibility(self, show_songinfo_only=False): if show_songinfo_only or not self.expanded: for menu in ['add', 'replace', 'add2', 'replace2', 'rename', 'rm', 'pl', \ 'remove', 'clear', 'update', 'new', 'edit', 'sort', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() return elif self.current_tab == self.TAB_CURRENT: if len(self.currentdata) > 0: if self.current_selection.count_selected_rows() > 0: for menu in ['remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() if not self.filterbox_visible: for menu in ['clear', 'pl', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['clear', 'pl', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() else: for menu in ['clear', 'pl', 'sort', 'remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['add', 'replace', 'add2', 'replace2', 'rename', 'rm', \ 'update', 'new', 'edit']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_LIBRARY: self.UIManager.get_widget('/mainmenu/updatemenu/').show() if len(self.browserdata) > 0: if self.browser_selection.count_selected_rows() > 0: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() else: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['remove', 'clear', 'pl', 'rename', 'rm', 'new', 'edit', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_PLAYLISTS: if self.playlists_selection.count_selected_rows() > 0: for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() if self.playlists_selection.count_selected_rows() == 1 and self.mpd_major_version() >= 0.13: self.UIManager.get_widget('/mainmenu/renamemenu/').show() else: self.UIManager.get_widget('/mainmenu/renamemenu/').hide() else: for menu in ['add', 'replace', 'add2', 'replace2', 'rm', 'rename']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['remove', 'clear', 'pl', 'update', 'new', 'edit', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_STREAMS: self.UIManager.get_widget('/mainmenu/newmenu/').show() if self.streams_selection.count_selected_rows() > 0: if self.streams_selection.count_selected_rows() == 1: self.UIManager.get_widget('/mainmenu/editmenu/').show() else: self.UIManager.get_widget('/mainmenu/editmenu/').hide() for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['rename', 'remove', 'clear', 'pl', 'update', 'sort', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide()
b33877e05a3757e7c9cef00e0e41779cddbb5424 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/b33877e05a3757e7c9cef00e0e41779cddbb5424/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5414, 67, 14422, 12, 2890, 16, 2405, 67, 816, 75, 1376, 67, 3700, 33, 8381, 4672, 309, 2405, 67, 816, 75, 1376, 67, 3700, 578, 486, 365, 18, 17336, 30, 364, 3824, 316, 1022...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5414, 67, 14422, 12, 2890, 16, 2405, 67, 816, 75, 1376, 67, 3700, 33, 8381, 4672, 309, 2405, 67, 816, 75, 1376, 67, 3700, 578, 486, 365, 18, 17336, 30, 364, 3824, 316, 1022...
proxy_user=self.options.proxy_user, proxy_password=self.options.proxy_password)
proxy_user=self.proxy_user, proxy_password=self.proxy_password)
def _do_command(self):
8405d250762441819b75cc1a19b6f899d0c03012 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/8405d250762441819b75cc1a19b6f899d0c03012/managercli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 3076, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 3076, 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...
if best is None or best[1] > endtime: best = (newprob, endtime, n) if best is not None: newprob, new_time, parent = best[0], best[1], best[2]
def getpath(self, view, max_size): start = Arty.Node(self.position, self.angle, parent = None, time = 0, freeprob = 1) if self.freeprob_linesegment(self.position, self.angle, self.goal, view, 0) >= self.SAFETY_THRESHOLD: return [self.position, self.goal] #direct path
0484f9f3f562dab318bf38b4cbce4815517c3c34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9407/0484f9f3f562dab318bf38b4cbce4815517c3c34/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 803, 12, 2890, 16, 1476, 16, 943, 67, 1467, 4672, 787, 273, 1201, 4098, 18, 907, 12, 2890, 18, 3276, 16, 365, 18, 4341, 16, 982, 273, 599, 16, 813, 273, 374, 16, 4843, 7748, 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, 336, 803, 12, 2890, 16, 1476, 16, 943, 67, 1467, 4672, 787, 273, 1201, 4098, 18, 907, 12, 2890, 18, 3276, 16, 365, 18, 4341, 16, 982, 273, 599, 16, 813, 273, 374, 16, 4843, 7748, 2...
def translate_attrs(d, dpi, fonts, logger, font_delta=0, memory=None):
def translate_font_attrs(d, dpi, fonts, logger, font_delta=0, memory=None):
def translate_attrs(d, dpi, fonts, logger, font_delta=0, memory=None): """ Receives a dictionary of html attributes and styles and returns approximate Xylog equivalents in a new dictionary """ def font_weight(val): ans = 0 m = re.search("([0-9]+)", val) if m: ans = int(m.group(1)) elif val.find("bold") >= 0 or val.find("strong") >= 0: ans = 700 return 'bold' if ans >= 700 else 'normal' def font_style(val): ans = 'normal' if 'italic' in val or 'oblique' in val: ans = 'italic' return ans def font_family(val): ans = 'serif' if max(val.find("courier"), val.find("mono"), val.find("fixed"), val.find("typewriter"))>=0: ans = 'mono' elif max(val.find("arial"), val.find("helvetica"), val.find("verdana"), val.find("trebuchet"), val.find("sans")) >= 0: ans = 'sans' return ans def font_variant(val): ans = None if 'small-caps' in val.lower(): ans = 'small-caps' return ans def font_key(family, style, weight): key = 'normal' if style == 'italic' and weight == 'normal': key = 'italic' elif style == 'normal' and weight == 'bold': key = 'bold' elif style == 'italic' and weight == 'bold': key = 'bi' return key def font_size(val): # Assumes a 10 pt font (14 pixels) has fontsize 100 ans = None normal = 14 unit = Span.unit_convert(val, dpi, normal) if unit: if unit < 0: unit = normal + unit if unit < 0: unit = normal ans = int(unit * (72./dpi) * 10) else: if "xx-small" in val: ans = 40 elif "x-small" in val: ans = 60 elif "small" in val: ans = 80 elif "xx-large" in val: ans = 180 elif "x-large" in val: ans = 140 elif "large" in val: ans = 120 if ans is not None: ans += int(font_delta * 20) ans = str(ans) return ans t = dict() family, weight, style, variant = 'serif', 'normal', 'normal', None for key in d.keys(): val = d[key].lower() if key == 'font': vals = val.split() for val in vals: family = font_family(val) if family != 'serif': break for val in vals: weight = font_weight(val) if weight != 'normal': break for val in vals: style = font_style(val) if style != 'normal': break for val in vals: sz = font_size(val) if sz: t['fontsize'] = sz break for val in vals: variant = font_variant(val) if variant: t['fontvariant'] = variant break elif key in ['font-family', 'font-name']: family = font_family(val) elif key == "font-size": ans = font_size(val) if ans: t['fontsize'] = ans elif key == 'font-weight': weight = font_weight(val) elif key == 'font-style': style = font_style(val) elif key == 'font-variant': variant = font_variant(val) if variant: t['fontvariant'] = variant else: report = True if memory != None: if key in memory: report = False else: memory.append(key) if report: logger.info('Unhandled/malformed CSS key: %s: %s', key, d[key]) t['fontfacename'] = (family, font_key(family, style, weight)) if t.has_key('fontsize') and int(t['fontsize']) > 120: t['wordspace'] = 50 return t
e39dc4223f880d6b721e75d35aaa36ac5ad96971 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/e39dc4223f880d6b721e75d35aaa36ac5ad96971/convert_from.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 67, 5776, 67, 7039, 12, 72, 16, 16361, 16, 16450, 16, 1194, 16, 3512, 67, 9878, 33, 20, 16, 3778, 33, 7036, 4672, 3536, 9797, 3606, 279, 3880, 434, 1729, 1677, 471, 5687, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 67, 5776, 67, 7039, 12, 72, 16, 16361, 16, 16450, 16, 1194, 16, 3512, 67, 9878, 33, 20, 16, 3778, 33, 7036, 4672, 3536, 9797, 3606, 279, 3880, 434, 1729, 1677, 471, 5687, 471, ...
def receiver(): s = openmcastsock(MYGROUP, MYPORT)
def receiver(group): group_ip = ipaddr.IP(group) s = socket.socket(_sockfam(group_ip), socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(('', MYPORT)) if group_ip.version == 4: mreq = group_ip.packed + struct.pack('=I', socket.INADDR_ANY) s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq) else: mreq = group_ip.packed + struct.pack('@I', 0) s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq)
def sender(flag): s = socket(AF_INET, SOCK_DGRAM) if flag == '-b': s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) mygroup = '<broadcast>' else: mygroup = MYGROUP ttl = struct.pack('b', 1) # Time-to-live s.setsockopt(IPPROTO_IP, IP_MULTICAST_TTL, ttl) while 1: data = repr(time.time())
b6d4a6a7599bc9ef5f4a34c031a9280a2af3c57e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/b6d4a6a7599bc9ef5f4a34c031a9280a2af3c57e/mcast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5793, 12, 6420, 4672, 272, 273, 2987, 12, 6799, 67, 18819, 16, 20834, 67, 40, 15370, 13, 309, 2982, 422, 2400, 70, 4278, 272, 18, 4424, 27844, 12, 19815, 67, 25699, 16, 7460, 67, 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, 5793, 12, 6420, 4672, 272, 273, 2987, 12, 6799, 67, 18819, 16, 20834, 67, 40, 15370, 13, 309, 2982, 422, 2400, 70, 4278, 272, 18, 4424, 27844, 12, 19815, 67, 25699, 16, 7460, 67, 38, ...
args=('test.blah', 'a')
args=(sys.stderr,)
def formatException(self, ei): return "Got a [%s]" % ei[0].__name__
0ac91f0280629352d99d183cebf23f7cc843029b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/0ac91f0280629352d99d183cebf23f7cc843029b/test_logging.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 503, 12, 2890, 16, 13247, 4672, 327, 315, 15617, 279, 9799, 87, 4279, 738, 13247, 63, 20, 8009, 972, 529, 972, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 740, 503, 12, 2890, 16, 13247, 4672, 327, 315, 15617, 279, 9799, 87, 4279, 738, 13247, 63, 20, 8009, 972, 529, 972, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
EXAMPLES:
EXAMPLES::
def all_graph_colorings(G,n,count_only=False): """ Computes all n-colorings of the graph G by casting the graph coloring problem into an exact cover problem, and passing this into an implementation of the Dancing Links algorithm described by Knuth (who attributes the idea to Hitotumatu and Noshita). The construction works as follows: (columns) * The first |V| columns correspond to a vertex -- a 1 in this column indicates that that vertex has a color. * After those |V| columns, we add n*|E| columns -- a 1 in these columns indicate that a particular edge is incident to a vertex with a certain color. (rows) * For each vertex, add n rows; one for each color c. Place a 1 in the column corresponding to the vertex, and a 1 in the appropriate column for each edge incident to the vertex, indicating that that edge is incident to the color c. * If n > 2, the above construction cannot be exactly covered since each edge will be incident to only two vertices (and hence two colors) - so we add n*|E| rows, each one containing a 1 for each of the n*|E| columns. These get added to the cover solutions "for free" during the backtracking. Note that this construction results in n*|V| + 2*n*|E| + n*|E| entries in the matrix. The Dancing Links algorithm uses a sparse representation, so if the graph is simple, |E| <= |V|^2 and n <= |V|, this construction runs in O(|V|^3) time. Back-conversion to a coloring solution is a simple scan of the solutions, which will contain |V| + (n-2)*|E| entries, so runs in O(|V|^3) time also. For most graphs, the conversion will be much faster -- for example, a planar graph will be transformed for 4-coloring in linear time since |E| = O(|V|). REFERENCES: http://www-cs-staff.stanford.edu/~uno/papers/dancing-color.ps.gz EXAMPLES: sage: from sage.graphs.graph_coloring import all_graph_colorings sage: G = Graph({0:[1,2,3],1:[2]}) sage: n = 0 sage: for C in all_graph_colorings(G,3): ... parts = [C[k] for k in C] ... for P in parts: ... l = len(P) ... for i in range(l): ... for j in range(i+1,l): ... if G.has_edge(P[i],P[j]): ... raise RuntimeError, "Coloring Failed." ... n+=1 sage: print "G has %s 3-colorings."%n G has 12 3-colorings. TESTS: sage: G = Graph({0:[1,2,3],1:[2]}) sage: for C in all_graph_colorings(G,0): print C sage: for C in all_graph_colorings(G,-1): print C Traceback (most recent call last): ... ValueError: n must be non-negative. """ if n == 0: return if n < 0: raise ValueError, "n must be non-negative." V = G.vertices() E = G.edges() nV=len(V) nE=len(E) ones = [] N = xrange(n) Vd= {} colormap = {} k = 0 for i in range(nV): v = V[i] Vd[v] = i for c in N: ones.append([k, [i]]) colormap[k] = (v,c) k+=1 kk = nV for e in E: for c in N: v0 = n*Vd[e[0]]+c v1 = n*Vd[e[1]]+c ones[v0][1].append(kk+c) ones[v1][1].append(kk+c) kk+=n if n > 2: for i in range(n*nE): ones.append([k+i, [nV+i]]) colors = rainbow(n) for i in range(len(ones)): ones[i] = ones[i][1] try: for a in DLXCPP(ones): if count_only: yield 1 continue coloring = {} for x in a: if colormap.has_key(x): v,c = colormap[x] if coloring.has_key(colors[c]): coloring[colors[c]].append(v) else: coloring[colors[c]] = [v] yield coloring except RuntimeError: raise RuntimeError, "Too much recursion! Graph coloring failed."
52bb2bd004fd934c950659300094a9bc9ad4b49c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/52bb2bd004fd934c950659300094a9bc9ad4b49c/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 3536, 14169, 281, 777, 290, 17, 3266, 899, 434, 326, 2667, 611, 635, 27660, 326, 2667, 2036, 310, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 3536, 14169, 281, 777, 290, 17, 3266, 899, 434, 326, 2667, 611, 635, 27660, 326, 2667, 2036, 310, 61...
check_call_noisy([hg, 'clone', repository, fulldir])
check_call_noisy([hg, 'clone'] + hgopts + [repository, fulldir])
def do_hg_pull(dir, repository, hg, rev): fulldir = os.path.join(topsrcdir, dir) # clone if the dir doesn't exist, pull if it does if not os.path.exists(fulldir): fulldir = os.path.join(topsrcdir, dir) check_call_noisy([hg, 'clone', repository, fulldir]) else: cmd = [hg, 'pull', '-R', fulldir] if repository is not None: cmd.append(repository) check_call_noisy(cmd) # update to specific revision if options.verbose: cmd = [hg, 'update', '-v', '-r', rev, '-R', fulldir] else: cmd = [hg, 'update', '-r', rev, '-R', fulldir] check_call_noisy(cmd) check_call([hg, 'parent', '-R', fulldir, '--template=Updated to revision {node}.\n'])
84177b51c45ab616b60bdfb69679ee72485738c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11044/84177b51c45ab616b60bdfb69679ee72485738c6/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 26981, 67, 13469, 12, 1214, 16, 3352, 16, 22576, 16, 5588, 4672, 1983, 1214, 273, 1140, 18, 803, 18, 5701, 12, 3669, 4816, 1214, 16, 1577, 13, 468, 3236, 309, 326, 1577, 3302,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 26981, 67, 13469, 12, 1214, 16, 3352, 16, 22576, 16, 5588, 4672, 1983, 1214, 273, 1140, 18, 803, 18, 5701, 12, 3669, 4816, 1214, 16, 1577, 13, 468, 3236, 309, 326, 1577, 3302,...
self.sliderWin.SetDefaultSize(self.sliderWin.origSize)
self.sliderWin.SetDefaultSize(self.sliderWin.origSize)
def toggleTimeSlider(self, flag): """ Created: 23.07.2006, KP Description: Toggle the time slider on or off """ if not flag: self.sliderWin.SetDefaultSize((0, 0)) else: self.sliderWin.SetDefaultSize(self.sliderWin.origSize)
228d177ed04eda3e5752ade67b1e400d3b569646 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/228d177ed04eda3e5752ade67b1e400d3b569646/Visualizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10486, 950, 21824, 12, 2890, 16, 2982, 4672, 3536, 12953, 30, 10213, 18, 8642, 18, 6976, 26, 16, 1475, 52, 6507, 30, 399, 9891, 326, 813, 18442, 603, 578, 3397, 3536, 309, 486, 2982, 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, 10486, 950, 21824, 12, 2890, 16, 2982, 4672, 3536, 12953, 30, 10213, 18, 8642, 18, 6976, 26, 16, 1475, 52, 6507, 30, 399, 9891, 326, 813, 18442, 603, 578, 3397, 3536, 309, 486, 2982, 3...
self.display_image, self.dpi, self.saved_image_contents]
self.display_image, self.font_size, self.decimals, self.saved_image_contents]
def visible_settings(self): """The settings that are visible in the UI """ result = [self.objects_or_image] if self.objects_or_image == OI_OBJECTS: result += [self.objects_name] result += [self.measurement, self.image_name, self.text_color, self.display_image, self.dpi, self.saved_image_contents] return result
edc598b9bdc386736a3751d962a840353fbc9c99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2870/edc598b9bdc386736a3751d962a840353fbc9c99/displaydataonimage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6021, 67, 4272, 12, 2890, 4672, 3536, 1986, 1947, 716, 854, 6021, 316, 326, 6484, 3536, 563, 273, 306, 2890, 18, 6911, 67, 280, 67, 2730, 65, 309, 365, 18, 6911, 67, 280, 67, 2730, 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, 6021, 67, 4272, 12, 2890, 4672, 3536, 1986, 1947, 716, 854, 6021, 316, 326, 6484, 3536, 563, 273, 306, 2890, 18, 6911, 67, 280, 67, 2730, 65, 309, 365, 18, 6911, 67, 280, 67, 2730, 4...
options['mode'] = saved_mode
def task_run(task_id): """Runs the task by fetching arguments from the BibSched task queue. This is what BibSched will be invoking via daemon call. Return 1 in case of success and 0 in case of failure. """ global options, stat options = task_get_options(task_id) # get options from BibSched task table ## check task id: if not options.has_key("task"): write_message("Error: The task #%d does not seem to be a BibUpload task." % task_id, sys.stderr) return 0 ## check task status: task_status = task_read_status(task_id) if task_status != "WAITING": write_message("Error: The task #%d is %s. I expected WAITING." % \ (task_id, task_status), sys.stderr) return 0 ## we can run the task now: if options["verbose"]: write_message("Task #%d started." % task_id) task_update_status("RUNNING") ## initialize signal handler: signal.signal(signal.SIGUSR1, task_sig_sleep) signal.signal(signal.SIGTERM, task_sig_stop) signal.signal(signal.SIGABRT, task_sig_suicide) signal.signal(signal.SIGCONT, task_sig_wakeup) signal.signal(signal.SIGINT, task_sig_unknown) ## run the task: error = 0 write_message("BibUpload Mode "+options['mode']+" has been choosen.", verbose=2) write_message("STAGE 0:", verbose=2) if options['file_path'] is not None: recs = xml_marc_to_records(open_marc_file(options['file_path'])) stat['nb_records_to_upload'] = len(recs) write_message(" -Open XML marc: DONE", verbose=2) if recs is not None: # We proceed each record by record for record in recs: saved_mode = options['mode'] error = bibupload(record) options['mode'] = saved_mode if error[0] == 1: stat['nb_errors'] += 1 task_update_progress("Done %d out of %d." % \ (stat['nb_records_inserted'] + \ stat['nb_records_updated'], stat['nb_records_to_upload'])) else: write_message(" Error bibupload failed: No record found", verbose=1, stream=sys.stderr) if options['verbose'] >= 1: # Print out the statistics print_out_bibupload_statistics() # Check if they were errors if stat['nb_errors'] >= 1: task_update_status("DONE WITH ERRORS") else: ## we are done: task_update_status("DONE") if options["verbose"]: write_message("Task #%d finished." % task_id) return 1
e790dadaddfab4fbc7ca4ec1b3da63260cfadee0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/e790dadaddfab4fbc7ca4ec1b3da63260cfadee0/bibupload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 2681, 12, 4146, 67, 350, 4672, 3536, 9361, 326, 1562, 635, 16191, 1775, 628, 326, 605, 495, 55, 2049, 1562, 2389, 18, 225, 1220, 353, 4121, 605, 495, 55, 2049, 903, 506, 1538...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1562, 67, 2681, 12, 4146, 67, 350, 4672, 3536, 9361, 326, 1562, 635, 16191, 1775, 628, 326, 605, 495, 55, 2049, 1562, 2389, 18, 225, 1220, 353, 4121, 605, 495, 55, 2049, 903, 506, 1538...
ms.publish("RequestInjector:SetInitialRun", str(run))
ms.publish("RequestInjector:SelectWorkflow", workflowBase)
def reduceVersion(versString): """ _reduceVersion_ take a string like CMSSW_X_Y_Z_preA and reduce it to XYZpreA We add this into the job name for each release validation run to enable easily identifying which jobs are from which release """ result = versString.replace("CMSSW_", "") result = result.replace("_", "") return result
3ac54a4b22aebf33b8438e145d47361929a166be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/3ac54a4b22aebf33b8438e145d47361929a166be/releaseValidation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5459, 1444, 12, 2496, 780, 4672, 3536, 389, 12498, 1444, 67, 225, 4862, 279, 533, 3007, 15871, 1260, 59, 67, 60, 67, 61, 67, 62, 67, 1484, 37, 471, 5459, 518, 358, 30742, 1484, 37, 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, 5459, 1444, 12, 2496, 780, 4672, 3536, 389, 12498, 1444, 67, 225, 4862, 279, 533, 3007, 15871, 1260, 59, 67, 60, 67, 61, 67, 62, 67, 1484, 37, 471, 5459, 518, 358, 30742, 1484, 37, 2...
print 'removing the default HLT_Ht200 trigger from '
print 'removing the default trigger from '
def removeDefaultTrigger(process): print '++++++++++++++++++++++++++++++++++++++++++++' print 'removing the default HLT_Ht200 trigger from ' print 'standard fully hadronic event selection ' print '++++++++++++++++++++++++++++++++++++++++++++' process.analyseFullHadronicSelection.remove(process.hltHt200)
bbd9696552e26f4873b26139b7ff88459282358e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3254/bbd9696552e26f4873b26139b7ff88459282358e/fullHadronicSelection_cff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 1868, 6518, 12, 2567, 4672, 1172, 296, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 9904, 15, 6797, 1172, 296, 2764, 13767, 326, 805, 3080, 628, 296, 1172, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 1868, 6518, 12, 2567, 4672, 1172, 296, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 20934, 9904, 15, 6797, 1172, 296, 2764, 13767, 326, 805, 3080, 628, 296, 1172, 296...
elif maxlevels > 0 and \ name != os.curdir and name != os.pardir and \ os.path.isdir(fullname) and \ not os.path.islink(fullname):
elif (maxlevels > 0 and name != os.curdir and name != os.pardir and os.path.isdir(fullname) and not os.path.islink(fullname)):
def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, quiet=False, legacy=False): """Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: if given, purported directory name (this is the directory name that will show up in error messages) force: if True, force compilation, even if timestamps are up-to-date quiet: if True, be quiet during compilation legacy: if True, produce legacy pyc paths instead of PEP 3147 paths """ if not quiet: print('Listing', dir, '...') try: names = os.listdir(dir) except os.error: print("Can't list", dir) names = [] names.sort() success = 1 for name in names: if name == '__pycache__': continue fullname = os.path.join(dir, name) if ddir is not None: dfile = os.path.join(ddir, name) else: dfile = None if not os.path.isdir(fullname): if not compile_file(fullname, ddir, force, rx, quiet, legacy): success = 0 elif maxlevels > 0 and \ name != os.curdir and name != os.pardir and \ os.path.isdir(fullname) and \ not os.path.islink(fullname): if not compile_dir(fullname, maxlevels - 1, dfile, force, rx, quiet, legacy): success = 0 return success
93744dcdd0c73fe8bd1c86fd862578aae5d7d6d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/93744dcdd0c73fe8bd1c86fd862578aae5d7d6d9/compileall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 1214, 12, 1214, 16, 943, 12095, 33, 2163, 16, 302, 1214, 33, 7036, 16, 2944, 33, 8381, 16, 8581, 33, 7036, 16, 10902, 33, 8381, 16, 8866, 33, 8381, 4672, 3536, 3216, 17, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 1214, 12, 1214, 16, 943, 12095, 33, 2163, 16, 302, 1214, 33, 7036, 16, 2944, 33, 8381, 16, 8581, 33, 7036, 16, 10902, 33, 8381, 16, 8866, 33, 8381, 4672, 3536, 3216, 17, 11...
info['title'] = document.title_or_name info['type'] = self.gettext(document.class_title) info['size'] = document.get_human_size() info['url'] = '%s/;%s' % (self.get_pathto(document), document.get_firstview()) icon = document.get_path_to_icon(16, from_handler=self)
info['title'] = handler.title_or_name info['type'] = self.gettext(handler.class_title) info['size'] = handler.get_human_size() info['url'] = '%s/;%s' % (self.get_pathto(handler), handler.get_firstview()) icon = handler.get_path_to_icon(16, from_handler=self)
def site_search(self, context): root = context.root
900bac0f78b12961d9ce547c1323046c46bd1b20 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/900bac0f78b12961d9ce547c1323046c46bd1b20/website.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2834, 67, 3072, 12, 2890, 16, 819, 4672, 1365, 273, 819, 18, 3085, 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, 2834, 67, 3072, 12, 2890, 16, 819, 4672, 1365, 273, 819, 18, 3085, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.vizrankButton = OWGUI.button(self.optimizationButtons, self, "VizRank", callback = self.vizrank.reshow, tooltip = "Opens VizRank dialog, where you can search for interesting projections with different subsets of attributes.", debuggingEnabled = 0)
self.vizrankButton = OWGUI.button(self.optimizationButtons, self, "VizRank", callback = self.vizrank.reshow, tooltip = "Opens VizRank dialog where you can search for interesting projections with different subsets of attributes.", debuggingEnabled = 0)
def __init__(self,parent=None, signalManager = None, name = "Linear Projection", graphClass = None): OWVisWidget.__init__(self, parent, signalManager, name, TRUE)
c163529c0c7a1be3b6335f5e679f58f64efc14b8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/c163529c0c7a1be3b6335f5e679f58f64efc14b8/OWLinProj.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 16, 508, 273, 315, 15982, 21288, 3113, 2667, 797, 273, 599, 4672, 18233, 3282, 4609, 16186, 2738, 972, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 16, 508, 273, 315, 15982, 21288, 3113, 2667, 797, 273, 599, 4672, 18233, 3282, 4609, 16186, 2738, 972, 12, 2890, ...
self.assert_('pk' in objects[0])
self.assert_('pk' in objects[0]['bugs'][0])
def test_json_view(self): tc.go(make_twill_url('http://openhatch.org/search/?format=json&jsoncallback=callback&language=python')) response = tc.show() self.assert_(response.startswith('callback')) json_string_with_parens = response.split('callback', 1)[1] self.assert_(json_string_with_parens[0] == '(') self.assert_(json_string_with_parens[-1] == ')') json_string = json_string_with_parens[1:-1] objects = simplejson.loads(json_string) self.assert_('pk' in objects[0])
e1b227574a6055ff4bbcc0a61e7ffb1e25735924 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/e1b227574a6055ff4bbcc0a61e7ffb1e25735924/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1977, 67, 1945, 12, 2890, 4672, 1715, 18, 3240, 12, 6540, 67, 11246, 737, 67, 718, 2668, 2505, 2207, 3190, 76, 505, 18, 3341, 19, 3072, 23239, 2139, 33, 1977, 10, 1977, 3394,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1977, 67, 1945, 12, 2890, 4672, 1715, 18, 3240, 12, 6540, 67, 11246, 737, 67, 718, 2668, 2505, 2207, 3190, 76, 505, 18, 3341, 19, 3072, 23239, 2139, 33, 1977, 10, 1977, 3394,...
newchars, decodedbytes = self.decode(data, self.errors)
try: newchars, decodedbytes = self.decode(data, self.errors) except UnicodeDecodeError, exc: if firstline: newchars, decodedbytes = self.decode(data[:exc.start], self.errors) lines = newchars.splitlines(True) if len(lines)<=1: raise else: raise
def read(self, size=-1, chars=-1):
027542bf97f91868a12206db4f0f75685721665b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/027542bf97f91868a12206db4f0f75685721665b/codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 16, 5230, 29711, 21, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 29711, 21, 16, 5230, 29711, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
textcolor(DEFAULT)
textcolor(None)
def sectscan(goodScan, i, j): # light up an individual dot in a sector if goodScan or (abs(i-game.sector.x)<= 1 and abs(j-game.sector.y) <= 1): if (game.quad[i][j]==IHMATER0) or (game.quad[i][j]==IHMATER1) or (game.quad[i][j]==IHMATER2) or (game.quad[i][j]==IHE) or (game.quad[i][j]==IHF): if game.condition == "red": textcolor(RED) elif game.condition == "green": textcolor(GREEN) elif game.condition == "yellow": textcolor(YELLOW) elif game.condition == "docked": textcolor(CYAN) elif game.condition == "dead": textcolor(BROWN) if game.quad[i][j] != game.ship: highvideo() proutn("%c " % game.quad[i][j]) textcolor(DEFAULT) else: proutn("- ")
f193d8f46652803cac87ddebc7593774a27b552c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/f193d8f46652803cac87ddebc7593774a27b552c/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29140, 9871, 12, 19747, 7972, 16, 277, 16, 525, 4672, 468, 9052, 731, 392, 7327, 3928, 316, 279, 16323, 309, 7494, 7972, 578, 261, 5113, 12, 77, 17, 13957, 18, 5709, 280, 18, 92, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29140, 9871, 12, 19747, 7972, 16, 277, 16, 525, 4672, 468, 9052, 731, 392, 7327, 3928, 316, 279, 16323, 309, 7494, 7972, 578, 261, 5113, 12, 77, 17, 13957, 18, 5709, 280, 18, 92, 13, ...
if dleft == 0:
elif dleft == 0:
def on_get_value(self, rowref, column): node = self.tree.get_node_for_rowref(rowref) if not node: return None else: task = node.get_obj() if column == COL_TID: return task.get_id() elif column == COL_OBJ: return task elif column == COL_TITLE: return saxutils.escape(task.get_title()) elif column == COL_SDATE: return str(task.get_start_date()) elif column == COL_DDATE: return str(task.get_due_date()) elif column == COL_DUE: dleft = task.get_days_left() if not dleft: return str(task.get_due_date()) if dleft == 1: return _("Tomorrow") if dleft == 0: return _("Today") if dleft == -1: return _("Yesterday") if dleft < -1: return _("%s days ago") % str(abs(dleft)) if dleft > 1 and dleft <= 15: return _("In %s days") % str(dleft) else: return str(task.get_due_date())
12e20d4b34c0d490242ac011c26b3136fa3d99c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/12e20d4b34c0d490242ac011c26b3136fa3d99c6/tasktree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 588, 67, 1132, 12, 2890, 16, 1027, 1734, 16, 1057, 4672, 756, 273, 365, 18, 3413, 18, 588, 67, 2159, 67, 1884, 67, 492, 1734, 12, 492, 1734, 13, 309, 486, 756, 30, 327, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 588, 67, 1132, 12, 2890, 16, 1027, 1734, 16, 1057, 4672, 756, 273, 365, 18, 3413, 18, 588, 67, 2159, 67, 1884, 67, 492, 1734, 12, 492, 1734, 13, 309, 486, 756, 30, 327, 59...
self.uiPort = options["html_ui", "port"] self.launchUI = options["html_ui", "launch_browser"] self.gzipCache = options["Storage", "cache_use_gzip"] self.cacheExpiryDays = options["Storage", "cache_expiry_days"] self.runTestServer = False self.isTest = False
def init(self): assert not self.prepared, "init after prepare, but before close" # Open the log file. if options["globals", "verbose"]: self.logFile = open('_pop3proxy.log', 'wb', 0) self.servers = [] self.proxyPorts = [] if options["pop3proxy", "remote_servers"]: for server in options["pop3proxy", "remote_servers"]: server = server.strip() if server.find(':') > -1: server, port = server.split(':', 1) else: port = '110' self.servers.append((server, int(port)))
888d79317dace54896b1ecb5b7b2a48ff27795ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/888d79317dace54896b1ecb5b7b2a48ff27795ad/sb_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 4672, 1815, 486, 365, 18, 9366, 72, 16, 315, 2738, 1839, 2911, 16, 1496, 1865, 1746, 6, 468, 3502, 326, 613, 585, 18, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 4672, 1815, 486, 365, 18, 9366, 72, 16, 315, 2738, 1839, 2911, 16, 1496, 1865, 1746, 6, 468, 3502, 326, 613, 585, 18, 309, 702, 9614, 16227, 3113, 315, 11369, 11929, 30...
res = list(res) assert len(res) == 0 or len(res) == 1 or len(res) == 2 if len(res) > 0 and res[0][0] >= et: old_source = None if len(res) == 2: old_source = res[1][1] return edit_conflict(old_source, res[0][1]) tfu = get_title_for_user() if '-' in tfu or '_' in tfu: return my_utils.merge_dicts( d, dict( article_source = source, article_title = title_for_user, old_article_title = old_title, threads_id = threads_id, comment = comment, error = "bad_title_char", line = None, column = None, edit_time = int_time ) ) year,month,hour,day,minute,second = my_utils.get_ymdhms_tuple() uname = d.has_key('username') and d['username'] or extras.remote_ip sinfo = sourceparser.Siginfo(uname, ZonedDate(int_time, 0)) result = sourceparser.parse_wiki_document(unixify_text(source).decode(config.WEB_ENCODING), sinfo) if isinstance(result, sourceparser.ParserError): return my_utils.merge_dicts( d, dict( article_source=source, article_title=get_title_for_user(), old_article_title=old_title, threads_id = threads_id, comment=comment, error = "parse_error", parse_error = result.message, line=result.line, column=result.col, edit_time = int_time ) ) r, sourceparser_state, sig_source = result xhtml_output = None if not isinstance(r, sourceparser.Redirect): try:
r, sourceparser_state, sig_source = result xhtml_output = None if not isinstance(r, sourceparser.Redirect):
def edit_conflict(old_source, new_source): """old_source is the source before either user edited it. new_source is the source of the edit made by the user who created the edit conflict.""" return dict( article_source = source, article_title = title_for_user, old_article_title = old_title, threads_id = threads_id, # If there's an edit conflict, the article must exist, so there will be a threads_id. comment = comment, error = "edit_conflict", line = None, column = None, diff_xhtml = diffengine.pretty_diff(new_source, old_source or '', config.DIFF_LINE_LENGTH), edit_time = int_time )
c5a5f6a12b7943464d8280981a43e1328b105fd3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8158/c5a5f6a12b7943464d8280981a43e1328b105fd3/gliki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 20340, 12, 1673, 67, 3168, 16, 394, 67, 3168, 4672, 3536, 1673, 67, 3168, 353, 326, 1084, 1865, 3344, 729, 18532, 518, 18, 394, 67, 3168, 353, 326, 1084, 434, 326, 3874, 7165...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 20340, 12, 1673, 67, 3168, 16, 394, 67, 3168, 4672, 3536, 1673, 67, 3168, 353, 326, 1084, 1865, 3344, 729, 18532, 518, 18, 394, 67, 3168, 353, 326, 1084, 434, 326, 3874, 7165...
'parsheet', 'Parallel Stylesheets', 'stylesheets-block', 'boolean',
'parsheet', 'Parallel CSS', 'stylesheets-block', 'boolean',
def GetScoreAndDisplayValue(self, median, medians=None, is_uri_result=False): """Custom scoring function.
e28c72f7a29109b56ed1d55a8e25dea0858e413a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5745/e28c72f7a29109b56ed1d55a8e25dea0858e413a/test_set.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 7295, 1876, 4236, 620, 12, 2890, 16, 12644, 16, 6735, 19657, 33, 7036, 16, 353, 67, 1650, 67, 2088, 33, 8381, 4672, 3536, 3802, 22958, 445, 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, 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, 968, 7295, 1876, 4236, 620, 12, 2890, 16, 12644, 16, 6735, 19657, 33, 7036, 16, 353, 67, 1650, 67, 2088, 33, 8381, 4672, 3536, 3802, 22958, 445, 18, 2, -100, -100, -100, -100, -100, -1...
familly = socket.AF_INET6
try: socket.getaddrinfo(self.host, int(self.port), socket.AF_INET6) familly = socket.AF_INET6 except: pass
def reconnect(self): if self.host and self.port: self.disconnect() familly = socket.AF_INET if socket.has_ipv6: familly = socket.AF_INET6 self.sock = socket.socket( familly, socket.SOCK_STREAM) self.sock.settimeout(120) self.sock.connect((self.host, int(self.port)))
8ae1994e86d5d5727aaf467e63bbe276b5998ba8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/8ae1994e86d5d5727aaf467e63bbe276b5998ba8/pysocket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11812, 12, 2890, 4672, 309, 365, 18, 2564, 471, 365, 18, 655, 30, 365, 18, 20177, 1435, 284, 11580, 715, 273, 2987, 18, 6799, 67, 18819, 309, 2987, 18, 5332, 67, 10834, 26, 30, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11812, 12, 2890, 4672, 309, 365, 18, 2564, 471, 365, 18, 655, 30, 365, 18, 20177, 1435, 284, 11580, 715, 273, 2987, 18, 6799, 67, 18819, 309, 2987, 18, 5332, 67, 10834, 26, 30, 775, ...
"Use 'flies help' for the full list of commands\n")
"Use 'flies help' for the full list of commands")
def _PrintUsage(self): print ('\nClient for talking to a Flies Server\n\n' 'basic commands:\n\n' 'list List all available projects\n' 'projectinfo Retrieve a project\n' 'iterationinfo Retrieve a iteration\n\n' "Use 'flies help' for the full list of commands\n")
f80f66af483ec04e630f58db8048e9609039b02e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12929/f80f66af483ec04e630f58db8048e9609039b02e/flies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5108, 5357, 12, 2890, 4672, 1172, 7707, 64, 82, 1227, 364, 26591, 310, 358, 279, 478, 549, 281, 3224, 64, 82, 64, 82, 11, 296, 13240, 4364, 5581, 82, 64, 82, 11, 296, 1098, 2398...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5108, 5357, 12, 2890, 4672, 1172, 7707, 64, 82, 1227, 364, 26591, 310, 358, 279, 478, 549, 281, 3224, 64, 82, 64, 82, 11, 296, 13240, 4364, 5581, 82, 64, 82, 11, 296, 1098, 2398...
sc = ET.SubElement(root, 'upnp:searchClass')
sc = ET.SubElement(root, qname('searchClass',UPNP_NS))
def toElement(self,**kwargs):
e9c4345533fd24eede4febe6e6cd4c5c3b16e15c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/e9c4345533fd24eede4febe6e6cd4c5c3b16e15c/DIDLLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 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,...
for i in self._items: print i, i.alternate , " ", print
def parse_playlist(self, xml): #logging.info('Parsing playlist XML... %s', xml) #xml.replace('<summary/>', '<summary></summary>') #xml = fix_selfclosing(xml) soup = BeautifulStoneSoup(xml, selfClosingTags=self_closing_tags) self.meta = {} self._items = [] self._related = []
e9308323abd7d76cee674599e87bde273bc1afa0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11070/e9308323abd7d76cee674599e87bde273bc1afa0/iplayer2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1601, 1098, 12, 2890, 16, 2025, 4672, 468, 11167, 18, 1376, 2668, 13963, 16428, 3167, 2777, 738, 87, 2187, 2025, 13, 468, 2902, 18, 2079, 2668, 32, 7687, 18280, 16, 2368, 7687,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1601, 1098, 12, 2890, 16, 2025, 4672, 468, 11167, 18, 1376, 2668, 13963, 16428, 3167, 2777, 738, 87, 2187, 2025, 13, 468, 2902, 18, 2079, 2668, 32, 7687, 18280, 16, 2368, 7687,...
self.fill_table( page, ['end_time', inj.geocent_end_time] ) self.fill_table( page, ['end_time_ns', inj.geocent_end_time_ns] )
self.fill_table( page, ['end_time', '%010d' % inj.geocent_end_time] ) self.fill_table( page, ['end_time_ns', '%09d' %inj.geocent_end_time_ns] )
def create_table_inj(self, inj): """ Creates the first table containing basic properties of the injection which is followed up. @param inj: an injection table """
e96cbd4b80d557738ffe6f479cb8d2c70c7aed4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/e96cbd4b80d557738ffe6f479cb8d2c70c7aed4e/followup_trigger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2121, 67, 267, 78, 12, 2890, 16, 316, 78, 4672, 3536, 10210, 326, 1122, 1014, 4191, 5337, 1790, 434, 326, 10380, 1492, 353, 10860, 731, 18, 632, 891, 316, 78, 30, 392, 10380, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 67, 2121, 67, 267, 78, 12, 2890, 16, 316, 78, 4672, 3536, 10210, 326, 1122, 1014, 4191, 5337, 1790, 434, 326, 10380, 1492, 353, 10860, 731, 18, 632, 891, 316, 78, 30, 392, 10380, ...
"""Split a pathname into drive and path specifiers. Return a 2-tuple (drive, path); either part may be empty. This recognizes UNC paths (e.g. '\\\\host\\mountpoint\\dir\\file')"""
"""Split a pathname into drive and path specifiers. Returns a 2-tuple "(drive,path)"; either part may be empty"""
def splitdrive(p): """Split a pathname into drive and path specifiers. Return a 2-tuple (drive, path); either part may be empty. This recognizes UNC paths (e.g. '\\\\host\\mountpoint\\dir\\file')""" if p[1:2] == ':': return p[0:2], p[2:] firstTwo = p[0:2] if firstTwo == '//' or firstTwo == '\\\\': # is a UNC path: # vvvvvvvvvvvvvvvvvvvv equivalent to drive letter # \\machine\mountpoint\directories... # directory ^^^^^^^^^^^^^^^ normp = normcase(p) index = string.find(normp, '\\', 2) if index == -1: ##raise RuntimeError, 'illegal UNC path: "' + p + '"' return ("", p) index = string.find(normp, '\\', index + 1) if index == -1: index = len(p) return p[:index], p[index:] return '', p
c9656f612582e29c928b4900ff2dd83979849848 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9656f612582e29c928b4900ff2dd83979849848/ntpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 25431, 12, 84, 4672, 3536, 5521, 279, 9806, 1368, 14316, 471, 589, 857, 3383, 18, 2860, 279, 576, 17, 8052, 7751, 25431, 16, 803, 2225, 31, 225, 3344, 1087, 2026, 506, 1008, 8395, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 25431, 12, 84, 4672, 3536, 5521, 279, 9806, 1368, 14316, 471, 589, 857, 3383, 18, 2860, 279, 576, 17, 8052, 7751, 25431, 16, 803, 2225, 31, 225, 3344, 1087, 2026, 506, 1008, 8395, ...
def identify_files():
def identify_files(path=os.curdir, prefix=''):
def identify_files(): #set files to a list of the files we want to install for dirpath, dirnames, filenames in os.walk(os.curdir,topdown=True): dirnames[:] = [x for x in dirnames if x not in exclude_dirs] dirpath = os.path.split for filename in filenames: if filename not in exclude_files: filename = os.path.join(dirpath,filename) print "Marking file %s for installation" % filename files_to_install.append(filename) for dirname in dirnames: dirname = os.path.join(dirpath,dirname) print "Marking directory %s for installation" % dirname dirs_to_install.append(dirname)
5a1e28f88b1fbffe6a2eb4c7ae121c5169b222af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/5a1e28f88b1fbffe6a2eb4c7ae121c5169b222af/install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 67, 2354, 12, 803, 33, 538, 18, 1397, 1214, 16, 1633, 2218, 11, 4672, 468, 542, 1390, 358, 279, 666, 434, 326, 1390, 732, 2545, 358, 3799, 364, 17803, 16, 1577, 1973, 16, 9066, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 67, 2354, 12, 803, 33, 538, 18, 1397, 1214, 16, 1633, 2218, 11, 4672, 468, 542, 1390, 358, 279, 666, 434, 326, 1390, 732, 2545, 358, 3799, 364, 17803, 16, 1577, 1973, 16, 9066, ...
nn = gap.eval("NumeratorOfRationalFunction(ff)") dd = gap.eval("DenominatorOfRationalFunction(ff)")
nn = gap.eval("NumeratorOfRationalFunction(ff)").replace("x_1","x") dd = gap.eval("DenominatorOfRationalFunction(ff)").replace("x_1","x")
def poincare_series(self, p=2, n=10): """ Returns the Poincare series of G mod p (p must be a prime), for n>1 large. In other words, if you input a finite group G, a prime p, and a positive integer n, it returns a quotient of polynomials f(x)=P(x)/Q(x) whose coefficient of $x^k$ equals the rank of the vector space $H_k(G,ZZ/pZZ)$, for all k in the range $1\leq k \leq n$. REQUIRES: GAP package HAP (in gap_packages-*.spkg).
2aab0e46e038cb99ddd82ff3767ef8540acf0c86 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2aab0e46e038cb99ddd82ff3767ef8540acf0c86/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 885, 71, 834, 67, 10222, 12, 2890, 16, 293, 33, 22, 16, 290, 33, 2163, 4672, 3536, 2860, 326, 453, 885, 71, 834, 4166, 434, 611, 681, 293, 261, 84, 1297, 506, 279, 17014, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 885, 71, 834, 67, 10222, 12, 2890, 16, 293, 33, 22, 16, 290, 33, 2163, 4672, 3536, 2860, 326, 453, 885, 71, 834, 4166, 434, 611, 681, 293, 261, 84, 1297, 506, 279, 17014, 3631, ...
Returns the Cartan Type.
Returns the Cartan type.
def cartan_type(self): """ Returns the Cartan Type.
a164141dcaca9c673844b5041591f614ac6a8207 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a164141dcaca9c673844b5041591f614ac6a8207/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7035, 304, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 17695, 304, 1412, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7035, 304, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 17695, 304, 1412, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.separator = plugin_api.AddToolbarItem(gtk.SeparatorToolItem())
self.separator = plugin_api.add_toolbar_item(gtk.SeparatorToolItem())
def activate(self, plugin_api): self.menu_item = gtk.MenuItem("Start task in Hamster") self.menu_item.connect('activate', self.browser_cb, plugin_api) self.tb_button=gtk.ToolButton() self.tb_button.set_label("Start") self.tb_button.set_icon_name('hamster-applet') self.tb_button.set_tooltip_text("Start a new activity in Hamster Time Tracker based on the selected task") self.tb_button.connect('clicked', self.browser_cb, plugin_api) # add a menu item to the menu bar plugin_api.AddMenuItem(self.menu_item) # saves the separator's index to later remove it self.separator = plugin_api.AddToolbarItem(gtk.SeparatorToolItem()) # add a item (button) to the ToolBar plugin_api.AddToolbarItem(self.tb_button)
2d4da4adae7a488e78d1a18d125520cc069634ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/2d4da4adae7a488e78d1a18d125520cc069634ff/hamster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 16, 1909, 67, 2425, 4672, 365, 18, 5414, 67, 1726, 273, 22718, 18, 12958, 2932, 1685, 1562, 316, 670, 301, 8190, 7923, 365, 18, 5414, 67, 1726, 18, 3612, 2668, 10014, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 12, 2890, 16, 1909, 67, 2425, 4672, 365, 18, 5414, 67, 1726, 273, 22718, 18, 12958, 2932, 1685, 1562, 316, 670, 301, 8190, 7923, 365, 18, 5414, 67, 1726, 18, 3612, 2668, 10014, ...
"Compile a regular expression pattern, returning a RegexObject."
"""compile(pattern[, flags]) -> RegexObject Compile a regular expression pattern into a regular expression object, which can be used for matching using its match() and search() methods. """
def compile(pattern, flags=0): "Compile a regular expression pattern, returning a RegexObject." groupindex={} code=pcre_compile(pattern, flags, groupindex) return RegexObject(pattern, flags, code, groupindex)
6ebb387a087b1a64437856da4b286694396e663c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6ebb387a087b1a64437856da4b286694396e663c/re.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 4951, 16, 2943, 33, 20, 4672, 3536, 11100, 12, 4951, 63, 16, 2943, 5717, 317, 15078, 921, 225, 16143, 279, 6736, 2652, 1936, 1368, 279, 6736, 2652, 733, 16, 1492, 848, 506, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 12, 4951, 16, 2943, 33, 20, 4672, 3536, 11100, 12, 4951, 63, 16, 2943, 5717, 317, 15078, 921, 225, 16143, 279, 6736, 2652, 1936, 1368, 279, 6736, 2652, 733, 16, 1492, 848, 506, 1...
request = loads(str_)
request = Pickle.loads(str_)
def loop(self): """Loop forever and respond to all requests.""" _log("Server::loop") while True: try: try: str_ = _read_lp_hunk(self._in) except EOFError: if _g_debug_mode: _log("Exiting normally") sys.exit(0)
06157e647a2b7a7c67b08f34b60343d00b355e39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10078/06157e647a2b7a7c67b08f34b60343d00b355e39/saranwrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 2890, 4672, 3536, 6452, 21238, 471, 6846, 358, 777, 3285, 12123, 389, 1330, 2932, 2081, 2866, 6498, 7923, 1323, 1053, 30, 775, 30, 775, 30, 609, 67, 273, 389, 896, 67, 9953, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2798, 12, 2890, 4672, 3536, 6452, 21238, 471, 6846, 358, 777, 3285, 12123, 389, 1330, 2932, 2081, 2866, 6498, 7923, 1323, 1053, 30, 775, 30, 775, 30, 609, 67, 273, 389, 896, 67, 9953, ...
raise Exception, "Error opening process handle! Error Str: " + str(WinError())
raise Exception, "Error opening process handle! Process ID: " + str(PID) + " Error Str: " + str(WinError())
def getProcessHandle (PID): handle = _openProcess( PROCESS_QUERY_AND_TERMINATE, 0, PID) if handle: return handle else: raise Exception, "Error opening process handle! Error Str: " + str(WinError())
cc8694e5bb28dc31687749ddf46d9663786f4103 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7995/cc8694e5bb28dc31687749ddf46d9663786f4103/windows_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18758, 3259, 261, 16522, 4672, 1640, 273, 389, 3190, 2227, 12, 20647, 67, 10753, 67, 4307, 67, 29516, 1777, 16, 374, 16, 14788, 13, 309, 1640, 30, 327, 1640, 469, 30, 1002, 1185, 16, 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, 18758, 3259, 261, 16522, 4672, 1640, 273, 389, 3190, 2227, 12, 20647, 67, 10753, 67, 4307, 67, 29516, 1777, 16, 374, 16, 14788, 13, 309, 1640, 30, 327, 1640, 469, 30, 1002, 1185, 16, 3...
if line.split()[0].lower()=="end":break
ll=line.split() if ll[0].lower()=="end":break
def ff_conv(oldInput,oldSect,newInput,new_sect,conv): del new_sect.auto_g new_sect.pre_comments=oldSect.pre_comments new_sect.post_comments=oldSect.post_comments l_nr=0 nl=len(oldSect.raw_lines) while 1: if l_nr>=nl: break line=oldSect.raw_lines[l_nr] ll=line.strip().lower() if ll=="charges": while 1: l_nr+=1 if l_nr>=nl: break line=oldSect.raw_lines[l_nr] if line.split()[0].lower()=="end":break ch=Section(conv.upcase("charge")) ch.add_keyword(Keyword(conv.upcase("atom"), values=[line.split()[0]])) ch.add_keyword(Keyword(conv.upcase("charge"), values=[line.split()[1]])) new_sect.add_subsection(ch) elif ll=="bends": while 1: l_nr+=1 if l_nr>=nl: break line=oldSect.raw_lines[l_nr] if line.split()[0].lower()=="end":break ch=Section(conv.upcase("bend")) ch.add_keyword(Keyword(conv.upcase("atoms"),values=line.split()[1:4])) ch.add_keyword(Keyword(conv.upcase("k"),values=[line.split()[4]])) ch.add_keyword(Keyword(conv.upcase("theta0"),values=[line.split()[5]])) new_sect.add_subsection(ch) elif ll=="bonds": while 1: l_nr+=1 if l_nr>=nl: break line=oldSect.raw_lines[l_nr] if line.split()[0].lower()=="end":break ch=Section(conv.upcase("bond")) ch.add_keyword(Keyword(conv.upcase("atoms"),values=line.split()[1:3])) ch.add_keyword(Keyword(conv.upcase("k"),values=[line.split()[3]])) ch.add_keyword(Keyword(conv.upcase("r0"),values=[line.split()[4]])) new_sect.add_subsection(ch) elif ll.split()[0]=="parmfile": new_sect.add_keyword(Keyword("parmfile",[line.split()[2]])) new_sect.add_keyword(Keyword("parmtype",[line.split()[1]])) elif ll.split()[0]=="ei_scale": new_sect.add_keyword(Keyword("ei_scale14",[line.split()[1]])) elif ll.split()[0]=="vdw_scale": new_sect.add_keyword(Keyword("vdw_scale14",[line.split()[1]])) elif ll.split()[0]=="rcut_nb": new_sect.add_keyword(Keyword("rcut_nb",[line.split()[1]])) elif ll.split()[0]=="nonbonded": ss=Section(conv.upcase("nonbonded")) new_sect.add_subsection(ss) f_data={'lennard-jones':{3:'epsilon',4:'sigma',5:'rcut'}, 'bmhft':{3:'rcut'},'eam':{3:'parmfile'},'ipbv':{3:'rcut'}, 'williams':{3:'a',4:'b',5:'c',6:'rcut'}} while 1: l_nr+=1 if l_nr>=nl: break line=oldSect.raw_lines[l_nr] if line.split()[0].lower()=="end":break l=line.split() sname=l[0].lower() ch=Section(conv.upcase(l[0])) ch.add_keyword(Keyword("atom",l[1:3])) for idx in f_data[sname]: kname=f_data[sname][idx] ch.add_keyword(Keyword(conv.upcase(kname),values=[l[idx]])) ss.add_subsection(ch) else: print "WARNING ignoring line ",repr(line),"in forcefield section" l_nr+=1
e0c4b5ab23ad2adb0c363b9e52cb0f9ff781518d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2834/e0c4b5ab23ad2adb0c363b9e52cb0f9ff781518d/input_converter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6875, 67, 4896, 12, 1673, 1210, 16, 1673, 55, 386, 16, 2704, 1210, 16, 2704, 67, 5709, 16, 4896, 4672, 1464, 394, 67, 5709, 18, 6079, 67, 75, 394, 67, 5709, 18, 1484, 67, 9231, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6875, 67, 4896, 12, 1673, 1210, 16, 1673, 55, 386, 16, 2704, 1210, 16, 2704, 67, 5709, 16, 4896, 4672, 1464, 394, 67, 5709, 18, 6079, 67, 75, 394, 67, 5709, 18, 1484, 67, 9231, 33, ...
sage: MS = MatrixSpace(ZZ, 2) sage: a = list(MS) Traceback (most recent call last): ... NotImplementedError: object does not support iteration
sage: MS = MatrixSpace(ZZ, 2, 3) sage: i = iter(MS) sage: a = [ i.next() for _ in range(6) ] sage: a[0] [0 0 0] [0 0 0] sage: a[4] [0 0 0] [1 0 0]
def __iter__(self): """ EXAMPLES: sage: MS = MatrixSpace(GF(2),2) sage: a = list(MS) sage: len(a) 16 sage: a[0] [0 0] [0 0]
d7fb6610fe25d0a8efe9479e588f2a9e31c48e97 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d7fb6610fe25d0a8efe9479e588f2a9e31c48e97/matrix_space.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 9238, 273, 7298, 3819, 12, 43, 42, 12, 22, 3631, 22, 13, 272, 410, 30, 279, 273, 666, 12, 3537, 13, 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, 1001, 2165, 972, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 9238, 273, 7298, 3819, 12, 43, 42, 12, 22, 3631, 22, 13, 272, 410, 30, 279, 273, 666, 12, 3537, 13, 272, ...
clr.preload = True self.failUnless(clr.preload is True, clr.preload) clr.preload = 0 self.failUnless(clr.preload is False, clr.preload) clr.preload = 1 self.failUnless(clr.preload is True, clr.preload)
clr.setPreload(True) self.failUnless(clr.getPreload() is True, clr.getPreload()) clr.setPreload(0) self.failUnless(clr.getPreload() is False, clr.getPreload()) clr.setPreload(1) self.failUnless(clr.getPreload() is True, clr.getPreload())
def testPreloadVar(self): import clr self.failUnless(clr.preload is False, clr.preload) try: clr.preload = True self.failUnless(clr.preload is True, clr.preload) clr.preload = 0 self.failUnless(clr.preload is False, clr.preload) clr.preload = 1 self.failUnless(clr.preload is True, clr.preload) import System.Configuration content = dir(System.Configuration) self.failUnless(len(content) > 10, content) finally: clr.preload = False
e2aff663e48095b609a0d646efd75bc08e269c78 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8297/e2aff663e48095b609a0d646efd75bc08e269c78/test_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1386, 945, 1537, 12, 2890, 4672, 1930, 927, 86, 365, 18, 6870, 984, 2656, 12, 830, 86, 18, 1484, 945, 353, 1083, 16, 927, 86, 18, 1484, 945, 13, 775, 30, 927, 86, 18, 542, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1386, 945, 1537, 12, 2890, 4672, 1930, 927, 86, 365, 18, 6870, 984, 2656, 12, 830, 86, 18, 1484, 945, 353, 1083, 16, 927, 86, 18, 1484, 945, 13, 775, 30, 927, 86, 18, 542, 13...
c.execute('INSERT INTO %s(ds_key) VALUES(?)' % (info.table,), (str(key),))
c.execute('INSERT INTO %s(id, ds_key) VALUES(NULL, ?)' % (info.table,), (str(key),))
def save_entity(sql, info, entity): ''' Delete any existing entity from the database with the same key, then save the given entity. @param[in] info Associated ModelInfo instance. @param[in] entity appengine.ext.db.Model instance. ''' c = sql.cursor() key = entity.key() old_id = fetch_one_col(c, 'SELECT id FROM %s WHERE ds_key = ?' % (info.table, ), str(key)) if old_id is not None: c.execute('DELETE FROM %s WHERE id = ?' % (info.table,), (old_id,)) logging.debug('deleted old row from %s id=%s', info.table, old_id) c.execute('INSERT INTO %s(ds_key) VALUES(?)' % (info.table,), (str(key),)) new_id = c.lastrowid for prop in info.props: if old_id is not None: c.execute('DELETE FROM %s WHERE %s_id = ?' % (prop.table, info.table), (old_id, )) value = prop.translator(prop.prop.get_value_for_datastore(entity)) c.execute('INSERT INTO %s(%s_id, value) VALUES(?, ?)' % (prop.table, info.table), (new_id, value)) return old_id is not None
c988a7136c588ec46c99f57110ee9bd002f11810 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7737/c988a7136c588ec46c99f57110ee9bd002f11810/dsync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1096, 12, 4669, 16, 1123, 16, 1522, 4672, 9163, 2504, 1281, 2062, 1522, 628, 326, 2063, 598, 326, 1967, 498, 16, 1508, 1923, 326, 864, 1522, 18, 225, 632, 891, 63, 267, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1096, 12, 4669, 16, 1123, 16, 1522, 4672, 9163, 2504, 1281, 2062, 1522, 628, 326, 2063, 598, 326, 1967, 498, 16, 1508, 1923, 326, 864, 1522, 18, 225, 632, 891, 63, 267, 65, ...
return self.clients["git"]
git = self.clients["git"] if is_repo_path: git.set_repository(path) else: repo_path = git.find_repository_path(path) git.set_repository(repo_path) return git
def git(self, path, is_repo_path=False): if "git" in self.clients: return self.clients["git"] else: try: from rabbitvcs.vcs.git import Git git = Git()
d40ad4963e564851e8471c100e250a8f22162c3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/d40ad4963e564851e8471c100e250a8f22162c3c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5071, 12, 2890, 16, 589, 16, 353, 67, 7422, 67, 803, 33, 8381, 4672, 309, 315, 6845, 6, 316, 365, 18, 16931, 30, 5071, 273, 365, 18, 16931, 9614, 6845, 11929, 225, 309, 353, 67, 7422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5071, 12, 2890, 16, 589, 16, 353, 67, 7422, 67, 803, 33, 8381, 4672, 309, 315, 6845, 6, 316, 365, 18, 16931, 30, 5071, 273, 365, 18, 16931, 9614, 6845, 11929, 225, 309, 353, 67, 7422...
def get(self, key, default):
def get(self, key, default=None):
def get(self, key, default): return self.__data.get(key, default)
e5db3fc55b897d9c14cb7d367bb423270ac28590 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/e5db3fc55b897d9c14cb7d367bb423270ac28590/Session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 498, 16, 805, 33, 7036, 4672, 327, 365, 16186, 892, 18, 588, 12, 856, 16, 805, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 498, 16, 805, 33, 7036, 4672, 327, 365, 16186, 892, 18, 588, 12, 856, 16, 805, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if (platform.architecture() == "64bit" and os.path.isdir("thirdparty/win-python-x64")):
if (platform.architecture()[0]=="64bit" and os.path.isdir("thirdparty/win-python-x64")):
def parseopts(args): global OPTIMIZE,INSTALLER,RUNTIME,GENMAN global VERSION,COMPRESSOR,VERBOSE,THREADCOUNT longopts = [ "help", "optimize=","everything","nothing","installer","runtime", "version=","lzma","no-python","threads=","outputdir="] anything = 0 for pkg in PkgListGet(): longopts.append("no-"+pkg.lower()) for pkg in PkgListGet(): longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" elif (option=="--optimize"): OPTIMIZE=value elif (option=="--installer"): INSTALLER=1 elif (option=="--runtime"): RUNTIME=1 elif (option=="--genman"): GENMAN=1 elif (option=="--everything"): PkgEnableAll() elif (option=="--nothing"): PkgDisableAll() elif (option=="--threads"): THREADCOUNT=int(value) elif (option=="--outputdir"): SetOutputDir(value.strip()) elif (option=="--version"): VERSION=value if (len(VERSION.split(".")) != 3): raise "usage" elif (option=="--lzma"): COMPRESSOR="lzma" else: for pkg in PkgListGet(): if (option=="--use-"+pkg.lower()): PkgEnable(pkg) break for pkg in PkgListGet(): if (option=="--no-"+pkg.lower()): PkgDisable(pkg) break anything = 1 except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE")
d55e92ae68a3808d0405234f3a88d13f49650d6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/d55e92ae68a3808d0405234f3a88d13f49650d6d/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 4952, 12, 1968, 4672, 2552, 16456, 3445, 15641, 16, 28865, 654, 16, 54, 25375, 16, 16652, 9560, 2552, 8456, 16, 4208, 22526, 916, 16, 21900, 16, 21730, 7240, 1525, 4952, 273, 306, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4952, 12, 1968, 4672, 2552, 16456, 3445, 15641, 16, 28865, 654, 16, 54, 25375, 16, 16652, 9560, 2552, 8456, 16, 4208, 22526, 916, 16, 21900, 16, 21730, 7240, 1525, 4952, 273, 306, ...
reactor.stop()
stopConnection()
def closed(self): forwarding.SSHListenClientForwardingChannel.closed(self) if len(self.conn.channels) == 1 and not (options['noshell'] and not options['nocache']): # just us left reactor.stop()
6d10400ab77bc237c28603e1bf6c6441925d9f47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6d10400ab77bc237c28603e1bf6c6441925d9f47/conch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4375, 12, 2890, 4672, 20635, 18, 12559, 14750, 1227, 21487, 2909, 18, 12204, 12, 2890, 13, 309, 562, 12, 2890, 18, 4646, 18, 9114, 13, 422, 404, 471, 486, 261, 2116, 3292, 82, 17636, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4375, 12, 2890, 4672, 20635, 18, 12559, 14750, 1227, 21487, 2909, 18, 12204, 12, 2890, 13, 309, 562, 12, 2890, 18, 4646, 18, 9114, 13, 422, 404, 471, 486, 261, 2116, 3292, 82, 17636, 1...
df = subprocess.Popen(['free', '-m'], stdout=subprocess.PIPE).communicate()[0] self.checksLogger.debug('getDiskUsage: memory after Popen - ' + str(df))
mem = subprocess.Popen(['free', '-m'], stdout=subprocess.PIPE).communicate()[0] self.checksLogger.debug('getDiskUsage: memory after Popen - ' + str(mem))
def getDiskUsage(self): self.checksLogger.debug('getDiskUsage: start') # Memory logging (case 27152) if self.agentConfig['debugMode'] and sys.platform == 'linux2': df = subprocess.Popen(['free', '-m'], stdout=subprocess.PIPE).communicate()[0] self.checksLogger.debug('getDiskUsage: memory before Popen - ' + str(df)) # Get output from df try: self.checksLogger.debug('getDiskUsage: attempting Popen') df = subprocess.Popen(['df', '-ak'], stdout=subprocess.PIPE).communicate()[0] # -k option uses 1024 byte blocks so we can calculate into MB except Exception, e: import traceback self.checksLogger.error('getDiskUsage: exception = ' + traceback.format_exc()) return False # Memory logging (case 27152) if self.agentConfig['debugMode'] and sys.platform == 'linux2': df = subprocess.Popen(['free', '-m'], stdout=subprocess.PIPE).communicate()[0] self.checksLogger.debug('getDiskUsage: memory after Popen - ' + str(df)) self.checksLogger.debug('getDiskUsage: Popen success, start parsing') # Split out each volume volumes = df.split('\n') self.checksLogger.debug('getDiskUsage: parsing, split') # Remove first (headings) and last (blank) volumes.pop(0) volumes.pop() self.checksLogger.debug('getDiskUsage: parsing, pop') usageData = [] regexp = re.compile(r'([0-9]+)') previous_volume = '' self.checksLogger.debug('getDiskUsage: parsing, start loop')
82f5ff9203e54d2adeee8cfed704d09e3f00e8eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13266/82f5ff9203e54d2adeee8cfed704d09e3f00e8eb/checks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6247, 5357, 12, 2890, 4672, 365, 18, 12366, 3328, 18, 4148, 2668, 588, 6247, 5357, 30, 787, 6134, 225, 468, 9251, 2907, 261, 3593, 12732, 27655, 13, 309, 365, 18, 5629, 809, 3292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6247, 5357, 12, 2890, 4672, 365, 18, 12366, 3328, 18, 4148, 2668, 588, 6247, 5357, 30, 787, 6134, 225, 468, 9251, 2907, 261, 3593, 12732, 27655, 13, 309, 365, 18, 5629, 809, 3292, ...
message = 'An unhandled exception occured. Ideally, this should not happen. Please report the bug to the author.\n\n'
message = 'An unhandled exception occurred. Ideally, this should not happen. Please report the bug to the author.\n\n'
def except_hook_after(self, type_, value, traceback): from traceback import format_exception message = 'An unhandled exception occured. Ideally, this should not happen. Please report the bug to the author.\n\n' message += ''.join(format_exception(type_, value, traceback)) caption = 'Unhandled exception: %s' % type_.__name__ wx.MessageBox(message=message, caption=caption, style = wx.OK | wx.ICON_ERROR)
65590b4259f0946dfee13b41358e8b01f57d9474 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3683/65590b4259f0946dfee13b41358e8b01f57d9474/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1335, 67, 4476, 67, 5205, 12, 2890, 16, 618, 67, 16, 460, 16, 10820, 4672, 628, 10820, 1930, 740, 67, 4064, 883, 273, 296, 979, 27868, 1520, 7841, 18, 23062, 1230, 16, 333, 1410, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1335, 67, 4476, 67, 5205, 12, 2890, 16, 618, 67, 16, 460, 16, 10820, 4672, 628, 10820, 1930, 740, 67, 4064, 883, 273, 296, 979, 27868, 1520, 7841, 18, 23062, 1230, 16, 333, 1410, 486, ...
The degree of the character, that is, the dimension of module
The degree of the character, that is, the dimension of module.
def degree(self): """ The degree of the character, that is, the dimension of module EXAMPLES: sage: B3 = WeylCharacterRing(['B',3]) sage: [B3(x).degree() for x in B3.lattice().fundamental_weights()] [7, 21, 8] """ return sum(self._mdict[k] for k in self._mdict)
585641b32ec9003014ab40e39d632a05e840e883 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/585641b32ec9003014ab40e39d632a05e840e883/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10782, 12, 2890, 4672, 3536, 1021, 10782, 434, 326, 3351, 16, 716, 353, 16, 326, 4968, 434, 1605, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069, 10369,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10782, 12, 2890, 4672, 3536, 1021, 10782, 434, 326, 3351, 16, 716, 353, 16, 326, 4968, 434, 1605, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 605, 23, 273, 678, 402, 80, 7069, 10369,...
code = re.sub(r'\b(\d+\.?\d*)((r\b)|(e[-\d]))', r'\1%s\2' % no_mul_token, code) code = re_no_keyword(r'\b(\d+\.?\d*) *([a-zA-Z_(]\w*)\b', code)
code = re.sub(r'\b(\d+(?:\.\d+)?(?:e\d+)?)([rR]\b)', r'\1%s\2' % no_mul_token, code) code = re.sub(r'\b(\d+(?:\.\d+)?)e([-\d])', r'\1%se%s\2' % (no_mul_token, no_mul_token), code) code = re_no_keyword(r'\b(\d+(?:\.\d+)?) *([a-zA-Z_(]\w*)\b', code)
def re_no_keyword(pattern, code): for _ in range(2): # do it twice in because matches don't overlap for m in reversed(list(re.finditer(pattern, code))): left, right = m.groups() if left not in keywords and right not in keywords: code = "%s%s*%s%s" % (code[:m.start()], left, right, code[m.end():]) return code
9c069a9bdaf19ba7c9b7763f0e71aa3d4b0201b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9c069a9bdaf19ba7c9b7763f0e71aa3d4b0201b7/preparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 67, 2135, 67, 11041, 12, 4951, 16, 981, 4672, 364, 389, 316, 1048, 12, 22, 4672, 468, 741, 518, 13605, 316, 2724, 1885, 2727, 1404, 7227, 364, 312, 316, 9553, 12, 1098, 12, 266, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 67, 2135, 67, 11041, 12, 4951, 16, 981, 4672, 364, 389, 316, 1048, 12, 22, 4672, 468, 741, 518, 13605, 316, 2724, 1885, 2727, 1404, 7227, 364, 312, 316, 9553, 12, 1098, 12, 266, ...
if cc is not connection and cc._version==version:
if (cc is not connection and (not version or cc._version==version)):
def invalidate(self, oid, connection=None, version='', rc=sys.getrefcount): """Invalidate references to a given oid.
0accfcdbe1b930c5da92920a081e1455ae2dab56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/0accfcdbe1b930c5da92920a081e1455ae2dab56/DB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11587, 12, 2890, 16, 7764, 16, 1459, 33, 7036, 16, 1177, 2218, 2187, 4519, 33, 9499, 18, 588, 1734, 1883, 4672, 3536, 26970, 5351, 358, 279, 864, 7764, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 11587, 12, 2890, 16, 7764, 16, 1459, 33, 7036, 16, 1177, 2218, 2187, 4519, 33, 9499, 18, 588, 1734, 1883, 4672, 3536, 26970, 5351, 358, 279, 864, 7764, 18, 2, -100, -100, -100, -100, -...
cnx.cursor().execute('SET search_path TO %s, public', (self.schema,))
cnx.cursor().execute('SET search_path TO %s', (self.schema,))
def __init__(self, path, user=None, password=None, host=None, port=None, params={}): if path.startswith('/'): path = path[1:] # We support both psycopg and PgSQL but prefer psycopg global psycopg global PgSQL global PGSchemaError if not psycopg and not PgSQL: try: import psycopg2 as psycopg import psycopg2.extensions from psycopg2 import ProgrammingError as PGSchemaError psycopg2.extensions.register_type(psycopg2.extensions.UNICODE) except ImportError: from pyPgSQL import PgSQL from pyPgSQL.libpq import OperationalError as PGSchemaError if psycopg: dsn = [] if path: dsn.append('dbname=' + path) if user: dsn.append('user=' + user) if password: dsn.append('password=' + password) if host: dsn.append('host=' + host) if port: dsn.append('port=' + str(port)) cnx = psycopg.connect(' '.join(dsn)) cnx.set_client_encoding('UNICODE') else: cnx = PgSQL.connect('', user, password, host, path, port, client_encoding='utf-8', unicode_results=True) try: self.schema = None if 'schema' in params: self.schema = params['schema'] cnx.cursor().execute('SET search_path TO %s, public', (self.schema,)) except PGSchemaError: cnx.rollback() ConnectionWrapper.__init__(self, cnx)
25058d8801bcc03068ef8f314c86072e7c75176a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/25058d8801bcc03068ef8f314c86072e7c75176a/postgres_backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 729, 33, 7036, 16, 2201, 33, 7036, 16, 1479, 33, 7036, 16, 1756, 33, 7036, 16, 859, 12938, 4672, 309, 589, 18, 17514, 1918, 2668, 2473, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 16, 729, 33, 7036, 16, 2201, 33, 7036, 16, 1479, 33, 7036, 16, 1756, 33, 7036, 16, 859, 12938, 4672, 309, 589, 18, 17514, 1918, 2668, 2473, 4672, ...
arr_geo_types.extend( arrStakeholders.split(',') ); arr_geo_types.extend( arrSupplyChains.split(',') ); landscape_types = arrLandscapeTypes.split(','); administrative_levels = arrAdministrativeLevels.split(',');
if arrStakeholders: arr_geo_types.extend( arrStakeholders.split(',') ); if arrSupplyChains: arr_geo_types.extend( arrSupplyChains.split(',') ); landscape_types = [] if arrLandscapeTypes: landscape_types = arrLandscapeTypes.split(','); else: landscape_types = [''] administrative_levels = [] if arrAdministrativeLevels: administrative_levels = arrAdministrativeLevels.split(','); else: administrative_levels = ['']
def search_geopoints_frontpage(self, arrStakeholders='', arrSupplyChains='', arrAdministrativeLevels='', arrLandscapeTypes='', path='', geo_types=None, geo_query=None, REQUEST=None): """ """ arr_geo_types = [] arr_geo_types.extend( arrStakeholders.split(',') ); arr_geo_types.extend( arrSupplyChains.split(',') );
bee1aa8942e3ece6a01f470fa2e03fc83ec93a09 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/bee1aa8942e3ece6a01f470fa2e03fc83ec93a09/GeoMapTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 908, 556, 763, 87, 67, 10211, 2433, 12, 2890, 16, 2454, 510, 911, 9000, 2218, 2187, 2454, 3088, 1283, 15945, 2218, 2187, 2454, 4446, 3337, 1535, 12240, 2218, 2187, 2454, 29398, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 908, 556, 763, 87, 67, 10211, 2433, 12, 2890, 16, 2454, 510, 911, 9000, 2218, 2187, 2454, 3088, 1283, 15945, 2218, 2187, 2454, 4446, 3337, 1535, 12240, 2218, 2187, 2454, 29398, ...
origo = (data[0].x(), data[0].y())
origo = (data[1].x(), data[1].y())
def draw_callback(self, *args): """ Data is a tuple with tool, startpoint & endpoint """ #print "callback data %s" % data_tuple print "callback args %s" % args data = args[0] tool = data[0] print tool if (tool == 'clear'): self.backend.clear() if (tool == 'line'): #print "start_x=%d, start_y=%d, end_x=%d, end_y=%d" % (data[1].x(), data[1].y(), data[2].x(), data[2].y()) self.backend.line((data[1].x(), data[1].y()), (data[2].x(), data[2].y())) if (tool == 'circle'): origo = (data[0].x(), data[0].y()) r = int(round(helpers().point_distance(origo, (data[1].x(), data[1].y())))) self.backend.circle(r, origo)
a188d75cd5e43acf2c090fbbfa3397691ab5003c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14686/a188d75cd5e43acf2c090fbbfa3397691ab5003c/lasercannon_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 3394, 12, 2890, 16, 380, 1968, 4672, 3536, 1910, 353, 279, 3193, 598, 5226, 16, 787, 1153, 473, 2494, 3536, 468, 1188, 315, 3394, 501, 738, 87, 6, 738, 501, 67, 8052, 1172, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 67, 3394, 12, 2890, 16, 380, 1968, 4672, 3536, 1910, 353, 279, 3193, 598, 5226, 16, 787, 1153, 473, 2494, 3536, 468, 1188, 315, 3394, 501, 738, 87, 6, 738, 501, 67, 8052, 1172, ...
c = msvcrt.getch()
c = msvcrt.getwch()
def win_getpass(prompt='Password: ', stream=None): """Prompt for password with echo off, using Windows getch().""" if sys.stdin is not sys.__stdin__: return default_getpass(prompt, stream) import msvcrt for c in prompt: msvcrt.putch(c) pw = "" while 1: c = msvcrt.getch() if c == '\r' or c == '\n': break if c == '\003': raise KeyboardInterrupt if c == '\b': pw = pw[:-1] else: pw = pw + c msvcrt.putch('\r') msvcrt.putch('\n') return pw
3169e918e913757d94979e6e8eb8df8a7061c59d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3169e918e913757d94979e6e8eb8df8a7061c59d/getpass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5657, 67, 588, 5466, 12, 13325, 2218, 3913, 30, 2265, 1407, 33, 7036, 4672, 3536, 15967, 364, 2201, 598, 3376, 3397, 16, 1450, 8202, 336, 343, 1435, 12123, 309, 2589, 18, 21772, 353, 486...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5657, 67, 588, 5466, 12, 13325, 2218, 3913, 30, 2265, 1407, 33, 7036, 4672, 3536, 15967, 364, 2201, 598, 3376, 3397, 16, 1450, 8202, 336, 343, 1435, 12123, 309, 2589, 18, 21772, 353, 486...
elif self.root.processing_esc_digit and eid in self.plain_digit_keystroke: self.displayCurrentKeystroke(keystroke) if not self.root.repeat_initialized: self.root.repeat_value = self.digit_value[eid] self.root.repeat_initialized = True else: self.root.repeat_value = 10 * self.root.repeat_value + self.digit_value[eid] dprint("in processEvent: evt=%s id=%s FOUND REPEAT %d" % (str(evt.__class__), eid, self.root.repeat_value))
elif (self.root.meta_next or self.root.processing_esc_digit) and eid in self.plain_digit_keystroke: self.root.meta_next = False self.root.processing_esc_digit = True self.root.processEscDigit(keystroke)
def foundKeyAction(self, evt): eid = evt.GetId() keystroke = self.id_to_keystroke[eid] if eid == self.esc_keystroke.id: if self.root.meta_next: keystroke = self.meta_esc_keystroke eid = keystroke.id self.root.meta_next = False self.root.current_keystrokes.pop() dprint("in processEvent: evt=%s id=%s FOUND M-ESC" % (str(evt.__class__), eid)) elif self.root.current_keystrokes and self.root.current_keystrokes[-1] == self.meta_esc_keystroke: # M-ESC ESC is processed as a regular keystroke dprint("in processEvent: evt=%s id=%s FOUND M-ESC ESC" % (str(evt.__class__), eid)) pass else: dprint("in processEvent: evt=%s id=%s FOUND ESC" % (str(evt.__class__), eid)) self.root.meta_next = True self.displayCurrentKeystroke(keystroke) return elif eid in self.meta_digit_keystroke: self.displayCurrentKeystroke(keystroke) if not self.root.repeat_initialized: self.root.repeat_value = self.digit_value[eid] self.root.repeat_initialized = True else: self.root.repeat_value = 10 * self.root.repeat_value + self.digit_value[eid] dprint("in processEvent: evt=%s id=%s FOUND REPEAT %d" % (str(evt.__class__), eid, self.root.repeat_value)) return elif self.root.processing_esc_digit and eid in self.plain_digit_keystroke: self.displayCurrentKeystroke(keystroke) if not self.root.repeat_initialized: self.root.repeat_value = self.digit_value[eid] self.root.repeat_initialized = True else: self.root.repeat_value = 10 * self.root.repeat_value + self.digit_value[eid] dprint("in processEvent: evt=%s id=%s FOUND REPEAT %d" % (str(evt.__class__), eid, self.root.repeat_value)) return self.displayCurrentKeystroke(keystroke) if eid in self.id_next_level: dprint("in processEvent: evt=%s id=%s FOUND MULTI-KEYSTROKE" % (str(evt.__class__), eid)) self.setAcceleratorTable(self.id_next_level[eid]) else: dprint("in processEvent: evt=%s id=%s FOUND ACTION %s repeat=%s" % (str(evt.__class__), eid, self.keystroke_id_to_action[eid], self.root.repeat_value)) action = self.keystroke_id_to_action[eid] if action is not None: action.actionKeystroke(evt, multiplier=self.root.repeat_value) else: self.root.frame.SetStatusText("%s: None" % KeyAccelerator.getEmacsAccelerator(self.root.current_keystrokes)) if not self.root.quoted_next: self.resetKeyboardSuccess() self.setAcceleratorTable()
06dbd30848e3f3b419df2c1574810e7baa52289b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/06dbd30848e3f3b419df2c1574810e7baa52289b/multikey.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 653, 1803, 12, 2890, 16, 6324, 4672, 22555, 273, 6324, 18, 967, 548, 1435, 498, 16181, 273, 365, 18, 350, 67, 869, 67, 856, 16181, 63, 73, 350, 65, 225, 309, 22555, 422, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 653, 1803, 12, 2890, 16, 6324, 4672, 22555, 273, 6324, 18, 967, 548, 1435, 498, 16181, 273, 365, 18, 350, 67, 869, 67, 856, 16181, 63, 73, 350, 65, 225, 309, 22555, 422, 365, 1...
logging.basicConfig(level=level, format='%(levelname)-8s %(message)s') rotater = logging.handlers.RotatingFileHandler(config.get(prefs.LOG_PATHNAME), mode="w", maxBytes=100000, backupCount=5) formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s') rotater.setFormatter(formatter) logging.getLogger('').addHandler(rotater) logging.getLogger('').setLevel(level) rotater.doRollover()
else: level = logging.WARN logging.basicConfig(level=level, format='%(levelname)-8s %(message)s') rotater = logging.handlers.RotatingFileHandler( log_name, mode="w", maxBytes=100000, backupCount=5) formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s') rotater.setFormatter(formatter) logging.getLogger('').addHandler(rotater) logging.getLogger('').setLevel(level) rotater.doRollover()
def setup_logging (in_downloader=False): if in_downloader: level = logging.INFO logging.basicConfig(level=level, format='%(levelname)-8s %(message)s') handler = logging.StreamHandler(sys.stdout) logging.getLogger('').addHandler(handler) logging.getLogger('').setLevel(level) else: level = logging.WARN if config.get(prefs.APP_VERSION).endswith("git"): level = logging.DEBUG logging.basicConfig(level=level, format='%(levelname)-8s %(message)s') rotater = logging.handlers.RotatingFileHandler(config.get(prefs.LOG_PATHNAME), mode="w", maxBytes=100000, backupCount=5) formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s') rotater.setFormatter(formatter) logging.getLogger('').addHandler(rotater) logging.getLogger('').setLevel(level) rotater.doRollover()
c6d22185b7f883922e759b1311f7c6e687aa4fb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/c6d22185b7f883922e759b1311f7c6e687aa4fb5/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 11167, 261, 267, 67, 2378, 6714, 33, 8381, 4672, 309, 316, 67, 2378, 6714, 30, 1801, 273, 2907, 18, 5923, 2907, 18, 13240, 809, 12, 2815, 33, 2815, 16, 740, 2218, 17105, 3199...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 11167, 261, 267, 67, 2378, 6714, 33, 8381, 4672, 309, 316, 67, 2378, 6714, 30, 1801, 273, 2907, 18, 5923, 2907, 18, 13240, 809, 12, 2815, 33, 2815, 16, 740, 2218, 17105, 3199...
if not bold_open: tmp += bold[0] self.open_tag(*bold) tmp += self._italic_formatter(match, fullmatch) if bold_open: tmp += bold[1] self.close_tag(bold[1])
if italic_open: tmp += italic[1] self.close_tag(italic[1]) tmp += self._bold_formatter(match, fullmatch) if not italic_open: tmp += italic[0] self.open_tag(*italic)
def _bolditalic_formatter(self, match, fullmatch): bold = ('<strong>', '</strong>') bold_open = self.tag_open_p(bold) tmp = '' if not bold_open: tmp += bold[0] self.open_tag(*bold) tmp += self._italic_formatter(match, fullmatch) if bold_open: tmp += bold[1] self.close_tag(bold[1]) return tmp
94f1c837647f81515aed3d9f2dbc89611785f10d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/94f1c837647f81515aed3d9f2dbc89611785f10d/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16390, 7053, 335, 67, 12354, 12, 2890, 16, 845, 16, 1983, 1916, 4672, 13068, 273, 7707, 32, 9110, 1870, 16, 4357, 9110, 1870, 13, 13068, 67, 3190, 273, 365, 18, 2692, 67, 3190, 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, 16390, 7053, 335, 67, 12354, 12, 2890, 16, 845, 16, 1983, 1916, 4672, 13068, 273, 7707, 32, 9110, 1870, 16, 4357, 9110, 1870, 13, 13068, 67, 3190, 273, 365, 18, 2692, 67, 3190, 67...
res+=" --server '%s' --username '%s' --password '%s' "%(options["-a"],options["-l"],options["-p"])
res+=" --server '%s' --username '%s' --password '%s' "%(quote_for_run(options["-a"]), quote_for_run(options["-l"]), quote_for_run(options["-p"]))
def vmware_prepare_command(options,add_login_params,additional_params): res=options["-e"] if (add_login_params): if (vmware_internal_type==VMWARE_TYPE_ESX): res+=" --server '%s' --username '%s' --password '%s' "%(options["-a"],options["-l"],options["-p"]) elif (vmware_internal_type==VMWARE_TYPE_SERVER2): res+=" -h 'https://%s/sdk' -u '%s' -p '%s' -T server "%(options["-a"],options["-l"],options["-p"]) elif (vmware_internal_type==VMWARE_TYPE_SERVER1): host_name_array=options["-a"].split(':') res+=" -h '%s' -u '%s' -p '%s' -T server1 "%(host_name_array[0],options["-l"],options["-p"]) if (len(host_name_array)>1): res+="-P '%s' "%(host_name_array[1]) if ((options.has_key("-s")) and (vmware_internal_type==VMWARE_TYPE_ESX)): res+="--datacenter '%s' "%(options["-s"]) if (additional_params!=""): res+=additional_params return res
fe01865cf8a2f8535c865c4332952863230c2718 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6868/fe01865cf8a2f8535c865c4332952863230c2718/fence_vmware.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4268, 2726, 67, 9366, 67, 3076, 12, 2116, 16, 1289, 67, 5819, 67, 2010, 16, 13996, 67, 2010, 4672, 400, 33, 2116, 9614, 17, 73, 11929, 225, 309, 261, 1289, 67, 5819, 67, 2010, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4268, 2726, 67, 9366, 67, 3076, 12, 2116, 16, 1289, 67, 5819, 67, 2010, 16, 13996, 67, 2010, 4672, 400, 33, 2116, 9614, 17, 73, 11929, 225, 309, 261, 1289, 67, 5819, 67, 2010, 4672, ...