rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
_delete_files() | def test_dumbdbm_creation(self): _delete_files() f = dumbdbm.open(_fname, 'c') self.assertEqual(f.keys(), []) for key in self._dict: f[key] = self._dict[key] self.read_helper(f) f.close() | c08fe82b32386d2621f4c6c17cc334c7a3a924b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c08fe82b32386d2621f4c6c17cc334c7a3a924b9/test_dumbdbm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
72,
3592,
1966,
81,
67,
17169,
12,
2890,
4672,
284,
273,
302,
3592,
1966,
81,
18,
3190,
24899,
12749,
16,
296,
71,
6134,
365,
18,
11231,
5812,
12,
74,
18,
2452,
9334,
5378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
72,
3592,
1966,
81,
67,
17169,
12,
2890,
4672,
284,
273,
302,
3592,
1966,
81,
18,
3190,
24899,
12749,
16,
296,
71,
6134,
365,
18,
11231,
5812,
12,
74,
18,
2452,
9334,
5378,
... | |
EXAMPLES: | EXAMPLES:: | def get_minmax_data(self): """ Returns a dictionary with the bounding box data. EXAMPLES: sage: x,y = var('x,y') sage: d = plot_vector_field((.01*x,x+y), (x,10,20), (y,10,20))[0].get_minmax_data() sage: d['xmin'] 10.0 sage: d['ymin'] 10.0 """ from sage.plot.plot import minmax_data return minmax_data(self.xpos_array, self.ypos_array, dict=True) | b39a838c560927994d5f1cd0239aaf60298ce479 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b39a838c560927994d5f1cd0239aaf60298ce479/plot_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1154,
1896,
67,
892,
12,
2890,
4672,
3536,
2860,
279,
3880,
598,
326,
7552,
3919,
501,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
619,
16,
93,
273,
569,
2668,
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,
1154,
1896,
67,
892,
12,
2890,
4672,
3536,
2860,
279,
3880,
598,
326,
7552,
3919,
501,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
619,
16,
93,
273,
569,
2668,
92,
... |
if pkg["name"] != "gpg-pubkey": print "package", pkg.getFilename(), \ "does not have a sha1 header" | print "warning: package", pkg.getFilename(), "does not have a sha1 header" | def readRpmdb(dbpath="/var/lib/rpm/"): from binascii import b2a_hex print "Reading rpmdb, this can take some time..." print "Reading Packages..." (packages, keyring, maxtid) = readPackages(dbpath) print "Reading the rest..." basenames = readDb(dbpath + "Basenames") conflictname = readDb(dbpath + "Conflictname") dirnames = readDb(dbpath + "Dirnames", "bt") filemd5s = readDb(dbpath + "Filemd5s") group = readDb(dbpath + "Group") installtid = readDb(dbpath + "Installtid", "bt", 1) name = readDb(dbpath + "Name") providename = readDb(dbpath + "Providename") provideversion = readDb(dbpath + "Provideversion", "bt") pubkeys = readDb(dbpath + "Pubkeys") requirename = readDb(dbpath + "Requirename") requireversion = readDb(dbpath + "Requireversion", "bt") sha1header = readDb(dbpath + "Sha1header") sigmd5 = readDb(dbpath + "Sigmd5") triggername = readDb(dbpath + "Triggername") print "Checking data integrity..." if maxtid != None: for tid in packages.keys(): if tid > maxtid: print "wrong tid:", tid verifyStructure(packages, basenames, "basenames") verifyStructure(packages, conflictname, "conflictname") verifyStructure(packages, dirnames, "dirnames") for x in filemd5s.values(): for y in x.keys(): x[y] = b2a_hex(x[y]) verifyStructure(packages, filemd5s, "filemd5s") verifyStructure(packages, group, "group") verifyStructure(packages, installtid, "installtid") verifyStructure(packages, name, "name", 0) verifyStructure(packages, providename, "providename") verifyStructure(packages, provideversion, "provideversion") #verifyStructure(packages, pubkeys, "pubkeys") verifyStructure(packages, requirename, "requirename") verifyStructure(packages, requireversion, "requireversion") verifyStructure(packages, sha1header, "install_sha1header", 0) verifyStructure(packages, sigmd5, "install_md5", 0) verifyStructure(packages, triggername, "triggername") for pkg in packages.values(): pkg.sig = HdrIndex() if pkg["archivesize"] != None: pkg.sig["payloadsize"] = pkg["archivesize"] del pkg["archivesize"] if 1: sha1header = pkg["install_sha1header"] else: if pkg["install_size_in_sig"] != None: pkg.sig["size_in_sig"] = pkg["install_size_in_sig"] del pkg["install_size_in_sig"] if pkg["install_md5"] != None: pkg.sig["md5"] = pkg["install_md5"] del pkg["install_md5"] if pkg["install_sha1header"] != None: pkg.sig["sha1header"] = pkg["install_sha1header"] del pkg["install_sha1header"] sha1header = pkg.sig["sha1header"] if sha1header == None: if pkg["name"] != "gpg-pubkey": print "package", pkg.getFilename(), \ "does not have a sha1 header" continue (indexNo, storeSize, fmt, fmt2) = writeHeader(pkg.hdr.hash, rpmdbtag, "immutable", install_keys, 0, pkg.rpmgroup) lead = pack("!8s2I", "\x8e\xad\xe8\x01\x00\x00\x00\x00", indexNo, storeSize) ctx = sha.new() ctx.update(lead) ctx.update(fmt) ctx.update(fmt2) if ctx.hexdigest() != sha1header: print pkg.getFilename(), \ "bad sha1: %s / %s" % (sha1header, ctx.hexdigest()) | 36064e9e7b8187b1d2723e47eb83915d362cf0b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/36064e9e7b8187b1d2723e47eb83915d362cf0b4/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
54,
84,
27574,
12,
1966,
803,
1546,
19,
1401,
19,
2941,
19,
86,
7755,
4898,
4672,
628,
28222,
1930,
324,
22,
69,
67,
7118,
1172,
315,
15714,
8715,
27574,
16,
333,
848,
4862,
2690,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
54,
84,
27574,
12,
1966,
803,
1546,
19,
1401,
19,
2941,
19,
86,
7755,
4898,
4672,
628,
28222,
1930,
324,
22,
69,
67,
7118,
1172,
315,
15714,
8715,
27574,
16,
333,
848,
4862,
2690,... |
def getSensitivities(self, y): """ Not supported in this model class. @remark: This method came existence due to GenericSensivityModel that exists in my master thesis code base. See remark on ::self.getRealModelSize() for more information why this method exists. """ raise NotImplementedError('This model does not support' ' sensitivity analysis implicitly.') | def evalJacX(self): """ Evaluate the jacobian of the function F w.r.t. states x. """ jac = N.array([0] * self.getRealModelSize()**2, dtype=c_jmi_real_t) mask = N.array([1] * self.getRealModelSize()**2, dtype=N.int32) self._m.jmimodel.jmi_ode_df(pyjmi.JMI_DER_CPPAD, pyjmi.JMI_DER_DENSE_ROW_MAJOR, pyjmi.JMI_DER_X, mask, jac) n = self.getRealModelSize() jac = jac.reshape( (n,n) ) return jac | 5d65e9159cc77ea4a79970d1b4dac2e7448e3981 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/5d65e9159cc77ea4a79970d1b4dac2e7448e3981/shooting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
46,
1077,
60,
12,
2890,
4672,
3536,
18176,
326,
20138,
26968,
434,
326,
445,
478,
341,
18,
86,
18,
88,
18,
5493,
619,
18,
3536,
20138,
225,
273,
423,
18,
1126,
3816,
20,
65,
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,
5302,
46,
1077,
60,
12,
2890,
4672,
3536,
18176,
326,
20138,
26968,
434,
326,
445,
478,
341,
18,
86,
18,
88,
18,
5493,
619,
18,
3536,
20138,
225,
273,
423,
18,
1126,
3816,
20,
65,
38... | |
description = "ID of a CeCog configuration file. If not provided, a default configuration will be used."), | description = "ID of a CeCog configuration file. If not provided, a default configuration will be used.", grouping = "3"), | def setup(): """ Defines the OMERO.scripts parameters and returns the created client object. """ import omero.scripts as scripts client = scripts.client(SCRIPT_NAME, scripts.Long( "Image_ID", optional = False, description = "ID of a valid dataset"), scripts.Long( "Dataset_ID", optional = True, description = "ID of a dataset to which output images should be added. If not provided,"+\ | 3eaf2e09472808b3b11ff5d84e970de79bc05866 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/3eaf2e09472808b3b11ff5d84e970de79bc05866/Run_Cecog_1.0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13332,
3536,
18003,
281,
326,
28839,
13309,
18,
12827,
1472,
471,
1135,
326,
2522,
1004,
733,
18,
3536,
1930,
8068,
2439,
18,
12827,
487,
8873,
1004,
273,
8873,
18,
2625,
12,
10885,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13332,
3536,
18003,
281,
326,
28839,
13309,
18,
12827,
1472,
471,
1135,
326,
2522,
1004,
733,
18,
3536,
1930,
8068,
2439,
18,
12827,
487,
8873,
1004,
273,
8873,
18,
2625,
12,
10885,
... |
Set of Morphisms from Symmetric group of order 3! as a permutation group to Symmetric group of order 3! as a permutation group in Category of groups | Set of Morphisms from SymmetricGroup(3) to SymmetricGroup(3) in Category of groups | def Hom(X, Y, cat=None): """ Create the space of homomorphisms from X to Y in the category cat. INPUT: X -- anything Y -- anything cat -- (optional) category in which the morphisms must be OUTPUT: a homset in cat EXAMPLES: sage: V = VectorSpace(QQ,3) sage: Hom(V, V) Set of Morphisms from Vector space of dimension 3 over Rational Field to Vector space of dimension 3 over Rational Field in Category of vector spaces over Rational Field sage: G = SymmetricGroup(3) sage: Hom(G, G) Set of Morphisms from Symmetric group of order 3! as a permutation group to Symmetric group of order 3! as a permutation group in Category of groups sage: Hom(ZZ, QQ, Sets()) Set of Morphisms from Integer Ring to Rational Field in Category of sets """ global _cache key = (X,Y,cat) if _cache.has_key(key): H = _cache[key]() if H: return H if cat is None or (cat is X.category() and cat is Y.category()): try: H = X._Hom_(Y) except AttributeError: pass cat_X = X.category() cat_Y = Y.category() if cat is None: if cat_X.is_subcategory(cat_Y): cat = cat_Y elif cat_Y.is_subcategory(cat_X): if not (cat is None) and not (cat_X is cat_Y): raise ValueError, "No unambiguous category found for Hom from %s to %s."%(X,Y) cat = cat_X else: raise TypeError, "No suitable category found for Hom from %s to %s."%(X,Y) elif isinstance(cat, category.Category): if not isinstance(cat, category.Category): raise TypeError, "Argument cat (= %s) must be a category."%cat if not cat_X.is_subcategory(cat) \ or not cat_Y.is_subcategory(cat): raise TypeError, \ "Argument cat (= %s) is incompatible with %s and %s."%(cat, X, Y) else: raise TypeError, "Argument cat (= %s) must be a category."%cat # coercing would be incredibly annoying, since the domain and codomain # are totally different objects #X = cat(X); Y = cat(Y) # construct H if cat._is_subclass(category.HeckeModules): from sage.modular.hecke.homspace import HeckeModuleHomspace H = HeckeModuleHomspace(X, Y) elif cat._is_subclass(category.FreeModules): from sage.modules.free_module_homspace import FreeModuleHomspace H = FreeModuleHomspace(X, Y, cat) elif cat._is_subclass(category.Rings): from sage.rings.homset import RingHomset H = RingHomset(X, Y) elif cat._is_subclass(category.Schemes) or cat._is_subclass(category.Schemes_over_base): from sage.schemes.generic.homset import SchemeHomset H = SchemeHomset(X, Y) else: # default H = Homset(X, Y, cat) ##_cache[key] = weakref.ref(H) _cache[(X, Y, cat)] = weakref.ref(H) return H | bc308a4cc580189d7f16431bed3f7797648fc410 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/bc308a4cc580189d7f16431bed3f7797648fc410/homset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
670,
362,
12,
60,
16,
1624,
16,
6573,
33,
7036,
4672,
3536,
1788,
326,
3476,
434,
13995,
362,
7657,
23749,
628,
1139,
358,
1624,
316,
326,
3150,
6573,
18,
225,
12943,
30,
1139,
1493,
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,
670,
362,
12,
60,
16,
1624,
16,
6573,
33,
7036,
4672,
3536,
1788,
326,
3476,
434,
13995,
362,
7657,
23749,
628,
1139,
358,
1624,
316,
326,
3150,
6573,
18,
225,
12943,
30,
1139,
1493,
6... |
nlut = lut.get(n.ip, LastUpdateTimes()) | nlut = lut.setdefault(n.ip, LastUpdateTimes()) | def checkMeshStatus(): """ Performs a mesh status check. """ global lut # Remove all invalid nodes and subnets Node.objects.filter(status = NodeStatus.Invalid).delete() Subnet.objects.filter(status = SubnetStatus.NotAllocated, last_seen__lt = datetime.now() - timedelta(minutes = 11)).delete() APClient.objects.filter(last_update__lt = datetime.now() - timedelta(minutes = 11)).delete() GraphItem.objects.filter(last_update__lt = datetime.now() - timedelta(days = 30)).delete() # Mark all nodes as down and all subnets as not announced Node.objects.all().update(warnings = False) Subnet.objects.exclude(status = SubnetStatus.NotAllocated).update(status = SubnetStatus.NotAnnounced) Link.objects.all().delete() # Fetch routing tables from OLSR nodes, hna, aliases = OlsrParser.getTables() # Create a topology plotter topology = DotTopologyPlotter() # Ping nodes present in the database and visible in OLSR dbNodes = {} nodesToPing = [] for nodeIp in nodes.keys(): try: # Try to get the node from the database dbNodes[nodeIp] = Node.objects.get(ip = nodeIp) dbNodes[nodeIp].peers = len(nodes[nodeIp].links) # If we have succeeded, add to list nodesToPing.append(nodeIp) except Node.DoesNotExist: # Node does not exist, create an invalid entry for it n = Node(ip = nodeIp, status = NodeStatus.Invalid, last_seen = datetime.now()) n.node_type = NodeType.Unknown n.warnings = True n.peers = len(nodes[nodeIp].links) n.save() dbNodes[nodeIp] = n # Mark invisible nodes as down for node in Node.objects.exclude(status = NodeStatus.Invalid): oldStatus = node.status if node.ip not in dbNodes: if node.status == NodeStatus.New: node.status = NodeStatus.Pending elif node.status != NodeStatus.Pending: node.status = NodeStatus.Down node.save() if oldStatus in (NodeStatus.Up, NodeStatus.Visible, NodeStatus.Duped) and node.status == NodeStatus.Down: Event.create_event(node, EventCode.NodeDown, '', EventSource.Monitor) # Invalidate uptime credit for this node nlut = lut.get(node.ip, LastUpdateTimes()) nlut.uptime_credit = None # Setup all node peerings for nodeIp, node in nodes.iteritems(): n = dbNodes[nodeIp] oldRedundancyLink = n.redundancy_link n.redundancy_link = False for peerIp, lq, ilq, etx in node.links: l = Link(src = n, dst = dbNodes[peerIp], lq = float(lq), ilq = float(ilq), etx = float(etx)) l.save() # Check if we have a peering with any border routers if l.dst.border_router: n.redundancy_link = True if oldRedundancyLink and not n.redundancy_link: Event.create_event(n, EventCode.RedundancyLoss, '', EventSource.Monitor) if n.redundancy_req and not n.redundancy_link: n.warnings = True n.save() # Add nodes to topology map and generate output for node in dbNodes.values(): topology.addNode(node) topology.save(os.path.join(GRAPHDIR, 'mesh_topology.png')) # Ping the nodes and update valid node status in the database results, dupes = PingParser.pingHosts(10, nodesToPing) nodewatcherInfos = NodeWatcher.spawnWorkers(results.keys()) for nodeIp in nodesToPing: n = dbNodes[nodeIp] oldStatus = n.status # Determine node status if nodeIp in results: n.status = NodeStatus.Up n.rtt_min, n.rtt_avg, n.rtt_max, n.pkt_loss = results[nodeIp] # Add RTT graph add_graph(n, '', GraphType.RTT, RRARTT, 'Latency', 'latency_%s' % nodeIp, n.rtt_avg) # Add uptime credit nlut = lut.get(n.ip, LastUpdateTimes()) if nlut.uptime_credit is not None: n.uptime_so_far = (n.uptime_so_far or 0) + int(time.time() - nlut.uptime_credit) nlut.uptime_credit = time.time() else: n.status = NodeStatus.Visible if nodeIp in dupes: n.status = NodeStatus.Duped n.warnings = True # Generate status change events if oldStatus in (NodeStatus.Down, NodeStatus.Pending) and n.status in (NodeStatus.Up, NodeStatus.Visible): if oldStatus == NodeStatus.Pending: n.first_seen = datetime.now() Event.create_event(n, EventCode.NodeUp, '', EventSource.Monitor) elif oldStatus != NodeStatus.Duped and n.status == NodeStatus.Duped: Event.create_event(n, EventCode.PacketDuplication, '', EventSource.Monitor) # Add LQ/ILQ graphs lq_avg = ilq_avg = 0.0 for peer in nodes[nodeIp].links: lq_avg += float(peer[1]) ilq_avg += float(peer[2]) lq_graph = add_graph(n, '', GraphType.LQ, RRALinkQuality, 'Link Quality', 'lq_%s' % nodeIp, lq_avg / n.peers, ilq_avg / n.peers) for peer in n.src.all(): add_graph(n, peer.dst.ip, GraphType.LQ, RRALinkQuality, 'Link Quality to %s' % peer.dst, 'lq_peer_%s_%s' % (nodeIp, peer.dst.ip), peer.lq, peer.ilq, parent = lq_graph) n.last_seen = datetime.now() # Check if we have fetched nodewatcher data if nodeIp in nodewatcherInfos and nodewatcherInfos[nodeIp] is not None: info = nodewatcherInfos[nodeIp] try: oldUptime = n.uptime or 0 oldChannel = n.channel or 0 oldVersion = n.firmware_version n.firmware_version = info['general']['version'] n.local_time = safe_date_convert(info['general']['local_time']) n.bssid = info['wifi']['bssid'] n.essid = info['wifi']['essid'] n.channel = NodeWatcher.frequency_to_channel(info['wifi']['frequency']) n.clients = 0 n.uptime = safe_uptime_convert(info['general']['uptime']) if oldVersion != n.firmware_version: Event.create_event(n, EventCode.VersionChange, '', EventSource.Monitor, data = 'Old version: %s\n New version: %s' % (oldVersion, n.firmware_version)) if oldUptime > n.uptime: Event.create_event(n, EventCode.UptimeReset, '', EventSource.Monitor, data = 'Old uptime: %s\n New uptime: %s' % (oldUptime, n.uptime)) if oldChannel != n.channel and oldChannel != 0: Event.create_event(n, EventCode.ChannelChanged, '', EventSource.Monitor, data = 'Old channel: %s\n New channel %s' % (oldChannel, n.channel)) if n.has_time_sync_problems(): n.warnings = True # Parse nodogsplash client information if 'nds' in info: for cid, client in info['nds'].iteritems(): try: c = APClient.objects.get(node = n, ip = client['ip']) except APClient.DoesNotExist: c = APClient(node = n) n.clients_so_far += 1 n.clients += 1 c.ip = client['ip'] c.uploaded = safe_int_convert(client['up']) c.downloaded = safe_int_convert(client['down']) c.last_update = datetime.now() c.save() # Generate a graph for number of clients add_graph(n, '', GraphType.Clients, RRAClients, 'Connected Clients', 'clients_%s' % nodeIp, n.clients) # Check for IP shortage wifiSubnet = n.subnet_set.filter(gen_iface_type = IfaceType.WiFi) if len(wifiSubnet) and n.clients >= ipcalc.Network(wifiSubnet[0].subnet, wifiSubnet[0].cidr).size() - 4: Event.create_event(n, EventCode.IPShortage, '', EventSource.Monitor, data = 'Subnet: %s\n Clients: %s' % (wifiSubnet[0], n.clients)) # Record interface traffic statistics for all interfaces for iid, iface in info['iface'].iteritems(): if iid not in ('wifi0', 'wmaster0'): add_graph(n, iid, GraphType.Traffic, RRAIface, 'Traffic - %s' % iid, 'traffic_%s_%s' % (nodeIp, iid), iface['up'], iface['down']) # Generate load average statistics if 'loadavg' in info['general']: n.loadavg_1min, n.loadavg_5min, n.loadavg_15min, n.numproc = safe_loadavg_convert(info['general']['loadavg']) add_graph(n, '', GraphType.LoadAverage, RRALoadAverage, 'Load Average', 'loadavg_%s' % nodeIp, n.loadavg_1min, n.loadavg_5min, n.loadavg_15min) add_graph(n, '', GraphType.NumProc, RRANumProc, 'Number of Processes', 'numproc_%s' % nodeIp, n.numproc) # Generate free memory statistics if 'memfree' in info['general']: n.memfree = safe_int_convert(info['general']['memfree']) buffers = safe_int_convert(info['general'].get('buffers', 0)) cached = safe_int_convert(info['general'].get('cached', 0)) add_graph(n, '', GraphType.MemUsage, RRAMemUsage, 'Memory Usage', 'memusage_%s' % nodeIp, n.memfree, buffers, cached) # Generate solar statistics when available if 'solar' in info and all([x in info['solar'] for x in ('batvoltage', 'solvoltage', 'charge', 'state', 'load')]): states = { 'boost' : 1, 'equalize' : 2, 'absorption' : 3, 'float' : 4 } add_graph(n, '', GraphType.Solar, RRASolar, 'Solar Monitor', 'solar_%s' % nodeIp, info['solar']['batvoltage'], info['solar']['solvoltage'], info['solar']['charge'], states.get(info['solar']['state'], 1), info['solar']['load'] ) # Check for installed package versions (every hour) nlut = lut.setdefault(n.ip, LastUpdateTimes()) if not nlut.packages or nlut.packages < datetime.now() - timedelta(hours = 1): nlut.packages = datetime.now() packages = NodeWatcher.fetchInstalledPackages(n.ip) or {} # Remove removed packages and update existing package versions for package in n.installedpackage_set.all(): if package.name not in packages: package.delete() else: package.version = packages[package.name] package.last_update = datetime.now() package.save() del packages[package.name] # Add added packages for packageName, version in packages.iteritems(): package = InstalledPackage(node = n) package.name = packageName package.version = version package.last_update = datetime.now() package.save() except: logging.warning(format_exc()) n.save() # Update valid subnet status in the database for nodeIp, subnets in hna.iteritems(): if nodeIp not in dbNodes: continue for subnet in subnets: subnet, cidr = subnet.split("/") try: s = Subnet.objects.get(node__ip = nodeIp, subnet = subnet, cidr = int(cidr)) s.last_seen = datetime.now() if s.status != SubnetStatus.NotAllocated: s.status = SubnetStatus.AnnouncedOk elif not s.node.border_router: s.node.warnings = True s.node.save() s.save() except Subnet.DoesNotExist: # Subnet does not exist, create an invalid entry for it s = Subnet(node = dbNodes[nodeIp], subnet = subnet, cidr = int(cidr), last_seen = datetime.now()) s.status = SubnetStatus.NotAllocated s.save() # Flag node entry with warnings flag (if not a border router) n = dbNodes[nodeIp] if not n.border_router: n.warnings = True n.save() | 00e566f934644f557719fc325653a17c1fcff4e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11345/00e566f934644f557719fc325653a17c1fcff4e5/monitor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
16748,
1482,
13332,
3536,
27391,
279,
6986,
1267,
866,
18,
3536,
2552,
27171,
225,
468,
3581,
777,
2057,
2199,
471,
19140,
2029,
18,
6911,
18,
2188,
12,
2327,
273,
2029,
1482,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
16748,
1482,
13332,
3536,
27391,
279,
6986,
1267,
866,
18,
3536,
2552,
27171,
225,
468,
3581,
777,
2057,
2199,
471,
19140,
2029,
18,
6911,
18,
2188,
12,
2327,
273,
2029,
1482,
18,
1... |
txt = unicode(pyfribidi.log2vis(txt.encode('utf-8'), base_direction=pyfribidi.LTR, encoding='utf-8'), 'utf-8') | try: txt = unicode(pyfribidi.log2vis(txt.encode('utf-8'), base_direction=pyfribidi.LTR, encoding='utf-8'), 'utf-8') except UnicodeDecodeError: pass | def renderText(self, txt, **kwargs): if useFriBidi: try: txt = pyfribidi.log2vis(txt, base_direction=pyfribidi.LTR) except UnicodeDecodeError: txt = unicode(pyfribidi.log2vis(txt.encode('utf-8'), base_direction=pyfribidi.LTR, encoding='utf-8'), 'utf-8') return self.formatter.styleText(txt, kwargs) | 2ca6dba07abe42ce77edd008fdc934013afb5afc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/2ca6dba07abe42ce77edd008fdc934013afb5afc/rlwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
1528,
12,
2890,
16,
6463,
16,
2826,
4333,
4672,
309,
999,
42,
566,
17763,
77,
30,
775,
30,
6463,
273,
2395,
74,
1533,
350,
77,
18,
1330,
22,
3516,
12,
5830,
16,
1026,
67,
9855,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1528,
12,
2890,
16,
6463,
16,
2826,
4333,
4672,
309,
999,
42,
566,
17763,
77,
30,
775,
30,
6463,
273,
2395,
74,
1533,
350,
77,
18,
1330,
22,
3516,
12,
5830,
16,
1026,
67,
9855,... |
show_add_subscription_screen() | self.show_add_subscription_screen() | def addSubButtonAction(self, button): print "addSubButtonAction" if consumer.has_key('uuid'): show_add_subscription_screen() else: show_import_certificate_screen() | b0b27d27a6be638f6b50178e4ac3dafb63a41f72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/b0b27d27a6be638f6b50178e4ac3dafb63a41f72/managergui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25716,
3616,
1803,
12,
2890,
16,
3568,
4672,
1172,
315,
1289,
1676,
3616,
1803,
6,
309,
4765,
18,
5332,
67,
856,
2668,
7080,
11,
4672,
365,
18,
4500,
67,
1289,
67,
11185,
67,
9252,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25716,
3616,
1803,
12,
2890,
16,
3568,
4672,
1172,
315,
1289,
1676,
3616,
1803,
6,
309,
4765,
18,
5332,
67,
856,
2668,
7080,
11,
4672,
365,
18,
4500,
67,
1289,
67,
11185,
67,
9252,
143... |
prefs_key = False) | prefs_key = True ) | def _paintnode(node, painter, x, y, widget): #bruce 070529 split this out """ Draw node in painter. x,y are coords for topleft of type-icon. widget (the modelTreeGui) is used for palette. """ ## print "_paintnode",node, painter, x, y, widget # x is 20, 40, etc (indent level) # y is 0 for the top item, incrs by 22 for other items -- but this varies as we scroll. # find state of node which determines how we draw it selected = node.picked disabled = node.is_disabled() ### might be slow! display_prefs = display_prefs_for_node(node) # someday these might also depend on parent node and/or on ModelTreeGui (i.e. widget) node_icon = node.node_icon(display_prefs) # a QPixmap object try: pixmap = _cached_icons[node_icon] except KeyError: # print "making pixmap for node_icon", node_icon # should occur once per unique icon per session pixmap = QIcon(node_icon).pixmap(_ICONSIZE[0], _ICONSIZE[1]) # vary the size _cached_icons[node_icon] = pixmap pass # draw it (icon and label), possibly transforming the painter before and during this. # Note about save/restore: Qt 4.1 doc says: # After painting, you should ensure that the painter is returned to the state it was supplied in # when this function was called. For example, it may be useful to call QPainter::save() # before painting and QPainter::restore() afterwards. need_save = disabled or selected #bruce 070529 presumed optimization if need_save: painter.save() if disabled: # before # draw icon and label in slanted form painter.shear(0, -0.5) painter.translate(0.5 * y + 4, 0.0) painter.drawPixmap(x, y, pixmap) # Draw a special symbol in the upper right corner of the node icon if one # of the following conditions is true: # - draw a small yellow dot if the node contains atoms that have their # display style set to something other than diDEFAULT. # - draw a small white ghost if the node contains invisible or hidden # chunks and/or atoms. # - draw a small yellow ghost if the node contains invisible or hidden # chunks and/or atoms _and_ the node also contains atoms that have their # display style set to something other than diDEFAULT. # Mark 2008-03-04 # # revised by bruce 080306, but not yet in final form, or in final place in this file. ### # What remains to do (assuming this works so far): # - some optimizations in the code for maintaining the node flags this accesses # - MT needs to subscribe to changes in this data for nodes it draws (and get mt_update when that changes) # - MT needs to include this data in what it compares about a node when deciding if redraw is needed. # Until it does, even an MT click often won't update the MT as needed. # (So to test this as it is so far, modify the model, then save and reopen the file.) node_symbols = debug_pref("Model Tree: add special symbols to node icons?", Choice_boolean_False, non_debug = True, prefs_key = False) if node_symbols: flags = node.get_atom_content(AC_INVISIBLE | AC_HAS_INDIVIDUAL_DISPLAY_STYLE) # Hidden nodes get ghosts. [hmm, probably not right ### FIX] node_has_invisible_contents = node.hidden # NIM: so do nodes with hidden sub-nodes. ##### IMPLEM # So do nodes which contain invisible (aka hidden) atoms: if flags & AC_INVISIBLE: node_has_invisible_contents = True # Nodes which contain atoms with non-default display styles get yellow dots # (or yellow ghosts if they already would have ghosts). node_has_special_display_contents = False if flags & AC_HAS_INDIVIDUAL_DISPLAY_STYLE: node_has_special_display_contents = True # What about non-default display styles on chunks? ### DECIDE, FIX # Now draw all this. if node_has_invisible_contents and node_has_special_display_contents: painter.drawPixmap(x, y, imagename_to_pixmap("modeltree/yellow_ghost.png")) elif node_has_invisible_contents: painter.drawPixmap(x, y, imagename_to_pixmap("modeltree/white_ghost.png")) elif node_has_special_display_contents: painter.drawPixmap(x, y, imagename_to_pixmap("modeltree/yellow_dot.png")) if selected: # before # draw a selection color as text bg color ###BUG: should use color role so it depends on app being in bg or fg (like it does for native QTreeView selectedness) # (note: this used to be done before drawing the icon, but even then it did not affect the icon. # so it would be ok in either place.) | 8ee22bd89e27971d7e619fc3211298a293a35396 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/8ee22bd89e27971d7e619fc3211298a293a35396/modelTreeGui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
84,
1598,
2159,
12,
2159,
16,
21295,
16,
619,
16,
677,
16,
3604,
4672,
468,
2848,
3965,
10934,
6260,
5540,
1416,
333,
596,
3536,
10184,
756,
316,
21295,
18,
619,
16,
93,
854,
6074... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
84,
1598,
2159,
12,
2159,
16,
21295,
16,
619,
16,
677,
16,
3604,
4672,
468,
2848,
3965,
10934,
6260,
5540,
1416,
333,
596,
3536,
10184,
756,
316,
21295,
18,
619,
16,
93,
854,
6074... |
If rowvar is zero, then each row is a variable with observations in the columns. """ if y is None: y = asarray(m) else: y = asarray(y) m = asarray(m) | If rowvar is non-zero (default), then each row is a variable with observations in the columns, otherwise each column is a variable and the observations are in the rows. """ X = asarray(m,ndmin=2) if X.shape[0] == 1: rowvar = 1 | def cov(m,y=None, rowvar=0, bias=0): """Estimate the covariance matrix. If m is a vector, return the variance. For matrices where each row is an observation, and each column a variable, return the covariance matrix. Note that in this case diag(cov(m)) is a vector of variances for each column. cov(m) is the same as cov(m, m) Normalization is by (N-1) where N is the number of observations (unbiased estimate). If bias is 1 then normalization is by N. If rowvar is zero, then each row is a variable with observations in the columns. """ if y is None: y = asarray(m) else: y = asarray(y) m = asarray(m) if rowvar: m = m.transpose() y = y.transpose() if (m.shape[0] == 1): m = m.transpose() if (y.shape[0] == 1): y = y.transpose() N = m.shape[0] if (y.shape[0] != N): raise ValueError, "x and y must have the same number of observations." m = m - m.mean(axis=0) y = y - y.mean(axis=0) if bias: fact = N*1.0 else: fact = N-1.0 val = squeeze(dot(m.transpose(),y.conj()) / fact) return val | 959f36c04ce8ca0b7bc44bb6438bddf162ad2db9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/959f36c04ce8ca0b7bc44bb6438bddf162ad2db9/function_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10613,
12,
81,
16,
93,
33,
7036,
16,
1027,
1401,
33,
20,
16,
12005,
33,
20,
4672,
3536,
13638,
326,
17366,
3148,
18,
225,
971,
312,
353,
279,
3806,
16,
327,
326,
12380,
18,
225,
2457... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10613,
12,
81,
16,
93,
33,
7036,
16,
1027,
1401,
33,
20,
16,
12005,
33,
20,
4672,
3536,
13638,
326,
17366,
3148,
18,
225,
971,
312,
353,
279,
3806,
16,
327,
326,
12380,
18,
225,
2457... |
clean = easy_run.fully_buffered(trim, | clean_out = easy_run.fully_buffered(trim, | def analyze_clashes(self, pdb_io=None, hierarchy=None, keep_hydrogens=False) : if (not libtbx.env.has_module(name="probe")): print "Probe could not be detected on your system. Please make sure Probe is in your path." print "Probe is available at http://kinemage.biochem.duke.edu/" sys.exit() assert [pdb_io, hierarchy].count(None) == 1 if(pdb_io is not None): hierarchy = pdb_io.construct_hierarchy() | 3b41616a436f5954b6fe913a69f133e978784a41 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/3b41616a436f5954b6fe913a69f133e978784a41/clashscore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
830,
7690,
12,
2890,
16,
10892,
67,
1594,
33,
7036,
16,
9360,
33,
7036,
16,
3455,
67,
18112,
9005,
23730,
33,
8381,
13,
294,
309,
261,
902,
2561,
18587,
92,
18,
3074,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
830,
7690,
12,
2890,
16,
10892,
67,
1594,
33,
7036,
16,
9360,
33,
7036,
16,
3455,
67,
18112,
9005,
23730,
33,
8381,
13,
294,
309,
261,
902,
2561,
18587,
92,
18,
3074,
18,
... |
res = run_sql("SELECT termlist FROM %sR WHERE id_bibrec=%s" % (rnkWORD_table[:-1], recID)) | res = run_sql("SELECT termlist FROM %sR WHERE id_bibrec=%s" % (methods[rank_method_code]["rnkWORD_table"][:-1], recID)) | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance,verbose): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar document above given percentage (0-100) verbose - how much debug information to show, 0-9""" startCreate = time.time() global voutput if methods[rank_method_code]["override_default_min_relevance"] == "no": rank_limit_relevance = methods[rank_method_code]["default_min_relevance"] query_terms = {} recID = int(recID) res = run_sql("SELECT termlist FROM %sR WHERE id_bibrec=%s" % (rnkWORD_table[:-1], recID)) if not res: return (None, "Warning: Requested record does not seem to exist.", "", voutput) rec_terms = deserialize_via_marshal(res[0][0]) #Get all documents using terms from the selected documents if len(rec_terms) > 0: terms = "%s" % dict(rec_terms).keys() terms = terms[1:len(terms) - 1] terms_recs = dict(run_sql("SELECT term, hitlist FROM %s WHERE term IN (%s)" % (rnkWORD_table,terms))) else: return (None, "Warning, An error has occured (3)", "", voutput) #Calculate all terms for (term, tf) in rec_terms.iteritems(): if len(term) >= methods[rank_method_code]["min_word_length"] and terms_recs.has_key(term): query_terms[term] = int((1 + math.log(tf[0])) * tf[1]) query_terms_old = query_terms.items() query_terms_old.sort(lambda x, y: cmp(y[1], x[1])) query_terms = {} stime = time.time() (recdict, rec_termcount, lrecIDs_remove) = ({}, {}, {}) #Use only most important terms for (t, tf) in query_terms_old: term_recs = deserialize_via_marshal(terms_recs[t]) if len(query_terms_old) <= methods[rank_method_code]["max_nr_words_lower"] or (len(term_recs) >= methods[rank_method_code]["min_nr_words_docs"] and (((float(len(term_recs)) / float(col_size)) <= methods[rank_method_code]["max_word_occurence"]) and ((float(len(term_recs)) / float(col_size)) >= methods[rank_method_code]["min_word_occurence"]))): query_terms[t] = round(tf, 4) (recdict, rec_termcount, lrecIDs_remove) = calculate_record_relevance((t, query_terms[t]) , term_recs, hitset, recdict, rec_termcount, lrecIDs_remove, verbose, "yes") if verbose > 0: voutput += "Term: %s,Number of records: %s, %s<br>" % (t, len(recdict), tf) if len(query_terms_old) > methods[rank_method_code]["max_nr_words_lower"] and (len(query_terms) == methods[rank_method_code]["max_nr_words_upper"] or tf < 0): break if len(query_terms) == 0: #not enough terms to get a good result return (None, "Warning, An error has occured (4)", "", voutput) if verbose > 0: voutput += "<br>Number of terms: %s<br>" % run_sql("SELECT count(id) FROM %s" % rnkWORD_table)[0][0] voutput += "Number of terms to use for query: %s<br>" % (len(query_terms)) voutput += "Current number of recIDs: %s<br>" % (col_size) voutput += "Prepare time: %s<br>" % (str(time.time() - startCreate)) recdict = post_calculate_record_relevance(recdict, rec_termcount, lrecIDs_remove, hitset, verbose) reclist = sort_record_relevance(recdict, rank_limit_relevance,recID, verbose) if verbose > 0: voutput += "Total time used: %s<br>" % (str(time.time() - startCreate)) rank_method_stat(reclist, query_terms) return (reclist[:len(reclist)], methods[rank_method_code]["prefix"], methods[rank_method_code]["postfix"], voutput) | 2b7ec6adb61acaf4f4c7868f48416243cf69c71b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2b7ec6adb61acaf4f4c7868f48416243cf69c71b/bibrank_record_sorter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
22985,
12,
11500,
67,
2039,
67,
710,
16,
1950,
734,
16,
6800,
542,
16,
6171,
67,
3595,
67,
16599,
5882,
16,
11369,
4672,
3536,
21358,
6548,
358,
999,
364,
21046,
16416,
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,
1104,
67,
22985,
12,
11500,
67,
2039,
67,
710,
16,
1950,
734,
16,
6800,
542,
16,
6171,
67,
3595,
67,
16599,
5882,
16,
11369,
4672,
3536,
21358,
6548,
358,
999,
364,
21046,
16416,
18,
2... |
devCtxs = [d[0].ctx for d in devs] clearPkts = [d[0].clear(None if s else self.ctx, devCtxs) for d, (s, r) in zip(devs, collectResults)] | clearPkts = [d[0].clear() for d in devs] | def makeClearPackets(self, devs, collectResults): """Create packets to recover from a timeout error. For boards whose collect succeeded, we just clear the packet buffer. For boards whose collect failed, we clear the buffer and resend the trigger to synchronize the start of the next run command. """ devCtxs = [d[0].ctx for d in devs] clearPkts = [d[0].clear(None if s else self.ctx, devCtxs) for d, (s, r) in zip(devs, collectResults)] msg = 'Some boards failed:\n' for d, (s, r) in zip(devs, collectResults): msg += d[0].devName if s: msg += ': OK\n\n' else: msg += ': timeout!\n' + r.getBriefTraceback() + '\n\n' return clearPkts, msg | 974c7fd4798bbc4505005e321c346b6a750f384c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7016/974c7fd4798bbc4505005e321c346b6a750f384c/ghz_dacs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
9094,
27328,
12,
2890,
16,
4461,
87,
16,
3274,
3447,
4672,
3536,
1684,
12640,
358,
5910,
628,
279,
2021,
555,
18,
225,
2457,
11094,
87,
8272,
3274,
15784,
16,
732,
2537,
2424,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
9094,
27328,
12,
2890,
16,
4461,
87,
16,
3274,
3447,
4672,
3536,
1684,
12640,
358,
5910,
628,
279,
2021,
555,
18,
225,
2457,
11094,
87,
8272,
3274,
15784,
16,
732,
2537,
2424,
326,... |
if context is None: context = getcontext() ans = self._check_nans(context=context) if ans: return ans | if self._is_special: ans = self._check_nans(context=context) if ans: return ans if self._isinfinity() and self._sign == 0: return Decimal(self) | def sqrt(self, context=None): """Return the square root of self. | 1a63da64df2af26e1f050749c19281f1de9084fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a63da64df2af26e1f050749c19281f1de9084fa/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5700,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
990,
326,
8576,
1365,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5700,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
990,
326,
8576,
1365,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
print "In generator main. THIS SHOULD HAPPEN ONCE" | def _get_item_for_work_queue(dbase, mirna_queries, homologene_to_mrna, mrna_to_seq, mrna_to_exons): """ A generator that yields one item at a time for the work queue. """ print "In generator main. THIS SHOULD HAPPEN ONCE" # We work on one microRNA cluster at a time, and loop over all sequence clusters for micro_rna_id, micro_rna_cluster in mirna_queries.iteritems(): # Loop over every Homologene=>(mrna_geneid, mrna_transcript_no) for hge_homologeneid, _mrna_list in homologene_to_mrna.iteritems(): # homolog_cluster will get added to the input queue # This is a dict, rather than a simpler structure, so the threads can lookup # matching localtaxids for RNAhybrid comparisons. # # Key: gcs_localtaxid # Value: (mrc_geneid, mrc_transcript_no, exon_seq) homolog_cluster = {} # For each mRNA, lookup sequence (this is transcript no. agnostic) for mrc_geneid, mrc_transcript_no in _mrna_list: # Get sequence data for the entire gene gcs_chromosome, gcs_taxid, gcs_localtaxid, gcs_complement, gcs_start, gcs_stop = mrna_to_seq[mrc_geneid] # We add one to the sequence length since gcs_stop is strangely /inclusive/ # i.e. To select BP #70, gcs_start = 70 AND gcs_stop = 70 seq_length = gcs_stop - gcs_start + 1 # TODO: Bind params, and stop reopening this damn cursor. seq_db = dbase.cursor() # Extract the raw sequence from PAP.GENOMIC_SEQUENCE, which contains: # > ges_loadid, ges_chromosome, ges_taxid, ges_localtaxid, ges_sequence, ges_masked_sequence # # Note: Avoid DBMS_LOB. functions, which get quirky with large result sets. # cx_Oracle can also handle CLOB objects directly, e.g.: row[0].read(1, 100) seq_db.execute("SELECT SUBSTR(GES_SEQUENCE," + str(gcs_start) + ", " + str(seq_length) + ") " "FROM PAP.GENOMIC_SEQUENCE WHERE GES_TAXID = '" + str(gcs_taxid) + "' AND " "GES_CHROMOSOME = '" + str(gcs_chromosome) + "'") seq_clob = seq_db.fetchone()[0] assert(seq_db.rowcount == 1) # Convert CLOB to STR for some easier handling raw_seq = str(seq_clob) assert(len(raw_seq) == seq_length) # Make sure we got actual base pairs, not '-' or 'N' assert(re.match("^[ATGC]*$", raw_seq, re.IGNORECASE)) seq_db.close() # Check if strand is complement, and take reverse complement. if gcs_complement: raw_seq = revComplement(raw_seq) # Do some list slicing to get only the exon sequence. exons = [] for exon_start, exon_stop in mrna_to_exons[(mrc_geneid, mrc_transcript_no)]: # We have to offset these by gcs_start # We also add one to compensate for python being [inclusive:exclusive] exons.append(raw_seq[exon_start-gcs_start:exon_stop-gcs_start+1]) exon_seq = ''.join(exons) homolog_cluster[gcs_localtaxid] = (mrc_geneid, mrc_transcript_no, exon_seq) yield (micro_rna_id, micro_rna_cluster, homolog_cluster) raise NoMoreWork('No more work to do.') | 486c694f2104aa1ef623239e33ccb12a0d0194fb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12607/486c694f2104aa1ef623239e33ccb12a0d0194fb/scan.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1726,
67,
1884,
67,
1252,
67,
4000,
12,
1966,
448,
16,
312,
481,
6582,
67,
13748,
16,
13995,
3966,
4009,
67,
869,
67,
21387,
6582,
16,
9752,
6582,
67,
869,
67,
5436,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1726,
67,
1884,
67,
1252,
67,
4000,
12,
1966,
448,
16,
312,
481,
6582,
67,
13748,
16,
13995,
3966,
4009,
67,
869,
67,
21387,
6582,
16,
9752,
6582,
67,
869,
67,
5436,
16... | |
node.maskhref = "mask.png" | node.maskhref = "mask1.png" | def setMask(): try: node.maskhref = "mask.png" except RuntimeError: print "Skipping testWordsMask - no shader support." Player.stop() | 364ea3f2928194f06d00ee0ca892c0a933a8877d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/364ea3f2928194f06d00ee0ca892c0a933a8877d/WordsTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
5796,
13332,
775,
30,
756,
18,
4455,
7547,
273,
315,
4455,
21,
18,
6446,
6,
1335,
7265,
30,
1172,
315,
16877,
1842,
7363,
5796,
300,
1158,
16700,
2865,
1199,
19185,
18,
5681,
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,
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,
444,
5796,
13332,
775,
30,
756,
18,
4455,
7547,
273,
315,
4455,
21,
18,
6446,
6,
1335,
7265,
30,
1172,
315,
16877,
1842,
7363,
5796,
300,
1158,
16700,
2865,
1199,
19185,
18,
5681,
1435,
... |
self.build_list_params(params, instancesn, 'Instances.member.%d.instanceId') | self.build_list_params(params, instances, 'Instances.member.%d.instanceId') | def register_instances(self, load_balancer_name, instances): """ Add new Instances to an existing Load Balancer. @type load_balancer_name: string @param load_balancer_name: The name of the Load Balancer | 9940250a40f9d5810c93c3866aea22c083952d5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/9940250a40f9d5810c93c3866aea22c083952d5d/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
10162,
12,
2890,
16,
1262,
67,
18770,
67,
529,
16,
3884,
4672,
3536,
1436,
394,
18357,
358,
392,
2062,
4444,
605,
5191,
18,
225,
632,
723,
1262,
67,
18770,
67,
529,
30,
533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
10162,
12,
2890,
16,
1262,
67,
18770,
67,
529,
16,
3884,
4672,
3536,
1436,
394,
18357,
358,
392,
2062,
4444,
605,
5191,
18,
225,
632,
723,
1262,
67,
18770,
67,
529,
30,
533,
... |
def object_filenames (source_filenames): | def object_filenames (self, source_filenames): | def object_filenames (source_filenames): """Return the list of object filenames corresponding to each specified source filename.""" pass | 26e48ea7df9681c7a138388241ae6cb000d215b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26e48ea7df9681c7a138388241ae6cb000d215b0/ccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
733,
67,
19875,
261,
2890,
16,
1084,
67,
19875,
4672,
3536,
990,
326,
666,
434,
733,
9066,
4656,
358,
1517,
1269,
1084,
1544,
12123,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
733,
67,
19875,
261,
2890,
16,
1084,
67,
19875,
4672,
3536,
990,
326,
666,
434,
733,
9066,
4656,
358,
1517,
1269,
1084,
1544,
12123,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
'source': re.compile(r'(?is)<source>.*?</source>'), | 'source': re.compile(r'(?is)<source .*?</source>'), | def replaceExcept(text, old, new, exceptions, caseInsensitive=False, allowoverlap=False, marker = ''): """ Return text with 'old' replaced by 'new', ignoring specified types of text. Skips occurences of 'old' within exceptions; e.g., within nowiki tags or HTML comments. If caseInsensitive is true, then use case insensitive regex matching. If allowoverlap is true, overlapping occurences are all replaced (watch out when using this, it might lead to infinite loops!). Parameters: text - a unicode string old - a compiled regular expression new - a unicode string (which can contain regular expression references), or a function which takes a match object as parameter. See parameter repl of re.sub(). exceptions - a list of strings which signal what to leave out, e.g. ['math', 'table', 'template'] caseInsensitive - a boolean marker - a string that will be added to the last replacement; if nothing is changed, it is added at the end """ # Hyperlink regex is defined in weblinkchecker.py import weblinkchecker exceptionRegexes = { 'comment': re.compile(r'(?s)<!--.*?-->'), 'includeonly': re.compile(r'(?is)<includeonly>.*?</includeonly>'), 'math': re.compile(r'(?is)<math>.*?</math>'), 'noinclude': re.compile(r'(?is)<noinclude>.*?</noinclude>'), # wiki tags are ignored inside nowiki tags. 'nowiki': re.compile(r'(?is)<nowiki>.*?</nowiki>'), # preformatted text 'pre': re.compile(r'(?ism)<pre>.*?</pre>'), 'source': re.compile(r'(?is)<source>.*?</source>'), # inline references 'ref': re.compile(r'(?ism)<ref[ >].*?</ref>'), 'timeline': re.compile(r'(?is)<timeline>.*?</timeline>'), # lines that start with a space are shown in a monospace font and # have whitespace preserved. 'startspace': re.compile(r'(?m)^ (.*?)$'), # tables often have whitespace that is used to improve wiki # source code readability. # TODO: handle nested tables. 'table': re.compile(r'(?ims)^{\|.*?^\|}|<table>.*?</table>'), # templates with parameters often have whitespace that is used to # improve wiki source code readability. # 'template': re.compile(r'(?s){{.*?}}'), # The regex above fails on nested templates. This regex can handle # templates cascaded up to level 3, but no deeper. For arbitrary # depth, we'd need recursion which can't be done in Python's re. # After all, the language of correct parenthesis words is not regular. 'template': re.compile(r'(?s){{(({{(({{.*?}})|.)*}})|.)*}}'), 'hyperlink': weblinkchecker.compileLinkR(), 'gallery': re.compile(r'(?is)<gallery.*?>.*?</gallery>'), # this matches internal wikilinks, but also interwiki, categories, and # images. 'link': re.compile(r'\[\[(?P<title>[^\]\|]*)(\|[^\]]*)?\]\]') } # if we got a string, compile it as a regular expression if type(old) == type('') or type(old) == type(u''): if caseInsensitive: old = re.compile(old, re.IGNORECASE | re.UNICODE) else: old = re.compile(old) dontTouchRegexes = [] for exc in exceptions: if isinstance(exc, str) or isinstance(exc, unicode): # assume it's a reference to the exceptionRegexes dictionary # defined above. if not exceptionRegexes.has_key(exc): raise ValueError("Unknown tag type: " + exc) dontTouchRegexes.append(exceptionRegexes[exc]) else: # assume it's a regular expression dontTouchRegexes.append(exc) index = 0 markerpos = len(text) while index < len(text): match = old.search(text, index) if not match: # nothing left to replace break # check which exception will occur next. nextExceptionMatch = None for dontTouchR in dontTouchRegexes: excMatch = dontTouchR.search(text, index) if excMatch and ( nextExceptionMatch is None or excMatch.start() < nextExceptionMatch.start()): nextExceptionMatch = excMatch if nextExceptionMatch is not None and nextExceptionMatch.start() <= match.start(): # an HTML comment or text in nowiki tags stands before the next valid match. Skip. index = nextExceptionMatch.end() else: # We found a valid match. Replace it. try: # the parameter new can be a function which takes the match as a parameter. replacement = new(match) except TypeError: # it is not a function, but a string. # it is a little hack to make \n work. It would be better to fix it # previously, but better than nothing. new = new.replace('\\n', '\n') # We cannot just insert the new string, as it may contain regex # group references such as \2 or \g<name>. # On the other hand, this approach does not work because it can't # handle lookahead or lookbehind (see bug #1731008): #replacement = old.sub(new, text[match.start():match.end()]) #text = text[:match.start()] + replacement + text[match.end():] # So we have to process the group references manually. replacement = new groupR = re.compile(r'\\(?P<number>\d+)|\\g<(?P<name>.+?)>') while True: groupMatch = groupR.search(replacement) if not groupMatch: break groupID = groupMatch.group('name') or int(groupMatch.group('number')) replacement = replacement[:groupMatch.start()] + match.group(groupID) + replacement[groupMatch.end():] text = text[:match.start()] + replacement + text[match.end():] # continue the search on the remaining text if allowoverlap: index = match.start() + 1 else: index = match.start() + len(replacement) markerpos = match.start() + len(replacement) text = text[:markerpos] + marker + text[markerpos:] return text | 66a789f0b8055e8d9e803abf3d61ff1ffd110734 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/66a789f0b8055e8d9e803abf3d61ff1ffd110734/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
30212,
12,
955,
16,
1592,
16,
394,
16,
4798,
16,
648,
21931,
33,
8381,
16,
1699,
17946,
33,
8381,
16,
5373,
273,
875,
4672,
3536,
2000,
977,
598,
296,
1673,
11,
8089,
635,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1453,
30212,
12,
955,
16,
1592,
16,
394,
16,
4798,
16,
648,
21931,
33,
8381,
16,
1699,
17946,
33,
8381,
16,
5373,
273,
875,
4672,
3536,
2000,
977,
598,
296,
1673,
11,
8089,
635,
296,
... |
self.add("schemafile", short="S:", default="schema.xml", | self.add("schemafile", short="S:", long="schema=", default="schema.xml", | def __init__(self): RunnerOptions.__init__(self) self.add("schemafile", short="S:", default="schema.xml", handler=self.set_schemafile) | 810b50d1f7bfbbebf764224ad864aab349d6e783 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9782/810b50d1f7bfbbebf764224ad864aab349d6e783/zdrun.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
22712,
1320,
16186,
2738,
972,
12,
2890,
13,
365,
18,
1289,
2932,
4821,
768,
3113,
3025,
1546,
55,
2773,
16,
1525,
1546,
4821,
1546,
16,
805,
1546,
4821,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
4672,
22712,
1320,
16186,
2738,
972,
12,
2890,
13,
365,
18,
1289,
2932,
4821,
768,
3113,
3025,
1546,
55,
2773,
16,
1525,
1546,
4821,
1546,
16,
805,
1546,
4821,... |
_fl_get_button_numb = cfuncproto( load_so_libforms(), "fl_get_button_numb", cty.c_int, [cty.POINTER(FL_OBJECT)], """int fl_get_button_numb(FL_OBJECT * ob) """) | def fl_set_button(pObject, pushed): """ fl_set_button(pObject, pushed) """ ipushed = convert_to_int(pushed) keep_elem_refs(pObject, pushed, ipushed) _fl_set_button(pObject, ipushed) | 70db52a63a290ce6588b39cd296ac3185a4d5c20 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/70db52a63a290ce6588b39cd296ac3185a4d5c20/library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
5391,
12,
84,
921,
16,
18543,
4672,
3536,
1183,
67,
542,
67,
5391,
12,
84,
921,
16,
18543,
13,
3536,
225,
2359,
1218,
329,
273,
1765,
67,
869,
67,
474,
12,
6206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5391,
12,
84,
921,
16,
18543,
4672,
3536,
1183,
67,
542,
67,
5391,
12,
84,
921,
16,
18543,
13,
3536,
225,
2359,
1218,
329,
273,
1765,
67,
869,
67,
474,
12,
6206,
... | |
a=1.1 | a = 1.1 | def snapquat(self, qlist): q1 = self.quat a=1.1 what = 0 for q2,n in qlist: a2 = vlen((q2-q1).axis) if a2 < a: a = a2 q = q2 what = n self.quat = Q(q) self.gl_update() return what | 9dc95351096c9deab5f64e3e704bde7a93f95b49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9dc95351096c9deab5f64e3e704bde7a93f95b49/GLPane.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10915,
372,
270,
12,
2890,
16,
1043,
1098,
4672,
1043,
21,
273,
365,
18,
372,
270,
279,
273,
404,
18,
21,
4121,
273,
374,
364,
1043,
22,
16,
82,
316,
1043,
1098,
30,
279,
22,
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,
10915,
372,
270,
12,
2890,
16,
1043,
1098,
4672,
1043,
21,
273,
365,
18,
372,
270,
279,
273,
404,
18,
21,
4121,
273,
374,
364,
1043,
22,
16,
82,
316,
1043,
1098,
30,
279,
22,
273,
... |
'site': request.META['SERVER_NAME'], 'url': url, | def landingpage(request): """ Show the Landingpage" """ from pocp.ocp.models import provider, round_robin from random import random # User-Agent: iPassConnect (iPass) if request.META.has_key('HTTP_USER_AGENT'): if request.META['HTTP_USER_AGENT'] == 'iPassConnect': src_ip = request.META['REMOTE_ADDR'] # Round Robin for WISP my_random = random() for obj in round_robin.objects.all(): if my_random <= obj.rate: prov = obj break else: my_random -= obj.rate # Add and save new route add_active_route(src_ip = src_ip, prov = prov) return render_to_response('ipass.htm', {}) # /User-Agent # See django.contrib.auth.views, login: redirect_to = '/' loggedin = False if str(request.user) != "AnonymousUser": loggedin = True if request.method == "POST": form = AuthenticationForm(data=request.POST) if str(request.user) != "AnonymousUser": from django.contrib.auth.views import logout logout(request, '/') return HttpResponseRedirect('/') if form.is_valid(): # Light security check -- make sure redirect_to isn't garbage. if not redirect_to or '//' in redirect_to or ' ' in redirect_to: redirect_to = settings.LOGIN_REDIRECT_URL from django.contrib.auth import login login(request, form.get_user()) # If the user wants internet (he is coming from the landingepage and not # i.e. admin login) give_internet = request.POST.get('give_internet','0') if give_internet: try: src_ip = request.META['REMOTE_ADDR'] add_active_route(src_ip = src_ip, prov = None, conf = True) except: pass if request.session.test_cookie_worked(): request.session.delete_test_cookie() return HttpResponseRedirect(redirect_to) else: form = AuthenticationForm(request) request.session.set_test_cookie() url = None if request.GET.has_key('url'): url = request.GET['url'] else: url = request.build_absolute_uri() # Round Robin for WISP provs = [] for prov in round_robin.objects.all(): if prov.provider.iframe_url != '': provs.append(prov) sorted_provs = [] last = 0 while len(provs) > 0: my_random = random() - last for prov in provs: if my_random <= prov.rate: sorted_provs.append(prov.provider) last += prov.rate provs.remove(prov) break else: my_random -= prov.rate # than, repace the rest of the template return render_to_response('landingpage.htm', { 'username': request.user, 'loggedin': loggedin, 'form': form, 'site': request.META['SERVER_NAME'], 'url': url, 'wisps': sorted_provs, }) | eb5e4425a8e2a2d1cd6f65206fa209771d3c8b5b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4318/eb5e4425a8e2a2d1cd6f65206fa209771d3c8b5b/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19193,
310,
2433,
12,
2293,
4672,
3536,
9674,
326,
511,
464,
310,
2433,
6,
3536,
628,
293,
504,
84,
18,
504,
84,
18,
7665,
1930,
2893,
16,
3643,
67,
303,
4757,
628,
2744,
1930,
2744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19193,
310,
2433,
12,
2293,
4672,
3536,
9674,
326,
511,
464,
310,
2433,
6,
3536,
628,
293,
504,
84,
18,
504,
84,
18,
7665,
1930,
2893,
16,
3643,
67,
303,
4757,
628,
2744,
1930,
2744,
... | |
security.declarePrivate('get_invitation') | security.declareProtected(PERMISSION_INVITE_TO_TALKBACKCONSULTATION, 'get_invitation') | def get_current_invitation(self, REQUEST): return self.get_invitation(REQUEST.SESSION.get('nytb-current-key', None)) | 672ee02ba0f39a70f5d4933e56c1dce8257aa033 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/672ee02ba0f39a70f5d4933e56c1dce8257aa033/invitations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2972,
67,
5768,
8773,
12,
2890,
16,
12492,
4672,
327,
365,
18,
588,
67,
5768,
8773,
12,
5519,
18,
7042,
18,
588,
2668,
18538,
18587,
17,
2972,
17,
856,
2187,
599,
3719,
2,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2972,
67,
5768,
8773,
12,
2890,
16,
12492,
4672,
327,
365,
18,
588,
67,
5768,
8773,
12,
5519,
18,
7042,
18,
588,
2668,
18538,
18587,
17,
2972,
17,
856,
2187,
599,
3719,
2,
-... |
txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH).replace("PV",PYTHONV.replace("python", "")) | txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH).replace("PV",PV) | def MakeInstallerLinux(): import compileall PYTHONV=SDK["PYTHONVERSION"] if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec") if (os.path.exists("/usr/bin/rpmbuild")): oscmd("rm -rf `rpm -E '%_target_cpu'`") if (os.path.exists("/usr/bin/dpkg-deb")): oscmd("rm -rf `dpkg --print-architecture`") oscmd("mkdir -p linuxroot/usr/bin") oscmd("mkdir -p linuxroot/usr/include") oscmd("mkdir -p linuxroot/usr/share/panda3d") oscmd("mkdir -p linuxroot/usr/share/panda3d/direct") oscmd("mkdir -p linuxroot/usr/lib/panda3d") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages") oscmd("mkdir -p linuxroot/etc/ld.so.conf.d") WriteFile("linuxroot/usr/share/panda3d/direct/__init__.py", "") oscmd("sed -e 's@model-cache-@# model-cache-@' -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < "+GetOutputDir()+"/etc/Config.prc > linuxroot/etc/Config.prc") oscmd("cp "+GetOutputDir()+"/etc/Confauto.prc linuxroot/etc/Confauto.prc") oscmd("cp --recursive "+GetOutputDir()+"/include linuxroot/usr/include/panda3d") oscmd("cp --recursive direct/src/* linuxroot/usr/share/panda3d/direct") oscmd("cp --recursive "+GetOutputDir()+"/pandac linuxroot/usr/share/panda3d/pandac") oscmd("cp --recursive "+GetOutputDir()+"/models linuxroot/usr/share/panda3d/models") if os.path.isdir("samples"): oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples") if os.path.isdir(GetOutputDir()+"/Pmw"): oscmd("cp --recursive "+GetOutputDir()+"/Pmw linuxroot/usr/share/panda3d/Pmw") if os.path.isdir(GetOutputDir()+"/plugins"): oscmd("cp --recursive "+GetOutputDir()+"/plugins linuxroot/usr/share/panda3d/plugins") oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE") oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes") oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("echo '/usr/lib/panda3d' >> linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("cp "+GetOutputDir()+"/bin/* linuxroot/usr/bin/") for base in os.listdir(GetOutputDir()+"/lib"): oscmd("cp "+GetOutputDir()+"/lib/"+base+" linuxroot/usr/lib/panda3d/"+base) for base in os.listdir("linuxroot/usr/share/panda3d/direct"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("linuxroot/usr/share/panda3d/direct/"+base) compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw") DeleteCVS("linuxroot") oscmd("chmod -R 555 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/rpmbuild") and not os.path.exists("/usr/bin/dpkg-deb")): oscmd("rm -rf linuxroot/DEBIAN") oscmd("rpm -E '%_target_cpu' > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() pandasource = os.path.abspath(os.getcwd()) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",pandasource).replace("PYTHONV",PYTHONV) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+pandasource+"' -bb panda3d.spec") oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .") if (os.path.exists("/usr/bin/dpkg-deb")): oscmd("dpkg --print-architecture > "+GetOutputDir()+"/tmp/architecture.txt") ARCH=ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip() txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH).replace("PV",PYTHONV.replace("python", "")) oscmd("mkdir -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) WriteFile("linuxroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n") oscmd("chmod 755 linuxroot/DEBIAN/postinst") oscmd("cp linuxroot/DEBIAN/postinst linuxroot/DEBIAN/postrm") oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_"+ARCH+".deb") oscmd("chmod -R 755 linuxroot") if not(os.path.exists("/usr/bin/rpmbuild") or os.path.exists("/usr/bin/dpkg-deb")): exit("To build an installer, either rpmbuild or dpkg-deb must be present on your system!") | bc870c3aa3574f56ad76b46c45e56ab56846c2ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/bc870c3aa3574f56ad76b46c45e56ab56846c2ab/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
18678,
19475,
13332,
1930,
4074,
454,
12191,
20131,
58,
33,
22625,
9614,
16235,
20131,
5757,
11929,
309,
261,
538,
18,
803,
18,
291,
1214,
2932,
20132,
3085,
6,
3719,
30,
31476,
1264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4344,
18678,
19475,
13332,
1930,
4074,
454,
12191,
20131,
58,
33,
22625,
9614,
16235,
20131,
5757,
11929,
309,
261,
538,
18,
803,
18,
291,
1214,
2932,
20132,
3085,
6,
3719,
30,
31476,
1264... |
print translate | return pos | def optimizeLocals(node): if node.type == "function" and hasattr(node, "name"): print "FUNC: %s => %s" % (node.name, translate[node.name]) node.name = translate[node.name] if node.type == "identifier" and node.value in translate: # in a variable declaration if hasattr(node, "name"): print "DECL: %s => %s" % (node.value, translate[node.value]) node.name = node.value = translate[node.value] # every first identifier in a row of dots, or any identifier outsight of dot operator elif testChild(node): print "ACCESS: %s => %s" % (node.value, translate[node.value]) node.value = translate[node.value] | 340d8319207576ecbb9165204802fdd669dd0893 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/340d8319207576ecbb9165204802fdd669dd0893/Optimizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10979,
1333,
1031,
12,
2159,
4672,
309,
756,
18,
723,
422,
315,
915,
6,
471,
3859,
12,
2159,
16,
315,
529,
6,
4672,
1172,
315,
42,
21163,
30,
738,
87,
516,
738,
87,
6,
738,
261,
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,
10979,
1333,
1031,
12,
2159,
4672,
309,
756,
18,
723,
422,
315,
915,
6,
471,
3859,
12,
2159,
16,
315,
529,
6,
4672,
1172,
315,
42,
21163,
30,
738,
87,
516,
738,
87,
6,
738,
261,
21... |
return S_ERROR(lfc.sstrerror(lfc.cvar.serrno)) def __openDirectory(self,path): lfcPath = "%s%s" % (self.prefix,path) value = lfc.lfc_opendirg(lfcPath,'') | return S_ERROR( lfc.sstrerror( lfc.cvar.serrno ) ) def __openDirectory( self, path ): lfcPath = "%s%s" % ( self.prefix, path ) value = lfc.lfc_opendirg( lfcPath, '' ) | def __makeDirectory(self, path, mode): fullLfn = '%s%s' % (self.prefix,path) lfc.lfc_umask(0000) value = lfc.lfc_mkdir(fullLfn, mode) if value == 0: return S_OK() else: return S_ERROR(lfc.sstrerror(lfc.cvar.serrno)) | 6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6540,
2853,
12,
2890,
16,
589,
16,
1965,
4672,
1983,
48,
4293,
273,
1995,
87,
9,
87,
11,
738,
261,
2890,
18,
3239,
16,
803,
13,
328,
7142,
18,
80,
7142,
67,
379,
835,
12,
278... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6540,
2853,
12,
2890,
16,
589,
16,
1965,
4672,
1983,
48,
4293,
273,
1995,
87,
9,
87,
11,
738,
261,
2890,
18,
3239,
16,
803,
13,
328,
7142,
18,
80,
7142,
67,
379,
835,
12,
278... |
if not match[2] in variables: raise KeyError, 'Undefined variable ' + match[2] + ' in ' + input replacement = variables[match[2]] | if not match['content'] in variables: raise KeyError, 'Undefined variable ' + match['content'] + \ ' in ' + input replacement = variables[match['content']] | def ExpandVariables(input, is_late, variables, build_file): # Look for the pattern that gets expanded into variables if not is_late: variable_re = early_variable_re else: variable_re = late_variable_re matches = variable_re.findall(input) output = input if matches != None: # Reverse the list of matches so that replacements are done right-to-left. # That ensures that earlier re.sub calls won't mess up the string in a # way that causes later calls to find the earlier substituted text instead # of what's intended for replacement. matches.reverse() for match in matches: # match[0] is the substring to look for, match[1] is the character code # for the replacement type (< > <! >! <@ >@ <!@ >!@), and match[2] is the # name of the variable (< >) or command to run (<! >!). # run_command is true if a ! variant is used. run_command = '!' in match[1] # expand_to_list is true if an @ variant is used. In that case, # the expansion should result in a list. # Also note that the caller to be expecting a list in return, and not # all callers do because not all are working in list context. expand_to_list = '@' in match[1] and input == match[0] if run_command: # Run the command in the build file's directory. build_file_dir = os.path.dirname(build_file) if build_file_dir == '': # If build_file is just a leaf filename indicating a file in the # current directory, build_file_dir might be an empty string. Set # it to None to signal to subprocess.Popen that it should run the # command in the current directory. build_file_dir = None p = subprocess.Popen(match[2], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=build_file_dir) (p_stdout, p_stderr) = p.communicate() if p.wait() != 0 or p_stderr: sys.stderr.write(p_stderr) # Simulate check_call behavior by reusing its exception. raise subprocess.CalledProcessError(p.returncode, match[2]) replacement = p_stdout.rstrip() else: if not match[2] in variables: raise KeyError, 'Undefined variable ' + match[2] + ' in ' + input replacement = variables[match[2]] if isinstance(replacement, list): for item in replacement: if not isinstance(item, str) and not isinstance(item, int): raise TypeError, 'Variable ' + match[2] + ' must expand to a ' + \ ' string or list of strings; list contains a ' + \ item.__class__.__name__ # Run through the list and handle variable expansions in it. Since # the list is guaranteed not to contain dicts, this won't do anything # with conditions sections. # # TODO(mark): I think this should be made more general: any time an # expansion is done, if there are more expandable tokens left in the # output, additional expansion phases should be done. It should not # be effective solely for lists. ProcessVariablesAndConditionsInList(replacement, is_late, variables, build_file) elif not isinstance(replacement, str) and \ not isinstance(replacement, int): raise TypeError, 'Variable ' + match[2] + ' must expand to a ' + \ ' string or list of strings; found a ' + \ replacement.__class__.__name__ if expand_to_list: # Expanding in list context. It's guaranteed that there's only one # replacement to do in |input| and that it's this replacement. See # above. if isinstance(replacement, list): # If it's already a list, make a copy. output = replacement[:] else: # Split it the same way sh would split arguments. output = shlex.split(str(replacement)) else: # Expanding in string context. if isinstance(replacement, list): # When expanding a list into string context, turn the list items # into a string in a way that will work with a subprocess call. # # TODO(mark): This isn't completely correct. This should call a # generator-provided function that observes the proper # list-to-argument quoting rules on a specific platform. output = re.sub(re.escape(match[0]), gyp.common.EncodePOSIXShellList(replacement), output) else: # Expanding into string context is easy, just replace it. output = re.sub(re.escape(match[0]), str(replacement), output) return output | 77a65061ac645a662b0b5e32d5c55041890fd786 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/77a65061ac645a662b0b5e32d5c55041890fd786/input.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16429,
6158,
12,
2630,
16,
353,
67,
20293,
16,
3152,
16,
1361,
67,
768,
4672,
468,
10176,
364,
326,
1936,
716,
5571,
8406,
1368,
3152,
309,
486,
353,
67,
20293,
30,
2190,
67,
266,
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,
16429,
6158,
12,
2630,
16,
353,
67,
20293,
16,
3152,
16,
1361,
67,
768,
4672,
468,
10176,
364,
326,
1936,
716,
5571,
8406,
1368,
3152,
309,
486,
353,
67,
20293,
30,
2190,
67,
266,
273,... |
@type: list | @type param: list | def getFileContents(self, sha1List): | 29ba8c198c208c4d7699d4a48372ac1a9d35ee7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/29ba8c198c208c4d7699d4a48372ac1a9d35ee7d/repository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6034,
6323,
12,
2890,
16,
6056,
21,
682,
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,... | [
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,
6034,
6323,
12,
2890,
16,
6056,
21,
682,
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,
... |
r""" Repunits: $\frac {(10^n - 1)}{9}$. Often denoted by $R_n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A002275;a Repunits: (10^n - 1)/9. Often denoted by R_n. sage: a(0) 0 sage: a(2) 11 sage: a(8) 11111111 sage: a(20) 11111111111111111111 sage: a.list(9) [0, 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self): | def __init__(self): r""" Repunits: $\frac {(10^n - 1)}{9}$. Often denoted by $R_n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A002275;a Repunits: (10^n - 1)/9. Often denoted by R_n. sage: a(0) 0 sage: a(2) 11 sage: a(8) 11111111 sage: a(20) 11111111111111111111 sage: a.list(9) [0, 1, 11, 111, 1111, 11111, 111111, 1111111, 11111111] AUTHOR: -- Jaap Spies (2007-01-25) """ | def _eval(self, n): return Integer(n*(n+1)//2 + 1) | 69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
82,
21556,
82,
15,
21,
13,
759,
22,
397,
404,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
82,
21556,
82,
15,
21,
13,
759,
22,
397,
404,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.typecode += '\n%s%s.typecode = Struct(%s,[%s],pname="%s",aname="_%s",oname="%s xmlns=\\"%s\\"")'\ | if namespace == None: namespace = '' if style == 'rpc': namespace = '' self.typecode += '\n%s%s.typecode = Struct(%s,[%s], pname=name, aname="_%%s" %% name, oname="%%s xmlns=\\"%s\\"" %% name )'\ | self.typecode += '\n%sdef __init__(self, name=None, ns=None): pass' %(ID1) break | 0985689ec7bf293016071dd2a958894f48142513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0985689ec7bf293016071dd2a958894f48142513/wsdl2python.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
723,
710,
1011,
2337,
82,
9,
87,
536,
1001,
2738,
972,
12,
2890,
16,
508,
33,
7036,
16,
3153,
33,
7036,
4672,
1342,
11,
8975,
734,
21,
13,
898,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
365,
18,
723,
710,
1011,
2337,
82,
9,
87,
536,
1001,
2738,
972,
12,
2890,
16,
508,
33,
7036,
16,
3153,
33,
7036,
4672,
1342,
11,
8975,
734,
21,
13,
898,
2,
-100,
-100,
-100,
-100,
-100,
... |
self.colorSelect.SetColour(self.parent.blockItem.getEventsBackgroundColor()) | self.colorSelect.SetColour(self.parent.blockItem.calendarData.eventColor.wxColor()) | def wxSynchronizeWidget(self): selectedDate = self.parent.blockItem.selectedDate startDate = self.parent.blockItem.rangeStart | 25ddad0361cdcff8c6c9b1849cc3d6061261e934 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/25ddad0361cdcff8c6c9b1849cc3d6061261e934/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7075,
19298,
554,
4609,
12,
2890,
4672,
3170,
1626,
273,
365,
18,
2938,
18,
2629,
1180,
18,
8109,
1626,
12572,
273,
365,
18,
2938,
18,
2629,
1180,
18,
3676,
1685,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7075,
19298,
554,
4609,
12,
2890,
4672,
3170,
1626,
273,
365,
18,
2938,
18,
2629,
1180,
18,
8109,
1626,
12572,
273,
365,
18,
2938,
18,
2629,
1180,
18,
3676,
1685,
2,
-100,
-100,
-100,
... |
self.test_sockets[port] = sock | self.test_bind_sockets.add(sock) | def init_tests(self): """ Initialize testing infrastructure - sockets, etc. """ log.debug("Initializing test sockets.") for port in self.test_ports: try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setblocking(0) sock.bind((config.test_bind_ip, port)) self.test_sockets[port] = sock except socket.error, e: (err, message) = e.args log.error("Could not bind to test port %d: %s", port, message) if err == errno.EACCES: log.error("Run TorBEL as root or a user able to bind to privileged ports.") elif err == errno.EADDRNOTAVAIL: log.error("Please check your network settings.") if config.test_bind_ip: log.error("test_bind_ip in torbel_config.py must be assigned to a working network interface.") log.error("The current value (%s) does not appear to be valid.", config.test_bind_ip) else: log.error("Could not bind to IPADDR_ANY.") # re-raise the error to be caught by the client. raise | 921dc4f6d0461873a6adb949ad90974a0718ad25 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/921dc4f6d0461873a6adb949ad90974a0718ad25/torbel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
16341,
12,
2890,
4672,
3536,
9190,
7769,
316,
26150,
300,
16762,
16,
5527,
18,
3536,
613,
18,
4148,
2932,
29782,
1842,
16762,
1199,
13,
364,
1756,
316,
365,
18,
3813,
67,
4363,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
16341,
12,
2890,
4672,
3536,
9190,
7769,
316,
26150,
300,
16762,
16,
5527,
18,
3536,
613,
18,
4148,
2932,
29782,
1842,
16762,
1199,
13,
364,
1756,
316,
365,
18,
3813,
67,
4363,... |
path_utils.ChromiumBaselinePath(platform), expected_filename) | path_utils.ChromiumBaselinePath(platform), "LayoutTests", expected_filename) | def _ExtractAndAddNewBaselines(self, archive_file): """Extract new baselines from archive and add them to SVN repository. | f2e0d22b6fc87144be849c2ad18f098c479b7a36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/f2e0d22b6fc87144be849c2ad18f098c479b7a36/rebaseline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4976,
1876,
986,
1908,
11494,
14567,
12,
2890,
16,
5052,
67,
768,
4672,
3536,
4976,
394,
2580,
14567,
628,
5052,
471,
527,
2182,
358,
29537,
50,
3352,
18,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
4976,
1876,
986,
1908,
11494,
14567,
12,
2890,
16,
5052,
67,
768,
4672,
3536,
4976,
394,
2580,
14567,
628,
5052,
471,
527,
2182,
358,
29537,
50,
3352,
18,
2,
-100,
-100,
-100,
-100,... |
f = repos._getFileObject(sha1) | if oldVer.branch().label().getHost() == self.repos.name: f = repos._getFileObject(sha1) else: import pdb pdb.set_trace() f = self.repos._getLocalOrRemoteFileContents( pkgName, oldTroveVersion, troveFlavor, oldPath, oldVer, oldfile.contents.sha1(), oldfile.contents.size()).get() | def __init__(self, repos, cs): | a7a0035c5bff8db613b3666a6248fbad50b76bbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a7a0035c5bff8db613b3666a6248fbad50b76bbc/repository.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
13686,
16,
2873,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
13686,
16,
2873,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
out = BIO.openfile('p7.opaque', 'w') | out = BIO.openfile('opaque.p7', 'w') | def sign(): print 'test sign & save...', buf = makebuf() s = SMIME.SMIME() s.load_key('client.pem') p7 = s.sign(buf) out = BIO.openfile('p7.clear', 'w') out.write('To: ngps@post1.com\n') out.write('From: m2crypto@m2crypto.org\n') out.write('Subject: testing\n') buf = makebuf() # Recreate buf, because sign() has consumed it. s.write(out, p7, buf) out.close() buf = makebuf() p7 = s.sign(buf) out = BIO.openfile('p7.opaque', 'w') out.write('To: ngps@post1.com\n') out.write('From: m2crypto@m2crypto.org\n') out.write('Subject: testing\n') s.write(out, p7) out.close() print 'ok' | 3a4a3806a0bbef8fba9a0511cd1f742952b99554 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/3a4a3806a0bbef8fba9a0511cd1f742952b99554/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1573,
13332,
1172,
296,
3813,
1573,
473,
1923,
7821,
16,
1681,
273,
1221,
4385,
1435,
272,
273,
12014,
3114,
18,
7303,
3114,
1435,
272,
18,
945,
67,
856,
2668,
2625,
18,
20313,
6134,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1573,
13332,
1172,
296,
3813,
1573,
473,
1923,
7821,
16,
1681,
273,
1221,
4385,
1435,
272,
273,
12014,
3114,
18,
7303,
3114,
1435,
272,
18,
945,
67,
856,
2668,
2625,
18,
20313,
6134,
293... |
old_text = page.get() contents = contents + old_text commenttext_top = commenttext + " - " + wikipedia.translate(mysite, self.msg_top) | def create(self, title, contents): mysite = wikipedia.getSite() | ef2afd5d6d074404e1c0113955c6b72515e5cf25 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/ef2afd5d6d074404e1c0113955c6b72515e5cf25/pagefromfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
2077,
16,
2939,
4672,
312,
1900,
1137,
273,
21137,
18,
588,
4956,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
2077,
16,
2939,
4672,
312,
1900,
1137,
273,
21137,
18,
588,
4956,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
picking_obj.write(cr, uid, [picking_id], {'auto_picking': True}) | picking_obj.write(cr, uid, [picking_id], { 'auto_picking': True, 'invoice_state': '2binvoiced', }) | def create_picking(self, cr, uid, ids, context={}): """Create a picking for each order and validate it.""" picking_obj = self.pool.get('stock.picking') | d01777bee7c2174f0c2140223fb4361dcd79ef63 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d01777bee7c2174f0c2140223fb4361dcd79ef63/pos.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
11503,
310,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3536,
1684,
279,
6002,
310,
364,
1517,
1353,
471,
1954,
518,
12123,
6002,
310,
67,
2603,
273,
365,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
11503,
310,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3536,
1684,
279,
6002,
310,
364,
1517,
1353,
471,
1954,
518,
12123,
6002,
310,
67,
2603,
273,
365,
18... |
help(module) or call help('modulename').''' | help(module) or call help('modulename').''' % sys.version[:3] | def __repr__(self): return '''To get help on a Python object, call help(object). | f78a81b47baa04c78ca29ff4f4a8236297e852a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f78a81b47baa04c78ca29ff4f4a8236297e852a0/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
9163,
774,
336,
2809,
603,
279,
6600,
733,
16,
745,
2809,
12,
1612,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
9163,
774,
336,
2809,
603,
279,
6600,
733,
16,
745,
2809,
12,
1612,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(350,width), style=wx.CLOSE_BOX | wx.MINIMIZE_BOX) | wx.Frame.__init__(self, parent, wx.ID_ANY, title, size=(height,width), style=wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MAXIMIZE_BOX)) | def __init__(self, parent, id, title): """ Setup Application Window @author: Derek Buranen @author: Aaron Gerber """ if sys.platform.find('linux') != -1: width = 165 else: width = 145 | d45217a2e6abc93eeaf95b1a48b692548be45a34 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3659/d45217a2e6abc93eeaf95b1a48b692548be45a34/Gitso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
612,
16,
2077,
4672,
3536,
10939,
4257,
6076,
225,
632,
4161,
30,
463,
822,
79,
605,
295,
304,
275,
632,
4161,
30,
432,
297,
265,
611,
22533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
982,
16,
612,
16,
2077,
4672,
3536,
10939,
4257,
6076,
225,
632,
4161,
30,
463,
822,
79,
605,
295,
304,
275,
632,
4161,
30,
432,
297,
265,
611,
22533,
... |
"""Set up for running and repeating the task""" | """ Set up for running and repeating the task """ | def startRunning(self): """Set up for running and repeating the task""" | a4177140d86f97bf70e8b70ed3ab5654fb939104 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a4177140d86f97bf70e8b70ed3ab5654fb939104/startup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
7051,
12,
2890,
4672,
3536,
694,
731,
364,
3549,
471,
30571,
326,
1562,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
7051,
12,
2890,
4672,
3536,
694,
731,
364,
3549,
471,
30571,
326,
1562,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
paperpackage = "default" file.header[i] = replace(file.header[i], paperpackage, packages[paperpackage]) | file.header[i] = file.header[i] + ' widemarginsa4' | def convert_paperpackage(file): i = find_token(file.header, "\\paperpackage", 0) if i == -1: return packages = {'default':'none','a4':'none', 'a4wide':'a4', 'widemarginsa4':'a4wide'} if len(split(file.header[i])) > 1: paperpackage = split(file.header[i])[1] else: paperpackage = "default" file.header[i] = replace(file.header[i], paperpackage, packages[paperpackage]) | 255c2c247f1c9be13962871a1ec51da5f8c39f56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/255c2c247f1c9be13962871a1ec51da5f8c39f56/lyx_1_4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
27400,
5610,
12,
768,
4672,
277,
273,
1104,
67,
2316,
12,
768,
18,
3374,
16,
8422,
27400,
5610,
3113,
374,
13,
309,
277,
422,
300,
21,
30,
327,
225,
5907,
273,
13666,
1886,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
27400,
5610,
12,
768,
4672,
277,
273,
1104,
67,
2316,
12,
768,
18,
3374,
16,
8422,
27400,
5610,
3113,
374,
13,
309,
277,
422,
300,
21,
30,
327,
225,
5907,
273,
13666,
1886,
... |
'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Category', required=True), | def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}} | 52462287f3027f98bcfae6ee920c037e9c3d1c34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/52462287f3027f98bcfae6ee920c037e9c3d1c34/hr_payroll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
8949,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
3844,
16,
3815,
4672,
25123,
273,
3844,
309,
3815,
471,
3815,
422,
296,
457,
4278,
309,
509,
12,
301,
88,
13,
405,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
8949,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
3844,
16,
3815,
4672,
25123,
273,
3844,
309,
3815,
471,
3815,
422,
296,
457,
4278,
309,
509,
12,
301,
88,
13,
405,
37... | |
print "returning after query list action" | print "returning after query list action" | def fix_whatsthis_text_and_links(parent, refix_later = (), debug_cutoff = 0): #bruce 060319 renamed this from fix_whatsthis_text_for_mac #bruce 051227-29 revised this #bruce 060120 revised this as part of fixing bug 1295 """Fix whatsthis text and objects (for all OSes, not just macs as it once did). This should be called after all widgets (and their whatsthis text) in the UI have been created. It's ok, but slow (up to 0.2 seconds per call or more), to call it more than once on the main window. If you call it again on something else, as of 060319 this will cause bugs by clearing _objects_and_text_that_need_fixing_later, but that can be easily fixed when we need to support repeated calls on smaller widgets. Calling it on a single QAction works, but doesn't do enough to fix the text again for toolbuttons (and I think menuitems) made by Qt from that action (re bug 1421). See also refix_whatsthis_text_and_links, which can be called to restore whatsthis text which Qt messed up for some reason, as happens when you set tooltips or menutext for Undo and Redo actions (bug 1421). This function does two things: 1. If the system is a Mac, this replaces all occurrences of 'Ctrl' with 'Cmd' in all the whatsthis text for all QAction or QWidget objects that are children of parent. 2. For all systems, it replaces certain whatsthis text patterns with hyperlinks, and adds MyWhatsThis objects to widgets with text modified that way (or that might contain hyperlinks) or that are QPopupMenus. """ if debug_whatsthis_links or debug_refix or use_debug_refix_cutoff: print "\nrunning fix_whatsthis_text_and_links\n" if 0 and debug_cutoff: print "returning immediately (sanity check, bug better be there or you're insane)" ####@@@@@ yes, bug is not fixed yet return from PlatformDependent import is_macintosh mac = is_macintosh() if mac or enable_whatsthis_links: # fix text in 1 or 2 ways for all QAction objects (which are not widgets) objList = filter(lambda x: isinstance(x, QAction), parent.children()) if 0 and debug_cutoff: print "returning after query list action" ####@@@@@ bug is not fixed yet; the illegal instr crash happens after reload whatsthis return ao = 0 # only matters when debug_cutoff is set for obj in objList: if debug_cutoff: print "ao %d, obj" % ao, obj text = str(obj.whatsThis()) if mac: text = replace_ctrl_with_cmd(text) if debug_cutoff and 'Undo' in str(text): print 'undo in',ao, obj, text if enable_whatsthis_links: text = turn_featurenames_into_links(text, savekey = id(obj), saveplace = _actions ) obj.setWhatsThis(text) ao += 4 if ao == debug_cutoff: break if debug_cutoff: print "returning when ao got to %d; 1,2,3,4 are for obj 0" % ao # 24 doesn't fix, 25 does. hmm. return if debug_cutoff: print "returning before widgets" ####@@@@@ bug is fixed by this point if we let above loop run to completion return if enable_whatsthis_links: # add MyWhatsThis objects to all widgets that might need them # (and also fix their text if it's not fixed already -- # needed in case it didn't come from a QAction; maybe that never happens as of 060120) objList = filter(lambda x: isinstance(x, QWidget), parent.children()) # this includes QMenuBar, QPopupMenu for each main menu and cmenu (I guess), # but not menuitems themselves. (No hope of including dynamic cmenu items, but since # we make those, we could set their whatsthis text and process it the same way # using separate code (nim ###@@@).) [bruce 060120] # In fact there is no menu item class in Qt that I can find! You add items as QActions or as sets of attrs. # QActions also don't show up in this list... global _objects_and_text_that_need_fixing_later if _objects_and_text_that_need_fixing_later: print "bug warning: _objects_and_text_that_need_fixing_later being remade from scratch; causes bug 1421 if not reviewed"###@@@ _objects_and_text_that_need_fixing_later = [] objcount = 0 # only matters when debug_cutoff is set and when code above this to use it earlier is removed for obj in objList: text = whatsthis_text_for_widget(obj) # could be either "" or None if text: # in case text doesn't come from a QAction, modify it in the same ways as above, # and store it again or pass it to the MyWhatsThis object; # both our mods are ok if they happen twice -- if some hyperlink contains 'ctrl', # so did the text before it got command names converted to links. if mac: text = replace_ctrl_with_cmd(text) text = turn_featurenames_into_links(text) assert text # we'll just feed it to a MyWhatsThis object so we don't have to store it here else: text = None # turn "" into None #ismenu = isinstance(obj, QPopupMenu) ismenu = isinstance(obj, QMenu) try: ismenubar = isinstance(obj, QMenuBar) except: # usual for non-Macs, I presume ismenubar = False if text is not None and (ismenu or ismenubar): # assume any text (even if not changed here) might contain hyperlinks, # so any widget with text might need a MyWhatsThis object; # the above code (which doesn't bother storing mac-modified text) also assumes we're doing this print text obj.setWhatsThis(text) #bruce 060319 part of fixing bug 1421 ts = str(text) if "Undo" in ts or "Redo" in ts or obj in refix_later or ismenu or ismenubar: # hardcoded cases cover ToolButtons whose actions are Undo or Redo (or a few others included by accident) _objects_and_text_that_need_fixing_later.append(( obj, text)) if debug_refix: if obj in refix_later: print "got from refix_later:",obj ####@@@@ we got a menu from caller, but editmenu bug 1421 still not fixed! if ismenu: print "ismenu",obj if ismenubar: print "ismenubar",obj objcount += 1 if objcount == debug_cutoff: # debug code for bug 1421 break continue if debug_refix or use_debug_refix_cutoff: print len(_objects_and_text_that_need_fixing_later), "_objects_and_text_that_need_fixing_later" ####@@@@ print "debug_cutoff was %d, objcount reached %d" % (debug_cutoff, objcount) # we did the first objcount objects if objcount: print "last obj done was", objList[objcount - 1] return # from fix_whatsthis_text_and_links | 596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
23770,
20244,
291,
67,
955,
67,
464,
67,
7135,
12,
2938,
16,
283,
904,
67,
29082,
273,
1832,
16,
1198,
67,
16131,
273,
374,
4672,
468,
2848,
3965,
13026,
4630,
3657,
17657,
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,
2917,
67,
23770,
20244,
291,
67,
955,
67,
464,
67,
7135,
12,
2938,
16,
283,
904,
67,
29082,
273,
1832,
16,
1198,
67,
16131,
273,
374,
4672,
468,
2848,
3965,
13026,
4630,
3657,
17657,
3... |
"""Round an amount to two digits after the decimal place. Also ensures that -0.0 is represented as 0.0""" return round(round(amt, 2) + 0.001, 2) | """Round an amount to two digits after the decimal place.""" return round(amt, 2) | def round2(amt): """Round an amount to two digits after the decimal place. Also ensures that -0.0 is represented as 0.0""" # Maybe not elegant, but it ought to work... return round(round(amt, 2) + 0.001, 2) | f033666bcdde58f54e8d36028888341c99158209 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8066/f033666bcdde58f54e8d36028888341c99158209/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3643,
22,
12,
301,
88,
4672,
3536,
11066,
392,
3844,
358,
2795,
6815,
1839,
326,
6970,
3166,
18,
225,
8080,
11932,
716,
300,
20,
18,
20,
353,
10584,
487,
374,
18,
20,
8395,
225,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3643,
22,
12,
301,
88,
4672,
3536,
11066,
392,
3844,
358,
2795,
6815,
1839,
326,
6970,
3166,
18,
225,
8080,
11932,
716,
300,
20,
18,
20,
353,
10584,
487,
374,
18,
20,
8395,
225,
468,
... |
exprArgCache = {} | def nullDebugAction(*args): """'Do-nothing' debug action, to suppress debugging output during parsing.""" pass | cf270a876802009d82e8d28923bdd6b889a1f506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3693/cf270a876802009d82e8d28923bdd6b889a1f506/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
446,
2829,
1803,
30857,
1968,
4672,
3536,
11,
3244,
17,
30874,
11,
1198,
1301,
16,
358,
12257,
10450,
876,
4982,
5811,
12123,
1342,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
446,
2829,
1803,
30857,
1968,
4672,
3536,
11,
3244,
17,
30874,
11,
1198,
1301,
16,
358,
12257,
10450,
876,
4982,
5811,
12123,
1342,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
'af': u'%d v.Chr.', | 'af':u'%d v.C.', | def __call__(self, m, d): import wikipedia return wikipedia.html2unicode((date_format[m][self.site.lang]) % d, site = self.site) | 2f8392c560135a8fa55641f181fd3a11ca38d1c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/2f8392c560135a8fa55641f181fd3a11ca38d1c1/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
312,
16,
302,
4672,
1930,
21137,
327,
21137,
18,
2620,
22,
9124,
12443,
712,
67,
2139,
63,
81,
6362,
2890,
18,
4256,
18,
4936,
5717,
738,
302,
16,
2834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
1991,
972,
12,
2890,
16,
312,
16,
302,
4672,
1930,
21137,
327,
21137,
18,
2620,
22,
9124,
12443,
712,
67,
2139,
63,
81,
6362,
2890,
18,
4256,
18,
4936,
5717,
738,
302,
16,
2834,
... |
assert gc.collect() == 2 | if gc.collect() != 2: raise TestFailed def test_saveall(): debug = gc.get_debug() gc.set_debug(debug | gc.DEBUG_SAVEALL) l = [] l.append(l) id_l = id(l) del l gc.collect() try: for obj in gc.garbage: if id(obj) == id_l: del obj[:] break else: raise TestFailed gc.garbage.remove(obj) finally: gc.set_debug(debug) | exec("def f(): pass\n") in d | 419afec2d7b22fe8cf5fdba072bbc63384a4dad6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/419afec2d7b22fe8cf5fdba072bbc63384a4dad6/test_gc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1196,
2932,
536,
284,
13332,
1342,
64,
82,
7923,
316,
302,
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,
1196,
2932,
536,
284,
13332,
1342,
64,
82,
7923,
316,
302,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"Expected int for endDate, actual type is %s" % type(databaseParameters["endDate"]) | "Expected datetime.datetime for endDate, actual type is %s" % type(databaseParameters["endDate"]) | def getListOfTopCrashersBySignature(aCursor, databaseParameters, totalNumberOfCrashesForPeriodFunc=totalNumberOfCrashesForPeriod): """ """ databaseParameters["totalNumberOfCrashes"] = totalNumberOfCrashesForPeriodFunc(aCursor, databaseParameters) if databaseParameters["totalNumberOfCrashes"] == None: return [] assert type(databaseParameters["totalNumberOfCrashes"]) is long, \ "Expected int for totalNumberOfCrashes, actual type is %s" % type(databaseParameters["totalNumberOfCrashes"]) assert type(databaseParameters["startDate"]) is datetime.datetime, \ "Expected int for startDate, actual type is %s" % type(databaseParameters["startDate"]) assert type(databaseParameters["endDate"]) is datetime.datetime, \ "Expected int for endDate, actual type is %s" % type(databaseParameters["endDate"]) assert type(databaseParameters["productdims_id"]) is int, \ "Expected int for productdims_id, actual type is %s" % type(databaseParameters["productdims_id"]) assert type(databaseParameters["listSize"]) is int, \ "Expected int for listSize, actual type is %s" % type(databaseParameters["listSize"]) where = "" if databaseParameters["crashType"] == 'browser': where = "WHERE tcbs.plugin_count = 0 AND tcbs.hang_count = 0" if databaseParameters["crashType"] == 'plugin': where = "WHERE tcbs.plugin_count > 0 OR tcbs.hang_count > 0" sql = """ select tcbs.signature, sum(tcbs.count) as count, cast(sum(tcbs.count) as float) / %d as percentOfTotal, sum(case when os.os_name LIKE 'Windows%%' then tcbs.count else 0 end) as win_count, sum(case when os.os_name = 'Mac OS X' then tcbs.count else 0 end) as mac_count, sum(case when os.os_name = 'Linux' then tcbs.count else 0 end) as linux_count, sum(tcbs.hang_count) as hang_count, sum(tcbs.plugin_count) as plugin_count from top_crashes_by_signature tcbs join osdims os on tcbs.osdims_id = os.id and '%s' < tcbs.window_end and tcbs.window_end <= '%s' and tcbs.productdims_id = %d %s group by tcbs.signature order by 2 desc limit %d""" % (databaseParameters["totalNumberOfCrashes"], databaseParameters["startDate"], \ databaseParameters["endDate"], databaseParameters["productdims_id"], where, \ databaseParameters["listSize"]) #logger.debug(aCursor.mogrify(sql, databaseParameters)) return db.execute(aCursor, sql) | 7d93c04040d9b3be1580ed764b81f6f842f1cb32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12383/7d93c04040d9b3be1580ed764b81f6f842f1cb32/topCrashBySignatureTrends.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10033,
951,
3401,
12893,
961,
414,
858,
5374,
12,
69,
6688,
16,
2063,
2402,
16,
2078,
9226,
12893,
7690,
1290,
5027,
2622,
33,
4963,
9226,
12893,
7690,
1290,
5027,
4672,
3536,
3536,
2063,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10033,
951,
3401,
12893,
961,
414,
858,
5374,
12,
69,
6688,
16,
2063,
2402,
16,
2078,
9226,
12893,
7690,
1290,
5027,
2622,
33,
4963,
9226,
12893,
7690,
1290,
5027,
4672,
3536,
3536,
2063,
... |
return [newSymbolTable(st, self._filename) | return [_newSymbolTable(st, self._filename) | def get_children(self): return [newSymbolTable(st, self._filename) for st in self._table.children] | e6b5ba621f6f9a5463469cbc1873907e43be8bb8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/e6b5ba621f6f9a5463469cbc1873907e43be8bb8/symtable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5906,
12,
2890,
4672,
327,
306,
67,
2704,
5335,
1388,
12,
334,
16,
365,
6315,
3459,
13,
364,
384,
316,
365,
6315,
2121,
18,
5906,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5906,
12,
2890,
4672,
327,
306,
67,
2704,
5335,
1388,
12,
334,
16,
365,
6315,
3459,
13,
364,
384,
316,
365,
6315,
2121,
18,
5906,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
move_id = move_obj.create(cr, uid, {'journal_id': data.property_stock_journal.id}) | move_id = move_obj.create(cr, uid, {'journal_id': data.categ_id.property_stock_journal.id}) | def change_price(self, cr, uid, ids, context): """ @summary: Changes the Standard Price of Product. And creates an account move accordingly. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of IDs selected @param context: A standard dictionary @return: """ rec_id = context and context.get('active_id', False) prod_obj = self.pool.get('product.template') location_obj = self.pool.get('stock.location') lot_obj = self.pool.get('stock.report.prodlots') move_obj = self.pool.get('account.move') move_line_obj = self.pool.get('account.move.line') res = self.read(cr, uid, ids[0], ['new_price']) new_price = res.get('new_price',[]) data = prod_obj.browse(cr, uid, rec_id) diff = data.standard_price - new_price prod_obj.write(cr, uid, rec_id, {'standard_price': new_price}) loc_ids = location_obj.search(cr, uid, [('account_id','<>',False),('usage','=','internal')]) lot_ids = lot_obj.search(cr, uid, [('location_id', 'in', loc_ids),('product_id','=',rec_id)]) qty = 0 debit = 0.0 credit = 0.0 stock_input_acc = data.property_stock_account_input.id or data.categ_id.property_stock_account_input_categ.id stock_output_acc = data.property_stock_account_output.id or data.categ_id.property_stock_account_output_categ.id for lots in lot_obj.browse(cr, uid, lot_ids): qty += lots.name | 49e9a1ee0de150645be482613c6401daae6f79d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/49e9a1ee0de150645be482613c6401daae6f79d1/stock_change_standard_price.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
8694,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
3536,
632,
7687,
30,
17776,
326,
8263,
20137,
434,
8094,
18,
7835,
3414,
392,
2236,
3635,
15905,
18,
225,
632,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
8694,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
3536,
632,
7687,
30,
17776,
326,
8263,
20137,
434,
8094,
18,
7835,
3414,
392,
2236,
3635,
15905,
18,
225,
632,
89... |
while sys.argv[1:2] == ['-d']: | htmlhelp = '' while sys.argv[1] == ['-d']: | def test(): import sys debugging = 0 print_headers = 0 cont = 0 html3 = 0 while sys.argv[1:2] == ['-d']: debugging = debugging + 1 del sys.argv[1:2] if sys.argv[1] == '-p': print_headers = 1 del sys.argv[1] if sys.argv[1] == '-c': cont = 1 del sys.argv[1] if sys.argv[1] == '-3': html3 = 1 del sys.argv[1] if len(sys.argv) <> 3: print 'usage: texi2html [-d [-d]] [-p] [-c] inputfile outputdirectory' sys.exit(2) if html3: parser = TexinfoParserHTML3() else: parser = TexinfoParser() parser.cont = cont parser.debugging = debugging parser.print_headers = print_headers file = sys.argv[1] parser.setdirname(sys.argv[2]) if file == '-': fp = sys.stdin else: parser.setincludedir(os.path.dirname(file)) try: fp = open(file, 'r') except IOError, msg: print file, ':', msg sys.exit(1) parser.parse(fp) fp.close() parser.report() | 6dbcc8f6eb9e3b136c03d11137b7c0c7afb8d4a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6dbcc8f6eb9e3b136c03d11137b7c0c7afb8d4a4/texi2html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
13332,
1930,
2589,
10450,
273,
374,
1172,
67,
2485,
273,
374,
466,
273,
374,
1729,
23,
273,
374,
1729,
5201,
273,
875,
225,
1323,
2589,
18,
19485,
63,
21,
65,
422,
10228,
17,
72,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13332,
1930,
2589,
10450,
273,
374,
1172,
67,
2485,
273,
374,
466,
273,
374,
1729,
23,
273,
374,
1729,
5201,
273,
875,
225,
1323,
2589,
18,
19485,
63,
21,
65,
422,
10228,
17,
72,... |
sage: len(setA) == 1 or len(setB) == 1 | sage: len(setA) == 1 or len(setB) == 1 | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. INPUT: | 06f830c7a677dbabf75020fadb7c4c3325a771f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/06f830c7a677dbabf75020fadb7c4c3325a771f8/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3612,
2818,
12,
2890,
16,
460,
67,
3700,
33,
5510,
16,
999,
67,
7126,
67,
5336,
33,
8381,
16,
6928,
33,
8381,
16,
12776,
33,
7036,
16,
3988,
33,
20,
4672,
436,
8395,
2860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3612,
2818,
12,
2890,
16,
460,
67,
3700,
33,
5510,
16,
999,
67,
7126,
67,
5336,
33,
8381,
16,
6928,
33,
8381,
16,
12776,
33,
7036,
16,
3988,
33,
20,
4672,
436,
8395,
2860,
... |
'; sleep 1; /http/R-patched3/bin/R --no-readline --no-save --slave <f1.R >>f1.Rout 2>> Status.msg &' | '; sleep 1; /var/www/bin/R-local-7-LAM-MPI/bin/R --no-readline --no-save --slave <f1.R >>f1.Rout 2>> Status.msg &' | def Rrun(tmpDir, lamSuffix): """ Launch R, after setting the lam stuff.""" Rcommand = 'export LAM_MPI_SESSION_SUFFIX="' + lamSuffix + \ '"; cd ' + tmpDir + \ '; sleep 1; /http/R-patched3/bin/R --no-readline --no-save --slave <f1.R >>f1.Rout 2>> Status.msg &' Rtorun = os.system(Rcommand) | e18e78b1f6a27560d881723dcb477b91325c2570 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6463/e18e78b1f6a27560d881723dcb477b91325c2570/runAndCheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
534,
2681,
12,
5645,
1621,
16,
17310,
5791,
4672,
3536,
14643,
534,
16,
1839,
3637,
326,
17310,
10769,
12123,
534,
3076,
273,
296,
6530,
511,
2192,
67,
49,
1102,
67,
7042,
67,
14964,
530... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
534,
2681,
12,
5645,
1621,
16,
17310,
5791,
4672,
3536,
14643,
534,
16,
1839,
3637,
326,
17310,
10769,
12123,
534,
3076,
273,
296,
6530,
511,
2192,
67,
49,
1102,
67,
7042,
67,
14964,
530... |
self.color = EXPIRING_TEXT_COLOR else: self.text = '' | self.color = EXPIRING_TEXT_COLOR else: self.text = '' | def _setup_layout(self): if self.info.downloaded: if not self.info.video_watched: self.text = _('Unplayed') self.color = UNPLAYED_COLOR elif self.info.expiration_date: self.text = displaytext.expiration_date_short( self.info.expiration_date) self.color = EXPIRING_TEXT_COLOR else: self.text = '' elif (self.info.download_info and self.info.download_info.rate == 0): if self.info.download_info.state == 'paused': self.text = _('paused') elif self.info.download_info.state == 'failed': self.text = self.info.download_info.short_reason_failed else: self.text = self.info.download_info.startup_activity self.color = DOWNLOADING_COLOR elif not self.info.item_viewed: self.text = _('Newly Available') self.color = AVAILABLE_COLOR else: self.text = '' | 3ca049c2e45f1a757c3549648c6118e716ed7d33 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/3ca049c2e45f1a757c3549648c6118e716ed7d33/style.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8401,
67,
6741,
12,
2890,
4672,
309,
365,
18,
1376,
18,
2378,
4230,
30,
309,
486,
365,
18,
1376,
18,
9115,
67,
7585,
329,
30,
365,
18,
955,
273,
389,
2668,
984,
1601,
329,
6134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8401,
67,
6741,
12,
2890,
4672,
309,
365,
18,
1376,
18,
2378,
4230,
30,
309,
486,
365,
18,
1376,
18,
9115,
67,
7585,
329,
30,
365,
18,
955,
273,
389,
2668,
984,
1601,
329,
6134,... |
rely=amount - locate anchor of this widget between 0.0 and 1.0 | rely=amount - locate anchor of this widget between 0.0 and 1.0 | def place_configure(self, cnf={}, **kw): """Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed. x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account """ for k in ['in_']: if kw.has_key(k): kw[k[:-1]] = kw[k] del kw[k] self.tk.call( ('place', 'configure', self._w) + self._options(cnf, kw)) | d7df8f189a3faf8daf8962de755dfcc8067236fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/d7df8f189a3faf8daf8962de755dfcc8067236fd/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
67,
14895,
12,
2890,
16,
23118,
28793,
2826,
9987,
4672,
3536,
6029,
279,
3604,
316,
326,
982,
3604,
18,
2672,
487,
702,
30,
316,
33,
7525,
300,
4171,
3632,
358,
1492,
326,
3604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
67,
14895,
12,
2890,
16,
23118,
28793,
2826,
9987,
4672,
3536,
6029,
279,
3604,
316,
326,
982,
3604,
18,
2672,
487,
702,
30,
316,
33,
7525,
300,
4171,
3632,
358,
1492,
326,
3604,
... |
move_ids.append(act[1]) | if isinstance(act[1], (int, long)): move_ids.append(act[1]) else: move_ids.extend(act[1]) | def set_inventory_moves(self, cursor, user, shipment_id, name, value, arg, context=None): move_obj = self.pool.get('stock.move') | 628dc7e3da115ad06ccfee12e10075f3b08cc684 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9298/628dc7e3da115ad06ccfee12e10075f3b08cc684/shipment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
26024,
67,
81,
10829,
12,
2890,
16,
3347,
16,
729,
16,
26990,
67,
350,
16,
508,
16,
460,
16,
1501,
16,
819,
33,
7036,
4672,
3635,
67,
2603,
273,
365,
18,
6011,
18,
588,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
26024,
67,
81,
10829,
12,
2890,
16,
3347,
16,
729,
16,
26990,
67,
350,
16,
508,
16,
460,
16,
1501,
16,
819,
33,
7036,
4672,
3635,
67,
2603,
273,
365,
18,
6011,
18,
588,
26... |
uom, qty_uos, uos, name, partner_id, lang, update_tax, date_order, packaging) | uom, qty_uos, uos, name, partner_id, lang, update_tax, date_order, packaging, fiscal_position) | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, is_maintenance=False, maintenance_product_qty=False, maintenance_month_qty=False): | 1bb7cb71fd72ec0532c769a8014f977fe3ab88c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/1bb7cb71fd72ec0532c769a8014f977fe3ab88c2/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... |
def pkgname_ui(self, pkgname, ts_states=('e' 'o')): | def pkgname_ui(self, pkgname, ts_states=('e', None)): | def pkgname_ui(self, pkgname, ts_states=('e' 'o')): """ Get more information on a simple pkgname, if we can. """ return _pkgname_ui(self.ayum, pkgname, ts_states) | 9988a288f8d2ac1c00820a471bcffcf42ad2aa9e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/9988a288f8d2ac1c00820a471bcffcf42ad2aa9e/output.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29348,
67,
4881,
12,
2890,
16,
29348,
16,
3742,
67,
7992,
33,
2668,
73,
2187,
599,
3719,
30,
3536,
968,
1898,
1779,
603,
279,
4143,
29348,
16,
309,
732,
848,
18,
3536,
327,
389,
10657,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29348,
67,
4881,
12,
2890,
16,
29348,
16,
3742,
67,
7992,
33,
2668,
73,
2187,
599,
3719,
30,
3536,
968,
1898,
1779,
603,
279,
4143,
29348,
16,
309,
732,
848,
18,
3536,
327,
389,
10657,... |
session.send(Iq('get',NS_ROSTER)) | self._owner.send(Iq('get',NS_ROSTER)) | def Request(self,session,force=0): """ Request roster from server if it were not yet requested (or if the 'force' argument is set). """ if self.set is None: self.set=0 elif not force: return session.send(Iq('get',NS_ROSTER)) self.DEBUG('Roster requested from server','start') | d67ba537b854366bef00b747b3fb604feefd71e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7194/d67ba537b854366bef00b747b3fb604feefd71e8/roster.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1567,
12,
2890,
16,
3184,
16,
5734,
33,
20,
4672,
3536,
1567,
721,
8190,
628,
1438,
309,
518,
4591,
486,
4671,
3764,
261,
280,
309,
326,
296,
5734,
11,
1237,
353,
444,
2934,
3536,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1567,
12,
2890,
16,
3184,
16,
5734,
33,
20,
4672,
3536,
1567,
721,
8190,
628,
1438,
309,
518,
4591,
486,
4671,
3764,
261,
280,
309,
326,
296,
5734,
11,
1237,
353,
444,
2934,
3536,
309,... |
try: total_vertices = len (self.vertex_list) except: print "ERROR: len ( ) exception 4" total_vertices = 0 self.vertex_list = [ ] | total_vertices = len (self.vertex_list) | def update_vertices (self): | a32d54b41aac78b3a450827c2f818ce73bb60b4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/a32d54b41aac78b3a450827c2f818ce73bb60b4e/MotionTrail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
17476,
261,
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,
1089,
67,
17476,
261,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if name not in ('receivable', 'payable'): | if name not in ('receivable', 'payable', 'receivable_today', 'payable_today'): | def search_receivable_payable(self, cursor, user_id, name, args, context=None): if not len(args): return [] move_line_obj = self.pool.get('account.move.line') company_obj = self.pool.get('company.company') user_obj = self.pool.get('res.user') | c2fdd6e852f94ab4559f3c5ac982a6b50b203473 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/c2fdd6e852f94ab4559f3c5ac982a6b50b203473/move.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
8606,
427,
429,
67,
10239,
429,
12,
2890,
16,
3347,
16,
729,
67,
350,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
309,
486,
562,
12,
1968,
4672,
327,
5378,
3635,
67,
1369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
8606,
427,
429,
67,
10239,
429,
12,
2890,
16,
3347,
16,
729,
67,
350,
16,
508,
16,
833,
16,
819,
33,
7036,
4672,
309,
486,
562,
12,
1968,
4672,
327,
5378,
3635,
67,
1369,
... |
def finish(self, args): | def finish(self, is_exception, *result): | def finish(self, args): self._counter -= 1 if self._counter == 0: super(InProgressAny, self).finish(self) # Unlike InProgressAny, we don't unref _objects because the caller # may want to access them by iterating us. That's fine, because # unlike InProgressAny where we'd prefer not to have useless # transient InProgressCallbacks connected to any provided signals, # here we know we won't because they will all have been emitted # in order for us to be here. | f2645e8bfd4a8d52fb3445cbf8581763cbe80794 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11722/f2645e8bfd4a8d52fb3445cbf8581763cbe80794/async.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4076,
12,
2890,
16,
353,
67,
4064,
16,
380,
2088,
4672,
365,
6315,
7476,
3947,
404,
309,
365,
6315,
7476,
422,
374,
30,
2240,
12,
13434,
2961,
16,
365,
2934,
13749,
12,
2890,
13,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4076,
12,
2890,
16,
353,
67,
4064,
16,
380,
2088,
4672,
365,
6315,
7476,
3947,
404,
309,
365,
6315,
7476,
422,
374,
30,
2240,
12,
13434,
2961,
16,
365,
2934,
13749,
12,
2890,
13,
468,
... |
gump.addText(200, 313, self.submaterials1[index][0], 0x480) | gump.addText(200, 313, self.submaterials1[index][0], enabbledhue) | def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480) | 0d89a4bc8e80f0d0c5ebc39da765d50080b61588 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/0d89a4bc8e80f0d0c5ebc39da765d50080b61588/makemenus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
16016,
12,
2890,
16,
314,
2801,
16,
7291,
16,
1775,
16,
27539,
273,
374,
4672,
468,
7852,
20994,
310,
1516,
18,
309,
365,
18,
5965,
266,
6017,
30,
314,
2801,
18,
1289,
3616,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
16016,
12,
2890,
16,
314,
2801,
16,
7291,
16,
1775,
16,
27539,
273,
374,
4672,
468,
7852,
20994,
310,
1516,
18,
309,
365,
18,
5965,
266,
6017,
30,
314,
2801,
18,
1289,
3616,
12,
... |
apply(self.cb, self.cb_arg) | apply(self.cb, (self.cb_arg,)) | def poll(self): if not self.async: raise error, 'Can only call poll() in async mode' if not self.busy_cmd: return if self.testready(): if self.cb: apply(self.cb, self.cb_arg) | 4a2d8bcd310af4045295aeb1d48c5b9b57910dc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4a2d8bcd310af4045295aeb1d48c5b9b57910dc3/VCR.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7672,
12,
2890,
4672,
309,
486,
365,
18,
3810,
30,
1002,
555,
16,
296,
2568,
1338,
745,
7672,
1435,
316,
4326,
1965,
11,
309,
486,
365,
18,
9274,
93,
67,
4172,
30,
327,
309,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7672,
12,
2890,
4672,
309,
486,
365,
18,
3810,
30,
1002,
555,
16,
296,
2568,
1338,
745,
7672,
1435,
316,
4326,
1965,
11,
309,
486,
365,
18,
9274,
93,
67,
4172,
30,
327,
309,
365,
18,... |
} | } | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False): product_uom_obj = self.pool.get('product.uom') partner_obj = self.pool.get('res.partner') product_obj = self.pool.get('product.product') | 6c58c27ae54d6d246eaf3ccd86d55dcf0ec0d3bd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/6c58c27ae54d6d246eaf3ccd86d55dcf0ec0d3bd/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3017,
67,
350,
67,
3427,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
846,
335,
5449,
16,
3017,
16,
26667,
33,
20,
16,
582,
362,
33,
8381,
16,
26667,
67,
89,
538,
33,
20,
16,
582,
... |
NotifyUIAsync (_("IMAP error: %s") % error, self.log.error, alert=True) | if __debug__: self.printCurrentView("catchErrors") self._setDone() if not self.factory.connectionLost: self.__disconnect() NotifyUIAsync(_("Error: %s") % error.value, self.log.error, alert=True) """Continue the errback chain""" return error | def catchErrors(self, error): """ This method captures all errors thrown while in the Twisted Reactor Thread. @return: C{None} """ | cd0d773c52b7eb7870b5e37e0d7c668e7d25477c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cd0d773c52b7eb7870b5e37e0d7c668e7d25477c/imap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1044,
4229,
12,
2890,
16,
555,
4672,
3536,
1220,
707,
21922,
777,
1334,
6718,
1323,
316,
326,
12694,
25444,
868,
3362,
4884,
18,
632,
2463,
30,
385,
95,
7036,
97,
3536,
2,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1044,
4229,
12,
2890,
16,
555,
4672,
3536,
1220,
707,
21922,
777,
1334,
6718,
1323,
316,
326,
12694,
25444,
868,
3362,
4884,
18,
632,
2463,
30,
385,
95,
7036,
97,
3536,
2,
-100,
-100,
... |
oldvalue.encode('utf-8'), newvalue.encode('utf-8'))) | oldvalue, newvalue)) | def addTicketChange(self, ticket, time, author, field, oldvalue, newvalue): c = self.db().cursor() | 3c880bacc20a99c1c09f23abe68ea43a4bd475ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/3c880bacc20a99c1c09f23abe68ea43a4bd475ab/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13614,
3043,
12,
2890,
16,
9322,
16,
813,
16,
2869,
16,
652,
16,
1592,
1132,
16,
394,
1132,
4672,
276,
273,
365,
18,
1966,
7675,
9216,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
13614,
3043,
12,
2890,
16,
9322,
16,
813,
16,
2869,
16,
652,
16,
1592,
1132,
16,
394,
1132,
4672,
276,
273,
365,
18,
1966,
7675,
9216,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
return s.sleeping_abort | return retval | def sleeping(s, sleepsecs, remainingsecs): if remainingsecs: s._msg("Next sync in %d:%02d" % (remainingsecs / 60, remainingsecs % 60)) else: s._msg("Wait done; synchronizing now.") s.gettf().destroythreadextraframe() time.sleep(sleepsecs) return s.sleeping_abort | 99e9c22cec3c4377e84865e4fa0b22c39e1011dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5335/99e9c22cec3c4377e84865e4fa0b22c39e1011dc/Tk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5329,
310,
12,
87,
16,
5329,
21317,
16,
4463,
21317,
4672,
309,
4463,
21317,
30,
272,
6315,
3576,
2932,
2134,
3792,
316,
738,
72,
5319,
3103,
72,
6,
738,
261,
17956,
21317,
342,
4752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5329,
310,
12,
87,
16,
5329,
21317,
16,
4463,
21317,
4672,
309,
4463,
21317,
30,
272,
6315,
3576,
2932,
2134,
3792,
316,
738,
72,
5319,
3103,
72,
6,
738,
261,
17956,
21317,
342,
4752,
... |
class SimpleColumn_OLD(Widget2D): | class SimpleColumn(Widget2D): | def draw(self): if self.print_lbox: print "print_lbox: %r lbox attrs are %r" % (self, (self.bleft, self.bright, self.bbottom, self.btop)) glPushMatrix() prior = None for a in self.drawables: if prior: # move from prior to a dy = prior.bbottom + self.gap + a.btop glTranslatef(0,-dy,0) # positive is up, but Column progresses down prior = a self.drawkid(a) ## a.draw() glPopMatrix() return | 89be157bda1f4c38c891ba4720328fcd4edfafff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/89be157bda1f4c38c891ba4720328fcd4edfafff/Column.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
309,
365,
18,
1188,
67,
80,
2147,
30,
1172,
315,
1188,
67,
80,
2147,
30,
738,
86,
328,
2147,
3422,
854,
738,
86,
6,
738,
261,
2890,
16,
261,
2890,
18,
70,
448... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
309,
365,
18,
1188,
67,
80,
2147,
30,
1172,
315,
1188,
67,
80,
2147,
30,
738,
86,
328,
2147,
3422,
854,
738,
86,
6,
738,
261,
2890,
16,
261,
2890,
18,
70,
448... |
1, ?)""", (path, track.getArtist(), track.getAlbum(), | 1, ?, ?)""", (path, track.getArtist(), track.getAlbum(), | def addTrack(self, path, hasTrackID=True): self._logger.debug("Adding \'"+path+"\' to the library.") track = self._trackFactory.getTrackFromPathNoID(self, path) if track == None: self._logger.debug("\'"+path+"\' is an invalid file.") return None c = self._conn.cursor() trackID = None if hasTrackID == True: trackID = self._getTrackID(track) path = track.getPath() if hasTrackID == False or trackID == None: c.execute("""insert into tracks (path, artist, album, title, tracknumber, unscored, length, bpm) values (?, ?, ?, ?, ?, 1, ?)""", (path, track.getArtist(), track.getAlbum(), track.getTitle(), track.getTrackNumber(), track.getLength(), track.getBPM())) trackID = c.lastrowid self._logger.info("\'"+path+"\' has been added to the library.") else: self._logger.debug("\'"+path+"\' is already in the library.") c.close() self._conn.commit() track.setID(self._trackFactory, trackID) return trackID | a22728eb1556c31bb0384a611647cfcbe778cc71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/a22728eb1556c31bb0384a611647cfcbe778cc71/Database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
4402,
12,
2890,
16,
589,
16,
711,
4402,
734,
33,
5510,
4672,
365,
6315,
4901,
18,
4148,
2932,
13962,
521,
4970,
15,
803,
9078,
3730,
358,
326,
5313,
1199,
13,
3298,
273,
365,
6315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4402,
12,
2890,
16,
589,
16,
711,
4402,
734,
33,
5510,
4672,
365,
6315,
4901,
18,
4148,
2932,
13962,
521,
4970,
15,
803,
9078,
3730,
358,
326,
5313,
1199,
13,
3298,
273,
365,
6315... |
if os.name == 'posix': self.set_reuse_addr() | def serve_forever(self): log("Serving FTP on %s:%s." %self.socket.getsockname()) if os.name == 'posix': self.set_reuse_addr() # here we try to use poll(), if it exists, else we'll use select() asyncore.loop(timeout=1, use_poll=True) | ae9b0c6a5cbc6b36438a90d75686b070896c07c6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/ae9b0c6a5cbc6b36438a90d75686b070896c07c6/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12175,
67,
1405,
502,
12,
2890,
4672,
613,
2932,
25721,
19324,
603,
738,
87,
5319,
87,
1199,
738,
2890,
18,
7814,
18,
14665,
975,
529,
10756,
468,
2674,
732,
775,
358,
999,
7672,
9334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12175,
67,
1405,
502,
12,
2890,
4672,
613,
2932,
25721,
19324,
603,
738,
87,
5319,
87,
1199,
738,
2890,
18,
7814,
18,
14665,
975,
529,
10756,
468,
2674,
732,
775,
358,
999,
7672,
9334,
... | |
if terp: | if terp and 'certificate' in terp: | def get_terp(moddir): try: terp = file_open(os.path.join(moddir, '__terp__.py')) try: return eval(terp.read()) finally: terp.close() except IOError: return None | 956e0132c7db38cff4eb83f04b87d9276c79c19c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/956e0132c7db38cff4eb83f04b87d9276c79c19c/maintenance_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
387,
84,
12,
1711,
1214,
4672,
775,
30,
19272,
84,
273,
585,
67,
3190,
12,
538,
18,
803,
18,
5701,
12,
1711,
1214,
16,
4940,
387,
84,
25648,
2074,
26112,
775,
30,
327,
5302,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
387,
84,
12,
1711,
1214,
4672,
775,
30,
19272,
84,
273,
585,
67,
3190,
12,
538,
18,
803,
18,
5701,
12,
1711,
1214,
16,
4940,
387,
84,
25648,
2074,
26112,
775,
30,
327,
5302,... |
for key,val in sys.modules.items(): print key, ":", val | def start(argv, lang): '''The orio.main.starting procedure''' | f084b0b1737af90e31d476973a384ebaf0b59a7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8417/f084b0b1737af90e31d476973a384ebaf0b59a7f/orio_main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
19485,
16,
3303,
4672,
9163,
1986,
578,
1594,
18,
5254,
18,
18526,
12131,
26418,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
787,
12,
19485,
16,
3303,
4672,
9163,
1986,
578,
1594,
18,
5254,
18,
18526,
12131,
26418,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
b' PyThreadState_Get: no current thread\n') | b' PyThreadState_Get: no current thread') | def test_no_FatalError_infinite_loop(self): p = subprocess.Popen([sys.executable, "-c", 'import _testcapi;' '_testcapi.crash_no_current_thread()'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) (out, err) = p.communicate() self.assertEqual(out, b'') # This used to cause an infinite loop. self.assertEqual(err, b'Fatal Python error:' b' PyThreadState_Get: no current thread\n') | 59b5b5c1293d3e5b156101f49869fcc3fab0f885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/59b5b5c1293d3e5b156101f49869fcc3fab0f885/test_capi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2135,
67,
19593,
668,
67,
267,
9551,
67,
6498,
12,
2890,
4672,
293,
273,
6652,
18,
52,
3190,
3816,
9499,
18,
17751,
16,
3701,
71,
3113,
296,
5666,
389,
3813,
71,
2425,
4359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2135,
67,
19593,
668,
67,
267,
9551,
67,
6498,
12,
2890,
4672,
293,
273,
6652,
18,
52,
3190,
3816,
9499,
18,
17751,
16,
3701,
71,
3113,
296,
5666,
389,
3813,
71,
2425,
4359,
... |
s ="" | s = "" | def getCDATA(self): """ Serialise node, dropping all tags and leaving CDATA intact. That is effectively kills all formatiing, leaving only text were contained in XML. """ s ="" cnt = 0 if self.kids: for a in self.kids: s=s+self.data[cnt] s = s + mystr(a) cnt=cnt+1 if (len(self.data)-1) >= cnt: s = s + self.data[cnt] return s | 77fc3fbd8c6b16e072d869bb9968fe2f6a570b1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7194/77fc3fbd8c6b16e072d869bb9968fe2f6a570b1d/simplexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
4883,
12,
2890,
4672,
3536,
7366,
784,
756,
16,
3640,
1382,
777,
2342,
471,
15086,
28294,
509,
621,
18,
12466,
353,
23500,
8673,
87,
777,
740,
77,
310,
16,
15086,
1338,
977,
4591,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
4883,
12,
2890,
4672,
3536,
7366,
784,
756,
16,
3640,
1382,
777,
2342,
471,
15086,
28294,
509,
621,
18,
12466,
353,
23500,
8673,
87,
777,
740,
77,
310,
16,
15086,
1338,
977,
4591,
... |
'Purchase Line') | 'Purchase Line'), 'dm_campaign_group_purchase_line_ids': fields.many2many('dm.campaign.group.purchase_line', 'dm_campaign_group_purchase_line_purchase_order_rel', 'purchase_order_id', 'dm_campaign_group_purchase_line_id', 'Purchase Line (for Campaign Group)') | def get_campaign_purchase_line_ids(self , cr, uid, ids, context): result = {} | 5010cdaa837283b1d217370051c8e96e0458b848 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/5010cdaa837283b1d217370051c8e96e0458b848/dm_purchase_advanced.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14608,
67,
12688,
12104,
67,
1369,
67,
2232,
12,
2890,
269,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
563,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14608,
67,
12688,
12104,
67,
1369,
67,
2232,
12,
2890,
269,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
563,
273,
2618,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if width == -1: width = settings.width if height == -1: height = settings.height | if width == None: width = settings.width if height == None: height = settings.height | def DrawTextFramed(text, settings, x=-1, y=-1, width=-1, height=-1, size=0, mode='hard'): if x == -1: x = settings.x if y == -1: y = settings.y if width == -1: width = settings.width if height == -1: height = settings.height if size == 0: size = settings.size if settings.shadow_visible: osd.drawstringframed(text, x+settings.shadow_pad_x, y+settings.shadow_pad_y, width, height, settings.shadow_color, None, font=settings.font, ptsize=size, align_h=settings.align, align_v=settings.valign, mode=mode) osd.drawstringframed(text, x, y, width, height, settings.color, None, font=settings.font, ptsize=size, align_h=settings.align, align_v=settings.valign, mode=mode) | 5bc8072ec1bf25caf380e0fc14ea8ea0852f9d35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/5bc8072ec1bf25caf380e0fc14ea8ea0852f9d35/main1_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
1528,
42,
1940,
329,
12,
955,
16,
1947,
16,
619,
29711,
21,
16,
677,
29711,
21,
16,
1835,
29711,
21,
16,
2072,
29711,
21,
16,
963,
33,
20,
16,
1965,
2218,
20379,
11,
4672,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
1528,
42,
1940,
329,
12,
955,
16,
1947,
16,
619,
29711,
21,
16,
677,
29711,
21,
16,
1835,
29711,
21,
16,
2072,
29711,
21,
16,
963,
33,
20,
16,
1965,
2218,
20379,
11,
4672,
309... |
[(self._rec_name, operator, name)] + args, | [(self._rec_name, operator, name)] + (args or []), | def name_search(self, cursor, user, name='', args=None, operator='ilike', context=None, limit=None): if name: ids = self.search(cursor, user, [('code', 'like', name + '%')] + args, limit=limit, context=context) if not ids: ids = self.search(cursor, user, [(self._rec_name, operator, name)] + args, limit=limit, context=context) else: ids = self.search(cursor, user, args, limit=limit, context=context) res = self.name_get(cursor, user, ids, context=context) return res | ccd75033ce2688e4e7b95ce46f257a08b15e5738 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9290/ccd75033ce2688e4e7b95ce46f257a08b15e5738/account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
3072,
12,
2890,
16,
3347,
16,
729,
16,
508,
2218,
2187,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
7036,
4672,
309,
508,
30,
3258,
273,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
508,
67,
3072,
12,
2890,
16,
3347,
16,
729,
16,
508,
2218,
2187,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
7036,
4672,
309,
508,
30,
3258,
273,
365... |
print "******* python %s build_ext %s" % (setupscript, buildargs) | print "EXECUTING: python %s build_ext %s" % (setupscript, buildargs) | def run_python(pkg, args): cwd = os.getcwd() os.chdir(os.path.join(pkg, args.release)) setupscript = "setup.py" buildargs = "" installdir = "" if args.casacore: buildargs += " --casacore=%s" % args.casacore if args.enable_hdf5: buildargs += " --enable-hdf5" if args.hdf5: buildargs += " --hdf5=%s" % args.hdf5 if args.hdf5lib: buildargs += " --hdf5lib=%s" % args.hdf5lib if args.cfitsio: buildargs += " --cfitsio=%s" % args.cfitsio if args.wcs: buildargs += " --wcs=%s" % args.wcs if args.boost: buildargs += " --boost=%s" % args.boost if args.boost: buildargs += " --boost=%s" % args.boost if args.boostlib: buildargs += " --boostlib=%s" % args.boostlib if args.f2clib: buildargs += " --f2clib=%s" % args.f2clib if args.f2c: buildargs += " --f2c=%s" % args.f2c if args.lapacklib: buildargs += " --lapacklib=%s" % args.lapacklib if args.lapack: buildargs += " --lapack=%s" % args.lapack if args.prefix: buildargs += " --pyrap=%s" % args.prefix if args.pyprefix: os.environ["PYTHONPATH"] = args.pyprefix installdir = " --install-dir=%s" % args.pyprefix if sys.platform == "darwin": vers, sdk = darwin_sdk(args.universal) os.environ["MACOSX_DEPLOYMENT_TARGET"] = vers os.environ["CFLAGS"] = sdk | 51177738ec3678f83cad6a9bc051e9c4e89339b8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7472/51177738ec3678f83cad6a9bc051e9c4e89339b8/batchbuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
8103,
12,
10657,
16,
833,
4672,
7239,
273,
1140,
18,
588,
11089,
1435,
1140,
18,
343,
1214,
12,
538,
18,
803,
18,
5701,
12,
10657,
16,
833,
18,
9340,
3719,
3875,
4263,
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,
1086,
67,
8103,
12,
10657,
16,
833,
4672,
7239,
273,
1140,
18,
588,
11089,
1435,
1140,
18,
343,
1214,
12,
538,
18,
803,
18,
5701,
12,
10657,
16,
833,
18,
9340,
3719,
3875,
4263,
273,
... |
HeaderStyle.fontName = 'Helvetica' | HeaderStyle.fontName = 'Helvetica-Bold' | def myLaterPages(canvas, doc): #canvas.drawImage("snkanim.gif", 36, 36) canvas.saveState() canvas.setStrokeColorRGB(1,0,0) canvas.setLineWidth(5) canvas.line(50,45,50,PAGE_HEIGHT-45) canvas.line(50,PAGE_HEIGHT-70, 555, PAGE_HEIGHT-70) canvas.setFont('Helvetica-Bold',15) canvas.drawString(inch, PAGE_HEIGHT-62, doc.collector_title) canvas.setFont('Helvetica',11) canvas.drawString(inch, 0.75 * inch, "Page %d" % doc.page) canvas.drawString(450, 0.75 * inch, doc.collector.toPortalTime(DateTime(), long_format=1)) canvas.restoreState() | 45dec44f0c220881b471c7a3fe771ff8b0a6b59d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/45dec44f0c220881b471c7a3fe771ff8b0a6b59d/pdfwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
20607,
5716,
12,
15424,
16,
997,
4672,
468,
15424,
18,
9446,
2040,
2932,
8134,
79,
304,
381,
18,
13905,
3113,
6580,
16,
6580,
13,
5953,
18,
5688,
1119,
1435,
5953,
18,
542,
14602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
20607,
5716,
12,
15424,
16,
997,
4672,
468,
15424,
18,
9446,
2040,
2932,
8134,
79,
304,
381,
18,
13905,
3113,
6580,
16,
6580,
13,
5953,
18,
5688,
1119,
1435,
5953,
18,
542,
14602,
... |
form. (This is not the same as the p-adic precision of the | form. (This is not the same as the `p`-adic precision of the | def prec(self): r""" Return the series expansion precision of this overconvergent modular form. (This is not the same as the p-adic precision of the coefficients.) | 51aabb4f4c1d25de708da4cd9e8295aeb8a186e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/51aabb4f4c1d25de708da4cd9e8295aeb8a186e7/genus0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13382,
12,
2890,
4672,
436,
8395,
2000,
326,
4166,
17965,
6039,
434,
333,
1879,
591,
502,
75,
319,
681,
2490,
646,
18,
261,
2503,
353,
486,
326,
1967,
487,
326,
1375,
84,
68,
17,
20333... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13382,
12,
2890,
4672,
436,
8395,
2000,
326,
4166,
17965,
6039,
434,
333,
1879,
591,
502,
75,
319,
681,
2490,
646,
18,
261,
2503,
353,
486,
326,
1967,
487,
326,
1375,
84,
68,
17,
20333... |
while( runes[ runenum ] > -1 ): | while( runenum < 16 and runes[ runenum ] > -1 ): | def sendGump( char, item ): char.socket.closegump( 0x87654322 ) char.soundeffect( 0x55 ) runebook = cGump( 0, 0, 0, 100, 120 ) runebook.startPage( 0 ) runebook.addGump( 100, 10, 2200 ) # decoration bar n = 125 m = 0 for i in range( 0, 16 ): if( i == 8 ): n = 170 if( i % 8 == 0 ): m = 57 elif( i % 8 == 7 ): m = 59 else: m = 58 runebook.addGump( n + i * 15, 50, m ) # page number button at the bottom of the book for i in range( 0, 8 ): j = i / 4 runebook.addPageButton( 130 + i * 35 + j * 30, 187, i + 2225, i + 2225, i + 2 ) # charge / max charge if not item.hastag( "charges" ): item.settag( "charges", 0 ) charges = item.gettag( "charges" ) if not item.hastag( "maxcharges" ): item.settag( "maxcharges", 5 ) maxcharges = item.gettag( "maxcharges" ) runebook.addText( 160, 40, "Charges: %i" % charges ) runebook.addText( 300, 40, "Max Charges: %i" % maxcharges ) runebook.startPage( 1 ) # rename button return code = 1000 #runebook.addButton( 130, 20, 2472, 2473, 1000 ) #runebook.addText( 158, 22, "Rename Book" ) # next page - top right corner runebook.addPageButton( 393, 14, 2206, 2206, 2 ) # get rune serials and names runes = [ -1 ] * 16 for i in range( 0, 16 ): if not item.hastag( "rune %i" % i ): item.settag( "rune %i" % i, int( runes[ i ] ) ) else: runes[ i ] = int( item.gettag( "rune %i" % i ) ) runenum = 0 while( runes[ runenum ] > -1 ): runenum = runenum + 1 runenames = [ "Empty" ] * 16 for i in range( 0, runenum ): rune = wolfpack.finditem( int( runes[ i ] ) ) if rune and isrune( rune ): runenames[ i ] = rune.name # blue button and rune name for i in range( 0, 16 ): if( i < 8 ): x = 130 else: x = 290 y = 60 + ( i % 8 ) * 15 # blue button return code = rune number + 1 # tramel color : 115, feluca color : ??? namecolor = 115 runebook.addButton( x, y + 5, 2103, 2104, i + 1 ) if i < runenum: runebook.addText( x + 15, y, "%s" % runenames[ i ], namecolor ) else: # no color - black runebook.addText( x + 15, y, "Empty" ) if item.hastag( "default" ): default = item.gettag( "default" ) else: item.settag( "default", 0 ) default = 0 # page 2 - 9 for i in range( 2, 10 ): runebook.startPage( i ) # next page - top right corner if( i < 9 ): runebook.addPageButton( 393, 14, 2206, 2206, i + 1 ) # previous page - top left corner runebook.addPageButton( 125, 14, 2205, 2205, i - 1 ) # for each sub-page for j in range( 0, 2 ): # rune number k = ( i - 2 ) * 2 + j # blue button return code = 1 + rune number runebook.addButton( 130 + j * 160, 65, 2103, 2104, 1 + k ) # recall button return code = 301 + rune number runebook.addButton( 135 + j * 160, 140, 2271, 2271, 301 + k ) # gate button return code = 401 + rune number runebook.addButton( 205 + j * 160, 140, 2291, 2291, 401 + k ) # there's a recall rune # tramel color : 115, feluca : ??? namecolor = 115 if( k < runenum ): runebook.addText( 145 + j * 160, 60, runenames[ k ], namecolor ) # set default button return code = 101 + rune number if( k == default ): runebook.addButton( 160 + j * 135, 20, 2360, 2360, 101 + k ) else: runebook.addButton( 160 + j * 135, 20, 2360, 2361, 101 + k ) runebook.addText( 175 + j * 135, 15, "Set default" ) # drop button return code = 201 + rune number runebook.addButton( 135 + j * 160, 115, 2437, 2438, 201 + k ) runebook.addText( 150 + j * 160, 115, "Drop rune" ) # empty - no color : black else: runebook.addText( 145 + j * 160, 60, runenames[ k ] ) runebook.setArgs( [ item ] ) runebook.setType( 0x87654322 ) runebook.setCallback( "magic.runebook.callback" ) # send it runebook.send( char ) | 12a27dd7cd0ccbe5acc248c6e0de4ff22a7f6e5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/12a27dd7cd0ccbe5acc248c6e0de4ff22a7f6e5f/runebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
43,
2801,
12,
1149,
16,
761,
262,
30,
1149,
18,
7814,
18,
4412,
75,
2801,
12,
374,
92,
28,
6669,
6564,
1578,
22,
262,
1149,
18,
87,
465,
536,
74,
386,
12,
374,
92,
2539,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
43,
2801,
12,
1149,
16,
761,
262,
30,
1149,
18,
7814,
18,
4412,
75,
2801,
12,
374,
92,
28,
6669,
6564,
1578,
22,
262,
1149,
18,
87,
465,
536,
74,
386,
12,
374,
92,
2539,
262,... |
if __name__ == "__main__": run_demo() | if __name__ == "__main__": run_demo() | def res(y,t): for i in range(4): qt.real_x[i+1] = y[i] qt.jmimodel.ode_f() return qt.real_dx[1:5] | f4d27353d0dd2d52d880e064575ad4d9ec620c15 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7711/f4d27353d0dd2d52d880e064575ad4d9ec620c15/quadtank.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
400,
12,
93,
16,
88,
4672,
364,
277,
316,
1048,
12,
24,
4672,
25672,
18,
7688,
67,
92,
63,
77,
15,
21,
65,
273,
677,
63,
77,
65,
25672,
18,
78,
81,
381,
1009,
18,
390,
67,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
400,
12,
93,
16,
88,
4672,
364,
277,
316,
1048,
12,
24,
4672,
25672,
18,
7688,
67,
92,
63,
77,
15,
21,
65,
273,
677,
63,
77,
65,
25672,
18,
78,
81,
381,
1009,
18,
390,
67,
74,
... |
t = s.split('\n') do_strip = False for I in t: I2 = I.lstrip() if I2.startswith('sage:') or I2.startswith('>>>'): do_strip = True break if not do_strip: return s s = '' for I in t: I2 = I.lstrip() if I2.startswith('sage:'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('>>>'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('...'): s += after_first_word(I2) + '\n' return s | s = aString.lstrip() is_example = s.startswith('sage:') or s.startswith('>>>') if not is_example: return aString new = '' lines = s.split('\n') for line in lines: line = line.lstrip() if line.startswith('sage:'): new += after_first_word(line).lstrip() + '\n' elif line.startswith('>>>'): new += after_first_word(line).lstrip() + '\n' elif line.startswith('...'): new += after_first_word(line) + '\n' return new | def ignore_prompts_and_output(s): """ Given a string s that defines an input block of code, if any line begins in "sage:" (or ">>>"), strip out all lines that don't begin in either "sage:" (or ">>>") or"...", and remove all "sage:" (or ">>>") and "..." from the beginning of the remaining lines. """ t = s.split('\n') do_strip = False for I in t: I2 = I.lstrip() if I2.startswith('sage:') or I2.startswith('>>>'): do_strip = True break if not do_strip: return s s = '' for I in t: I2 = I.lstrip() if I2.startswith('sage:'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('>>>'): s += after_first_word(I2).lstrip() + '\n' elif I2.startswith('...'): s += after_first_word(I2) + '\n' return s | 8dca6ec08bfce6b0fd76ef23f87e7f5c68474280 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8dca6ec08bfce6b0fd76ef23f87e7f5c68474280/worksheet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2305,
67,
17401,
1092,
67,
464,
67,
2844,
12,
87,
4672,
3536,
16803,
279,
533,
272,
716,
11164,
392,
810,
1203,
434,
981,
16,
309,
1281,
980,
17874,
316,
315,
87,
410,
2773,
261,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2305,
67,
17401,
1092,
67,
464,
67,
2844,
12,
87,
4672,
3536,
16803,
279,
533,
272,
716,
11164,
392,
810,
1203,
434,
981,
16,
309,
1281,
980,
17874,
316,
315,
87,
410,
2773,
261,
280,
... |
expect(f.read(1), 'a') | expect(f.read(1), b'a') | def expect(got_this, expect_this): if test_support.verbose: print('%r =?= %r ...' % (got_this, expect_this), end=' ') if got_this != expect_this: if test_support.verbose: print('no') raise test_support.TestFailed, 'got %r, but expected %r' %\ (got_this, expect_this) else: if test_support.verbose: print('yes') | f55d86abe0e358709c72f404db4b832ea362c7d9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/f55d86abe0e358709c72f404db4b832ea362c7d9/test_largefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4489,
12,
13212,
67,
2211,
16,
4489,
67,
2211,
4672,
309,
1842,
67,
13261,
18,
11369,
30,
1172,
29909,
86,
273,
35,
33,
738,
86,
25956,
738,
261,
13212,
67,
2211,
16,
4489,
67,
2211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4489,
12,
13212,
67,
2211,
16,
4489,
67,
2211,
4672,
309,
1842,
67,
13261,
18,
11369,
30,
1172,
29909,
86,
273,
35,
33,
738,
86,
25956,
738,
261,
13212,
67,
2211,
16,
4489,
67,
2211,
... |
“Hyper-Star Graph: A New Interconnection Network Improving the Network Cost of the Hypercube.” In Proceedings of the First EurAsian | "Hyper-Star Graph: A New Interconnection Network Improving the Network Cost of the Hypercube." In Proceedings of the First EurAsian | def HyperStarGraph(self,n,k): r''' Returns the hyper star graph HS(n,k). INPUT:: - ``n`` - ``k`` EXAMPLES:: sage: g = graphs.HyperStarGraph(6,3) sage: g.plot() # long time REFERENCES: - Lee, Hyeong-Ok, Jong-Seok Kim, Eunseuk Oh, and Hyeong-Seok Lim. “Hyper-Star Graph: A New Interconnection Network Improving the Network Cost of the Hypercube.” In Proceedings of the First EurAsian Conference on Information and Communication Technology, 858-865. Springer-Verlag, 2002. AUTHORS: - Michael Yurko (2009-09-01) | ddcbacc126d6b6e8f42df1d37db96f441baf7988 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ddcbacc126d6b6e8f42df1d37db96f441baf7988/graph_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18274,
18379,
4137,
12,
2890,
16,
82,
16,
79,
4672,
436,
26418,
2860,
326,
9512,
10443,
2667,
670,
55,
12,
82,
16,
79,
2934,
225,
12943,
2866,
225,
300,
225,
12176,
82,
10335,
225,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18274,
18379,
4137,
12,
2890,
16,
82,
16,
79,
4672,
436,
26418,
2860,
326,
9512,
10443,
2667,
670,
55,
12,
82,
16,
79,
2934,
225,
12943,
2866,
225,
300,
225,
12176,
82,
10335,
225,
300... |
ext_modules = [Extension("py2exe_util", | ext_modules = [Extension("py2exe.py2exe_util", | def _removefiles(self, dstdir, srcdir): if not os.path.isdir(srcdir): return for n in os.listdir(srcdir): name = os.path.join(dstdir, n) if os.path.isfile(name): self.announce("removing '%s'" % name) if not self.dry_run: os.remove(name) if os.path.splitext(name)[1] == '.py': try: os.remove(name + 'c') except: pass try: os.remove(name + 'o') except: pass elif os.path.isdir(name): self._removefiles(name, os.path.join(srcdir, n)) if not self.dry_run: os.rmdir(name) else: self.announce("skipping removal of '%s' (does not exist)" %\ name) | 6c0e865e7cfefd57ec3be3495edb997bb8f96e7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/6c0e865e7cfefd57ec3be3495edb997bb8f96e7f/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4479,
2354,
12,
2890,
16,
3046,
1214,
16,
1705,
1214,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
4816,
1214,
4672,
327,
364,
290,
316,
1140,
18,
1098,
1214,
12,
4816,
1214,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4479,
2354,
12,
2890,
16,
3046,
1214,
16,
1705,
1214,
4672,
309,
486,
1140,
18,
803,
18,
291,
1214,
12,
4816,
1214,
4672,
327,
364,
290,
316,
1140,
18,
1098,
1214,
12,
4816,
1214,... |
name = pkg["name"] | name = self.pkgs[i]["name"] found = 0 | def runDepRes(self): # Add packages to be updated to our operation resolver self.opresolver = RpmResolver(self.pydb.getPkgList(), OP_UPDATE) for pkg in self.pkgs: if self.command in ("update", "upgrade", "groupupdate", "groupupgrade"): name = pkg["name"] for ipkg in self.pydb.getPkgList(): if ipkg["name"] == name: if name in self.always_install: self.opresolver.append(pkg) else: self.opresolver.append(pkg) break else: if pkg["name"] in self.always_install: self.opresolver.append(pkg) else: self.opresolver.append(pkg) # Look for obsoletes and add them to our update packages for repo in self.repos: for pkg in repo.getList(): if pkg in self.pkgs: continue for u in pkg["obsoletes"]: s = self.opresolver.searchDependency(u) if len(s) > 0: self.opresolver.append(pkg) del self.pkgs self.pkgs = [] self.__runDepResolution() | 11e31557ed329a80c28dc4dd5f98950a5e67f5da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/11e31557ed329a80c28dc4dd5f98950a5e67f5da/yum.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
16316,
607,
12,
2890,
4672,
468,
1436,
5907,
358,
506,
3526,
225,
358,
3134,
1674,
5039,
365,
18,
556,
14122,
273,
534,
7755,
4301,
12,
2890,
18,
2074,
1966,
18,
588,
11264,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
16316,
607,
12,
2890,
4672,
468,
1436,
5907,
358,
506,
3526,
225,
358,
3134,
1674,
5039,
365,
18,
556,
14122,
273,
534,
7755,
4301,
12,
2890,
18,
2074,
1966,
18,
588,
11264,
682,
... |
classes = node.get('classes', ['Unknown', ]) for cls in classes: self.body.append( '\\docutilsrole%s{' % cls) self.context.append('}'*len(classes)) | self.latex_fallbacks['inline'] = latex_headings['DUspan'] classes = node.get('classes', []) self.body.append(r'\DUspan{%s}{' %','.join(classes)) | def visit_inline(self, node): # titlereference classes = node.get('classes', ['Unknown', ]) for cls in classes: self.body.append( '\\docutilsrole%s{' % cls) self.context.append('}'*len(classes)) | 41ef6870051e05cad1cccc70281783fc3ccd539a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1278/41ef6870051e05cad1cccc70281783fc3ccd539a/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
10047,
12,
2890,
16,
756,
4672,
468,
268,
305,
749,
73,
1134,
3318,
273,
756,
18,
588,
2668,
4701,
2187,
10228,
4874,
2187,
308,
13,
364,
2028,
316,
3318,
30,
365,
18,
3432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10047,
12,
2890,
16,
756,
4672,
468,
268,
305,
749,
73,
1134,
3318,
273,
756,
18,
588,
2668,
4701,
2187,
10228,
4874,
2187,
308,
13,
364,
2028,
316,
3318,
30,
365,
18,
3432,
... |
class SSSidebarButton (schema.Item): | class SSSidebarButton(schema.Item): | def SetSize(self, rect): sidebar = Block.Block.findBlockByName ("Sidebar") textRect = wxSidebar.GetRectFromOffsets (rect, sidebar.editRectOffsets) self.control.SetRect (textRect); | a13c4af172df2a489c068700d17da784a8374ce3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/a13c4af172df2a489c068700d17da784a8374ce3/SideBar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1225,
12,
2890,
16,
4917,
4672,
23364,
273,
3914,
18,
1768,
18,
4720,
1768,
5911,
7566,
8895,
3215,
7923,
977,
6120,
273,
7075,
8895,
3215,
18,
967,
6120,
1265,
13830,
261,
2607,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1225,
12,
2890,
16,
4917,
4672,
23364,
273,
3914,
18,
1768,
18,
4720,
1768,
5911,
7566,
8895,
3215,
7923,
977,
6120,
273,
7075,
8895,
3215,
18,
967,
6120,
1265,
13830,
261,
2607,
1... |
self.__instance.append(plugin_class()) | self.__instances.append(plugin_class()) | def __init__(self): self._count = 0 self.__instance = [] | 0a15cb85700b10c8fb1249dd252d5b8a292af23e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3386/0a15cb85700b10c8fb1249dd252d5b8a292af23e/pluginmanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
1883,
273,
374,
365,
16186,
1336,
273,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
6315,
1883,
273,
374,
365,
16186,
1336,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Video(id=intid, db=mythvideo).update({'filename': filename, u'host': u''}) | Video(intid, db=mythvideo).update({'filename': filename, u'host': u''}) | def processMythTvMetaData(self): '''Check each video file in the mythvideo directories download graphics files and meta data then update MythTV data base meta data with any new information. ''' # Verify that the proper fields are present db_version = mythdb.settings.NULL.DBSchemaVer field_names = mythvideo.tablefields['videometadata'] for field in ['season', 'episode', 'coverfile', 'screenshot', 'banner', 'fanart']: if not field in field_names: sys.stderr.write(u"\n! Error: Your MythTv data base scheme version (%s) does not have the necessary fields at least (%s) is missing\n\n" % (db_version, field)) sys.exit(1) | 8bef99cd8eeb3e9f5a55012babd3859cbabd2a16 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/8bef99cd8eeb3e9f5a55012babd3859cbabd2a16/jamu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12062,
451,
56,
90,
6998,
12,
2890,
4672,
9163,
1564,
1517,
6191,
585,
316,
326,
3399,
451,
9115,
6402,
4224,
17313,
1390,
471,
2191,
501,
1508,
1089,
8005,
451,
15579,
501,
1026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12062,
451,
56,
90,
6998,
12,
2890,
4672,
9163,
1564,
1517,
6191,
585,
316,
326,
3399,
451,
9115,
6402,
4224,
17313,
1390,
471,
2191,
501,
1508,
1089,
8005,
451,
15579,
501,
1026,
... |
return rng.randint(0,1<<16) | return rng.randint(0, (1<<16) - 1) | def randHash(num): """ this returns a random 16-bit integer, given a seed integer. It will always return the same output given the same input. This is useful for repeatably mapping numbers with predictable bit patterns (i.e. doIds or zoneIds) to numbers with random bit patterns """ rng = RandomNumGen(num) return rng.randint(0,1<<16) | e013eecaf797f4ebb80f4d90fc2d63c736cced56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/e013eecaf797f4ebb80f4d90fc2d63c736cced56/RandomNumGen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5605,
2310,
12,
2107,
4672,
3536,
333,
1135,
279,
2744,
2872,
17,
3682,
3571,
16,
864,
279,
5009,
3571,
18,
2597,
903,
3712,
327,
326,
1967,
876,
864,
326,
1967,
810,
18,
1220,
353,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5605,
2310,
12,
2107,
4672,
3536,
333,
1135,
279,
2744,
2872,
17,
3682,
3571,
16,
864,
279,
5009,
3571,
18,
2597,
903,
3712,
327,
326,
1967,
876,
864,
326,
1967,
810,
18,
1220,
353,
53... |
pres.save() | pdfcontent = pres.save() | def process(datafilename, notes=0, handout=0, cols=0, verbose=0, outDir=None): "Process one PythonPoint source file." from reportlab.tools.pythonpoint.stdparser import PPMLParser parser = PPMLParser() parser.sourceFilename = datafilename rawdata = open(datafilename).read() parser.feed(rawdata) pres = parser.getPresentation() pres.sourceFilename = datafilename pres.outDir = outDir pres.notes = notes pres.handout = handout pres.cols = cols pres.verbose = verbose #this does all the work pres.save() if verbose: print 'saved presentation %s.pdf' % os.path.splitext(datafilename)[0] parser.close() | b4313d504cd51f70b053b3b310ed5c2d8ac3ef09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/b4313d504cd51f70b053b3b310ed5c2d8ac3ef09/pythonpoint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
892,
3459,
16,
10913,
33,
20,
16,
948,
659,
33,
20,
16,
5347,
33,
20,
16,
3988,
33,
20,
16,
596,
1621,
33,
7036,
4672,
315,
2227,
1245,
6600,
2148,
1084,
585,
1199,
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,
1207,
12,
892,
3459,
16,
10913,
33,
20,
16,
948,
659,
33,
20,
16,
5347,
33,
20,
16,
3988,
33,
20,
16,
596,
1621,
33,
7036,
4672,
315,
2227,
1245,
6600,
2148,
1084,
585,
1199,
628,
... |
applist.sort() | def updateApp(filename): appdict = { # windows applications 'WindowsFileSystem':'^CabinetWClass', 'Chrome':'^Chrome_', 'IE':'^IEFrame.*Windows Internet Explorer\r$', 'Notepad':'^Notepad', 'WindowsPhotoViewer':'^Photo_Lightweight_Viewer', 'TTPlayer':'^TTPlayer_', 'WindowsConsole':'^ConsoleWindowClass', 'TortoiseSVN':'.*TortoiseSVN\r$', 'GIMP':'.*GIMP\r$|^gdkWindowToplevel', 'AdobeReader':'.*Adobe Reader\r$', 'FunshionPlayer':'^funshion_player_tzdenjohn', 'WindowsProgramManager':'^Progman Program Manager', 'WindowsMediaPlayer':'^WMPlayerApp Windows Media Player', 'OpenOffice':'.*OpenOffice.org Calc$', 'DigitalPhotoProfessional':'^ATL:0043D110 Digital Photo Professional|^#32770 Digital Photo Professional', 'StormPlayer':'^Afx:400000:3:10003:2:', 'MSN':'^IMWindowClass|.*Windows Live Messenger$', # Linux applications 'Firefox':'^ "Navigator", "Firefox"|^ "Dialog", "Firefox"', 'GnomeTerminal':'^ "gnome-terminal"', 'Kpdf':'^ "kpdf"', 'Desktop':'^ "desktop_window"', 'Nautilus':'^ "nautilus"|^ "file_properties", "Nautilus"', 'Gedit':'^ "gedit"', 'GnomeSetting':'^ "gnome-control-center"|^ "gnome-appearance-properties"', 'Yast':'^ "y2controlcenter-gnome"|^ "y2base"', # Linux & Windows 'Emacs':'^Emacs|^ "emacs"', 'QQ':'^TXGuiFoundation|^ "qq"', 'OpenOffice':'^ "VCLSalFrame", "OpenOffice.org 3.0"', 'Skype':'^ "skype"', 'Pidgin':'^ "pidgin"', 'Python':'^TkTopLevel|^Shell_TrayWnd|^ "python"' } pstart = Application('start','^start') pstop = Application('stop','^stop') other = Application('other','.') applist = createListFromDict(Application,appdict) f = open(filename,'r') line = f.readline() laststs = None lastmatched = pstart while len(line) > 0: pmatched = None #print line, st = laststs if pstart.match(line): st = time.strptime(line[6:14],"%H:%M:%S") pmatched = pstart laststs = st.tm_hour*3600+st.tm_min*60+st.tm_sec elif pstop.match(line): st = time.strptime(line[5:13],"%H:%M:%S") pmatched = pstop sts = st.tm_hour*3600+st.tm_min*60+st.tm_sec dt = sts - laststs lastmatched.addTime(dt) laststs = sts else: ismatched = False title = line[9:] st = time.strptime(line[:8],"%H:%M:%S") sts = st.tm_hour*3600+st.tm_min*60+st.tm_sec dt = sts - laststs lastmatched.addTime(dt) for a in applist: if a.match(title): pmatched = a ismatched = True break if not ismatched: #print title, other.match(title) pmatched = other laststs = sts lastmatched = pmatched line = f.readline() applist = removeZeroTime(applist) applist.sort() if other.time() > 0 : applist.append(other) #print #print #for p in patternlist: # print p.name, p.count, p.time/60.0 return applist | cb3cc6be614af2edd89a16a6fd54ab36f623d036 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8373/cb3cc6be614af2edd89a16a6fd54ab36f623d036/day.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
3371,
12,
3459,
4672,
595,
1576,
273,
288,
468,
9965,
12165,
296,
10399,
11785,
11,
2497,
66,
39,
378,
23864,
59,
797,
2187,
296,
28548,
11,
2497,
66,
28548,
67,
2187,
296,
8732,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3371,
12,
3459,
4672,
595,
1576,
273,
288,
468,
9965,
12165,
296,
10399,
11785,
11,
2497,
66,
39,
378,
23864,
59,
797,
2187,
296,
28548,
11,
2497,
66,
28548,
67,
2187,
296,
8732,
... | |
def prune(self, leaves, method="keep"): | def prune(self, nodes): | def prune(self, leaves, method="keep"): """ Prunes the topology of this node in order to conserve only a selected list of leaf nodes. The algorithm deletes nodes until getting a consistent topology with a subset of nodes. Topology relationships among kept nodes is maintained. | ccac25119271aed7adc37469e1484c48ec612b6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/ccac25119271aed7adc37469e1484c48ec612b6c/tree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13293,
12,
2890,
16,
2199,
4672,
3536,
2301,
27490,
326,
9442,
434,
333,
756,
316,
1353,
358,
356,
30104,
1338,
279,
3170,
666,
434,
7839,
2199,
18,
1021,
4886,
9792,
2199,
3180,
8742,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13293,
12,
2890,
16,
2199,
4672,
3536,
2301,
27490,
326,
9442,
434,
333,
756,
316,
1353,
358,
356,
30104,
1338,
279,
3170,
666,
434,
7839,
2199,
18,
1021,
4886,
9792,
2199,
3180,
8742,
2... |
patches = patch1 + patches | patches = (patch1,) + patches | def patch(ui, repo, patch1, *patches, **opts): """import an ordered set of patches""" try: import psyco psyco.full() except: pass patches = patch1 + patches d = opts["base"] strip = opts["strip"] quiet = opts["quiet"] and "> /dev/null" or "" for patch in patches: ui.status("applying %s\n" % patch) pf = os.path.join(d, patch) text = "" for l in file(pf): if l[:4] == "--- ": break text += l f = os.popen("lsdiff --strip %d %s" % (strip, pf)) files = filter(None, map(lambda x: x.rstrip(), f.read().splitlines())) f.close() if files: if os.system("patch -p%d < %s %s" % (strip, pf, quiet)): raise "patch failed!" repo.commit(files, text) | c2d94da7a0e6c0e3dca7fde11b7285f11005b2c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/c2d94da7a0e6c0e3dca7fde11b7285f11005b2c4/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
12,
4881,
16,
3538,
16,
4729,
21,
16,
380,
30278,
16,
2826,
4952,
4672,
3536,
5666,
392,
5901,
444,
434,
16482,
8395,
775,
30,
1930,
4250,
93,
2894,
4250,
93,
2894,
18,
2854,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
12,
4881,
16,
3538,
16,
4729,
21,
16,
380,
30278,
16,
2826,
4952,
4672,
3536,
5666,
392,
5901,
444,
434,
16482,
8395,
775,
30,
1930,
4250,
93,
2894,
4250,
93,
2894,
18,
2854,
143... |
can be instanced when used by the MultiPathXMLRPCServer | can be instanced when used by the MultiPathXMLRPCServer. | def remove_duplicates(lst): """remove_duplicates([2,2,2,1,3,3]) => [3,1,2] Returns a copy of a list without duplicates. Every list item must be hashable and the order of the items in the resulting list is not defined. """ u = {} for x in lst: u[x] = 1 return u.keys() | 4f6671c5666e1f245677d247650a5efddfd79399 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/4f6671c5666e1f245677d247650a5efddfd79399/SimpleXMLRPCServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
22449,
12,
16923,
4672,
3536,
4479,
67,
22449,
3816,
22,
16,
22,
16,
22,
16,
21,
16,
23,
16,
23,
5717,
516,
306,
23,
16,
21,
16,
22,
65,
225,
2860,
279,
1610,
434,
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,
1206,
67,
22449,
12,
16923,
4672,
3536,
4479,
67,
22449,
3816,
22,
16,
22,
16,
22,
16,
21,
16,
23,
16,
23,
5717,
516,
306,
23,
16,
21,
16,
22,
65,
225,
2860,
279,
1610,
434,
279,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.