rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
print "precision problem for %s, %dd, %dk, need fixing" % (mode, d, k)
print "precision problem for %s, %dd, %dk, test need fixing" % (mode, d, k)
def _test_common(self, d, k, mode): dic = load_dataset('%s_%dd_%dk.mat' % (mode, d, k))
76afc91d8ddf202146c1cc1b22949de3110c98d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/76afc91d8ddf202146c1cc1b22949de3110c98d0/test_gmm_em.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 67, 6054, 12, 2890, 16, 302, 16, 417, 16, 1965, 4672, 11681, 273, 1262, 67, 8682, 29909, 87, 10185, 449, 10185, 2883, 18, 7373, 11, 738, 261, 3188, 16, 302, 16, 417, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3813, 67, 6054, 12, 2890, 16, 302, 16, 417, 16, 1965, 4672, 11681, 273, 1262, 67, 8682, 29909, 87, 10185, 449, 10185, 2883, 18, 7373, 11, 738, 261, 3188, 16, 302, 16, 417, 3719, ...
self.respond("150 %s" %resp)
self.respond("150 FILE: %s" %resp)
def ftp_STOU(self, line): "store a file with a unique name" # note: RFC 959 prohibited STOU parameters, but this prohibition is obsolete. # note2: RFC 959 wants ftpd to respond with code 250 but I've seen a # lot of FTP servers responding with 125 or 150, and this is a better choice, imho, # because STOU works just like STOR.
6ea4c256591c49c89bfcade357edbebf2ac0a674 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/6ea4c256591c49c89bfcade357edbebf2ac0a674/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 882, 26556, 12, 2890, 16, 980, 4672, 315, 2233, 279, 585, 598, 279, 3089, 508, 6, 468, 4721, 30, 8372, 2468, 6162, 450, 29993, 2347, 26556, 1472, 16, 1496, 333, 450, 15769, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 882, 26556, 12, 2890, 16, 980, 4672, 315, 2233, 279, 585, 598, 279, 3089, 508, 6, 468, 4721, 30, 8372, 2468, 6162, 450, 29993, 2347, 26556, 1472, 16, 1496, 333, 450, 15769, ...
line['account_id'] = line['account_id'] and line['account_id'][0] line['product_id'] = line['product_id'] and line['product_id'][0] line['uos_id'] = line['uos_id'] and line['uos_id'][0] line['invoice_line_tax_id'] = [(6,0, line.get('invoice_line_tax_id', [])) ]
if 'account_id' in line: line['account_id'] = line.get('account_id', False) and line['account_id'][0] if 'product_id' in line: line['product_id'] = line.get('product_id', False) and line['product_id'][0] if 'uos_id' in line: line['uos_id'] = line.get('uos_id', False) and line['uos_id'][0] if 'invoice_line_tax_id' in line: line['invoice_line_tax_id'] = [(6,0, line.get('invoice_line_tax_id', [])) ]
def cleanup_lines(lines): for line in lines: del line['id'] del line['invoice_id'] line['account_id'] = line['account_id'] and line['account_id'][0] line['product_id'] = line['product_id'] and line['product_id'][0] line['uos_id'] = line['uos_id'] and line['uos_id'][0] line['invoice_line_tax_id'] = [(6,0, line.get('invoice_line_tax_id', [])) ] return map(lambda x: (0,0,x), lines)
570538f86090ba30a80bf48e0f311c9c2b35a7bc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/570538f86090ba30a80bf48e0f311c9c2b35a7bc/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 67, 3548, 12, 3548, 4672, 364, 980, 316, 2362, 30, 1464, 980, 3292, 350, 3546, 1464, 980, 3292, 16119, 67, 350, 3546, 309, 296, 4631, 67, 350, 11, 316, 980, 30, 980, 3292, 4631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 67, 3548, 12, 3548, 4672, 364, 980, 316, 2362, 30, 1464, 980, 3292, 350, 3546, 1464, 980, 3292, 16119, 67, 350, 3546, 309, 296, 4631, 67, 350, 11, 316, 980, 30, 980, 3292, 4631, ...
if not self.credential.isValid('00:30'): logger.warning('GRID proxy not valid.')
if not self.credential.isValid('01:00'): logger.warning('GRID proxy lifetime shorter than 1 hour')
def native_master_cancel(self,jobids): '''Native bulk cancellation supported by GLITE middleware.'''
2894819cc9fb319a887e52d7bcf90bfd04bd02b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/2894819cc9fb319a887e52d7bcf90bfd04bd02b0/Grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6448, 67, 7525, 67, 10996, 12, 2890, 16, 4688, 2232, 4672, 9163, 9220, 8280, 7272, 3260, 635, 10252, 5398, 5827, 1093, 6309, 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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 6448, 67, 7525, 67, 10996, 12, 2890, 16, 4688, 2232, 4672, 9163, 9220, 8280, 7272, 3260, 635, 10252, 5398, 5827, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print id, type, name, size, hex(attrs)
if DEBUG: print id, type, name, size, hex(attrs)
def copyres(input, output): ctor = None UseResFile(input) ntypes = Count1Types() for itype in range(1, 1+ntypes): type = Get1IndType(itype) nresources = Count1Resources(type) for ires in range(1, 1+nresources): res = Get1IndResource(type, ires) id, type, name = res.GetResInfo() lcname = string.lower(name) if (type, lcname) == (RESTYPE, RESNAME): continue # Don't copy __main__ from template if lcname == OWNERNAME: ctor = type size = res.size attrs = res.GetResAttrs() print id, type, name, size, hex(attrs) res.LoadResource() res.DetachResource() UseResFile(output) try: res2 = Get1Resource(type, id) except MacOS.Error: res2 = None if res2: print "Overwriting..." res2.RemoveResource() res.AddResource(type, id, name) res.WriteResource() attrs = attrs | res.GetResAttrs() print "New attrs =", hex(attrs) res.SetResAttrs(attrs) UseResFile(input) return ctor
61c70e63ab82b74b8dadfc71296290b2c75eefdf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/61c70e63ab82b74b8dadfc71296290b2c75eefdf/BuildApplet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 455, 12, 2630, 16, 876, 4672, 15120, 273, 599, 2672, 607, 812, 12, 2630, 13, 290, 2352, 273, 6974, 21, 2016, 1435, 364, 518, 388, 316, 1048, 12, 21, 16, 404, 15, 496, 989, 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, 1610, 455, 12, 2630, 16, 876, 4672, 15120, 273, 599, 2672, 607, 812, 12, 2630, 13, 290, 2352, 273, 6974, 21, 2016, 1435, 364, 518, 388, 316, 1048, 12, 21, 16, 404, 15, 496, 989, 4672...
hourdate = datetime.combine(dummyDate, time(hour))
timedate = time(hour=hour, tzinfo=defaultTzinfo) hourdate = datetime.combine(dummyDate, timedate)
def GetLocaleHourStrings(hourrange): """ use PyICU to format the hour, because some locales use a 24 hour clock """ timeFormatter = DateFormat.createTimeInstance() hourFP = FieldPosition(DateFormat.HOUR1_FIELD) dummyDate = date.today() for hour in hourrange: hourdate = datetime.combine(dummyDate, time(hour)) timeString = timeFormatter.format(hourdate, hourFP) (start, end) = (hourFP.getBeginIndex(),hourFP.getEndIndex()) hourString = str(timeString)[start:end] yield hour, hourString
d69d62b4d7b5b44421f92098358b81f41a87f089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d69d62b4d7b5b44421f92098358b81f41a87f089/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3916, 13433, 7957, 12, 12091, 3676, 4672, 3536, 999, 4707, 2871, 57, 358, 740, 326, 6126, 16, 2724, 2690, 6922, 999, 279, 4248, 6126, 7268, 3536, 813, 5074, 273, 18371, 18, 2640, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 3916, 13433, 7957, 12, 12091, 3676, 4672, 3536, 999, 4707, 2871, 57, 358, 740, 326, 6126, 16, 2724, 2690, 6922, 999, 279, 4248, 6126, 7268, 3536, 813, 5074, 273, 18371, 18, 2640, 95...
name=string.strip(name) if len(name)==0: name = socket.gethostname() try: name = socket.gethostbyaddr(name)[0] except socket.error: pass self.putcmd("ehlo",name)
self.putcmd("ehlo", _get_fqdn_hostname(name))
def ehlo(self, name=''): """ SMTP 'ehlo' command. Hostname to send for this command defaults to the FQDN of the local host. """ name=string.strip(name) if len(name)==0: name = socket.gethostname() try: name = socket.gethostbyaddr(name)[0] except socket.error: pass self.putcmd("ehlo",name) (code,msg)=self.getreply() # According to RFC1869 some (badly written) # MTA's will disconnect on an ehlo. Toss an exception if # that happens -ddm if code == -1 and len(msg) == 0: raise SMTPServerDisconnected("Server not connected") self.ehlo_resp=msg if code<>250: return (code,msg) self.does_esmtp=1 #parse the ehlo response -ddm resp=string.split(self.ehlo_resp,'\n') del resp[0] for each in resp: m=re.match(r'(?P<feature>[A-Za-z0-9][A-Za-z0-9\-]*)',each) if m: feature=string.lower(m.group("feature")) params=string.strip(m.string[m.end("feature"):]) self.esmtp_features[feature]=params return (code,msg)
7baf72fe4c119e32e58bb5dd7356a68ce800b2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7baf72fe4c119e32e58bb5dd7356a68ce800b2f7/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20124, 383, 12, 2890, 16, 508, 2218, 11, 4672, 3536, 18102, 296, 73, 76, 383, 11, 1296, 18, 17423, 358, 1366, 364, 333, 1296, 3467, 358, 326, 23127, 8609, 434, 326, 1191, 1479, 18, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20124, 383, 12, 2890, 16, 508, 2218, 11, 4672, 3536, 18102, 296, 73, 76, 383, 11, 1296, 18, 17423, 358, 1366, 364, 333, 1296, 3467, 358, 326, 23127, 8609, 434, 326, 1191, 1479, 18, 353...
def getClassVariantsFromTree(node, console): classvariants = set([]) variants = treeutil.findVariablePrefix(node, "qx.core.Variant") for variant in variants: if not variant.hasParentContext("call/operand"): continue variantMethod = treeutil.selectNode(variant, "identifier[4]/@name") if variantMethod not in ["select", "isSet", "compilerIsSet"]: continue firstParam = treeutil.selectNode(variant, "../../params/1") if firstParam and treeutil.isStringLiteral(firstParam): classvariants.add(firstParam.get("value")) else: console.warn("! qx.core.Variant call without literal argument") return classvariants def getClassVariants(fileId, filePath, treeLoader, cache, console, generate=True): cacheId = "class-%s" % (filePath,) classinfo, _ = cache.readmulti(cacheId, filePath) classvariants = None if classinfo == None or 'svariants' not in classinfo: if generate: tree = treeLoader.getTree(fileId, {}) classvariants = getClassVariantsFromTree(tree, console) if classinfo == None: classinfo = {} classinfo['svariants'] = classvariants cache.writemulti(cacheId, classinfo) else: classvariants = classinfo['svariants'] return classvariants
def projectClassVariantsToCurrent(classVariants, variantSet): res = {} for key in variantSet: if key in classVariants: res[key] = variantSet[key] return res
d17bc4ee70a82a11f3064c1370149d5708b2059a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/d17bc4ee70a82a11f3064c1370149d5708b2059a/Class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1984, 797, 21165, 774, 3935, 12, 1106, 21165, 16, 5437, 694, 4672, 400, 273, 2618, 364, 498, 316, 5437, 694, 30, 309, 498, 316, 667, 21165, 30, 400, 63, 856, 65, 273, 5437, 694, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1984, 797, 21165, 774, 3935, 12, 1106, 21165, 16, 5437, 694, 4672, 400, 273, 2618, 364, 498, 316, 5437, 694, 30, 309, 498, 316, 667, 21165, 30, 400, 63, 856, 65, 273, 5437, 694, 63, ...
oper = block.operations[operindex] msg.append(str(oper))
if operindex is not None: oper = block.operations[operindex] msg.append(str(oper)) else: msg.append("at the start of the block with input arguments:") for v in block.inputargs: s_v = annotator.binding(v, "(no annotation)") msg.append("%8s: %s" % (v, s_v))
def format_someobject_error(annotator, position_key, what, s_value, called_from_graph, binding=""): #block = getattr(annotator, 'flowin_block', None) or block msg = ["annotation of %r degenerated to SomeObject()" % (what,)] if position_key is not None: graph, block, operindex = position_key oper = block.operations[operindex] msg.append(str(oper)) msg.append('') msg += source_lines(graph, block, operindex, long=True) if called_from_graph is not None: msg.append(".. called from %r" % (called_from_graph,)) if s_value.origin is not None: msg.append(".. SomeObject() origin: %s" % ( annotator.whereami(s_value.origin),)) msg.append("Previous annotation:") msg.append(" " + str(binding)) return "\n".join(msg)
99a4051e1b079a1346a68ac8caa3ace508faecb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/99a4051e1b079a1346a68ac8caa3ace508faecb3/error.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 19068, 1612, 67, 1636, 12, 18338, 639, 16, 1754, 67, 856, 16, 4121, 16, 272, 67, 1132, 16, 2566, 67, 2080, 67, 4660, 16, 5085, 1546, 6, 4672, 468, 2629, 273, 3869, 12, 18338...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 19068, 1612, 67, 1636, 12, 18338, 639, 16, 1754, 67, 856, 16, 4121, 16, 272, 67, 1132, 16, 2566, 67, 2080, 67, 4660, 16, 5085, 1546, 6, 4672, 468, 2629, 273, 3869, 12, 18338...
else:
elif args in ('', 'disabled'):
def do_repo(self, line): (cmd, args, line) = self.parseline(line) if cmd in ['list', None]: if self.base.repos.repos.values(): self.base.log(2, '%-20.20s %-40.40s status' % ('repo id', 'repo name')) for repo in self.base.repos.repos.values(): if repo in self.base.repos.listEnabled(): self.base.log(2, '%-20.20s %-40.40s enabled' % (repo, repo.name)) else: self.base.log(2, '%-20.20s %-40.40s disabled' % (repo, repo.name)) elif cmd == 'enable': repos = self._shlex_split(args) for repo in repos: try: changed = self.base.repos.enableRepo(repo) except Errors.ConfigError, e: self.base.errorlog(0, e) except Errors.RepoError, e: self.base.errorlog(0, e) else: for repo in changed: try: self.base.doRepoSetup(thisrepo=repo) except Errors.RepoError, e: self.base.errorlog(0, 'Disabling Repository') self.base.repos.disableRepo(repo) return False if hasattr(self.base, 'up'): # reset the updates del self.base.up elif cmd == 'disable': repos = self._shlex_split(args) for repo in repos: try: self.base.repos.disableRepo(repo) except Errors.ConfigError, e: self.base.errorlog(0, e) except Errors.RepoError, e: self.base.errorlog(0, e)
b9d20781cfbcbfbf5431e97fc31a8ee7f39e9551 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/b9d20781cfbcbfbf5431e97fc31a8ee7f39e9551/shell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7422, 12, 2890, 16, 980, 4672, 261, 4172, 16, 833, 16, 980, 13, 273, 365, 18, 1065, 1786, 558, 12, 1369, 13, 309, 1797, 316, 10228, 1098, 2187, 599, 14542, 309, 365, 18, 196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7422, 12, 2890, 16, 980, 4672, 261, 4172, 16, 833, 16, 980, 13, 273, 365, 18, 1065, 1786, 558, 12, 1369, 13, 309, 1797, 316, 10228, 1098, 2187, 599, 14542, 309, 365, 18, 196...
id(self._id2ref),
id(self.__dict__),
def __init__(self, name, firstCheckDelay = None): Job.__init__(self, name) self._serialNum = serialNum() self._priority = (Job.Priorities.Low + Job.Priorities.Normal) / 2 self._checkContainersJob = None # run first check after one hour if firstCheckDelay is None: firstCheckDelay = 60. * 15. self._nextCheckDelay = firstCheckDelay self._index2containerName2len = {} self._index2delay = {} # set up our data structures self._id2ref = {}
88950518abcce43f6828c7e417218c4bdb6988d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/88950518abcce43f6828c7e417218c4bdb6988d8/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1122, 1564, 6763, 273, 599, 4672, 3956, 16186, 2738, 972, 12, 2890, 16, 508, 13, 365, 6315, 8818, 2578, 273, 2734, 2578, 1435, 365, 6315, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 1122, 1564, 6763, 273, 599, 4672, 3956, 16186, 2738, 972, 12, 2890, 16, 508, 13, 365, 6315, 8818, 2578, 273, 2734, 2578, 1435, 365, 6315, 8457, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 509) else quickfix.StringField.__init__(self, 509, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5908, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5908, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
for qx in qx_in_tango_without_image:
keys = qx_in_tango_without_image.keys() keys.sort() for qx in keys:
def get_html(qx_to_tango_map, qx_not_in_tango, qx_in_tango_without_image, qx_icon_path, tango_icon_path): html = """ <html> <body> %s </body> </html> """ qx_to_tango_table = """ <h2>qooxdoo to Tango mapping</h2> <table> %s </table> """ rows = "" for qx in qx_to_tango_map: tango = qx_to_tango_map[qx] rows += "<tr><td><img src='%s/%s.png'></img>%s</td><td><img src='%s/%s.png'></img>%s</td></tr>\n" % (qx_icon_path, qx, qx, tango_icon_path, tango, tango) qx_to_tango_table = qx_to_tango_table % rows no_tango_icon_table = """ <h2>qoxxdoo images tango equivalent but no tango icon</h2> <table> %s </table> """ rows = "" for qx in qx_in_tango_without_image: rows += "<tr><td><img src='%s/%s.png'></img>%s</td><td>%s</td></tr>\n" % (qx_icon_path, qx, qx, qx_in_tango_without_image[qx]) no_tango_icon_table = no_tango_icon_table % rows no_tango_list = "<h2>qoxxdoo images without tango equivalent</h2>" for qx in qx_not_in_tango: no_tango_list += "<img src='%s/%s.png'></img>%s<br>\n" % (qx_icon_path, qx, qx) return html % (qx_to_tango_table + no_tango_icon_table + no_tango_list)
2c98d0979abca19a2176c742a4d52a42b9417cdf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/2c98d0979abca19a2176c742a4d52a42b9417cdf/fix-names.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2620, 12, 85, 92, 67, 869, 67, 88, 6399, 67, 1458, 16, 1043, 92, 67, 902, 67, 267, 67, 88, 6399, 16, 1043, 92, 67, 267, 67, 88, 6399, 67, 13299, 67, 2730, 16, 1043, 92, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2620, 12, 85, 92, 67, 869, 67, 88, 6399, 67, 1458, 16, 1043, 92, 67, 902, 67, 267, 67, 88, 6399, 16, 1043, 92, 67, 267, 67, 88, 6399, 67, 13299, 67, 2730, 16, 1043, 92, ...
def text(self, id):
def text(self, id=None):
def text(self, id): text_name = id text = model.Material.byName(text_name) # no id or no text by that id if not text: return self.text_index() stats = shakespeare.stats.Stats() c.text = text c.stats = stats.text_stats(text) # 40 seems limit for google data = [ (s.word, s.freq) for s in c.stats[:40] ] try: c.img_url = self.vertical_bar_chart(data) except: # TODO: log error message c.img_url = '' return render('stats/text.html')
d78b505af77788d5d03432507546f621c575df26 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9817/d78b505af77788d5d03432507546f621c575df26/stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 12, 2890, 16, 612, 33, 7036, 4672, 977, 67, 529, 273, 612, 977, 273, 938, 18, 11790, 18, 1637, 461, 12, 955, 67, 529, 13, 468, 1158, 612, 578, 1158, 977, 635, 716, 612, 309, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 12, 2890, 16, 612, 33, 7036, 4672, 977, 67, 529, 273, 612, 977, 273, 938, 18, 11790, 18, 1637, 461, 12, 955, 67, 529, 13, 468, 1158, 612, 578, 1158, 977, 635, 716, 612, 309, 4...
def recordClip(addRecorder, removeRecorder, seconds, name, extension, rate):
def recordClipImpl(addRecorder, removeRecorder, seconds, name, extension, rate):
def recordClip(addRecorder, removeRecorder, seconds, name, extension, rate): # All comments are needed. Do not add blank lines! TIMEOUT = core.declareEventType('TIMEOUT') conn = None def stop(event): removeRecorder(name + extension) conn.disconnect() conn = queuedEventHub.subscribeToType(TIMEOUT, stop) # If no name was given, create one out of the time if name is None: timeStamp = datetime.fromtimestamp(timer.time()) name = timeStamp.strftime("%Y%m%d%H%M%S") # Add the forward recorder addRecorder(name + extension, rate) # Create the timer clipTimer = timerManager.newTimer(TIMEOUT, seconds) clipTimer.start()
176d20b74d7fee149376822838f92eb4a30de589 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10608/176d20b74d7fee149376822838f92eb4a30de589/shellinit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1409, 15339, 2828, 12, 1289, 10777, 16, 1206, 10777, 16, 3974, 16, 508, 16, 2710, 16, 4993, 4672, 468, 4826, 5678, 854, 3577, 18, 2256, 486, 527, 7052, 2362, 5, 24374, 273, 2922, 18, 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, 1409, 15339, 2828, 12, 1289, 10777, 16, 1206, 10777, 16, 3974, 16, 508, 16, 2710, 16, 4993, 4672, 468, 4826, 5678, 854, 3577, 18, 2256, 486, 527, 7052, 2362, 5, 24374, 273, 2922, 18, 2...
self.catalogTableName = self.__getTableName( "catalog", "Types" )
self.catalogTableName = _getTableName( "catalog", "Types" )
def __init__( self, name = 'Accounting/AccountingDB', maxQueueSize = 10 ): DB.__init__( self, 'AccountingDB', name, maxQueueSize ) self.maxBucketTime = 604800 #1 w self.autoCompact = False self.__doingCompaction = False self.__doingPendingLockTime = 0 self.__deadLockRetries = 2 self.__queuedRecordsLock = ThreadSafe.Synchronizer() self.__queuedRecordsToInsert = [] self.dbCatalog = {} self.dbBucketsLength = {} self.__keysCache = {} maxParallelInsertions = self.getCSOption( "ParallelRecordInsertions", 10 ) self.__threadPool = ThreadPool( 1, maxParallelInsertions ) self.__threadPool.daemonize() self.catalogTableName = self.__getTableName( "catalog", "Types" ) self._createTables( { self.catalogTableName : { 'Fields' : { 'name' : "VARCHAR(64) UNIQUE NOT NULL", 'keyFields' : "VARCHAR(256) NOT NULL", 'valueFields' : "VARCHAR(256) NOT NULL", 'bucketsLength' : "VARCHAR(256) NOT NULL", }, 'PrimaryKey' : 'name' } } ) self.__loadCatalogFromDB() gMonitor.registerActivity( "registeradded", "Register added", "Accounting", "entries", gMonitor.OP_ACUM ) gMonitor.registerActivity( "insertiontime", "Record insertion time", "Accounting", "seconds", gMonitor.OP_MEAN ) gMonitor.registerActivity( "querytime", "Records query time", "Accounting", "seconds", gMonitor.OP_MEAN )
5644734dd5f9b2176cf1b7afc4f6ab55941c88f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5644734dd5f9b2176cf1b7afc4f6ab55941c88f0/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 508, 273, 296, 3032, 310, 19, 3032, 310, 2290, 2187, 943, 3183, 1225, 273, 1728, 262, 30, 2383, 16186, 2738, 972, 12, 365, 16, 296, 3032, 310, 2290, 2187,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 508, 273, 296, 3032, 310, 19, 3032, 310, 2290, 2187, 943, 3183, 1225, 273, 1728, 262, 30, 2383, 16186, 2738, 972, 12, 365, 16, 296, 3032, 310, 2290, 2187,...
yield user
yield user.decode('utf-8')
def _get_users(self, filename): f = open(filename) for line in f: user = line.split(':', 1)[0] if user: yield user
f640684c762ccbbeb365e9ddb5f50d3d7183bb15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6208/f640684c762ccbbeb365e9ddb5f50d3d7183bb15/htfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5577, 12, 2890, 16, 1544, 4672, 284, 273, 1696, 12, 3459, 13, 364, 980, 316, 284, 30, 729, 273, 980, 18, 4939, 2668, 30, 2187, 404, 25146, 20, 65, 309, 729, 30, 2824, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5577, 12, 2890, 16, 1544, 4672, 284, 273, 1696, 12, 3459, 13, 364, 980, 316, 284, 30, 729, 273, 980, 18, 4939, 2668, 30, 2187, 404, 25146, 20, 65, 309, 729, 30, 2824, ...
""" Returns the 'mysterious' $L$-invariant associated to an elliptic curve with split multiplicative reduction. One instance where this constant appears is in the exceptional case of the $p$-adic Birch and Swinnerton-Dyer conjecture as
r""" Returns the ``mysterious'' $\mathcal{L}$-invariant associated to an elliptic curve with split multiplicative reduction. One instance where this constant appears is in the exceptional case of the $p$-adic Birch and Swinnerton-Dyer conjecture as
def L_invariant(self,prec=20): """ Returns the 'mysterious' $L$-invariant associated to an elliptic curve with split multiplicative reduction. One instance where this constant appears is in the exceptional case of the $p$-adic Birch and Swinnerton-Dyer conjecture as formulated by Mazur-Tate-Teitelbaum (Invent. Math. 84, 1986).
8b9a7f70654e1801d87f39c2c02110d0180493fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8b9a7f70654e1801d87f39c2c02110d0180493fd/ell_tate_curve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 67, 267, 8688, 12, 2890, 16, 4036, 33, 3462, 4672, 436, 8395, 2860, 326, 12176, 81, 1094, 264, 22774, 6309, 271, 64, 15949, 771, 95, 48, 22496, 17, 267, 8688, 3627, 358, 392, 415,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 67, 267, 8688, 12, 2890, 16, 4036, 33, 3462, 4672, 436, 8395, 2860, 326, 12176, 81, 1094, 264, 22774, 6309, 271, 64, 15949, 771, 95, 48, 22496, 17, 267, 8688, 3627, 358, 392, 415,...
write('Instrument: %s\n' % iname)
f.write('Instrument: %s\n' % iname)
def _write_settings_file(self): fn = self.get_settings_filepath() f = open(fn) f.write('Filename: %s\n', self._filename) f.write('Timestamp: %s\n\n', self._timestamp)
ff159a13593e9bbf0a057a9ca9add33979c4910c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6471/ff159a13593e9bbf0a057a9ca9add33979c4910c/data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 4272, 67, 768, 12, 2890, 4672, 2295, 273, 365, 18, 588, 67, 4272, 67, 10561, 1435, 284, 273, 1696, 12, 4293, 13, 284, 18, 2626, 2668, 5359, 30, 738, 87, 64, 82, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 4272, 67, 768, 12, 2890, 4672, 2295, 273, 365, 18, 588, 67, 4272, 67, 10561, 1435, 284, 273, 1696, 12, 4293, 13, 284, 18, 2626, 2668, 5359, 30, 738, 87, 64, 82, 2187, ...
':action':'file_upload', 'protcol_version':'1', 'name':self.distribution.get_name(), 'version':self.distribution.get_version(), 'content':(os.path.basename(filename),content), 'filetype':command, 'pyversion':pyversion, 'md5_digest':md5(content).hexdigest(),
':action': 'file_upload', 'protcol_version': '1', 'name': meta.get_name(), 'version': meta.get_version(), 'content': (os.path.basename(filename),content), 'filetype': command, 'pyversion': pyversion, 'md5_digest': md5(content).hexdigest(), 'metadata_version' : '1.0', 'summary': meta.get_description(), 'home_page': meta.get_url(), 'author': meta.get_contact(), 'author_email': meta.get_contact_email(), 'license': meta.get_licence(), 'description': meta.get_long_description(), 'keywords': meta.get_keywords(), 'platform': meta.get_platforms(), 'classifiers': meta.get_classifiers(), 'download_url': meta.get_download_url(), 'provides': meta.get_provides(), 'requires': meta.get_requires(), 'obsoletes': meta.get_obsoletes(),
def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: spawn(("gpg", "--detach-sign", "-a", filename), dry_run=self.dry_run)
6d0c85a71c0d12fd45693ca37b66959a33e9b941 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6d0c85a71c0d12fd45693ca37b66959a33e9b941/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 12560, 12, 2932, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, 3113, 3701,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 67, 768, 12, 2890, 16, 1296, 16, 2395, 1589, 16, 1544, 4672, 468, 4383, 309, 3764, 309, 365, 18, 2977, 30, 12560, 12, 2932, 6403, 75, 3113, 5238, 8238, 497, 17, 2977, 3113, 3701,...
nodestrength=mins
def VisualizeNet(net,xy,coloredvertices=False,equalsize=False,labels={},showAllNodes=True,vcolor=[1.0,1.0,1.0],vsize=1.0,nodeColors={},bgcolor='white',maxwidth=2.0,minwidth=0.2,uselabels='none',edgeColorMap='winter',weightLimits='none'): ''' Visualizes a network. Inputs: net = network to be visualized (of type SymmNet() ). xy = coordinates (usually originating from visuals.Himmeli, e.g. h=visuals.Himmeli(net,...,...) followed by xy=h.getCoordinates() coloredvertices = (True/False). If True, i) IF dict nodeColors was given, these colors are used, ii) IF NOT, vcolor is used if given, and if not, nodes are white. If False, node colors are based on strength. equalsize = (True/False) True: all vertices are of same size, input as vsize, default 1.0. False: sizes are based on vertex strength. showAllNodes = (True/False) something of a quick hack; if True, displays disconnected components and nodes which have no edges left after e.g. thresholding bgcolor = [r g b], r/g/b between 0.0 and 1.0. Background color, default is black. maxwidth = max width of edges as plotted, default 2.0 minwidth = min width of edges as plotted, default 0.2 uselabels = ('none','all') Determines if node labels are shown. 'none' shows none, 'all' shows all. Note: any labels input in dict labels ({nodename:labelstring}) are always shown; use this dict to show labels next to your chosen nodes of interest. edgeColorMap=myMap allows the user to set color scheme for edges. Edges are always colored according to edge weights, which are first normalized to the range (0,1) and then transformed to colors using edgeColorMap. There are 150 colormaps available in pylab; for a full listing, please see help(pylab.cm) (and look for DATA). Or try, for example, edgeColorMap='orange' or edgeColorMap='primary', two colormaps of our own that are not available in pylab. weightLimits=(0,5) The tuple (minWeight, maxWeight) provides the minimum and maximum value for weights. If none are given, (nearly) the true min and max weights in the network will be used. The weightLimits are used for setting edge colors and width. They enable the user to plot several networks (which may have different min and max weights) such that a certain color and width always correspond to a certain edge weight. Thus, the color and width in the visualization can be used to infer edge weight. If the network turns out to contain weights above the given maxWeight (below minWeight) these will be rounded downwards (upwards) to the given limit. It is more reasonable however for the user to provide limits that can accommodate all weights, this is just a necessary precaution for the case where the given limits are too tight. Usage examples: m=pynet.SymmNet() m[0][1]=1.0 m[1][2]=3.5 m[0][2]=5.0 Here are the coordinates, a dictionary that contains 2-tuples xy={} xy[0]=(0,0) xy[1]=(4,0) xy[2]=(2,3) f=FigureCanvasBase(visuals.VisualizeNet(m,xy)) f.print_eps("tmp.eps",dpi=80.0) f=FigureCanvasBase(visuals.VisualizeNet(m,xy,edgeColorMap='orange')) f.print_eps("tmp2.eps",dpi=80.0) f=FigureCanvasBase(visuals.VisualizeNet(m,xy,edgeColorMap='orange',equalsize=True,vsize=16)) f.print_eps("tmp3.eps",dpi=80.0) (General questions: Is there a neater way to output the figures than using FigureCanvasBase? How can I have a look at the figures from within python, without saving them to .eps files?) ''' thisfigure=Figure(figsize=(6,6),dpi=100,facecolor=bgcolor) axes=thisfigure.add_subplot(111) axes.set_axis_bgcolor(bgcolor) # sets the color for node labels fontcolor='w' if bgcolor=='white': fontcolor='k' # first draw all edges edges=list(net.edges) wlist=[] for edge in edges: wlist.append(edge[2]) wmin=min(wlist) wmax=max(wlist) # If weightLimits were not given, use (almost) the true min # and max weights in the network. Note: using a value slightly # below wmin, because otherwise when normalizing the weights, # the minimum weights would be transformed to zero and the # edges not visible at all. - Riitta if weightLimits=='none': if wmin==0: weightLimits=(wmin,wmax) else: weightLimits=(wmin-0.00001,wmax) myEdgeColorMap=setEdgeColorMap(edgeColorMap) for edge in edges: width=setEdgeWidth(edge[2],weightLimits,minwidth,maxwidth) colour=setEdgeColor(edge[2],weightLimits,myEdgeColorMap) xcoords=[xy[edge[0]][0],xy[edge[1]][0]] ycoords=[xy[edge[0]][1],xy[edge[1]][1]] plot_edge(axes,xcoords,ycoords,width=width,colour=colour) # then draw nodes, depending on given options # showAllNodes displays also nodes who do not have any edges # left after e.g. thresholding nodelist=[] if showAllNodes: for node in xy.keys(): nodelist.append(node) else: for node in net: nodelist.append(node) minnode=2.0 maxnode=6.0 strengths=netext.strengths(net) maxs=max(strengths.values()) mins=min(strengths.values()) if not(equalsize): A=(maxnode-minnode)/(maxs-mins) B=maxnode-A*maxs for node in nodelist: # first define size if equalsize: nodesize=vsize if (nodesize<1.0): # hack: Himmeli wants size <1.0 nodesize=nodesize*maxnode # if Himmeli-type size used, scale up else: if node in net: nodestrength=strengths[node] nodesize=A*strengths[node]+B else: nodestrength=mins nodesize=minnode # then determine color if coloredvertices: if len(nodeColors)>0: ctemp=nodeColors[node] if len(ctemp)==6: # recognize as Himmeli-type string ('999999') rc=float(ctemp[0:2])/99.0 gc=float(ctemp[2:4])/99.0 bc=float(ctemp[4:6])/99.0 # this is a stupid hack; sometimes rounding errors result # in rc=1.0 + epsilon and matplotlib complains... if (rc<0.0): rc=0.0 elif rc>1.0: rc=1.0 if (bc<0.0): bc=0.0 elif bc>1.0: bc=1.0 if (gc<0.0): gc=0.0 elif gc>1.0: gc=1.0 color=(rc,gc,bc) else: color=nodeColors[node] #othrwise assume it is a RGB tuple else: if len(vcolor)==6: rc=float(vcolor[0:2])/99.0 gc=float(vcolor[2:4])/99.0 bc=float(vcolor[4:6])/99.0 if (rc<0.0): rc=0.0 elif rc>1.0: rc=1.0 if (bc<0.0): bc=0.0 elif bc>1.0: bc=1.0 if (gc<0.0): gc=0.0 elif gc>1.0: gc=1.0 color=(rc,gc,bc) else: color=vcolor else: color=setEdgeColor(nodestrength,(mins,maxs),myEdgeColorMap) # use the same colormap for nodes as for edges (now the name edgeColorMap is a bit misleading... Could change it to just colorMap, or alternatively add another input option, 'nodeColorMap') #color=colortuple(nodestrength,mins,maxs) plot_node(axes,x=xy[node][0],y=xy[node][1],color=color,size=nodesize) if uselabels=='all': axes.annotate(str(node),(xy[node][0],xy[node][1]),color=fontcolor,size=7) elif node in labels: axes.annotate(labels[node],(xy[node][0],xy[node][1]),color=fontcolor,size=7) setp(axes,'xticks','','xticklabels','','yticks','','yticklabels','') xylist=xy.values() xlist=[] ylist=[] for elem in xylist: xlist.append(elem[0]) ylist.append(elem[1]) minx=min(xlist) maxx=max(xlist) miny=min(ylist) maxy=max(ylist) xdelta=0.05*(maxx-minx) ydelta=0.05*(maxy-miny) setp(axes,'xlim',(minx-xdelta,maxx+xdelta),'ylim',(miny-ydelta,maxy+ydelta)) return thisfigure
c16fe22866cce6c3aabc203d3b2bf1cd6e8eb553 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/c16fe22866cce6c3aabc203d3b2bf1cd6e8eb553/visuals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26832, 554, 7308, 12, 2758, 16, 1698, 16, 1293, 7653, 17476, 33, 8381, 16, 14963, 554, 33, 8381, 16, 5336, 28793, 4500, 1595, 3205, 33, 5510, 16, 90, 3266, 22850, 21, 18, 20, 16, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26832, 554, 7308, 12, 2758, 16, 1698, 16, 1293, 7653, 17476, 33, 8381, 16, 14963, 554, 33, 8381, 16, 5336, 28793, 4500, 1595, 3205, 33, 5510, 16, 90, 3266, 22850, 21, 18, 20, 16, 21, ...
self.received = s.recv(1024)
self.received = data = s.recv(1024)
def connecting_client(self, addr): socket = __import__("socket", {}, {}, []) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(addr) self.client_addr = s.getsockname() s.send("@") self.received = s.recv(1024) while data: self.received += s.recv(1024) s.close()
2751e02612e24ffea6b311c671baed9e5196342d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/2751e02612e24ffea6b311c671baed9e5196342d/test__socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14244, 67, 2625, 12, 2890, 16, 3091, 4672, 2987, 273, 1001, 5666, 972, 2932, 7814, 3113, 10615, 10615, 5378, 13, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 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, 14244, 67, 2625, 12, 2890, 16, 3091, 4672, 2987, 273, 1001, 5666, 972, 2932, 7814, 3113, 10615, 10615, 5378, 13, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, ...
return http.Response(stream = encode_list([v, W.name()]))
return HTMLResponse(stream = encode_list([v, W.name()]))
def render(self, ctx): name = ctx.args['name'][0] W = notebook.create_new_worksheet(name) v = notebook.worksheet_list_html(W.name()) return http.Response(stream = encode_list([v, W.name()]))
86a4ed9cb0aba48a11523b820246bf1c9d9e7be2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86a4ed9cb0aba48a11523b820246bf1c9d9e7be2/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 508, 273, 1103, 18, 1968, 3292, 529, 3546, 63, 20, 65, 678, 273, 14718, 18, 2640, 67, 2704, 67, 1252, 8118, 12, 529, 13, 331, 273, 14718, 18, 1252, 81...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 508, 273, 1103, 18, 1968, 3292, 529, 3546, 63, 20, 65, 678, 273, 14718, 18, 2640, 67, 2704, 67, 1252, 8118, 12, 529, 13, 331, 273, 14718, 18, 1252, 81...
SendMail(fromAddr, mailtoAddr, startTime, buildName, "The build failed",
SendMail(fromAddr, mailtoAddr, startTime, buildName, "status",
def main(): global buildscriptFile, fromAddr, mailtoAddr, alertAddr, adminAddr, defaultDomain, defaultRsyncServer parser = OptionParser(usage="%prog [options] buildName", version="%prog 1.2") parser.add_option("-t", "--toAddr", action="store", type="string", dest="toAddr", default=mailtoAddr, help="Where to mail script reports\n" " [default] " + mailtoAddr + defaultDomain) parser.add_option("-p", "--project", action="store", type="string", dest="project", default="newchandler", help="Name of script to use (without .py extension)\n" "[default] newchandler") parser.add_option("-o", "--output", action="store", type="string", dest="outputDir", default=os.path.join(os.environ['HOME'],"output"), help="Name of temp output directory\n" " [default] ~/output") parser.add_option("-a", "--alert", action="store", type="string", dest="alertAddr", default=alertAddr, help="E-mail to notify on build errors \n" " [default] " + alertAddr + defaultDomain) parser.add_option("-r", "--rsyncServer", action="store", type="string", dest="rsyncServer", default=defaultRsyncServer, help="Net address of server where builds get uploaded \n" " [default] " + defaultRsyncServer) (options, args) = parser.parse_args() if len(args) != 1: parser.print_help() parser.error("You must at least provide a name for your build") buildName = args[0] fromAddr += defaultDomain mailtoAddr = options.toAddr alertAddr = options.alertAddr if mailtoAddr.find('@') == -1: mailtoAddr += defaultDomain if alertAddr.find('@') == -1: alertAddr += defaultDomain prevStartInt = 0 curDir = os.path.abspath(os.getcwd()) buildscriptFile = os.path.join("buildscripts", options.project + ".py") outputDir = os.path.abspath(options.outputDir) if not os.path.exists(outputDir): os.mkdir(outputDir) if not os.path.exists(buildDir): os.mkdir(buildDir) path = os.environ.get('PATH', os.environ.get('path')) cvsProgram = hardhatutil.findInPath(path, "cvs") print "cvs =", cvsProgram rsyncProgram = hardhatutil.findInPath(path, "rsync") print "rsync =", rsyncProgram startInt = int(time.time()) startTime = str(startInt) os.chdir(curDir) nowString = time.strftime("%Y-%m-%d %H:%M:%S") buildVersion = hardhatutil.RemovePunctuation(nowString) print "Starting:", nowString, buildVersion log = open(logFile, "w") log.write("Start: " + nowString + "\n") try: # load (or reload) the buildscript file for the project mod = hardhatutil.ModuleFromFile(buildscriptFile, "buildscript") treeName = mod.treeName SendMail(fromAddr, mailtoAddr, startTime, buildName, "building", treeName, None) ret = mod.Start(hardhatFile, buildDir, "-D'"+ nowString + "'", buildVersion, 0, log) except TinderbuildError, e: print e print "Tinderbuild: Build failed" log.write("Tinderbuild: Build failed\n") status = "build_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, alertAddr, startTime, buildName, "The build failed", treeName, logContents) SendMail(fromAddr, mailtoAddr, startTime, buildName, "The build failed", treeName, logContents) log = open(logFile, "w") except Exception, e: print e print "Build failed" log.write("Build failed\n") status = "build_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, alertAddr, startTime, buildName, "The build failed", treeName, logContents) SendMail(fromAddr, mailtoAddr, startTime, buildName, "The build failed", treeName, logContents) log = open(logFile, "w") else: if ret == "success-nochanges": print "There were no changes, and the tests were successful" log.write("There were no changes, and the tests were successful\n") status = "success" elif ret == "success-changes" or ret == "success-first-run": if ret == "success-first-run": print "First run of tinderbox, and the tests were successful" log.write("First run of tinderbox, and the tests were successful\n") else: print "There were changes, and the tests were successful" log.write("There were changes, and the tests were successful\n") status = "success" newDir = os.path.join(outputDir, buildVersion) print "Renaming " + os.path.join(buildDir, "output", buildVersion) + " to " + newDir log.write("Renaming " + os.path.join(buildDir, "output", buildVersion) + " to " + newDir + "\n") os.rename(os.path.join(buildDir, "output", buildVersion), newDir) if os.path.exists(outputDir+os.sep+"index.html"): os.remove(outputDir+os.sep+"index.html") if os.path.exists(outputDir+os.sep+"time.js"): os.remove(outputDir+os.sep+"time.js") print "Calling RotateDirectories" log.write("Calling RotateDirectories\n") RotateDirectories(outputDir) print "Calling CreateIndex with " + newDir log.write("Calling CreateIndex with " + newDir + "\n") CreateIndex(outputDir, buildVersion, nowString, buildName) buildNameNoSpaces = buildName.replace(" ", "") print "Rsyncing..." outputList = hardhatutil.executeCommandReturnOutputRetry( [rsyncProgram, "-e", "ssh", "-avzp", "--delete", outputDir + os.sep, "192.168.101.46:continuous/" + buildNameNoSpaces]) hardhatutil.dumpOutputList(outputList, log) elif ret == "build_failed": print "The build failed" log.write("The build failed\n") status = "build_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, alertAddr, startTime, buildName, "The build failed", treeName, logContents) SendMail(fromAddr, mailtoAddr, startTime, buildName, "The build failed", treeName, logContents) log = open(logFile, "w") elif ret == "test_failed": print "Unit tests failed" log.write("Unit tests failed\n") status = "test_failed" log.close() log = open(logFile, "r") logContents = log.read() log.close() SendMail(fromAddr, alertAddr, startTime, buildName, "Unit tests failed", treeName, logContents) SendMail(fromAddr, mailtoAddr, startTime, buildName, "Unit tests failed", treeName, logContents) log = open(logFile, "w") else: print "There were no changes" log.write("There were no changes in CVS\n") status = "not_running" log.write( "End = " + time.strftime("%Y-%m-%d %H:%M:%S") + "\n") log.close() log = open(logFile, "r") logContents = log.read() log.close() nowTime = str(int(time.time())) SendMail(fromAddr, mailtoAddr, startTime, buildName, status, treeName, logContents)
e0d3f665cd0450be1abd0ace7bb244be1777f644 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e0d3f665cd0450be1abd0ace7bb244be1777f644/tinderbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 1361, 4263, 812, 16, 628, 3178, 16, 4791, 869, 3178, 16, 6881, 3178, 16, 3981, 3178, 16, 805, 3748, 16, 805, 54, 8389, 2081, 225, 2082, 273, 18862, 12, 9167, 11613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2552, 1361, 4263, 812, 16, 628, 3178, 16, 4791, 869, 3178, 16, 6881, 3178, 16, 3981, 3178, 16, 805, 3748, 16, 805, 54, 8389, 2081, 225, 2082, 273, 18862, 12, 9167, 11613, ...
assert request.session
assert request.session is not None
def testAnonSession(self): """ run some requests, no auth, check if anon sessions work """ self.config = self.TestConfig(anonymous_session_lifetime=1) cookie = '' trail_expected = [] first = True for pagename in self.PAGES: environ = self.setup_env(PATH_INFO='/%s' % pagename, HTTP_COOKIE=cookie) request = self.process_request(environ)
8da57c08ef8cfbefd2d454c1dc46ccccab25736c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/8da57c08ef8cfbefd2d454c1dc46ccccab25736c/test_auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 979, 265, 2157, 12, 2890, 4672, 3536, 1086, 2690, 3285, 16, 1158, 1357, 16, 866, 309, 30637, 8856, 1440, 3536, 365, 18, 1425, 273, 365, 18, 4709, 809, 12, 19070, 67, 3184, 67, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 979, 265, 2157, 12, 2890, 4672, 3536, 1086, 2690, 3285, 16, 1158, 1357, 16, 866, 309, 30637, 8856, 1440, 3536, 365, 18, 1425, 273, 365, 18, 4709, 809, 12, 19070, 67, 3184, 67, 17...
best = shift, bin1, bin2
best = t1, t2, shift
def splitbins(bins): # split a sparse integer table into two tables, such as: # value = t2[(t1[char>>shift]<<shift)+(char&mask)] # and value == 0 means no data bytes = sys.maxint for shift in range(16): bin1 = [] bin2 = [] size = 2**shift bincache = {} for i in range(0, len(bins), size): bin = bins[i:i+size] index = bincache.get(tuple(bin)) if index is None: index = len(bin2) bincache[tuple(bin)] = index for v in bin: if v is None: bin2.append(0) else: bin2.append(v) bin1.append(index>>shift) # determine memory size b = len(bin1)*getsize(bin1) + len(bin2)*getsize(bin2) if b < bytes: best = shift, bin1, bin2 bytes = b shift, bin1, bin2 = best
20c6c6a885ef170c8c80b25320c00639f6714b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/20c6c6a885ef170c8c80b25320c00639f6714b7b/makeunicodedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 11862, 12, 11862, 4672, 468, 1416, 279, 9387, 3571, 1014, 1368, 2795, 4606, 16, 4123, 487, 30, 468, 282, 460, 273, 268, 22, 63, 12, 88, 21, 63, 3001, 9778, 4012, 65, 17685, 4012,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11862, 12, 11862, 4672, 468, 1416, 279, 9387, 3571, 1014, 1368, 2795, 4606, 16, 4123, 487, 30, 468, 282, 460, 273, 268, 22, 63, 12, 88, 21, 63, 3001, 9778, 4012, 65, 17685, 4012,...
en._callback_add("anchor,clicked", my_entry_anchor_test, (en,))
en.callback_anchor_clicked_add(my_entry_anchor_test, en)
def entry_clicked(obj, it, *args, **kargs): win = elementary.Window("entry", elementary.ELM_WIN_BASIC) win.title_set("Entry") win.autodel_set(True) bg = elementary.Background(win) win.resize_object_add(bg) bg.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bg.show() bx = elementary.Box(win) win.resize_object_add(bx) bx.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) bx.show() en = elementary.Entry(win) en.line_wrap_set(False) en.entry_set("This is an entry widget in this window that<br>" "uses markup <b>like this</> for styling and<br>" "formatting <em>like this</>, as well as<br>" "<a href=X><link>links in the text</></a>, so enter text<br>" "in here to edit it. By the way, links are<br>" "called <a href=anc-02>Anchors</a> so you will need<br>" "to refer to them this way.") en._callback_add("anchor,clicked", my_entry_anchor_test, (en,)) en.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND) en.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bx.pack_end(en) en.show() bx2 = elementary.Box(win) bx2.horizontal_set(True) bx2.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt = elementary.Button(win) bt.label_set("Clear") bt.clicked = (my_entry_bt_1, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Print") bt.clicked = (my_entry_bt_2, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Selection") bt.clicked = (my_entry_bt_3, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bt = elementary.Button(win) bt.label_set("Insert") bt.clicked = (my_entry_bt_4, en) bt.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL) bt.size_hint_weight_set(evas.EVAS_HINT_EXPAND, 0.0) bx2.pack_end(bt) bt.show() bx.pack_end(bx2) bx2.show() en.focus() win.show()
ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12343/ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1241, 67, 7475, 329, 12, 2603, 16, 518, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 5657, 273, 930, 814, 18, 3829, 2932, 4099, 3113, 930, 814, 18, 2247, 49, 67, 24572, 67, 25642, 13, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1241, 67, 7475, 329, 12, 2603, 16, 518, 16, 380, 1968, 16, 2826, 79, 1968, 4672, 5657, 273, 930, 814, 18, 3829, 2932, 4099, 3113, 930, 814, 18, 2247, 49, 67, 24572, 67, 25642, 13, 56...
def cancel(self):
def keyCancelConfirm(self, result): if not result: return
def cancel(self): if self.oldInterfaceState is False: iNetwork.deactivateInterface(self.iface,self.cancelCB) else: self.close('cancel')
f741c4cc282f2f99b86e6ec305604f27216087ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/f741c4cc282f2f99b86e6ec305604f27216087ba/NetworkSetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 6691, 11269, 12, 2890, 16, 563, 4672, 309, 486, 563, 30, 327, 309, 365, 18, 1673, 1358, 1119, 353, 1083, 30, 277, 3906, 18, 323, 10014, 1358, 12, 2890, 18, 31479, 16, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 6691, 11269, 12, 2890, 16, 563, 4672, 309, 486, 563, 30, 327, 309, 365, 18, 1673, 1358, 1119, 353, 1083, 30, 277, 3906, 18, 323, 10014, 1358, 12, 2890, 18, 31479, 16, 2890, 18, ...
self.fuseChunksDashboard.setGeometry(QRect(462,45,84,29))
self.fuseChunksDashboard.setGeometry(QRect(495,48,92,29))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
12c8fe24cb1ace55e7caf0b09c7238554087208a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/12c8fe24cb1ace55e7caf0b09c7238554087208a/MainWindowUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
return self.infos[key]
return copy.deepcopy(self.infos[key])
def info(self, key): """ Retrieve the value associated with the name key. """ if key in self.infos: return self.infos[key] return None
8ac35d276f830ba42b58e9384dab19333d0aef66 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9114/8ac35d276f830ba42b58e9384dab19333d0aef66/BProject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 2890, 16, 498, 4672, 3536, 10708, 326, 460, 3627, 598, 326, 508, 498, 18, 3536, 309, 498, 316, 365, 18, 18227, 30, 327, 1610, 18, 16589, 3530, 12, 2890, 18, 18227, 63, 856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1123, 12, 2890, 16, 498, 4672, 3536, 10708, 326, 460, 3627, 598, 326, 508, 498, 18, 3536, 309, 498, 316, 365, 18, 18227, 30, 327, 1610, 18, 16589, 3530, 12, 2890, 18, 18227, 63, 856, ...
mul1s regm, t1
mul1s regm, t1, flags=(OF,CF)
def macroop IMUL_R_R_I
b64d0bdeda1662091746c3695b4429fcc6f69342 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6787/b64d0bdeda1662091746c3695b4429fcc6f69342/multiply_and_divide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 6246, 1506, 67, 54, 67, 54, 67, 45, 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, 1652, 11522, 556, 6246, 1506, 67, 54, 67, 54, 67, 45, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
params = ref[ pI+1: ]
params = ref[ pI + 1: ]
def __mapReferer(self): ref = request.environ[ 'HTTP_REFERER' ] ref = ref[ ref.find( "/", 8 ) : ] scriptName = request.environ[ 'SCRIPT_NAME' ] if scriptName: if scriptName[0] != "/": scriptName = "/%s" % scriptName if ref.find( scriptName ) == 0: ref = ref[ len( scriptName ): ] pI = ref.find( '?' ); if pI > -1: params = ref[ pI+1: ] ref = ref[ :pI ] else: params = "" pDict = dict( cgi.parse_qsl( params ) ) return ( config[ 'routes.map' ].match( ref ), pDict )
a808837c8f1431d1e02fdbb67a8e5983086333a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12767/a808837c8f1431d1e02fdbb67a8e5983086333a2/userdata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1458, 426, 18459, 12, 2890, 4672, 1278, 273, 590, 18, 28684, 63, 296, 3693, 67, 30269, 654, 11, 308, 1278, 273, 1278, 63, 1278, 18, 4720, 12, 2206, 3113, 1725, 262, 294, 308, 310...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1458, 426, 18459, 12, 2890, 4672, 1278, 273, 590, 18, 28684, 63, 296, 3693, 67, 30269, 654, 11, 308, 1278, 273, 1278, 63, 1278, 18, 4720, 12, 2206, 3113, 1725, 262, 294, 308, 310...
debug_log = True
def startswithany(str, prefixes): for prefix in prefixes: if str.startswith(prefix): return True return False
d34b631d2e45870e85a6b7e5f824aa96f5632111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9368/d34b631d2e45870e85a6b7e5f824aa96f5632111/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4244, 2273, 12, 701, 16, 9419, 4672, 364, 1633, 316, 9419, 30, 309, 609, 18, 17514, 1918, 12, 3239, 4672, 327, 1053, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4244, 2273, 12, 701, 16, 9419, 4672, 364, 1633, 316, 9419, 30, 309, 609, 18, 17514, 1918, 12, 3239, 4672, 327, 1053, 327, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sage: finance.Stock('vmw').historical()[:5]
sage: finance.Stock('vmw').google()[:5]
def historical(self,startdate='Jan+1,+1990'): """ Return an immutable sequence of historical price data for this stock, obtained from Google.
5ba1a4a9510fd2da6a56209f764593aa64c92d20 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5ba1a4a9510fd2da6a56209f764593aa64c92d20/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23922, 12, 2890, 16, 1937, 712, 2218, 46, 304, 15, 21, 16, 15, 19818, 20, 11, 4672, 3536, 2000, 392, 11732, 3102, 434, 23922, 6205, 501, 364, 333, 12480, 16, 12700, 628, 6124, 18, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23922, 12, 2890, 16, 1937, 712, 2218, 46, 304, 15, 21, 16, 15, 19818, 20, 11, 4672, 3536, 2000, 392, 11732, 3102, 434, 23922, 6205, 501, 364, 333, 12480, 16, 12700, 628, 6124, 18, 2, ...
... self.close = self.generator.close
... def __init__(self, name):
3e69fb99647491a8e186e4e8c077fc39f70ce520 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3e69fb99647491a8e186e4e8c077fc39f70ce520/test_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
class Version(object):
class Version(debian_support.Version, object):
def __str__(self): return "Could not parse version: "+self._version
d1a6e7d1146d8d4d723d7162f4e59e6efb012666 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12282/d1a6e7d1146d8d4d723d7162f4e59e6efb012666/changelog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 315, 4445, 486, 1109, 1177, 30, 13773, 2890, 6315, 1589, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 315, 4445, 486, 1109, 1177, 30, 13773, 2890, 6315, 1589, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
try: glpk_lib = cdll.LoadLibrary(dllname) except: raise ImportError("Cannot import GLPK's shared library (" + dllname + "). Make sure its path is included in your system's PATH variable.")
def _load_glpk(): # Attempt to automatically detect which version of GLPK we are using. try: fi, fo = os.popen4('glpsol -v') fi.close() tokens = fo.read().split() # Version GLPK detected!! i = tokens.index('LP/MIP') if tokens[i+1] == 'Solver,': i += 3 else: i += 2 version_string = tokens[i] version = version_string.split('.') version = tuple([int(i) for i in version[:2]]) except Exception, e: raise ImportError("Failed to run 'glpsol' to extract version number. GLPK may not be properly installed.") # Attempt to load the DLL if os.name == 'posix' and sys.platform.startswith('linux'): dllname = 'libglpk.so' elif os.name == 'posix' and sys.platform.startswith('darwin'): dllname = 'libglpk.dylib' elif os.name == 'nt': dllname = 'glpk'+str(version[0])+str(version[1])+'.dll' else: raise ImportError('Platform '+str(os.name)+' is currently not supported.') try: glpk_lib = cdll.LoadLibrary(dllname) except: raise ImportError("Cannot import GLPK's shared library (" + dllname + "). Make sure its path is included in your system's PATH variable.") return version, glpk_lib
6f19a1f55402af52669d1e2728707ba0e9b605b3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1322/6f19a1f55402af52669d1e2728707ba0e9b605b3/glpk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 7043, 5465, 13332, 468, 12864, 358, 6635, 5966, 1492, 1177, 434, 10252, 8784, 732, 854, 1450, 18, 775, 30, 7314, 16, 18261, 273, 1140, 18, 84, 3190, 24, 2668, 7043, 1121, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 67, 7043, 5465, 13332, 468, 12864, 358, 6635, 5966, 1492, 1177, 434, 10252, 8784, 732, 854, 1450, 18, 775, 30, 7314, 16, 18261, 273, 1140, 18, 84, 3190, 24, 2668, 7043, 1121, ...
>>> VersionManagement.infer_next_version('3.0.9', '0.0.1')
>>> VM_infer('3.0.9', '0.0.1')
def infer_next_version(last_version, increment): """ Given a simple application version (as a StrictVersion), and an increment (1.0, 0.1, or 0.0.1), guess the next version. >>> VersionManagement.infer_next_version('3.2', '0.0.1') '3.2.1' >>> VersionManagement.infer_next_version(StrictVersion('3.2'), '0.0.1') '3.2.1' >>> VersionManagement.infer_next_version('3.2.3', '0.1') '3.3' >>> VersionManagement.infer_next_version('3.1.2', '1.0') '4.0' Subversions never increment parent versions >>> VersionManagement.infer_next_version('3.0.9', '0.0.1') '3.0.10' If it's a prerelease version, just remove the prerelease. >>> VersionManagement.infer_next_version('3.1a1', '0.0.1') '3.1' """ last_version = SummableVersion(str(last_version)) if last_version.prerelease: last_version.prerelease = None return str(last_version) increment = SummableVersion(increment) sum = last_version + increment sum.reset_less_significant(increment) return str(sum)
e305d484aa2294b4f486a574edcd9ecbe9dea495 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/833/e305d484aa2294b4f486a574edcd9ecbe9dea495/hgtools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12455, 67, 4285, 67, 1589, 12, 2722, 67, 1589, 16, 5504, 4672, 3536, 16803, 279, 4143, 2521, 1177, 261, 345, 279, 22307, 1444, 3631, 471, 392, 5504, 261, 21, 18, 20, 16, 374, 18, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12455, 67, 4285, 67, 1589, 12, 2722, 67, 1589, 16, 5504, 4672, 3536, 16803, 279, 4143, 2521, 1177, 261, 345, 279, 22307, 1444, 3631, 471, 392, 5504, 261, 21, 18, 20, 16, 374, 18, 21, ...
if selectedinfilename:
if selectedinfilename or tdef.get_live():
def start_and_play(self,tdef,dscfg): """ Called by GUI thread when Tribler started with live or video torrent on cmdline """
b0c0fcfd2260b17400bbe42aa53bafc144783e69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9686/b0c0fcfd2260b17400bbe42aa53bafc144783e69/VideoPlayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 464, 67, 1601, 12, 2890, 16, 88, 536, 16, 72, 1017, 2137, 4672, 3536, 11782, 635, 10978, 2650, 1347, 840, 495, 749, 5746, 598, 8429, 578, 6191, 17351, 603, 22877, 3536, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 787, 67, 464, 67, 1601, 12, 2890, 16, 88, 536, 16, 72, 1017, 2137, 4672, 3536, 11782, 635, 10978, 2650, 1347, 840, 495, 749, 5746, 598, 8429, 578, 6191, 17351, 603, 22877, 3536, 2, -10...
if sys.platform == 'win32': reuse_constant = socket.SO_EXCLUSIVEADDRUSE else: reuse_constant = socket.SO_REUSEADDR
def set_reuse_addr(self): # try to re-use a server port if possible try: # Windows SO_REUSEADDR is very broken (from a unixy perspective) if sys.platform == 'win32': reuse_constant = socket.SO_EXCLUSIVEADDRUSE else: reuse_constant = socket.SO_REUSEADDR
9d499f2f96197b5a8deeff98228c667adb4b43e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9d499f2f96197b5a8deeff98228c667adb4b43e6/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 266, 1202, 67, 4793, 12, 2890, 4672, 468, 775, 358, 283, 17, 1202, 279, 1438, 1756, 309, 3323, 775, 30, 468, 8202, 7460, 67, 862, 8001, 14142, 353, 8572, 12933, 261, 2080, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 266, 1202, 67, 4793, 12, 2890, 4672, 468, 775, 358, 283, 17, 1202, 279, 1438, 1756, 309, 3323, 775, 30, 468, 8202, 7460, 67, 862, 8001, 14142, 353, 8572, 12933, 261, 2080, 279...
print "Running %s.test09_MultiDB..." % self.__class__.__name__
print "Running %s.test10_MultiDB..." % self.__class__.__name__
def test09_MultiDB(self): d1 = self.d if verbose: print '\n', '-=' * 30 print "Running %s.test09_MultiDB..." % self.__class__.__name__
46ea74ede0b8d2264d7a6e3eeddf206a32b98522 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/46ea74ede0b8d2264d7a6e3eeddf206a32b98522/test_basics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5908, 67, 5002, 2290, 12, 2890, 4672, 302, 21, 273, 365, 18, 72, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 5908, 67, 5002, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5908, 67, 5002, 2290, 12, 2890, 4672, 302, 21, 273, 365, 18, 72, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 5908, 67, 5002, ...
print "\nAvailable (toolbar) controls:"
print "\nAvailable (panel/toolbar) controls:"
def usage(actions, msg=None): name = os.path.basename(sys.argv[0]) uiname = "%s %s" % (UInfo.name, UInfo.version) print "\n%s" % uiname print "=" * len(uiname) print "\nUsage: %s [options] [floppy image]" % name print "\nOptions:" print "\t-h, --help\t\tthis help" print "\t-n, --nomenu\t\tomit menus" print "\t-e, --embed\t\tembed Hatari window in middle of controls" print "\t-f, --fullscreen\tstart in fullscreen" print "\t-l, --left <controls>\ttoolbar at left" print "\t-r, --right <controls>\ttoolbar at right" print "\t-t, --top <controls>\ttoolbar at top" print "\t-b, --bottom <controls>\ttoolbar at bottom" print "\t-p, --panel <name>,<controls>" print "\t\t\t\tseparate window with given name and controls" print "\nAvailable (toolbar) controls:" for action, description in actions.list_actions(): size = len(action) if size < 8: tabs = "\t\t" elif size < 16: tabs = "\t" else: tabs = "\n\t\t\t" print "\t%s%s%s" % (action, tabs, description) print """
686602b8ab36ee4ec2ff799f2a8c8c77a682e402 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2811/686602b8ab36ee4ec2ff799f2a8c8c77a682e402/hatariui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 4905, 16, 1234, 33, 7036, 4672, 508, 273, 1140, 18, 803, 18, 13909, 12, 9499, 18, 19485, 63, 20, 5717, 582, 267, 339, 273, 2213, 87, 738, 87, 6, 738, 261, 57, 966, 18, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 4905, 16, 1234, 33, 7036, 4672, 508, 273, 1140, 18, 803, 18, 13909, 12, 9499, 18, 19485, 63, 20, 5717, 582, 267, 339, 273, 2213, 87, 738, 87, 6, 738, 261, 57, 966, 18, 52...
self._send_log_msg(pkgLogMsg, '%s updated summary for %s' % ( identity.current.user.display_name, pkg.name),
self._send_log_msg(pkgLogMsg, '%s summary updated by %s' % ( pkg.name, identity.current.user.display_name),
def edit_package(self, package, **changes): '''Add a new package to the database. ''' # Check that the tg.identity is allowed to set themselves as owner if not identity.in_any_group('cvsadmin'): return dict(status=False, message='User must be in cvsadmin')
86e82a2b4d3ce67d7dd2881604f20fc61759f00b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/86e82a2b4d3ce67d7dd2881604f20fc61759f00b/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 67, 5610, 12, 2890, 16, 2181, 16, 2826, 6329, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 444, 20968, 487, 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, 3874, 67, 5610, 12, 2890, 16, 2181, 16, 2826, 6329, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 444, 20968, 487, 3...
self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_
pass
def __init__(self, about=None, meta=None, label=None, id=None, node=None, edge=None, rootedge=None, valueOf_=None, mixedclass_=None, content_=None): super(NodeAndRootEdgeAndEdgeSet, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.node = _cast(None, node) self.edge = _cast(None, edge) self.rootedge = _cast(None, rootedge) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2973, 33, 7036, 16, 2191, 33, 7036, 16, 1433, 33, 7036, 16, 612, 33, 7036, 16, 756, 33, 7036, 16, 3591, 33, 7036, 16, 1365, 7126, 33, 7036, 16, 4323, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2973, 33, 7036, 16, 2191, 33, 7036, 16, 1433, 33, 7036, 16, 612, 33, 7036, 16, 756, 33, 7036, 16, 3591, 33, 7036, 16, 1365, 7126, 33, 7036, 16, 4323, ...
def __str__(self): if not self.upToDate: return str(self.value) else: return str(self.getOutput("value"))
def __str__(self): if not self.upToDate: return str(self.value) else: return str(self.getOutput("value"))
bbb89ebe493db9587a30f7ab1f63c48c2c8e5e95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/bbb89ebe493db9587a30f7ab1f63c48c2c8e5e95/basic_modules.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 486, 365, 18, 416, 31264, 30, 327, 609, 12, 2890, 18, 1132, 13, 469, 30, 327, 609, 12, 2890, 18, 588, 1447, 2932, 1132, 6, 3719, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 486, 365, 18, 416, 31264, 30, 327, 609, 12, 2890, 18, 1132, 13, 469, 30, 327, 609, 12, 2890, 18, 588, 1447, 2932, 1132, 6, 3719, 2, -100, -100, ...
for badobject in "a string", 3+42j, randrange: self.assertRaises((struct.error, TypeError),
for badobject in ("a string", 3+42j, randrange, NotAnIntNS(), NotAnIntOS()): self.assertRaises(struct.error,
def run(self): from random import randrange
463dc4bf26c37c5f90cfe9328087976a0bdc5757 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/463dc4bf26c37c5f90cfe9328087976a0bdc5757/test_struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 628, 2744, 1930, 5605, 3676, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 628, 2744, 1930, 5605, 3676, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def cloneContext(self, context, domain, encodedDomain):
def cloneContext(self, context, domain, attributes, metas):
def cloneContext(self, context, domain, encodedDomain): import copy context = copy.deepcopy(context) for field in self.fields: value = context.values.get(field.name, None) if value: if field.flags & self.List: i = j = realI = 0 selected = context.values.get(field.selected, []) selected.sort() nextSel = selected and selected[0] or None while i < len(value): if encodedDomain.get(value[i][0], None) != value[i][1]: del value[i] if nextSel == realI: del selected[j] nextSel = j < len(selected) and selected[j] or None else: if nextSel == realI: selected[j] -= realI - i j += 1 nextSel = j < len(selected) and selected[j] or None i += 1 realI += 1 if hasattr(field, "selected"): context.values[field.selected] = selected[:j] else: if value[1] >= 0 and encodedDomain.get(value[0], None) != value[1]: del context.values[field.name] context.encodedDomain = encodedDomain context.orderedDomain = [(attr.name, attr.varType) for attr in domain] return context
5a8bd231f596fa01d75d6ac9602fa7521b797293 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/5a8bd231f596fa01d75d6ac9602fa7521b797293/OWContexts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3236, 1042, 12, 2890, 16, 819, 16, 2461, 16, 1677, 16, 21232, 4672, 1930, 1610, 819, 273, 1610, 18, 16589, 3530, 12, 2472, 13, 225, 364, 652, 316, 365, 18, 2821, 30, 460, 273, 819, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3236, 1042, 12, 2890, 16, 819, 16, 2461, 16, 1677, 16, 21232, 4672, 1930, 1610, 819, 273, 1610, 18, 16589, 3530, 12, 2472, 13, 225, 364, 652, 316, 365, 18, 2821, 30, 460, 273, 819, 1...
for file in pkg.getFilesInfo(): print "file",file filename = file[0] print "filename",filename if filename.startswith('/usr/lib/debug') or \ not stat.S_ISREG(files[filename][0]) or \ string.find(file[1], 'ELF') == -1:
for fname, pkgfile in pkg.files().items(): if fname.startswith('/usr/lib/debug') or \ not stat.S_ISREG(pkgfile.mode) or \ string.find(pkgfile.magic, 'ELF') == -1:
def check(self, pkg):
29a4c5a13a46e5592daecf3ca6e03acc12a1f285 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10341/29a4c5a13a46e5592daecf3ca6e03acc12a1f285/CheckStaticLibraries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3475, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 3475, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return '-'
return u'-'
def render(self, context): # FIXME this needs to be documentet and explainded alot better # FIXME store transaction with select related to reduce query count entry = self.entry.resolve(context) value = self.value.resolve(context)
f0e078d297b549bb662c1e54365d71effdb26ff8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12178/f0e078d297b549bb662c1e54365d71effdb26ff8/ufs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 819, 4672, 468, 9852, 333, 4260, 358, 506, 1668, 278, 471, 19765, 785, 524, 352, 7844, 468, 9852, 1707, 2492, 598, 2027, 3746, 358, 5459, 843, 1056, 1241, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 819, 4672, 468, 9852, 333, 4260, 358, 506, 1668, 278, 471, 19765, 785, 524, 352, 7844, 468, 9852, 1707, 2492, 598, 2027, 3746, 358, 5459, 843, 1056, 1241, 273, 365, ...
eg.PrintError(text.error2+' '+text.error3 % (SERVER,PORT))
eg.PrintError(self.text.error2+' '+self.text.error3 % (SERVER,PORT))
def processEmail(mailbox, data, idList, account, count, id, tmpData): conds = ["%s.find(%s)>-1", "not %s.find(%s)>-1", "%s==%s", "not %s==%s", "%s.startswith(%s)", "%s.endswith(%s)"] msg = myParser.parsestr(data) parts = GetParts(msg) flag = False if self.setup[4] == 1: #filter AND mode i = 0 while i < 6: what, cond, strng = self.setup[5][i] if what > 0 and not eval(conds[cond] % (('parts[what-1]'), 'strng')): break i += 1 if i == 6: flag = True else: #filter OR mode i = 0 while i < 6: what, cond, strng = self.setup[5][i] if what > 0 and eval(conds[cond] % (('parts[what-1]'), 'strng')): flag = True break i += 1 if flag: if msg.has_key('Message-Id'): messId = msg['Message-Id'] else: messId = parts[1] if self.setup[11]: #trigger event for each email ? if not messId in idList: if self.setup[13] > 0: eg.TriggerEvent(self.setup[12], payload = parts[self.setup[13]-1], prefix = 'E-mail') else: eg.TriggerEvent(self.setup[12], prefix = 'E-mail') if self.setup[14]: #~ delete if account[1] == 0: #POP resp = mailbox.dele(id) #if resp[:3]=='+OK': # print "deleted !!!" # notDeleted = False else: resp = mailbox.store(id, "+FLAGS", '(\Deleted)') #if resp[0] =='OK': # resp = mailbox.expunge() # if resp[0] =='OK': # print "deleted !!!" count += 1 #show notification window? if self.setup[6]: tmpRec = [messId] #0 ID tmpRec.append(parts[0]) #1 Subject tmpRec.append(parts[1]) #2 From tmpRec.append(account[0]) #3 tmpRec.append(str(count)) #4 tmpRec.append(id) #5 tmpData.append(tmpRec) return (count, tmpData)
12fb689db69b2ce866902fbcc1bb19e0622932ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8076/12fb689db69b2ce866902fbcc1bb19e0622932ba/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 4134, 12, 4408, 2147, 16, 501, 16, 29174, 16, 2236, 16, 1056, 16, 612, 16, 1853, 751, 4672, 30958, 273, 8247, 9, 87, 18, 4720, 9275, 87, 13, 34, 17, 21, 3113, 315, 902, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 4134, 12, 4408, 2147, 16, 501, 16, 29174, 16, 2236, 16, 1056, 16, 612, 16, 1853, 751, 4672, 30958, 273, 8247, 9, 87, 18, 4720, 9275, 87, 13, 34, 17, 21, 3113, 315, 902, 738, ...
el = self.document.getroot().cssselect('.bloc-video-edito h3')[0]
el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0]
def get_date_and_duration(self): duration_regexp = re.compile('(.+) - (.+)min(.+)s') el = self.document.getroot().cssselect('.bloc-video-edito h3')[0] if el is not None: m = duration_regexp.match(el.text.strip()) if m: day, month, year = [int(s) for s in m.group(1).split('/')] date = datetime.datetime(year, month, day) duration = datetime.timedelta(minutes=int(m.group(3)), seconds=int(m.group(2))) return date, duration else: return None
d4ecc0c5de4690c529d24afcdd6d285b2a2144f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/d4ecc0c5de4690c529d24afcdd6d285b2a2144f0/video.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 712, 67, 464, 67, 8760, 12, 2890, 4672, 3734, 67, 17745, 273, 283, 18, 11100, 2668, 22770, 300, 261, 18, 6975, 1154, 22770, 87, 6134, 415, 273, 365, 18, 5457, 18, 588, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 712, 67, 464, 67, 8760, 12, 2890, 4672, 3734, 67, 17745, 273, 283, 18, 11100, 2668, 22770, 300, 261, 18, 6975, 1154, 22770, 87, 6134, 415, 273, 365, 18, 5457, 18, 588, 3085, ...
if (wn, wb, wr, 0, bn, wb, wr, 0) in drawSet:
if (wn, wb, wr, 0, bn, bb, br, 0) in drawSet:
def testMaterial (board): """ Tests if no players are able to win the game from the current position """ whiteBoards = board.boards[WHITE] blackBoards = board.boards[BLACK] if bitLength(whiteBoards[PAWN]) or bitLength(blackBoards[PAWN]): return False if bitLength(whiteBoards[QUEEN]) or bitLength(blackBoards[QUEEN]): return False wn = bitLength(whiteBoards[KNIGHT]) wb = bitLength(whiteBoards[BISHOP]) wr = bitLength(whiteBoards[ROOK]) bn = bitLength(blackBoards[KNIGHT]) bb = bitLength(blackBoards[BISHOP]) br = bitLength(blackBoards[ROOK]) if (wn, wb, wr, 0, bn, wb, wr, 0) in drawSet: return True # Tests KBKB. Draw if bishops are of same color if not wn + wr + bn + wr and wb == 1 and bb == 1: if whiteBoards[BISHOP] & BLACK_SQUARES and True != \ blackBoards[BISHOP] & BLACK_SQUARES and True: return True
37c5ec69f8e6027c19db8a116fac1b3883fd2f22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/37c5ec69f8e6027c19db8a116fac1b3883fd2f22/ldraw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 11790, 261, 3752, 4672, 3536, 7766, 87, 309, 1158, 18115, 854, 7752, 358, 5657, 326, 7920, 628, 326, 783, 1754, 3536, 225, 9578, 13809, 14727, 273, 11094, 18, 3752, 87, 63, 16861, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11790, 261, 3752, 4672, 3536, 7766, 87, 309, 1158, 18115, 854, 7752, 358, 5657, 326, 7920, 628, 326, 783, 1754, 3536, 225, 9578, 13809, 14727, 273, 11094, 18, 3752, 87, 63, 16861, ...
<form name="step3_form" action="%s/admin2/bibcirculation/loan_on_desk_step4" method="get" >
<form name="step3_form" action="%s/admin2/bibcirculation/loan_on_desk_step4" method="post" >
def tmpl_loan_on_desk_step3(self, user_id, list_of_books, infos, ln=CFG_SITE_LANG): """ @param ln: language of the page """
648f0875a183c65548d6b2535cea8cf25a2a9827 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/648f0875a183c65548d6b2535cea8cf25a2a9827/bibcirculation_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 383, 304, 67, 265, 67, 5489, 79, 67, 4119, 23, 12, 2890, 16, 729, 67, 350, 16, 666, 67, 792, 67, 12567, 16, 10626, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 383, 304, 67, 265, 67, 5489, 79, 67, 4119, 23, 12, 2890, 16, 729, 67, 350, 16, 666, 67, 792, 67, 12567, 16, 10626, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, ...
msg = " %-11s : %s" % (state[txmbr.output_state],txmbr.po)
msg = " %-11s : %s " % (state[txmbr.output_state],txmbr.po)
def _printTransaction(self): #transaction set states state = { TS_UPDATE : "update", TS_INSTALL : "install", TS_TRUEINSTALL: "trueinstall", TS_ERASE : "erase", TS_OBSOLETED : "obsoleted", TS_OBSOLETING : "obsoleting", TS_AVAILABLE : "available", TS_UPDATED : "updated"}
0c832bd74c22c94ef8330887bd41ff1477ef6737 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/0c832bd74c22c94ef8330887bd41ff1477ef6737/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1188, 3342, 12, 2890, 4672, 468, 7958, 444, 5493, 919, 273, 288, 15508, 67, 8217, 377, 294, 315, 2725, 3113, 15508, 67, 28865, 565, 294, 315, 5425, 3113, 15508, 67, 18724, 28865, 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, 389, 1188, 3342, 12, 2890, 4672, 468, 7958, 444, 5493, 919, 273, 288, 15508, 67, 8217, 377, 294, 315, 2725, 3113, 15508, 67, 28865, 565, 294, 315, 5425, 3113, 15508, 67, 18724, 28865, 30...
% (default_filename, home_dir)), _("Yes"),
% (default_filename, home_dir)), _("Yes"),
def calc_url(self): """ Creates a file for use with GoogleEarth and launches GoogleEarth if in system """ home_dir = os.path.expanduser("~") default_filename = 'GrampsPlacesForGoogleEarth' filename = os.path.join(home_dir, default_filename) if not _GOOGLEEARTH_OK: qd2 = QuestionDialog2( _("GoogleEarth not installed!"), (_("Create kmz/kml file ''%s''\n" "in user directory ''%s''?")\ % (default_filename, home_dir)), _("Yes"), _("No")) if not qd2.run(): return base = os.path.dirname(filename) # Check if directory exists if not os.path.exists(os.path.normpath(base)): ErrorDialog((_("Failure writing to %s") % base), _("Directory does not exist")) return
767a0ae51fb403854e86b60498675cea0c45c60e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1491/767a0ae51fb403854e86b60498675cea0c45c60e/GoogleEarthWriteKML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 718, 12, 2890, 4672, 3536, 10210, 279, 585, 364, 999, 598, 6124, 41, 27076, 471, 8037, 281, 6124, 41, 27076, 309, 316, 2619, 3536, 6382, 67, 1214, 273, 1140, 18, 803, 18, 123...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 718, 12, 2890, 4672, 3536, 10210, 279, 585, 364, 999, 598, 6124, 41, 27076, 471, 8037, 281, 6124, 41, 27076, 309, 316, 2619, 3536, 6382, 67, 1214, 273, 1140, 18, 803, 18, 123...
"Overloaded __getslice__ which accpepts one-based indices."
"Overloaded __getslice__ which accepts one-based indices."
def __getslice__(self, i, j): "Overloaded __getslice__ which accpepts one-based indices." if i != 0: i = FortranArray.map_int(i) obj = numpy.ndarray.__getslice__(self, i, j) if isinstance(obj, numpy.ndarray): fa = obj.view(FortranArray) return fa
cfb253cd7493b5416ac61bd9a57cf65cb5c321ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/cfb253cd7493b5416ac61bd9a57cf65cb5c321ef/farray.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 315, 4851, 4230, 1001, 588, 6665, 972, 1492, 8104, 1245, 17, 12261, 4295, 1199, 309, 277, 480, 374, 30, 277, 273, 2457, 13171, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 6665, 972, 12, 2890, 16, 277, 16, 525, 4672, 315, 4851, 4230, 1001, 588, 6665, 972, 1492, 8104, 1245, 17, 12261, 4295, 1199, 309, 277, 480, 374, 30, 277, 273, 2457, 13171, 1...
... >>> 1/0
... >>> 1//0
>>> def f(x):
a234b5762eb4de6cb8ecae9c9cb84c877a302afe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a234b5762eb4de6cb8ecae9c9cb84c877a302afe/test_doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print taskNames
def updateTaskListBox(self): # Get a list of task names taskNames = [] self.__taskDict = {} tasks = self.taskMgr.getTasks() tasks.sort(key = lambda t: t.getName()) count = 0 for task in tasks: taskNames.append(task.getName()) self.__taskDict[count] = task count += 1 print taskNames if taskNames: self.taskListBox.setlist(taskNames) # And set current index (so keypresses will start with index 0) self.taskListBox.component('listbox').activate(0) # Select first item #self.taskListBox.select_set(0) # [gjeon] commented out to avoid focus problem with other lists self.setCurrentTask()
1712abd96c1df181db8096c1fe181a6755d407be /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8543/1712abd96c1df181db8096c1fe181a6755d407be/TaskManagerPanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2174, 682, 3514, 12, 2890, 4672, 468, 968, 279, 666, 434, 1562, 1257, 1562, 1557, 273, 5378, 365, 16186, 4146, 5014, 273, 2618, 4592, 273, 365, 18, 4146, 9455, 18, 588, 6685, 1435,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2174, 682, 3514, 12, 2890, 4672, 468, 968, 279, 666, 434, 1562, 1257, 1562, 1557, 273, 5378, 365, 16186, 4146, 5014, 273, 2618, 4592, 273, 365, 18, 4146, 9455, 18, 588, 6685, 1435,...
print _('The following books were not added as they already exist in the database (see --duplicates option):')
print >>sys.stderr, _('The following books were not added as they already exist in the database (see --duplicates option):')
def do_add(db, paths, one_book_per_directory, recurse, add_duplicates): sys.stdout = NULL try: files, dirs = [], [] for path in paths: path = os.path.abspath(path) if os.path.isdir(path): dirs.append(path) else: files.append(path) formats, metadata = [], [] for book in files: format = os.path.splitext(book)[1] format = format[1:] if format else None if not format: continue stream = open(book, 'rb') mi = get_metadata(stream, stream_type=format, use_libprs_metadata=True) if not mi.title: mi.title = os.path.splitext(os.path.basename(book))[0] if not mi.authors: mi.authors = ['Unknown'] formats.append(format) metadata.append(mi) file_duplicates = db.add_books(files, formats, metadata, add_duplicates=add_duplicates) if not file_duplicates: file_duplicates = [] dir_dups = [] for dir in dirs: if recurse: dir_dups.extend(db.recursive_import(dir, single_book_per_directory=one_book_per_directory)) else: func = db.import_book_directory if one_book_per_directory else db.import_book_directory_multiple dups = func(dir) if not dups: dups = [] dir_dups.extend(dups) sys.stdout = sys.__stdout__ if add_duplicates: for mi, formats in dir_dups: db.import_book(mi, formats) else: print _('The following books were not added as they already exist in the database (see --duplicates option):') for mi, formats in dir_dups: title = mi.title if isinstance(title, unicode): title = title.encode(preferred_encoding) print '\t', title + ':' for path in formats: print '\t\t ', path if file_duplicates: for path, mi in zip(file_duplicates[0], file_duplicates[2]): title = mi.title if isinstance(title, unicode): title = title.encode(preferred_encoding) print '\t', title+':' print '\t\t ', path if send_message is not None: send_message('refreshdb:', 'calibre GUI') finally: sys.stdout = sys.__stdout__
aab8744748b031f43fe9148ccb2cdc2e9db72d82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/aab8744748b031f43fe9148ccb2cdc2e9db72d82/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1289, 12, 1966, 16, 2953, 16, 1245, 67, 3618, 67, 457, 67, 5149, 16, 11502, 16, 527, 67, 22449, 4672, 2589, 18, 10283, 273, 3206, 775, 30, 1390, 16, 7717, 273, 5378, 16, 537...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 12, 1966, 16, 2953, 16, 1245, 67, 3618, 67, 457, 67, 5149, 16, 11502, 16, 527, 67, 22449, 4672, 2589, 18, 10283, 273, 3206, 775, 30, 1390, 16, 7717, 273, 5378, 16, 537...
mb.member_operators( lambda x: x.name in ("operator++", "operator--", "operator*", "operator->", "operator()") ).exclude()
mb.member_operators( lambda x: x.name in ("operator++", "operator--", "operator*", "operator->", "operator()", "operator[]") ).exclude()
def export_interface_classes( mb ): """export virtual classes. These classes can not instantiated directly from python. """ classes_to_export = set( ['Alignandum', 'MultipleAlignment', 'Alignator', 'Iterator', # 'Dottor', 'Translator', 'SubstitutionMatrix', 'Fragmentor', 'Alignment', 'AlignmentIterator', 'AlignmentConstIterator', 'Scorer', 'Weightor', 'Renderer', 'LogOddor', 'Regularizor', 'Iterator2D', 'ResiduePAIR', 'Alignatum', 'EVDParameters', 'AlignandumData', 'SubstitutionMatrixData', 'NormalDistributionParameters', 'Distor', 'Treetor', 'Tree', 'PhyloMatrix', ]) ## include all classes mb.classes( lambda x: x.name in classes_to_export ).include() ## deal with copying/cloning members functions mb.member_functions( lambda x: x.name == "getClone" ).call_policies = \ return_value_policy( manage_new_object ) mb.member_functions( lambda x: x.name == "getNew" ).call_policies = \ return_value_policy( manage_new_object ) ## add __str__ function for functions having defined the '<<' operator ## This automatically maps std::ostream to a string mb.free_operators( lambda x: x.name == "operator<<" ).include() ## used for dottor objects ## mb.member_functions( lambda x: x.name == "getPairs" ).call_policies = \ ## return_value_policy( manage_new_object ) # return reference to existing values - look at managing this better later mb.member_functions( lambda x: x.name == "getPointer" ).call_policies = \ return_value_policy( reference_existing_object ) mb.member_functions( lambda x: x.name == "getReference" ).call_policies = \ return_value_policy( reference_existing_object ) ## mb.member_functions( lambda x: x.name == "getRowIndices" ).call_policies = \ ## return_value_policy( reference_existing_object ) mb.member_functions( lambda x: x.name == "getRow" ).call_policies = \ return_value_policy( reference_existing_object ) mb.member_functions( lambda x: x.name == "align" ).call_policies = \ return_value_policy( reference_existing_object ) mb.member_functions( lambda x: x.name == "fragment" ).call_policies = \ return_value_policy( reference_existing_object ) mb.member_functions( "calculateWeights" ).call_policies = \ return_value_policy( manage_new_object ) mb.member_functions( "calculateMatrix" ).call_policies = \ return_value_policy( manage_new_object ) mb.member_functions( "calculateTree" ).call_policies = \ return_value_policy( manage_new_object ) mb.member_functions( lambda mem_fun: mem_fun.name.startswith( "getNodes" ) ).call_policies = \ return_value_policy( manage_new_object ) ## deal with Translator objects ## do not export decode/encode cls = mb.class_( "Translator" ) cls.member_functions( "decode" ).exclude() cls.member_functions( "encode" ).exclude() ## exclude the following because of unhandled arguments/return types mb.member_functions( "fillProfile").exclude() mb.member_functions( "fillFrequencies").exclude() mb.member_functions( "getMatrix" ).exclude() ## get an error for this. For Dottor, now obsolete. ## mb.member_functions( lambda x: x.name in ("getRowIndices",) ).exclude() ## do not include the increment/decrement and dereference operators, because there is no equivalent in python ## exlude functions while testing. Need to map return types later. mb.member_operators( lambda x: x.name in ("operator++", "operator--", "operator*", "operator->", "operator()") ).exclude() ## do not export the internal iterator interfaces. This makes Alignment ## virtual and the wrapper will cause compilation to fail. mb.classes( lambda x: x.name in ("Iterator", "ConstIterator")).exclude() ## see http://article.gmane.org/gmane.comp.python.c++/10177 ## this is used to remove the wrapper classes for purely virtual classes. for c in classes_to_export: cls = mb.class_( c ) ## remove virtual member functions. This will result in a class to be ## not virtual and hence no wrapper. members = cls.decls( declarations.virtuality_type_matcher( declarations.VIRTUALITY_TYPES.PURE_VIRTUAL ), decl_type=declarations.calldef.member_calldef_t, allow_empty=True) members.set_virtuality( declarations.VIRTUALITY_TYPES.NOT_VIRTUAL ) members = cls.decls( declarations.virtuality_type_matcher( declarations.VIRTUALITY_TYPES.ALL ), decl_type=declarations.calldef.member_calldef_t, allow_empty=True) members.set_virtuality( declarations.VIRTUALITY_TYPES.NOT_VIRTUAL ) ## do not wrap constructors, because compilation will fail for ## abstract classes. cls.constructors().exclude() ## deal with methods that transfer ownership of the first argument ## supplied to the method. ## The list contains ## 1: the class with the member function ## 2: the function prefix that needs to wrapped ## 3: the class of the pointee classes_with_ownership_transfer = [ ("MultipleAlignment", "add", "Alignatum") , ] ## TODO: add others, in particular addPair, but check for argument types #("Alignment", "addPair", "ResiduePAIR" ) ] for ccontainer, fname, cpointee in classes_with_ownership_transfer: cls_pointee = mb.class_( cpointee ) cls_pointee.held_type = 'std::auto_ptr< %s >' % cls_pointee.decl_string cls_container= mb.class_( ccontainer ) mem_funs = cls_container.member_functions( fname ) for f in mem_funs: # set alias to original function name, otherwise ugly names will be created # a call for rename() had no effect. f.add_transformation( function_transformers.transfer_ownership( 0 ), alias = fname ) ## export load/save functionality exportSave( mb, options ) exportLoad( mb, options ) ## Deal with templated matrix class template_translations = { 'Matrix<double>' : 'MatrixDouble', 'Matrix<unsigned>' : 'MatrixUInt', 'Matrix<int>' : 'MatrixInt', } ## first include the whole class, then exclude specific member functions declarations_to_export = set( template_translations.keys() ) mb.decls( lambda x: x.name in declarations_to_export ).include() for old, new in template_translations.items(): cls = mb.class_( old ) cls.rename( new ) cls.alias = new ## no warning for warning W1036: Py++ can not expose pointer to Python immutable member cls.vars(lambda x: x.name == "mMatrix" ).disable_warnings( messages.W1036 ) ## do not wrap [], gives rise to "invalid application of 'sizeof' to incomplete type" cls.member_operators( "operator[]" ).exclude() ## silence warnings about immutable types cls.mem_fun( "getValue" ).disable_warnings( messages.W1008 ) cls.mem_fun( "setValue" ).disable_warnings( messages.W1008 )
17694f712e3a6083ccc3dcd42f7ac85d1ed3158c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8012/17694f712e3a6083ccc3dcd42f7ac85d1ed3158c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 5831, 67, 4701, 12, 4903, 262, 30, 3536, 6530, 5024, 3318, 18, 225, 8646, 3318, 848, 486, 17651, 5122, 628, 5790, 18, 3536, 3318, 67, 869, 67, 6530, 273, 444, 12, 10228, 1004...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 5831, 67, 4701, 12, 4903, 262, 30, 3536, 6530, 5024, 3318, 18, 225, 8646, 3318, 848, 486, 17651, 5122, 628, 5790, 18, 3536, 3318, 67, 869, 67, 6530, 273, 444, 12, 10228, 1004...
if isinstance(iv, list): [ fu.append(self, _elt) for _elt in iv ] else: fu.set(self, iv)
if isinstance(iv, list): assert fu.isPlural() [ fu.append(self, _elt) for _elt in iv ] else: fu.set(self, iv)
def __init__ (self, *args, **kw): dom_node = kw.pop('_dom_node', None) if dom_node is not None: kw['_validate_constraints'] = False if self._AttributeWildcard is not None: self.__wildcardAttributeMap = { } if self._HasWildcardElement: self.__wildcardElements = [] if self._Abstract: raise pyxb.AbstractInstantiationError(type(self)) super(complexTypeDefinition, self).__init__(**kw) self.reset() if self._CT_SIMPLE == self._ContentTypeTag: self.__setContent(self._TypeDefinition.Factory(_dom_node=dom_node, *args, **kw)) # Extract keywords that match field names attribute_settings = { } if dom_node is not None: attribute_settings.update(self.__AttributesFromDOM(dom_node)) for fu in self._AttributeMap.values(): iv = kw.get(fu.id()) if iv is not None: attribute_settings[fu.name()] = iv self.__setAttributes(attribute_settings, dom_node) for fu in self._ElementMap.values(): iv = kw.get(fu.id()) if iv is not None: if isinstance(iv, list): [ fu.append(self, _elt) for _elt in iv ] else: fu.set(self, iv) if dom_node is not None: self._setContentFromDOM(dom_node) elif 0 < len(args): self.extend(args)
75ebca63756007c0475e260d076b0b620801eb29 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/75ebca63756007c0475e260d076b0b620801eb29/basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 4092, 67, 2159, 273, 5323, 18, 5120, 2668, 67, 9859, 67, 2159, 2187, 599, 13, 309, 4092, 67, 2159, 353, 486, 599, 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, 1001, 2738, 972, 261, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 4092, 67, 2159, 273, 5323, 18, 5120, 2668, 67, 9859, 67, 2159, 2187, 599, 13, 309, 4092, 67, 2159, 353, 486, 599, 30, ...
self.boss.command('filemanager', 'browse',
self.boss.call_command('filemanager', 'browse',
def command_filemanager(self, filename): self.boss.command('filemanager', 'browse', directory=self.get_parent_directory(filename))
0289a17045ed9782553b943e4530757c0b0690b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/0289a17045ed9782553b943e4530757c0b0690b1/contexts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 768, 4181, 12, 2890, 16, 1544, 4672, 365, 18, 70, 8464, 18, 1991, 67, 3076, 2668, 768, 4181, 2187, 296, 25731, 2187, 1867, 33, 2890, 18, 588, 67, 2938, 67, 5149, 12, 3459, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 768, 4181, 12, 2890, 16, 1544, 4672, 365, 18, 70, 8464, 18, 1991, 67, 3076, 2668, 768, 4181, 2187, 296, 25731, 2187, 1867, 33, 2890, 18, 588, 67, 2938, 67, 5149, 12, 3459, ...
if fullpath[0:2] == '.' + os.sep: fullpath = fullpath[2:] else: fullpath = fullpath[len(path)+1:]
fullpath = fullpath[len(path)+1:]
def loadTestModules(path, name='', packages=None): """ Return a test suite composed of all the tests from modules in a directory. Search for modules in directory `path`, beginning with `name`. If `packages` is true, search subdirectories (also beginning with `name`) recursively. Subdirectories must be Python packages; they must contain an '__init__.py' module. """ testLoader = unittest.defaultTestLoader testSuite = unittest.TestSuite() testModules = [] paths = [path] while paths: p = paths.pop(0) if not p: p = os.curdir files = os.listdir(p) for filename in files: if filename.startswith(name): fullpath = os.path.join(p, filename) if filename.endswith('.py'): # If the path is empty, we get a module name # starting with ./ . It means that we need to truncate # two characters from the start in order to get a # meaningful module name. if fullpath[0:2] == '.' + os.sep: fullpath = fullpath[2:] else: fullpath = fullpath[len(path)+1:] testModules.append(path2mod(fullpath)) elif packages and os.path.isdir(fullpath) and \ os.path.isfile(os.path.join(fullpath, '__init__.py')): paths.append(fullpath) # Import modules and add their tests to the suite. sys.path.insert(0, path) for mod in testModules: if debug: print >>sys.stderr, "importing %s" % mod module = import_module(mod) # if there's a suite defined, incorporate its contents try: suite = getattr(module, 'suite') except AttributeError: # Look for individual tests moduleTests = testLoader.loadTestsFromModule(module) # unittest.TestSuite.addTests() doesn't work as advertised, # as it can't load tests from another TestSuite, so we have # to cheat: testSuite.addTest(moduleTests) continue if type(suite) == types.FunctionType: testSuite.addTest(suite()) elif type(suite) == types.InstanceType \ and isinstance(suite, unittest.TestSuite): testSuite.addTest(suite) else: raise AssertionError, "don't understand suite (%s)" % mod sys.path.pop(0) return testSuite
56ca6d9fa7781566ef98949ce7d2098ee0431fb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/56ca6d9fa7781566ef98949ce7d2098ee0431fb6/package_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 4709, 7782, 12, 803, 16, 508, 2218, 2187, 5907, 33, 7036, 4672, 3536, 2000, 279, 1842, 11371, 18673, 434, 777, 326, 7434, 628, 4381, 316, 279, 1867, 18, 225, 5167, 364, 4381, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 4709, 7782, 12, 803, 16, 508, 2218, 2187, 5907, 33, 7036, 4672, 3536, 2000, 279, 1842, 11371, 18673, 434, 777, 326, 7434, 628, 4381, 316, 279, 1867, 18, 225, 5167, 364, 4381, 316, ...
query = tquery + query + ';'
query = tquery + query + ' AND task.success=1;'
def get_global_report(request, reportId): """ Generates a global report. @param reportId report Id """ post = request.POST if reportId == 'imssavedselections': from terapix.reporting.csv import CSVReport sels = ImageSelections.objects.all().order_by('date') content = [] k = 1 for s in sels: content.append((k, s.name)) k += 1 if not content: return HttpResponse('No saved selections found', mimetype = 'text/plain') return HttpResponse(str(CSVReport(data = content, separator = '\t')), mimetype = 'text/plain') elif reportId == 'procresults': try: kind = post['kind_select'] except Exception, e: return HttpResponseRedirect('/youpi/reporting/') from terapix.reporting.csv import CSVReport from django.db import connection import time cur = connection.cursor() s = time.time() q = """ SELECT t.success, t.title, t.start_date, u.username, t.hostname, t.clusterId, t.results_output_dir FROM youpi_processing_task AS t, auth_user AS u, youpi_processing_kind AS k WHERE t.user_id = u.id AND t.kind_id = k.id AND k.name = '%s' ORDER BY t.start_date """ % kind cur.execute(q) res = cur.fetchall() content = [] for r in res: status = 'F' # Failed if r[0]: status = 'S' row = [status] row.extend(r[1:]) content.append(row) if not content: return HttpResponse('No results found', mimetype = 'text/plain') return HttpResponse(str(CSVReport(data = content)), mimetype = 'text/plain') elif reportId == 'advimgreport': from terapix.youpi.forms import ReportAdvancedImageForm form = ReportAdvancedImageForm(post) if form.is_valid(): from django.template.loader import get_template tmpl = get_template('reports/advanced-image-report-options.html') tdata = tmpl.render(Context({'report': {'context': {'form': form}}})) report_columns = post.getlist('show_column_in_report') # Builds query tables = ['youpi_image AS i'] tquery = 'SELECT DISTINCT(i.id) FROM %s ' query = '' updated = False if post['date_obs_min']: query += "dateobs >= '%s'" % post['date_obs_min'] updated = True if post['date_obs_max']: if not updated: query += "dateobs <= '%s'" % post['date_obs_max'] else: query += " AND dateobs <= '%s'" % post['date_obs_max'] updated = True if post['exptime_min']: if updated: query += " AND" query += " exptime >= %s" % post['exptime_min'] updated = True if post['exptime_max']: if updated: query += " AND" query += " exptime <= %s" % post['exptime_max'] updated = True if post['run_id'] and post['run_id'] != '-1': tables.append('youpi_rel_ri AS ri') if updated: query += " AND" query += " ri.run_id = %s AND ri.image_id = i.id" % post['run_id'] updated = True if post['flat']: if updated: query += " AND" query += ' i.flat LIKE \'%' + post['flat'] + '%\'' updated = True if post['mask']: if updated: query += " AND" query += ' i.mask LIKE \'%' + post['mask'] + '%\'' updated = True if post['object']: if updated: query += " AND" query += ' i.object LIKE \'%' + post['object'] + '%\'' updated = True if post['airmass_min']: if updated: query += " AND" query += ' i.airmass >= %s' % post['airmass_min'] updated = True if post['airmass_max']: if updated: query += " AND" query += ' i.airmass <= %s' % post['airmass_max'] updated = True if post.has_key('tags'): tables.append('youpi_rel_tagi AS tagi') tagList = post.getlist('tags') if updated: query += " AND" query += " tagi.image_id = i.id AND (" for tagid in tagList: query += ' tagi.tag_id = %s OR' % tagid query = query[:-3] + ')' updated = True if post.has_key('instruments'): tables.append('youpi_instrument AS inst') instList = post.getlist('instruments') if updated: query += " AND" query += " inst.id = i.instrument_id AND (" for instid in instList: query += ' inst.id = %s OR' % instid query = query[:-3] + ')' updated = True if post.has_key('channels'): tables.append('youpi_channel AS chan') chanList = post.getlist('channels') if updated: query += " AND" query += " chan.id = i.channel_id AND (" for chanid in chanList: query += ' chan.id = %s OR' % chanid query = query[:-3] + ')' updated = True if post['elongation_min']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') if updated: query += " AND" query += ' fitsin.psfelmin >= %s AND fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id' % post['elongation_min'] updated = True if post['elongation_max']: if not post['elongation_min']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') if updated: query += " AND" query += ' fitsin.psfelmax <= %s AND fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id' % post['elongation_max'] updated = True if post['seeing_min']: if not post['elongation_min'] and not post['elongation_max']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') if updated: query += " AND" query += ' fitsin.psffwhmmin >= %s AND fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id' % post['seeing_min'] updated = True if post['seeing_max']: if not post['elongation_min'] and not post['elongation_max'] and not post['seeing_min']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') if updated: query += " AND" query += ' fitsin.psffwhmmax <= %s AND fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id' % post['seeing_max'] updated = True if post['sky_background_min']: if not post['elongation_min'] and not post['elongation_max'] and not post['seeing_min'] and not post['seeing_max']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') if updated: query += " AND" query += ' fitsin.bkg >= %s AND fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id' % post['sky_background_min'] updated = True if post['sky_background_max']: if not post['elongation_min'] and not post['elongation_max'] and not post['seeing_min'] and not post['seeing_max'] and not post['sky_background_min']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') if updated: query += " AND" query += ' fitsin.bkg <= %s AND fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id' % post['sky_background_max'] updated = True if post.has_key('grades'): if not post['elongation_min'] and not post['elongation_max'] and not post['seeing_min'] and not post['seeing_max'] and not post['sky_background_min'] and not post['sky_background_max']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') tables.append('youpi_firstqeval AS eval') gList = post.getlist('grades') if updated: query += " AND" query += ' fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id AND eval.fitsin_id = fitsin.id AND (' for gid in gList: query += " eval.grade = '%s' OR" % gid query = query[:-3] + ')' updated = True if post['comment']: if not post['elongation_min'] and not post['elongation_max'] and not post['seeing_min'] and not post['seeing_max'] and not post['sky_background_min'] and not post['sky_background_max']: tables.append('youpi_plugin_fitsin AS fitsin') tables.append('youpi_processing_task AS task') tables.append('youpi_rel_it AS relit') if updated: query += " AND" query += ' fitsin.task_id = task.id AND relit.task_id = task.id AND relit.image_id = i.id AND eval.fitsin_id = fitsin.id AND ' if not post.has_key('grades'): tables.append('youpi_firstqeval AS eval') tables.append('youpi_firstqcomment AS fcom') query += ' eval.comment_id = fcom.id AND ' query += ' (eval.custom_comment LIKE \'%' + post['comment'] + '%\' OR fcom.comment LIKE \'%' + post['comment'] + '%\')' updated = True tquery = tquery % ','.join(tables) if updated: tquery += ' WHERE ' query = tquery + query + ';' # If WHERE not in query, there will be too much results if query.find('WHERE') == -1 and not post['right_ascension_RA']: report_content = """
92db3ba484128ec1a1d566c5d6aa1619e7283736 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11651/92db3ba484128ec1a1d566c5d6aa1619e7283736/reporting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6347, 67, 6006, 12, 2293, 16, 2605, 548, 4672, 3536, 31902, 279, 2552, 2605, 18, 632, 891, 2605, 548, 2605, 3124, 3536, 1603, 273, 590, 18, 3798, 309, 2605, 548, 422, 296, 381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6347, 67, 6006, 12, 2293, 16, 2605, 548, 4672, 3536, 31902, 279, 2552, 2605, 18, 632, 891, 2605, 548, 2605, 3124, 3536, 1603, 273, 590, 18, 3798, 309, 2605, 548, 422, 296, 381...
self.clear_trajectory_vars()
def initialize_state(self, initial_state, initial_velocities=0): self.current_state[:] = initial_state self.current_velocities[:] = initial_velocities[:] self.accelerations[:] = -self.calculate_gradient(self.current_state)/self.masses self.tmp[:] = self.current_velocities + 0.5*self.accelerations*self.time_step self.clear_trajectory_vars() self.initialized = True
b2ffe3203c09ea911540e50150e3f1ea1f5526a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11053/b2ffe3203c09ea911540e50150e3f1ea1f5526a2/dynamics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 2019, 12, 2890, 16, 2172, 67, 2019, 16, 2172, 67, 29418, 1961, 33, 20, 4672, 365, 18, 2972, 67, 2019, 10531, 65, 273, 2172, 67, 2019, 365, 18, 2972, 67, 29418, 1961, 10531, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 67, 2019, 12, 2890, 16, 2172, 67, 2019, 16, 2172, 67, 29418, 1961, 33, 20, 4672, 365, 18, 2972, 67, 2019, 10531, 65, 273, 2172, 67, 2019, 365, 18, 2972, 67, 29418, 1961, 10531, ...
"RShift":"<<", "BitOr":"|", "BitXor":"^", "BitAnd":"&", "FloorDiv":"//"}
"LShift":">>", "RShift":"<<", "BitOr":"|", "BitXor":"^", "BitAnd":"&", "FloorDiv":"//", "Pow": "**"}
def _UnaryOp(self, t): self.write(self.unop[t.op.__class__.__name__]) self.write("(") self.dispatch(t.operand) self.write(")")
abdcc23a326c677816e7fc6af76d81f37581157f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/abdcc23a326c677816e7fc6af76d81f37581157f/unparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15972, 3817, 12, 2890, 16, 268, 4672, 365, 18, 2626, 12, 2890, 18, 318, 556, 63, 88, 18, 556, 16186, 1106, 972, 16186, 529, 972, 5717, 365, 18, 2626, 2932, 2932, 13, 365, 18, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 15972, 3817, 12, 2890, 16, 268, 4672, 365, 18, 2626, 12, 2890, 18, 318, 556, 63, 88, 18, 556, 16186, 1106, 972, 16186, 529, 972, 5717, 365, 18, 2626, 2932, 2932, 13, 365, 18, 10...
self._ReleaseNodeLock([self.target_node, self.new_node])
self._ReleaseNodeLock([self.instance.primary_node, self.target_node, self.new_node])
def _ExecDrbd8Secondary(self, feedback_fn): """Replace the secondary node for DRBD 8.
d5cd389c61faca21f200400d2e65b2148da79ddd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/d5cd389c61faca21f200400d2e65b2148da79ddd/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 6731, 72, 28, 14893, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 326, 9946, 756, 364, 16801, 18096, 1725, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 6731, 72, 28, 14893, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 326, 9946, 756, 364, 16801, 18096, 1725, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
class Utility:
def get_widget_attrs(table,column,with_desc=True,sortable=False,index=None): options = {} lower_column = column.lower() lower_table = table.lower()
4ca7700265af8d7a7c519d2d573f1cbd8ce829a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/4ca7700265af8d7a7c519d2d573f1cbd8ce829a3/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6587, 67, 7039, 12, 2121, 16, 2827, 16, 1918, 67, 5569, 33, 5510, 16, 27236, 33, 8381, 16, 1615, 33, 7036, 4672, 702, 273, 2618, 2612, 67, 2827, 273, 1057, 18, 8167, 1435, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6587, 67, 7039, 12, 2121, 16, 2827, 16, 1918, 67, 5569, 33, 5510, 16, 27236, 33, 8381, 16, 1615, 33, 7036, 4672, 702, 273, 2618, 2612, 67, 2827, 273, 1057, 18, 8167, 1435, 2...
rev_date = "$Date: 2004/10/20 10:03:54 $"[7:-2]
rev_date = "$Date: 2004/11/16 12:08:44 $"[7:-2]
def getGRUFVersion(self,): """ getGRUFVersion(self,) => Return human-readable GRUF version as a string. """ rev_date = "$Date: 2004/10/20 10:03:54 $"[7:-2] return "%s / Revised %s" % (version__, rev_date)
c9a00afcb496b7bca821e7b762ee9380af0bd1a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/c9a00afcb496b7bca821e7b762ee9380af0bd1a1/GroupUserFolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6997, 57, 42, 1444, 12, 2890, 16, 4672, 3536, 336, 6997, 57, 42, 1444, 12, 2890, 16, 13, 516, 2000, 8672, 17, 11018, 15228, 57, 42, 1177, 487, 279, 533, 18, 3536, 5588, 67, 712,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6997, 57, 42, 1444, 12, 2890, 16, 4672, 3536, 336, 6997, 57, 42, 1444, 12, 2890, 16, 13, 516, 2000, 8672, 17, 11018, 15228, 57, 42, 1177, 487, 279, 533, 18, 3536, 5588, 67, 712,...
assert brefs == [payment, payment2]
self.assertEquals(brefs, [payment, payment2])
def test_back_relationships(self):
86089dd5ecda849baf4811c4a444c82c5f916c42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/86089dd5ecda849baf4811c4a444c82c5f916c42/test_referenceable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 823, 67, 21632, 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, ...
[ 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, 1842, 67, 823, 67, 21632, 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,...
tags.append(FeedParserDict({'term': term, 'scheme': scheme, 'label': label}))
tags.append(value)
def _addTag(self, term, scheme, label): context = self._getContext() tags = context.setdefault('tags', []) if (not term) and (not scheme) and (not label): return value = FeedParserDict({'term': term, 'scheme': scheme, 'label': label}) if value not in tags: tags.append(FeedParserDict({'term': term, 'scheme': scheme, 'label': label}))
44482af2baebba8741223b8967e4efeaf8365c45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/44482af2baebba8741223b8967e4efeaf8365c45/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 1805, 12, 2890, 16, 2481, 16, 4355, 16, 1433, 4672, 819, 273, 365, 6315, 29120, 1435, 2342, 273, 819, 18, 542, 1886, 2668, 4156, 2187, 5378, 13, 309, 261, 902, 2481, 13, 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, 389, 1289, 1805, 12, 2890, 16, 2481, 16, 4355, 16, 1433, 4672, 819, 273, 365, 6315, 29120, 1435, 2342, 273, 819, 18, 542, 1886, 2668, 4156, 2187, 5378, 13, 309, 261, 902, 2481, 13, 471...
row = list(row) for i in xrange(len(row)): row[i] = converters[i](row[i]).encode('utf-8') writer.writerow(row)
writer.writerow([converters[i](cell).encode('utf-8') for i, cell in enumerate(row) if cols[i] not in self._html_cols])
def iso_datetime(dt): return format_datetime(from_utimestamp(dt), 'iso8601')
7791c448d96ebf3665d60e2764a6e1dec34e8db9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/7791c448d96ebf3665d60e2764a6e1dec34e8db9/report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8702, 67, 6585, 12, 7510, 4672, 327, 740, 67, 6585, 12, 2080, 67, 322, 2796, 12, 7510, 3631, 296, 9699, 14181, 6134, 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, 8702, 67, 6585, 12, 7510, 4672, 327, 740, 67, 6585, 12, 2080, 67, 322, 2796, 12, 7510, 3631, 296, 9699, 14181, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
docroot = self._req.document_root()
def make_cookie(self):
00524ee271ee1d9c14cdf63bd9e078875ac7552f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/00524ee271ee1d9c14cdf63bd9e078875ac7552f/Session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 8417, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 8417, 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, -10...
m[:] = 'c'*mapsize self.assertEqual(m[:], 'c'*mapsize,
m[:] = b'c'*mapsize self.assertEqual(m[:], b'c'*mapsize,
def test_access_parameter(self): # Test for "access" keyword parameter mapsize = 10 open(TESTFN, "wb").write("a"*mapsize) f = open(TESTFN, "rb") m = mmap.mmap(f.fileno(), mapsize, access=mmap.ACCESS_READ) self.assertEqual(m[:], 'a'*mapsize, "Readonly memory map data incorrect.")
3c5b3f3090b6007274572d236a3d5ae5856203ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3c5b3f3090b6007274572d236a3d5ae5856203ec/test_mmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3860, 67, 6775, 12, 2890, 4672, 468, 7766, 364, 315, 3860, 6, 4932, 1569, 852, 1467, 273, 1728, 1696, 12, 16961, 19793, 16, 315, 9464, 20387, 2626, 2932, 69, 6, 14, 1458, 146...
out.append('\n') out.append( indent+str(self.asList()) )
def dump(self,indent='',depth=0): """Diagnostic method for listing out the contents of a ParseResults. Accepts an optional indent argument so that this string can be embedded in a nested display of other data.""" out = [] keys = self.items() keys.sort() for k,v in keys: if out: out.append('\n') out.append( "%s%s- %s: " % (indent,(' '*depth), k) ) if isinstance(v,ParseResults): if v.keys(): out.append('\n') out.append( v.dump(indent,depth+1) ) out.append('\n') else: out.append(str(v)) else: out.append(str(v)) out.append('\n') out.append( indent+str(self.asList()) ) return "".join(out)
b18dc9df3d867052b855a09a154d1d37325344c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/b18dc9df3d867052b855a09a154d1d37325344c4/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 9355, 2218, 2187, 5979, 33, 20, 4672, 3536, 26836, 707, 364, 11591, 596, 326, 2939, 434, 279, 2884, 3447, 18, 27158, 392, 3129, 3504, 1237, 1427, 716, 333, 533, 848, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 9355, 2218, 2187, 5979, 33, 20, 4672, 3536, 26836, 707, 364, 11591, 596, 326, 2939, 434, 279, 2884, 3447, 18, 27158, 392, 3129, 3504, 1237, 1427, 716, 333, 533, 848, ...
self.marginsHard = self.getHardMargins() self.marginsSoft = self.getSoftMargins()
self.marginsHard = self.getMarginsHard() self.marginsSoft = self.getMarginsSoft()
def inputWindow(self, xLL = None, yLL = None, xUR = None, yUR = None): self._writePort(self.lang.inputWindow(xLL, yLL, xUR, yUR)) #print "doing getHardMargins()" self.marginsHard = self.getHardMargins() #print "doing getSoftMargins()" self.marginsSoft = self.getSoftMargins()
ae2d12ff6ed28ac1579cccecb715b30b14c4dede /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3716/ae2d12ff6ed28ac1579cccecb715b30b14c4dede/plotter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 810, 3829, 12, 2890, 16, 619, 4503, 273, 599, 16, 677, 4503, 273, 599, 16, 619, 1099, 273, 599, 16, 677, 1099, 273, 599, 4672, 365, 6315, 2626, 2617, 12, 2890, 18, 4936, 18, 2630, 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, 810, 3829, 12, 2890, 16, 619, 4503, 273, 599, 16, 677, 4503, 273, 599, 16, 619, 1099, 273, 599, 16, 677, 1099, 273, 599, 4672, 365, 6315, 2626, 2617, 12, 2890, 18, 4936, 18, 2630, 38...
self.within_title = len(self.body)
self.in_document_title = len(self.body)
def visit_subtitle(self, node): if isinstance(node.parent, nodes.sidebar): self.body.append(self.starttag(node, 'p', '', CLASS='sidebar-subtitle')) self.context.append('</p>\n') else: self.body.append(self.starttag(node, 'h2', '', CLASS='subtitle')) self.context.append('</h2>\n') self.within_title = len(self.body)
89793d1bacb5cf79ed93134514193035075bf21a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/89793d1bacb5cf79ed93134514193035075bf21a/html4css1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 1717, 2649, 12, 2890, 16, 756, 4672, 309, 1549, 12, 2159, 18, 2938, 16, 2199, 18, 26417, 4672, 365, 18, 3432, 18, 6923, 12, 2890, 18, 1937, 2692, 12, 2159, 16, 296, 84, 218...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 1717, 2649, 12, 2890, 16, 756, 4672, 309, 1549, 12, 2159, 18, 2938, 16, 2199, 18, 26417, 4672, 365, 18, 3432, 18, 6923, 12, 2890, 18, 1937, 2692, 12, 2159, 16, 296, 84, 218...
def __init__(self, tests, directory, platform, is_debug_mode, is_lint_mode):
def __init__(self, tests, directory, platform, is_debug_mode, is_lint_mode, standalone=False):
def __init__(self, tests, directory, platform, is_debug_mode, is_lint_mode): """Reads the test expectations files from the given directory.""" path = os.path.join(directory, self.TEST_LIST) self._expected_failures = TestExpectationsFile(path, tests, platform, is_debug_mode, is_lint_mode)
8382948623a694853c63da7de1ac272f65883504 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/8382948623a694853c63da7de1ac272f65883504/test_expectations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7434, 16, 1867, 16, 4072, 16, 353, 67, 4148, 67, 3188, 16, 353, 67, 5671, 67, 3188, 16, 17676, 33, 8381, 4672, 3536, 7483, 326, 1842, 26305, 1390, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7434, 16, 1867, 16, 4072, 16, 353, 67, 4148, 67, 3188, 16, 353, 67, 5671, 67, 3188, 16, 17676, 33, 8381, 4672, 3536, 7483, 326, 1842, 26305, 1390, 628, ...
self.priv["ctasklist"]["columns"].insert(self.CTASKLIST_COL_TITLE, title_col)
self.priv["ctasklist"]["columns"].insert( self.CTASKLIST_COL_TITLE, title_col)
def __create_closed_tasks_tview(self):
fac54dcba973acc5967f43b60fb540659a1a87a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/fac54dcba973acc5967f43b60fb540659a1a87a8/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 12204, 67, 9416, 67, 88, 1945, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1001, 2640, 67, 12204, 67, 9416, 67, 88, 1945, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
label = self.builder.get_object("label1")
label = self.builder.get_object("label1")
def on_delete_task(self, widget=None, tid=None): #If we don't have a parameter, then take the selection in the treeview if not tid: #tid_to_delete is a [project,task] tuple self.tids_todelete = self.get_selected_tasks() else: self.tids_todelete = [tid] #We must at least have something to delete ! if len(self.tids_todelete) > 0: label = self.builder.get_object("label1") label_text = label.get_text() label_text = label_text[0:label_text.find(":") + 1] # I find the tasks that are going to be deleted tasks = [] for tid in self.tids_todelete: def recursive_list_tasks(task_list, root): """Populate a list of all the subtasks and their children, recursively""" if root not in task_list: task_list.append(root) for i in root.get_subtasks(): recursive_list_tasks(task_list, i) task = self.req.get_task(tid) recursive_list_tasks(tasks, task) titles_list = [task.get_title() for task in tasks] titles = reduce (lambda x, y: x + "\n - " + y, titles_list) label.set_text("%s %s" % (label_text, "\n - " + titles)) delete_dialog = self.builder.get_object("confirm_delete") delete_dialog.run() delete_dialog.hide() #has the task been deleted ? return not self.tids_todelete else: return False
3b0e27344d0061ec5df265b1e55f3f8390a2fce4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/3b0e27344d0061ec5df265b1e55f3f8390a2fce4/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3733, 67, 4146, 12, 2890, 16, 3604, 33, 7036, 16, 11594, 33, 7036, 4672, 468, 2047, 732, 2727, 1404, 1240, 279, 1569, 16, 1508, 4862, 326, 4421, 316, 326, 2151, 1945, 309, 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, 603, 67, 3733, 67, 4146, 12, 2890, 16, 3604, 33, 7036, 16, 11594, 33, 7036, 4672, 468, 2047, 732, 2727, 1404, 1240, 279, 1569, 16, 1508, 4862, 326, 4421, 316, 326, 2151, 1945, 309, 486...
"""
"""
def fl_set_fselector_filetype_marker(p1, p2, p3, p4, p5): """ fl_set_fselector_filetype_marker(p1, p2, p3, p4, p5) """ _fl_set_fselector_filetype_marker(p1, p2, p3, p4, p5)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 74, 9663, 67, 7540, 5872, 67, 11145, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 4672, 3536, 1183, 67, 542, 67, 74, 9663, 67, 7540, 5872, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 74, 9663, 67, 7540, 5872, 67, 11145, 12, 84, 21, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 4672, 3536, 1183, 67, 542, 67, 74, 9663, 67, 7540, 5872, 6...
self.iptables.command("-A POSTROUTING -t mangle -m mark --mark %s -j DROP" % self.mark1) self.assertEqual(connectTcp(HOST, self.port1, TIMEOUT), False)
self.iptables.command("-A POSTROUTING -t mangle -m mark --mark %s -j DROP" % self.mark) self.assertEqual(connectTcp(HOST, self.port, TIMEOUT), False)
def testValid(self): # Connect client and filter port self.assert_(connectClient(self.client)) self.iptables.filterTcp(self.port1)
48308515ea16f240da28b031af9875bd2e965cb9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10929/48308515ea16f240da28b031af9875bd2e965cb9/test_mark_flag.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1556, 12, 2890, 4672, 468, 8289, 1004, 471, 1034, 1756, 365, 18, 11231, 67, 12, 3612, 1227, 12, 2890, 18, 2625, 3719, 365, 18, 8138, 1538, 18, 2188, 27591, 12, 2890, 18, 655, 21,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1556, 12, 2890, 4672, 468, 8289, 1004, 471, 1034, 1756, 365, 18, 11231, 67, 12, 3612, 1227, 12, 2890, 18, 2625, 3719, 365, 18, 8138, 1538, 18, 2188, 27591, 12, 2890, 18, 655, 21,...
if not args: args = '--block=4096 --block=8192 --threads=10 --size=1024 --numruns=2' profilers = self.job.profilers if not profilers.only(): for i in range(iterations): utils.system('./tiobench.pl --dir %s %s' %(dir, args)) if profilers.present(): profilers.start(self) utils.system('./tiobench.pl --dir %s %s' %(dir, args)) profilers.stop(self) profilers.report(self)
utils.system('./tiobench.pl --dir %s %s' %(self.dir, self.args))
def execute(self, dir = None, iterations=1, args = None): if not dir: dir = self.tmpdir os.chdir(self.srcdir) if not args: args = '--block=4096 --block=8192 --threads=10 --size=1024 --numruns=2' profilers = self.job.profilers if not profilers.only(): for i in range(iterations): utils.system('./tiobench.pl --dir %s %s' %(dir, args))
270244f1d6340930ba742d9d10cd64a27bf7651d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/270244f1d6340930ba742d9d10cd64a27bf7651d/tiobench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1577, 273, 599, 16, 11316, 33, 21, 16, 833, 273, 599, 4672, 309, 486, 1577, 30, 1577, 273, 365, 18, 5645, 1214, 1140, 18, 343, 1214, 12, 2890, 18, 4816, 1214, 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, 1836, 12, 2890, 16, 1577, 273, 599, 16, 11316, 33, 21, 16, 833, 273, 599, 4672, 309, 486, 1577, 30, 1577, 273, 365, 18, 5645, 1214, 1140, 18, 343, 1214, 12, 2890, 18, 4816, 1214, 13,...
print "PErr2 Pick deleted"
msg = "PErr2 Pick deleted" appendTextview(self.textviewStdOut, msg)
def delPErr2(self): try: del self.dicts[self.stPt]['PErr2'] print "PErr2 Pick deleted" except: pass
b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 1423, 523, 22, 12, 2890, 4672, 775, 30, 1464, 365, 18, 16287, 63, 2890, 18, 334, 16484, 23962, 1423, 523, 22, 3546, 1234, 273, 315, 1423, 523, 22, 23038, 4282, 6, 714, 1528, 1945...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 1423, 523, 22, 12, 2890, 4672, 775, 30, 1464, 365, 18, 16287, 63, 2890, 18, 334, 16484, 23962, 1423, 523, 22, 3546, 1234, 273, 315, 1423, 523, 22, 23038, 4282, 6, 714, 1528, 1945...
warning("Unable to guess type (interface=%s protocol=%
warning("Unable to guess datalink type (interface=%s linktype=%i). Using Ethernet" % (self.iface, ll))
def recv(self, x): ll = self.ins.datalink() if LLTypes.has_key(ll): cls = LLTypes[ll] else: warning("Unable to guess type (interface=%s protocol=%#x family=%i). Using Ethernet" % (sa_ll[0],sa_ll[1],sa_ll[3])) cls = Ether
22f9552562090f31dc59eb10c4b933437ecba2eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/22f9552562090f31dc59eb10c4b933437ecba2eb/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 12, 2890, 16, 619, 4672, 6579, 273, 365, 18, 2679, 18, 72, 3145, 754, 1435, 309, 29863, 2016, 18, 5332, 67, 856, 12, 2906, 4672, 2028, 273, 29863, 2016, 63, 2906, 65, 469, 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, 10665, 12, 2890, 16, 619, 4672, 6579, 273, 365, 18, 2679, 18, 72, 3145, 754, 1435, 309, 29863, 2016, 18, 5332, 67, 856, 12, 2906, 4672, 2028, 273, 29863, 2016, 63, 2906, 65, 469, 30, ...
sage: magma.function_call('IsSquare', 100, nvals=2)
sage: magma.function_call('IsSquare', 100, nvals=2)
def function_call(self, function, args=[], params={}, nvals=1): """ Return result of evaluating a Magma function with given input, parameters, and asking for nvals as output.
04917fdfb19c54d3ca3aa421b8fa4cc30257acef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/04917fdfb19c54d3ca3aa421b8fa4cc30257acef/magma.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 445, 67, 1991, 12, 2890, 16, 445, 16, 833, 22850, 6487, 859, 28793, 290, 4524, 33, 21, 4672, 3536, 2000, 563, 434, 26704, 279, 490, 9454, 445, 598, 864, 810, 16, 1472, 16, 471, 29288, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 445, 67, 1991, 12, 2890, 16, 445, 16, 833, 22850, 6487, 859, 28793, 290, 4524, 33, 21, 4672, 3536, 2000, 563, 434, 26704, 279, 490, 9454, 445, 598, 864, 810, 16, 1472, 16, 471, 29288, ...
if port <> -1:
if self.port <> -1:
def check(self): """ Check for new mails on your pop3 account. """ try: if self.ssl == True: if port <> -1: s = poplib.POP3_SSL(self.host, self.port) else: s = poplib.POP3_SSL(self.host) else: if port <> -1: s = poplib.POP3(self.host, self.port) else: s = poplib.POP3(self.host) except poplib.error_protoerror, e: self.error = True self.specto.logger.log( ('%s') % str(e), "warning", self.name) else: try: s.user(self.username) s.pass_(self.password) self.unreadMsg = len(s.list()[1]) self.newMsg = 0 self.mail_info.clear_old() if self.unreadMsg > 0: i=1 while i < self.unreadMsg + 1: str_msg = string.join(s.top(i, 0)[1], "\n") msg = email.message_from_string(str_msg) id = string.split(s.uidl(i))[2] #get unique info mail = Email(id, msg["From"].replace("\n", ""), msg["Subject"].replace("\n", ""), msg["date"]) if self.mail_info.add(mail): #check if it is a new email or just unread self.actually_changed=True self.newMsg+=1 i+=1 self.mail_info.sort() self.mail_info.remove_old() self.write_cache_file() s.quit() except poplib.error_proto, e: self.error = True self.specto.logger.log( ('%s') % str(e), "warning", self.name) except: self.specto.logger.log(_("Unexpected error: "), sys.exc_info()[0], "error", self.name)
6fa69a66ab3e54395f6a87e45693c5f017e28dfb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10818/6fa69a66ab3e54395f6a87e45693c5f017e28dfb/watch_mail_pop3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 3536, 2073, 364, 394, 4791, 87, 603, 3433, 1843, 23, 2236, 18, 3536, 775, 30, 309, 365, 18, 8157, 422, 1053, 30, 309, 365, 18, 655, 2813, 300, 21, 30, 272, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 3536, 2073, 364, 394, 4791, 87, 603, 3433, 1843, 23, 2236, 18, 3536, 775, 30, 309, 365, 18, 8157, 422, 1053, 30, 309, 365, 18, 655, 2813, 300, 21, 30, 272, 273, ...
processData["store"] = process.storeSupported processData["status"] = process.statusSupported
if process.storeSupported == True: processData["store"] = 'true' else: processData["store"] = 'false' if process.statusSupported == True: processData["status"] = 'true' else: processData["status"] = 'false'
def processesDescription(self): """Format process description block
5e3d987bdc40124b62600fe04fcf38e29a45153e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10967/5e3d987bdc40124b62600fe04fcf38e29a45153e/DescribeProcess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8488, 3291, 12, 2890, 4672, 3536, 1630, 1207, 2477, 1203, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8488, 3291, 12, 2890, 4672, 3536, 1630, 1207, 2477, 1203, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print CATALOG_INDEXES
def addIndexesToCatalogTool(self, out): ctool = getToolByName(self, 'portal_catalog') if ctool: # add indexes and metadatas to the portal catalog ct = getToolByName(self, 'portal_catalog') print CATALOG_INDEXES for idx in CATALOG_INDEXES: if idx['name'] in ct.indexes(): ct.delIndex(idx['name']) ct.addIndex(**idx) ct.reindexIndex(idx['name'], REQUEST=None) out.write("Found the '%s' index in the catalog, reinstalled and reindexed it to make sure the index type correct.\n" % idx['name']) else: ct.addIndex(**idx) ct.reindexIndex(idx['name'], REQUEST=None) out.write("Added and reindexed '%s' (%s) to the catalog.\n" % (idx['name'], idx['type']))
08c82074e83a691ff222875556f02fd35e6f9cf1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/08c82074e83a691ff222875556f02fd35e6f9cf1/Install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 8639, 774, 9769, 6364, 12, 2890, 16, 596, 4672, 276, 6738, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 7199, 6134, 309, 276, 6738, 30, 468, 527, 5596, 471, 312, 24484, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 8639, 774, 9769, 6364, 12, 2890, 16, 596, 4672, 276, 6738, 273, 336, 6364, 5911, 12, 2890, 16, 296, 24386, 67, 7199, 6134, 309, 276, 6738, 30, 468, 527, 5596, 471, 312, 24484, 358...
lines = text.split('\n') lines = map(lambda line, prefix=prefix: prefix + line, lines)
lines = [prefix + line for line in text.split('\n')]
def indent(self, text, prefix=' '): """Indent text by prepending a given prefix to each line.""" if not text: return '' lines = text.split('\n') lines = map(lambda line, prefix=prefix: prefix + line, lines) if lines: lines[-1] = lines[-1].rstrip() return '\n'.join(lines)
112a82b439e9fd04c483ed4a33a763333fe074b6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/112a82b439e9fd04c483ed4a33a763333fe074b6/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3504, 12, 2890, 16, 977, 16, 1633, 2218, 565, 296, 4672, 3536, 7790, 977, 635, 8254, 310, 279, 864, 1633, 358, 1517, 980, 12123, 309, 486, 977, 30, 327, 875, 2362, 273, 306, 3239, 397,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3504, 12, 2890, 16, 977, 16, 1633, 2218, 565, 296, 4672, 3536, 7790, 977, 635, 8254, 310, 279, 864, 1633, 358, 1517, 980, 12123, 309, 486, 977, 30, 327, 875, 2362, 273, 306, 3239, 397,...
if box: if orientation == 'horizontal': b = QHGroupBox(widget) else: b = QVGroupBox(widget) b.setTitle(box) else: if orientation == 'horizontal': b = QHBox(widget) else: b = QVBox(widget) return b
if box: if orientation == 'horizontal': b = QHGroupBox(widget) else: b = QVGroupBox(widget) b.setTitle(box) else: if orientation == 'horizontal': b = QHBox(widget) else: b = QVBox(widget) return b
def widgetBox(widget, box=None, orientation='vertical'): if box: if orientation == 'horizontal': b = QHGroupBox(widget) else: b = QVGroupBox(widget) b.setTitle(box) else: if orientation == 'horizontal': b = QHBox(widget) else: b = QVBox(widget) return b
7abe12326ad3cc73b55d7b6d29e51c9eacee5a84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/7abe12326ad3cc73b55d7b6d29e51c9eacee5a84/OWGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3604, 3514, 12, 6587, 16, 3919, 33, 7036, 16, 9820, 2218, 17824, 11, 4672, 309, 3919, 30, 309, 9820, 422, 296, 18396, 4278, 324, 273, 2238, 44, 1114, 3514, 12, 6587, 13, 469, 30, 324, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3604, 3514, 12, 6587, 16, 3919, 33, 7036, 16, 9820, 2218, 17824, 11, 4672, 309, 3919, 30, 309, 9820, 422, 296, 18396, 4278, 324, 273, 2238, 44, 1114, 3514, 12, 6587, 13, 469, 30, 324, ...
approx = self._complex_mpfr_field_(ComplexField(field.prec()))
approx = self._complex_mpfr_field_(ComplexField(prec))
def numerical_approximation(self, prec=53): """ Get a numerical approximation of self as either a real or complex number.
b7c4e96480f4622b4b10c6b9a335b1f79150ab82 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b7c4e96480f4622b4b10c6b9a335b1f79150ab82/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17409, 67, 26742, 5115, 12, 2890, 16, 13382, 33, 8643, 4672, 3536, 968, 279, 17409, 24769, 434, 365, 487, 3344, 279, 2863, 578, 7233, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -10...
2.0000000000000000000000000000000
2.0000000000000000000000000000
def real(self): """ Return real part of self.
0f85c81e959512e75d1c3f66db056b379125ea81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0f85c81e959512e75d1c3f66db056b379125ea81/complex_number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 2890, 4672, 3536, 2000, 2863, 1087, 434, 365, 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, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 12, 2890, 4672, 3536, 2000, 2863, 1087, 434, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def main(instr_path, dir_to_clean):
def clean_folder(instr_path, dir_to_clean): """ <Purpose> Given an instructions file and a directory, it will make sure that the directory matches the instructions, deleting files where necessary, printing errors where files are missing, and printing warnings where unrecognized files exist. <Arguments> instr_path: The location of the instructions file to be used. dir_to_clean: The location of the directory to be cleaned. <Exceptions> IllegalArgError on bad filepaths. ParseError on invalid instructions file. <Side Effects> None. <Returns> None. """
def main(instr_path, dir_to_clean): # First, get the required files and the files to be deleted (req_files, del_files) = parse_instructions(instr_path) req_files_found = [False for i in range(len(req_files))] unrecognized_files = [] if not os.path.exists(dir_to_clean): raise IllegalArgError("Given directory does not exist: " + dir_to_clean) for filename in os.listdir(dir_to_clean): deleted = False for del_file in del_files: if re.match(del_file, filename): deleted = True try: os.remove(dir_to_clean + "/" + filename) except OSError: # If it can't delete for some reason, move on pass if not deleted: required = False for i in range(len(req_files)): for part in req_files[i].split(","): part = part.strip() if re.match(part, filename): req_files_found[i] = True required = True if not required: unrecognized_files.append(filename) for filename in unrecognized_files: output("Warning: unrecognized file " + filename + " in " + dir_to_clean) for i in range(len(req_files)): if not req_files_found[i]: output("Error: required file " + req_files[i] + " not found in " + dir_to_clean)
88ea2e701d142effa344a8ae5d4a46364a17cbf6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7263/88ea2e701d142effa344a8ae5d4a46364a17cbf6/clean_folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 5609, 12, 267, 701, 67, 803, 16, 1577, 67, 869, 67, 6200, 4672, 3536, 411, 10262, 4150, 34, 16803, 392, 12509, 585, 471, 279, 1867, 16, 518, 903, 1221, 3071, 716, 326, 1867, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 5609, 12, 267, 701, 67, 803, 16, 1577, 67, 869, 67, 6200, 4672, 3536, 411, 10262, 4150, 34, 16803, 392, 12509, 585, 471, 279, 1867, 16, 518, 903, 1221, 3071, 716, 326, 1867, ...
file_locate(self.settings, ["netboot/busybox_config"])
file_locate(self.settings, ["netboot/busybox_config"])
def __init__(self,spec,addlargs): self.valid_values = [ "netboot/kernel/sources", "netboot/kernel/config", "netboot/kernel/prebuilt",
76e4b76af7393b5a674cfebf7a0578d4ef501a73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7327/76e4b76af7393b5a674cfebf7a0578d4ef501a73/netboot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2793, 16, 1289, 80, 1968, 4672, 365, 18, 877, 67, 2372, 273, 306, 315, 2758, 7137, 19, 8111, 19, 10141, 3113, 315, 2758, 7137, 19, 8111, 19, 1425, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2793, 16, 1289, 80, 1968, 4672, 365, 18, 877, 67, 2372, 273, 306, 315, 2758, 7137, 19, 8111, 19, 10141, 3113, 315, 2758, 7137, 19, 8111, 19, 1425, 3113, ...
SELECT RDB$RELATION_FIELDS.RDB$FIELD_NAME as field, RDB$TYPES.RDB$TYPE_NAME as t, RDB$FIELDS.RDB$FIELD_LENGTH as flength, RDB$FIELDS.RDB$FIELD_SCALE as fscale, RDB$RELATION_FIELDS.RDB$NULL_FLAG as nullAllowed, RDB$RELATION_FIELDS.RDB$DEFAULT_VALUE as thedefault, RDB$FIELDS.RDB$FIELD_SUB_TYPE as blobtype FROM RDB$RELATION_FIELDS INNER JOIN RDB$FIELDS ON (RDB$RELATION_FIELDS.RDB$FIELD_SOURCE = RDB$FIELDS.RDB$FIELD_NAME) INNER JOIN RDB$TYPES ON (RDB$FIELDS.RDB$FIELD_TYPE = RDB$TYPES.RDB$TYPE) WHERE (RDB$RELATION_FIELDS.RDB$RELATION_NAME = '%s') AND (RDB$TYPES.RDB$FIELD_NAME = 'RDB$FIELD_TYPE')"""
SELECT rf.RDB$FIELD_NAME as field, t.RDB$TYPE_NAME as t, f.RDB$FIELD_LENGTH as flength, f.RDB$FIELD_SCALE as fscale, rf.RDB$NULL_FLAG as nullAllowed, coalesce(rf.RDB$DEFAULT_SOURCE, f.rdb$default_source) as thedefault, f.RDB$FIELD_SUB_TYPE as blobtype FROM RDB$RELATION_FIELDS rf INNER JOIN RDB$FIELDS f ON rf.RDB$FIELD_SOURCE = f.RDB$FIELD_NAME INNER JOIN RDB$TYPES t ON f.RDB$FIELD_TYPE = t.RDB$TYPE WHERE rf.RDB$RELATION_NAME = '%s' AND t.RDB$FIELD_NAME = 'RDB$FIELD_TYPE'"""
def columnsFromSchema(self, tableName, soClass): """ Look at the given table and create Col instances (or subclasses of Col) for the fields it finds in that table. """
e67bf0dfaf2a7e84533480c43f4026dd1e5e0524 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8798/e67bf0dfaf2a7e84533480c43f4026dd1e5e0524/firebirdconnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2168, 1265, 3078, 12, 2890, 16, 4775, 16, 1427, 797, 4672, 3536, 10176, 622, 326, 864, 1014, 471, 752, 1558, 3884, 261, 280, 15320, 434, 1558, 13, 364, 326, 1466, 518, 13094, 316, 716, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2168, 1265, 3078, 12, 2890, 16, 4775, 16, 1427, 797, 4672, 3536, 10176, 622, 326, 864, 1014, 471, 752, 1558, 3884, 261, 280, 15320, 434, 1558, 13, 364, 326, 1466, 518, 13094, 316, 716, ...
NE1_QWidgetAction(self.subControlActionGroup, win = self.win)
NE1_QWidgetAction(parentWidget, win = self.win)
def _createBondToolActions(self, parentWidget): """ Create the actions to be included in flyout toolbar , when the 'bonds tool' is active. Note that the object names of these action will be be used to find the Bond Tool type to which each action corresponds to. @see: self._createActions() where this is called. """ self.bondToolsActionGroup = QActionGroup(parentWidget) self.bondToolsActionGroup.setExclusive(True) self.bond1Action = \ NE1_QWidgetAction(self.subControlActionGroup, win = self.win) self.bond1Action.setText("Single") self.bond1Action.setIcon(geticon("ui/actions/Command Toolbar/BuildAtoms/SingleBond.png")) self.bond1Action.setObjectName('ACTION_SINGLE_BOND_TOOL') self.bond2Action = \ NE1_QWidgetAction(self.subControlActionGroup, win = self.win) self.bond2Action.setText("Double") self.bond2Action.setIcon(geticon("ui/actions/Command Toolbar/BuildAtoms/DoubleBond.png")) self.bond2Action.setObjectName('ACTION_DOUBLE_BOND_TOOL') self.bond3Action = \ NE1_QWidgetAction(self.subControlActionGroup, win = self.win) self.bond3Action.setText("Triple") self.bond3Action.setIcon(geticon("ui/actions/Command Toolbar/BuildAtoms/TripleBond.png")) self.bond3Action.setObjectName('ACTION_TRIPLE_BOND_TOOL') self.bondaAction = \ NE1_QWidgetAction(self.subControlActionGroup, win = self.win) self.bondaAction.setText("Aromatic") self.bondaAction.setIcon(geticon("ui/actions/Command Toolbar/BuildAtoms/AromaticBond.png")) self.bondaAction.setObjectName('ACTION_AROMATIC_BOND_TOOL') self.bondgAction = \ NE1_QWidgetAction(self.subControlActionGroup, win = self.win) self.bondgAction.setText("Graphitic") self.bondgAction.setIcon(geticon("ui/actions/Command Toolbar/BuildAtoms/GraphiticBond.png")) self.bondgAction.setObjectName('ACTION_GRAPHITIC_BOND_TOOL') self.cutBondsAction = \ NE1_QWidgetAction(self.subControlActionGroup, win = self.win) self.cutBondsAction.setText("Cut Bonds") self.cutBondsAction.setIcon(geticon("ui/actions/Command Toolbar/BuildAtoms/CutBonds.png")) self.cutBondsAction.setObjectName('ACTION_DELETE_BOND_TOOL') for action in [self.bond1Action, self.bond2Action, self.bond3Action, self.bondaAction, self.bondgAction, self.cutBondsAction ]: self.bondToolsActionGroup.addAction(action) action.setCheckable(True) return
b2377bd13a375f591a6882c75a30d10db225cfe9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/b2377bd13a375f591a6882c75a30d10db225cfe9/Ui_BuildAtomsFlyout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 9807, 6364, 6100, 12, 2890, 16, 982, 4609, 4672, 3536, 1788, 326, 4209, 358, 506, 5849, 316, 21434, 659, 12748, 269, 1347, 326, 296, 70, 4096, 5226, 11, 353, 2695, 18, 3609, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 9807, 6364, 6100, 12, 2890, 16, 982, 4609, 4672, 3536, 1788, 326, 4209, 358, 506, 5849, 316, 21434, 659, 12748, 269, 1347, 326, 296, 70, 4096, 5226, 11, 353, 2695, 18, 3609, ...
print >> ssio, " Old Value shape, dtype, strides:",
print >> ssio, " Old Value shape, dtype, strides:",
def str_diagnostic(self): """Return a pretty multiline string representating the cause of the exception""" sio = StringIO() val_str_len_limit = 800 print >> sio, "BadOptimization Error", super(BadOptimization, self).__str__() print >> sio, " Variable: id", id(self.new_r), self.new_r print >> sio, " Op", self.new_r.owner print >> sio, " Value Type:", type(self.new_r_val) try: ssio = StringIO() print >> ssio, " Old Value shape, dtype, strides:", print >> ssio, self.old_r_val.shape, print >> ssio, self.old_r_val.dtype, print >> ssio, self.old_r_val.strides # only if all succeeds to we add anything to sio print >> sio, ssio.getvalue() except: pass
9b4af0ce9c47ac8d047e3343176029ad0ec512da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/9b4af0ce9c47ac8d047e3343176029ad0ec512da/debugmode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 12264, 11388, 12, 2890, 4672, 3536, 990, 279, 7517, 19431, 533, 2406, 1776, 326, 4620, 434, 326, 1520, 8395, 272, 1594, 273, 15777, 1435, 1244, 67, 701, 67, 1897, 67, 3595, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 12264, 11388, 12, 2890, 4672, 3536, 990, 279, 7517, 19431, 533, 2406, 1776, 326, 4620, 434, 326, 1520, 8395, 272, 1594, 273, 15777, 1435, 1244, 67, 701, 67, 1897, 67, 3595, 273,...
vbox.pack_start(f1); vbox.pack_start(f2);
def __init__(self): gtk.Window.__init__(self) self.set_title("Calcoli") #f1 = gtk.Frame('Valori'); f2 = gtk.Frame('Risultati') #main_vbox.pack_start(f1); main_vbox.pack_start(f2); #tbl_valori = gtk.Table(...); tbl_risultati = gtk.Table(...) #f1.add(tbl_valori); f2.add(tbl_risultati) vbox = gtk.VBox() vbox.set_spacing(4) vbox.set_border_width(4) f1 = gtk.Frame('Valori'); f2 = gtk.Frame('Risultati') vbox.pack_start(f1); vbox.pack_start(f2); tbl_valori = gtk.Table(8, 2) tbl_valori.attach(self.new_label("Altezza:"), 0, 1, 0, 1) tbl_valori.attach(self.new_label("Lunghezza:"), 0, 1, 1, 2) tbl_valori.attach(self.new_label("Larghezza:"), 0, 1, 2, 3) self.e_altezza, self.e_lunghezza, self.e_larghezza = gtk.Entry(), gtk.Entry(), gtk.Entry() tbl_valori.attach(self.e_altezza, 1, 2, 0, 1) tbl_valori.attach(self.e_lunghezza, 1, 2, 1, 2) tbl_valori.attach(self.e_larghezza, 1, 2, 2, 3) tbl = gtk.Table(8, 2) tbl.attach(self.new_label("Volume:"), 0, 1, 2, 3) tbl.attach(self.new_label("Piante Inseribili:"), 0, 1, 3, 4) tbl.attach(self.new_label("Numero di pesci 3-4 cm:"), 0 ,1, 4, 5) self.volume = self.new_label('0', False) self.piante_inseribili = self.new_label('0', False) self.num_pesci_3_4 = self.new_label('0', False) tbl.attach(self.volume, 1, 2, 2, 3) tbl.attach(self.piante_inseribili, 1, 2, 3, 4) tbl.attach(self.num_pesci_3_4, 1, 2, 4, 5) tbl.attach(self.new_label("Numero di pesci 5-6 cm:"), 0, 1, 5, 6) tbl.attach(self.new_label("Watt per piante esigenti:"), 0, 1, 6, 7) tbl.attach(self.new_label("Watt per piante poco esigenti:"), 0, 1, 8, 9) self.num_pesci_5_6 = self.new_label('0', False) self.watt_esigenti = self.new_label('0', False) self.watt_poco_esigenti = self.new_label('0', False) tbl.attach(self.num_pesci_5_6, 1, 2, 5, 6) tbl.attach(self.watt_esigenti, 1, 2, 6, 7) tbl.attach(self.watt_poco_esigenti, 1, 2, 8, 9) #vbox.pack_start(tbl)
8d8bc1379d769916bebc5029c801913f5f6a3abb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2406/8d8bc1379d769916bebc5029c801913f5f6a3abb/calcoli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 22718, 18, 3829, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 67, 2649, 2932, 3005, 1293, 77, 7923, 225, 468, 74, 21, 273, 22718, 18, 3219, 2668, 3053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 22718, 18, 3829, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 67, 2649, 2932, 3005, 1293, 77, 7923, 225, 468, 74, 21, 273, 22718, 18, 3219, 2668, 3053...
def __init__(self, id, path=None, title='', automatic=None):
def __init__(self, id, path=None, title='', requestName=None):
def __init__(self, id, path=None, title='', automatic=None): self.id = id self.setContainerPath(path) self.setTitle(title)
19985ee3fa2b5130bfb09a7ea7bf8aa014e8257c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/19985ee3fa2b5130bfb09a7ea7bf8aa014e8257c/SessionDataManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 612, 16, 589, 33, 7036, 16, 2077, 2218, 2187, 590, 461, 33, 7036, 4672, 365, 18, 350, 273, 612, 365, 18, 542, 2170, 743, 12, 803, 13, 365, 18, 542, 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, 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, 612, 16, 589, 33, 7036, 16, 2077, 2218, 2187, 590, 461, 33, 7036, 4672, 365, 18, 350, 273, 612, 365, 18, 542, 2170, 743, 12, 803, 13, 365, 18, 542, 4...