rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
value['destinations'].append( purl.getRelativeContentURL(instance) ) | value['destinations'].append(getRelativeContentURL(instance)) | def lookupDestinationsFor(typeinfo, tool, purl): """ search where the user can add a typeid instance """ # first, discover who can contain the type searchFor = [] for regType in tool.listTypeInfo(): if typeinfo.globalAllow(): searchFor.append(regType.getId()) elif regType.filter_content_types and \ typeinfo.getId() in regType.allowed_content_types: searchFor.append(regType.getId()) # after, gimme the path/s containers = [] for wanted in searchFor: for brain in \ instance.portal_catalog(portal_type=wanted): obj = brain.getObject() if obj != None and \ hasattr(obj.aq_explicit,'isPrincipiaFolderish'): containers.append(purl.getRelativeUrl(obj)) # ok, go on... return containers | b8218e6ab5b17cabfbb6f2f9b33b853fcd8112d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b8218e6ab5b17cabfbb6f2f9b33b853fcd8112d4/Widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
27992,
1290,
12,
723,
1376,
16,
5226,
16,
293,
718,
4672,
3536,
1623,
1625,
326,
729,
848,
527,
279,
618,
350,
791,
3536,
468,
1122,
16,
10372,
10354,
848,
912,
326,
618,
1623,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3689,
27992,
1290,
12,
723,
1376,
16,
5226,
16,
293,
718,
4672,
3536,
1623,
1625,
326,
729,
848,
527,
279,
618,
350,
791,
3536,
468,
1122,
16,
10372,
10354,
848,
912,
326,
618,
1623,
1... |
return record | return record, new_field_number | def add_field(recid, uid, record, tag, ind1, ind2, subcode, value_subfield): """Adds a new field to the record.""" tag = tag[:3] new_field_number = record_add_field(record, tag, ind1, ind2) record = add_subfield(recid, uid, tag, record, new_field_number, subcode, value_subfield) save_temp_record(record, uid, "%s.tmp" % get_file_path(recid)) return record | e34c1dabb23768395d9bfd6ba815c8aa129ca772 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/e34c1dabb23768395d9bfd6ba815c8aa129ca772/bibedit_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
1518,
12,
3927,
350,
16,
4555,
16,
1409,
16,
1047,
16,
1547,
21,
16,
1547,
22,
16,
720,
710,
16,
460,
67,
1717,
1518,
4672,
3536,
3655,
279,
394,
652,
358,
326,
1409,
12123,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
1518,
12,
3927,
350,
16,
4555,
16,
1409,
16,
1047,
16,
1547,
21,
16,
1547,
22,
16,
720,
710,
16,
460,
67,
1717,
1518,
4672,
3536,
3655,
279,
394,
652,
358,
326,
1409,
12123,... |
print '\t< %s' % line[:-2] | print '\t< %s' % line | def _get_line(self): | 46698bd1f4f6c68089d09c6be3b8ee342ba00bb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/46698bd1f4f6c68089d09c6be3b8ee342ba00bb9/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1369,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
1369,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if not edit: if cmd: sys.argv = ["-c"] + args else: sys.argv = args or [""] | def main(): cmd = None edit = 0 debug = 0 startup = 0 try: opts, args = getopt.getopt(sys.argv[1:], "c:deist:") except getopt.error, msg: sys.stderr.write("Error: %s\n" % str(msg)) sys.stderr.write(usage_msg) sys.exit(2) for o, a in opts: if o == '-c': cmd = a if o == '-d': debug = 1 if o == '-e': edit = 1 if o == '-s': startup = 1 if o == '-t': PyShell.shell_title = a if not edit: if cmd: sys.argv = ["-c"] + args else: sys.argv = args or [""] for i in range(len(sys.path)): sys.path[i] = os.path.abspath(sys.path[i]) pathx = [] if edit: for filename in args: pathx.append(os.path.dirname(filename)) elif args and args[0] != "-": pathx.append(os.path.dirname(args[0])) else: pathx.append(os.curdir) for dir in pathx: dir = os.path.abspath(dir) if not dir in sys.path: sys.path.insert(0, dir) global flist, root root = Tk() fixwordbreaks(root) root.withdraw() flist = PyShellFileList(root) if edit: for filename in args: flist.open(filename) shell = PyShell(flist) interp = shell.interp flist.pyshell = shell if startup: filename = os.environ.get("IDLESTARTUP") or \ os.environ.get("PYTHONSTARTUP") if filename and os.path.isfile(filename): interp.execfile(filename) if debug: shell.open_debugger() if cmd: interp.execsource(cmd) elif not edit and args and args[0] != "-": interp.execfile(args[0]) shell.begin() root.mainloop() root.destroy() | 826dc87f8c3a4f8d0ef6ea0a31f8fec6da7c73bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/826dc87f8c3a4f8d0ef6ea0a31f8fec6da7c73bf/PyShell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
1797,
273,
599,
3874,
273,
374,
1198,
273,
374,
11850,
273,
374,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
1797,
273,
599,
3874,
273,
374,
1198,
273,
374,
11850,
273,
374,
225,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
315,
... | |
Globals.debug("Code: %s, Domain: %s" % (error.code, error.domain)) | Globals.debug("Domain: %s, Code: %s" % (error.domain, error.code)) | def __PipelineBusErrorCb(self, bus, message): """ Handles GStreamer error messages. Parameters: bus -- reserved for GStreamer callbacks, don't use it explicitly. message -- reserved for GStreamer callbacks, don't use it explicitly. """ error, debug = message.parse_error() Globals.debug("Gstreamer bus error:", str(error), str(debug)) Globals.debug("Code: %s, Domain: %s" % (error.code, error.domain)) Globals.debug("Message:", error.message) self.emit("gst-bus-error", str(error), str(debug)) | 6026f7c20e7db25e100bbf198efed4c8d8f26538 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10033/6026f7c20e7db25e100bbf198efed4c8d8f26538/Project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8798,
7086,
668,
15237,
12,
2890,
16,
5766,
16,
883,
4672,
3536,
27020,
611,
1228,
264,
555,
2743,
18,
225,
7012,
30,
5766,
1493,
8735,
364,
611,
1228,
264,
6689,
16,
2727,
1404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8798,
7086,
668,
15237,
12,
2890,
16,
5766,
16,
883,
4672,
3536,
27020,
611,
1228,
264,
555,
2743,
18,
225,
7012,
30,
5766,
1493,
8735,
364,
611,
1228,
264,
6689,
16,
2727,
1404,
... |
self.lock.acquire() try: if isinstance(reason, Message): self.reason = reason if self.closed: return self.closed = True self.reason = reason self.incoming.close() self.responses.close() finally: self.lock.release() | if self.closed: return self.closed = True self.reason = reason self.incoming.close() self.responses.close() | def close(self, reason): self.lock.acquire() try: if isinstance(reason, Message): self.reason = reason if self.closed: return self.closed = True self.reason = reason self.incoming.close() self.responses.close() finally: self.lock.release() | a3416211a731a5ad905ad3e4119ba2052d224e3e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/197/a3416211a731a5ad905ad3e4119ba2052d224e3e/peer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
16,
3971,
4672,
365,
18,
739,
18,
1077,
1039,
1435,
775,
30,
309,
1549,
12,
10579,
16,
2350,
4672,
365,
18,
10579,
273,
3971,
309,
365,
18,
12204,
30,
327,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
16,
3971,
4672,
365,
18,
739,
18,
1077,
1039,
1435,
775,
30,
309,
1549,
12,
10579,
16,
2350,
4672,
365,
18,
10579,
273,
3971,
309,
365,
18,
12204,
30,
327,
365,
18,
1... |
return (False, "Can't change to primary mode: %s" % str(err)) | _Fail("Can't change to primary mode: %s", err) | def DrbdAttachNet(nodes_ip, disks, instance_name, multimaster): """Attaches the network on a list of drbd devices. """ status, bdevs = _FindDisks(nodes_ip, disks) if not status: return status, bdevs if multimaster: for idx, rd in enumerate(bdevs): try: _SymlinkBlockDev(instance_name, rd.dev_path, idx) except EnvironmentError, err: return (False, "Can't create symlink: %s" % str(err)) # reconnect disks, switch to new master configuration and if # needed primary mode for rd in bdevs: try: rd.AttachNet(multimaster) except errors.BlockDeviceError, err: return (False, "Can't change network configuration: %s" % str(err)) # wait until the disks are connected; we need to retry the re-attach # if the device becomes standalone, as this might happen if the one # node disconnects and reconnects in a different mode before the # other node reconnects; in this case, one or both of the nodes will # decide it has wrong configuration and switch to standalone RECONNECT_TIMEOUT = 2 * 60 sleep_time = 0.100 # start with 100 miliseconds timeout_limit = time.time() + RECONNECT_TIMEOUT while time.time() < timeout_limit: all_connected = True for rd in bdevs: stats = rd.GetProcStatus() if not (stats.is_connected or stats.is_in_resync): all_connected = False if stats.is_standalone: # peer had different config info and this node became # standalone, even though this should not happen with the # new staged way of changing disk configs try: rd.ReAttachNet(multimaster) except errors.BlockDeviceError, err: return (False, "Can't change network configuration: %s" % str(err)) if all_connected: break time.sleep(sleep_time) sleep_time = min(5, sleep_time * 1.5) if not all_connected: return (False, "Timeout in disk reconnecting") if multimaster: # change to primary mode for rd in bdevs: try: rd.Open() except errors.BlockDeviceError, err: return (False, "Can't change to primary mode: %s" % str(err)) if multimaster: msg = "multi-master and primary" else: msg = "single-master" return (True, "Disks are now configured as %s" % msg) | 2cc6781aac8b53426d83d4cb8a42dc7c58efb8d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/2cc6781aac8b53426d83d4cb8a42dc7c58efb8d6/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
463,
6731,
72,
4761,
7308,
12,
4690,
67,
625,
16,
17164,
16,
791,
67,
529,
16,
1778,
381,
2440,
4672,
3536,
4761,
281,
326,
2483,
603,
279,
666,
434,
5081,
16410,
7166,
18,
225,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
463,
6731,
72,
4761,
7308,
12,
4690,
67,
625,
16,
17164,
16,
791,
67,
529,
16,
1778,
381,
2440,
4672,
3536,
4761,
281,
326,
2483,
603,
279,
666,
434,
5081,
16410,
7166,
18,
225,
3536,
... |
utils.copy_without(src_dir, dst_dir, without, object_exactly = True) | utils.copy_without(src_dir, dst_dir, without, object_exactly=True, preserve=True) | def do_copy(self, args): if (len(args) < 2): raise utils.Failure("Bad syntax for copywithout command") src_dir = args[0] dst_dir = args[1] without = args[2:] | ae77d982fe9075a29bb8dbc336cb218c5129f5fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4427/ae77d982fe9075a29bb8dbc336cb218c5129f5fd/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3530,
12,
2890,
16,
833,
4672,
309,
261,
1897,
12,
1968,
13,
411,
576,
4672,
1002,
2990,
18,
5247,
2932,
6434,
6279,
364,
1610,
13299,
1296,
7923,
225,
1705,
67,
1214,
273,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
67,
3530,
12,
2890,
16,
833,
4672,
309,
261,
1897,
12,
1968,
13,
411,
576,
4672,
1002,
2990,
18,
5247,
2932,
6434,
6279,
364,
1610,
13299,
1296,
7923,
225,
1705,
67,
1214,
273,
83... |
strm.detached_circuits.append(circ) | for r in strm.circuit.routers: r.detached_streams.append(strm) tc_session.add(r) | def stream_status_event(self, s): if s.reason: lreason = s.reason else: lreason = "NONE" if s.remote_reason: rreason = s.remote_reason else: rreason = "NONE" reason = s.event_name+":"+s.status+":"+lreason+":"+rreason+":"+self.streams[s.strm_id].kind | c8ad6cda0735bca71a66e2ae8dc82c8034ffc7ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3224/c8ad6cda0735bca71a66e2ae8dc82c8034ffc7ce/SQLSupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
2327,
67,
2575,
12,
2890,
16,
272,
4672,
309,
272,
18,
10579,
30,
328,
10579,
273,
272,
18,
10579,
469,
30,
328,
10579,
273,
315,
9826,
6,
309,
272,
18,
7222,
67,
10579,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
2327,
67,
2575,
12,
2890,
16,
272,
4672,
309,
272,
18,
10579,
30,
328,
10579,
273,
272,
18,
10579,
469,
30,
328,
10579,
273,
315,
9826,
6,
309,
272,
18,
7222,
67,
10579,
30... |
elif ' | elif ' | def substitute_file(name): subst = '' f = open(name) for l in f: if '#define LIBTORRENT_VERSION_MAJOR' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION_MAJOR %d\n' % version[0] elif '#define LIBTORRENT_VERSION_MINOR' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION_MINOR %d\n' % version[1] if '#define LIBTORRENT_VERSION_TINY' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION_TINY %d\n' % version[2] elif '#define LIBTORRENT_VERSION' in l and filename.endiswith('.hpp'): l = '#define LIBTORRENT_VERSION "%d.%d.%d.%d"\n' % (version[0], version[1], version[2], version[3]) elif 'AC_INIT([libtorrent-rasterbar]' in l and filename.endiswith('.in'): l = 'AC_INIT([libtorrent-rasterbar], [%d.%d.%d], [arvid@cs.umu.se])\n' % (version[0], version[1], version[2]) elif 'set (VERSION ' in l and filename.endiswith('.in'): l = 'set (VERSION "%d.%d.%d")\n' % (version[0], version[1], version[2]) elif ':Version: ' in l and filename.endiswith('.rst'): l = ':Version: %d.%d.%d\n' % (version[0], version[1], version[2]) elif 'VERSION = ' in l and filename.endiswith('Jamfile'): l = 'VERSION = %d.%d.%d ;\n' % (version[0], version[1], version[2]) subst += l f.close() open(name, 'w+').write(subst) | ade9727b186357c72ab7a1eff51f29f4426775f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6320/ade9727b186357c72ab7a1eff51f29f4426775f8/set_version.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14811,
67,
768,
12,
529,
4672,
27750,
273,
875,
284,
273,
1696,
12,
529,
13,
364,
328,
316,
284,
30,
309,
2946,
11255,
23983,
56,
916,
7480,
67,
5757,
67,
26976,
916,
11,
316,
328,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14811,
67,
768,
12,
529,
4672,
27750,
273,
875,
284,
273,
1696,
12,
529,
13,
364,
328,
316,
284,
30,
309,
2946,
11255,
23983,
56,
916,
7480,
67,
5757,
67,
26976,
916,
11,
316,
328,
4... |
getLog().info("Ran setarch '%s'" % per) | getLog().debug("Ran setarch '%s'" % per) | def condPersonality(per=None): if per is None: return if personality_defs.get(per, None) is None: getLog().warning("Unable to find predefined setarch personality constant for '%s' arch." " You may have to manually run setarch."% per) return res = _libc.personality(personality_defs[per]) if res == -1: raise OSError(_errno.value, os.strerror(_errno.value)) getLog().info("Ran setarch '%s'" % per) | 006ebd8eb222bd332df40a08a9a6f934a4b9bc9e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/006ebd8eb222bd332df40a08a9a6f934a4b9bc9e/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6941,
8346,
7919,
12,
457,
33,
7036,
4672,
309,
1534,
353,
599,
30,
327,
309,
6175,
7919,
67,
12537,
18,
588,
12,
457,
16,
599,
13,
353,
599,
30,
9189,
7675,
8551,
2932,
3370,
358,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6941,
8346,
7919,
12,
457,
33,
7036,
4672,
309,
1534,
353,
599,
30,
327,
309,
6175,
7919,
67,
12537,
18,
588,
12,
457,
16,
599,
13,
353,
599,
30,
9189,
7675,
8551,
2932,
3370,
358,
1... |
constants_template = """import os | constants_template ="""import os | def get_constants(): confdir_full = rootdir + "/" + confdir datadir_full = rootdir + "/" + datadir imagedir_full = rootdir + "/" + imagedir localedir_full = rootdir + "/" + localedir gladedir_full = rootdir + "/" + gladedir constants_template = """import os if os.environ.get('UPSTREAM_CONF_DIR'): conf_dir = os.environ.get('UPSTREAM_CONF_DIR') else: # FIXME: change before release: conf_dir = '/etc/upstream' conf_dir = '%s' if os.environ.get('UPSTREAM_DATA_DIR'): data_dir = os.environ.get('UPSTREAM_DATA_DIR') else: # FIXME: change before release: data_dir = '/usr/share/upstream' data_dir = '%s' if os.environ.get('UPSTREAM_LOCALE_DIR'): locale_dir = os.environ.get('UPSTREAM_LOCALE_DIR') else: # FIXME: you get the idea... locale_dir = '%s' # what is default? if os.environ.get('UPSTREAM_GLADE_DIR'): glade_dir = os.environ.get('UPSTREAM_GLADE_DIR') else: glade_dir = '%s' # is this sensible? if os.environ.get('UPSTREAM_IMAGE_DIR'): image_dir = os.environ.get('UPSTREAM_IMAGE_DIR') else: image_dir = '%s' # is this sensible? locale_app = 'upstream''"""%(confdir_full,datadir_full,localedir_full,gladedir_full,imagedir_full) #print constants_template #error catching shutil.copyfile('upstream-base/constants.py', './constants.py.bak') #backup constants to wherever we're running setup from f = open("upstream-base/constants.py","w") #open the real constants.py which will be packaged f.writelines(constants_template) #write to file | 7ebdb11b84a058675ed00c860fbee72cdb86e487 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/635/7ebdb11b84a058675ed00c860fbee72cdb86e487/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13358,
13332,
2195,
1214,
67,
2854,
273,
1365,
1214,
397,
4016,
397,
2195,
1214,
22034,
481,
67,
2854,
273,
1365,
1214,
397,
4016,
397,
22034,
481,
8902,
23210,
67,
2854,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13358,
13332,
2195,
1214,
67,
2854,
273,
1365,
1214,
397,
4016,
397,
2195,
1214,
22034,
481,
67,
2854,
273,
1365,
1214,
397,
4016,
397,
22034,
481,
8902,
23210,
67,
2854,
273,
1... |
.. warning:: Calculations are done to double precision, and the output is a complex double element, no matter how big the precision of the input is. | def Ei(z): """ Return the value of the complex exponential integral Ei(z) at a complex number z. .. warning:: Calculations are done to double precision, and the output is a complex double element, no matter how big the precision of the input is. EXAMPLES:: sage: Ei(10) 2492.22897624 sage: Ei(I) 0.337403922901 + 2.51687939716*I sage: Ei(3+I) 7.823134676 + 6.09751978399*I The branch cut for this function is along the positive real axis:: sage: Ei(3 + 0.1*I) 9.91152770287 + 0.668898200718*I sage: Ei(3 - 0.1*I) 9.91152770287 + 5.61428710646*I ALGORITHM: Uses SciPy's special.exp1 function. """ import scipy.special, math return CDF(-scipy.special.exp1(-complex(z)) + complex(0,math.pi)) | bf0023bd20cc399afa45474b0ce1f89d2d98e135 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/bf0023bd20cc399afa45474b0ce1f89d2d98e135/transcendental.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
512,
77,
12,
94,
4672,
3536,
2000,
326,
460,
434,
326,
7233,
21774,
21423,
512,
77,
12,
94,
13,
622,
279,
7233,
1300,
998,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
512,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
512,
77,
12,
94,
4672,
3536,
2000,
326,
460,
434,
326,
7233,
21774,
21423,
512,
77,
12,
94,
13,
622,
279,
7233,
1300,
998,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
512,
7... | |
@testing.unsupported('mysql', 'FIXME: verify not fails_on') | @testing.fails_on('mysql') | def test_expiry(self): mapper(User, users) | b2504db4f72e64981f27b796fcfd50c3c07fd606 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/b2504db4f72e64981f27b796fcfd50c3c07fd606/naturalpks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22409,
12,
2890,
4672,
5815,
12,
1299,
16,
3677,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22409,
12,
2890,
4672,
5815,
12,
1299,
16,
3677,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Parses the text in the quick item entry widget in the toolbar. Creates the items depending on the command and adds it to the appropriate collection. Also parses the date/time info and sets the start/end time or the reminder time. | Parses the text in the quick item entry widget in the toolbar. Creates the items depending on the command and adds it to the appropriate collection. Also parses the date/time info and sets the start/end time or the reminder time. | def processQuickEntry(self, command): """ Parses the text in the quick item entry widget in the toolbar. Creates the items depending on the command and adds it to the appropriate collection. Also parses the date/time info and sets the start/end time or the reminder time. """ msgFlag = False eventFlag = False taskFlag = False # Default kind defaultKind = sidebar.filterClass # Search the text for "/" which indicates it is a quick item entry cmd_re = re.compile(r'/(?P<kind>([A-z]+))') cmd = cmd_re.match(command) if cmd is None: if defaultKind is not None: if defaultKind == pim.tasks.TaskStamp: taskFlag = True elif defaultKind == pim.mail.MailStamp: msgFlag = True elif defaultKind == pim.calendar.Calendar.EventStamp: eventFlag = True displayName = command while cmd is not None: kind = (cmd.group('kind')).lower() displayName = command[(cmd.end()):].strip() command = displayName # Set flags depending on its kind if kind in searchKinds: return False elif kind in (_(u'task'), _(u't')): taskFlag = True elif kind in (_(u'msg'), _(u'message'), _(u'm')): msgFlag = True elif kind in (_(u'event'), _(u'e')): eventFlag = True elif kind in (_(u'invite'), _(u'i')): eventFlag = True msgFlag = True elif kind in (_(u'request'), _(u'r')): taskFlag = True msgFlag = True elif kind not in (_(u'note'), _(u'n')): # if command is not 'note' then it is not a valid command. for eg: '/foo' return False cmd = cmd_re.match(displayName) | dd8513d99cebdf236d099ff8609b40c935a1fb19 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/dd8513d99cebdf236d099ff8609b40c935a1fb19/Main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
13663,
1622,
12,
2890,
16,
1296,
4672,
3536,
2280,
2420,
326,
977,
316,
326,
9549,
761,
1241,
3604,
316,
326,
12748,
18,
10210,
326,
1516,
8353,
603,
326,
1296,
471,
4831,
518,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
13663,
1622,
12,
2890,
16,
1296,
4672,
3536,
2280,
2420,
326,
977,
316,
326,
9549,
761,
1241,
3604,
316,
326,
12748,
18,
10210,
326,
1516,
8353,
603,
326,
1296,
471,
4831,
518,
358... |
try: story = open(filename).readlines() except IOError: raise IOError | story = open(filename).readlines() | def blosxom_entry_parser(filename, request): """ Open up a *.txt file and read its contents. The first line becomes the title of the entry. The other lines are the body of the entry. @param filename: A filename to extract data and metadata from @type filename: string @param request: A standard request object @type request: L{Pyblosxom.pyblosxom.Request} object @returns: A dict containing parsed data and meta data with the particular file (and plugin) @rtype: dict """ config = request.getConfiguration() entryData = {} try: story = open(filename).readlines() except IOError: raise IOError if len(story) > 0: entryData['title'] = story.pop(0).strip() # this handles properties of the entry that are between # the title and the body and start with a # while len(story) > 0: match = re.match(r'^#(\w+)\s+(.*)', story[0]) if match: story.pop(0) entryData[match.groups()[0]] = match.groups()[1].strip() else: break # Call the preformat function entryData['body'] = tools.run_callback('preformat', {'parser': (entryData.get('parser', '') or config.get('parser', 'plain')), 'story': story, 'request': request}, donefunc = lambda x:x != None, defaultfunc = lambda x: ''.join(x['story'])) # Call the postformat callbacks tools.run_callback('postformat', {'request': request, 'entry_data': entryData}) return entryData | a6adbe3b8f0f8676059bd800577f1434cf8e824d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/a6adbe3b8f0f8676059bd800577f1434cf8e824d/pyblosxom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
383,
30319,
362,
67,
4099,
67,
4288,
12,
3459,
16,
590,
4672,
3536,
3502,
731,
279,
380,
18,
5830,
585,
471,
855,
2097,
2939,
18,
225,
1021,
1122,
980,
12724,
326,
2077,
434,
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,
324,
383,
30319,
362,
67,
4099,
67,
4288,
12,
3459,
16,
590,
4672,
3536,
3502,
731,
279,
380,
18,
5830,
585,
471,
855,
2097,
2939,
18,
225,
1021,
1122,
980,
12724,
326,
2077,
434,
326,... |
import userpackages | try: import userpackages except ImportError: pass | def installPackages(self): """ installPackages() -> None Scheme through packages directory and initialize them all """ if self.configuration.packageDirectory: sys.path.append(self.configuration.packageDirectory) import packages | bb6eb7b6b1cda67adf270acdf7ca654eec540238 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/bb6eb7b6b1cda67adf270acdf7ca654eec540238/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
11425,
12,
2890,
4672,
3536,
3799,
11425,
1435,
317,
599,
10714,
3059,
5907,
1867,
471,
4046,
2182,
777,
3536,
309,
365,
18,
7025,
18,
5610,
2853,
30,
2589,
18,
803,
18,
6923,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
11425,
12,
2890,
4672,
3536,
3799,
11425,
1435,
317,
599,
10714,
3059,
5907,
1867,
471,
4046,
2182,
777,
3536,
309,
365,
18,
7025,
18,
5610,
2853,
30,
2589,
18,
803,
18,
6923,
12,
... |
Return '' if no cooked data available otherwise. Don't block. | Return b'' if no cooked data available otherwise. Don't block. | def read_very_lazy(self): """Return any data available in the cooked queue (very lazy). | 4ff2306a48ad184f76d4bd456b4caf600359b831 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/4ff2306a48ad184f76d4bd456b4caf600359b831/telnetlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
3242,
67,
15998,
12,
2890,
4672,
3536,
990,
1281,
501,
2319,
316,
326,
15860,
329,
2389,
261,
3242,
7962,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
3242,
67,
15998,
12,
2890,
4672,
3536,
990,
1281,
501,
2319,
316,
326,
15860,
329,
2389,
261,
3242,
7962,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
for args in exceptionList: expected = args[-1] try: exc = args[0] if len(args) == 2: raise exc else: raise exc(*args[1]) | for exc, args, expected in exceptionList: try: raise exc(*args) | def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e | d6d9d619b7a4c6e74547b9119fea0df07783ba71 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d6d9d619b7a4c6e74547b9119fea0df07783ba71/test_exceptions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
775,
30,
609,
12,
89,
11,
18601,
521,
89,
713,
41,
21,
6134,
1335,
1185,
16,
425,
30,
3296,
16532,
5509,
668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
2498,
12,
2890,
4672,
468,
1842,
716,
1520,
1677,
854,
5622,
2074,
775,
30,
609,
12,
89,
11,
18601,
521,
89,
713,
41,
21,
6134,
1335,
1185,
16,
425,
30,
3296,
16532,
5509,
668,
... |
self._stdout = _File() self._stderr = _File() | self._stdout = _file() self._stderr = _file() | def __init__(self, args=()): self.args = args self._process = None self._stdout = _File() self._stderr = _File() | 5703bad51d5788feb63b7d9cb69026f1bb9e37ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12327/5703bad51d5788feb63b7d9cb69026f1bb9e37ab/pymplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
833,
33,
1435,
4672,
365,
18,
1968,
273,
833,
365,
6315,
2567,
273,
599,
365,
6315,
10283,
273,
389,
812,
1435,
365,
6315,
11241,
273,
389,
812,
1435,
2,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
33,
1435,
4672,
365,
18,
1968,
273,
833,
365,
6315,
2567,
273,
599,
365,
6315,
10283,
273,
389,
812,
1435,
365,
6315,
11241,
273,
389,
812,
1435,
2,... |
if len(media_obj_list) == 1: | if len(media_list) == 1: | def update_rss(self, media_obj_list, rss_file): i =0 rss_item_list = [] if not os.path.exists(self.rss_dir): os.makedirs(self.rss_dir) if len(media_obj_list) == 1: sub_title = '(currently playing)' else: sub_title = '(playlist)' for media_obj in media_obj_list: media_size = media_obj.size media_link = self.channel.url + self.media_url_dir + media_obj.file_name media_description = '<table>' for key in media_obj.metadata.keys(): if media_obj.metadata[key] != '': media_description += '<tr><td>%s: </td><td><b>%s</b></td></tr>' % \ (key.capitalize(), media_obj.metadata[key]) media_description += '</table>' rss_item_list.append(PyRSS2Gen.RSSItem( title = media_obj.metadata['artist'] + ' : ' + media_obj.metadata['title'], link = media_link, description = media_description, enclosure = PyRSS2Gen.Enclosure(media_link, str(media_size), 'audio/mpeg'), guid = PyRSS2Gen.Guid(media_link), pubDate = datetime.datetime.now()) ) rss = PyRSS2Gen.RSS2(title = self.channel.name + ' ' + sub_title, link = self.channel.url, description = self.channel.description, lastBuildDate = datetime.datetime.now(), items = rss_item_list,) rss.write_xml(open(rss_file, "w")) | 787fef0709b19aa8df299b667ccf69a2ca01c4b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/787fef0709b19aa8df299b667ccf69a2ca01c4b6/deefuzz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
25151,
12,
2890,
16,
3539,
67,
2603,
67,
1098,
16,
18817,
67,
768,
4672,
277,
273,
20,
18817,
67,
1726,
67,
1098,
273,
5378,
309,
486,
1140,
18,
803,
18,
1808,
12,
2890,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
25151,
12,
2890,
16,
3539,
67,
2603,
67,
1098,
16,
18817,
67,
768,
4672,
277,
273,
20,
18817,
67,
1726,
67,
1098,
273,
5378,
309,
486,
1140,
18,
803,
18,
1808,
12,
2890,
18... |
nx = int(R * self.pixelsX) ny = int(R * self.pixelsY) | nx = int(round(R * self.pixelsX)) ny = int(round(R * self.pixelsY)) | def show(self, Xsize=600, Ysize=600): """return a pixbuf to shows the image in a Gtk window""" scaled_buf = None if Xsize > config.ImageWidth : config.ImageWidth = Xsize if Ysize > config.ImageHeight: config.ImageHeight = Ysize self.taille() R = min(float(Xsize) / self.pixelsX, float(Ysize) / self.pixelsY) if R < 1: nx = int(R * self.pixelsX) ny = int(R * self.pixelsY) else: nx = self.pixelsX ny = self.pixelsY | a00cb5733f2792d415d71ab962e652861d4abd01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12328/a00cb5733f2792d415d71ab962e652861d4abd01/imagizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
12,
2890,
16,
1139,
1467,
33,
28133,
16,
1624,
1467,
33,
28133,
4672,
3536,
2463,
279,
11871,
4385,
358,
17975,
326,
1316,
316,
279,
22132,
2742,
8395,
12304,
67,
4385,
273,
599,
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,
2405,
12,
2890,
16,
1139,
1467,
33,
28133,
16,
1624,
1467,
33,
28133,
4672,
3536,
2463,
279,
11871,
4385,
358,
17975,
326,
1316,
316,
279,
22132,
2742,
8395,
12304,
67,
4385,
273,
599,
3... |
print 'subtotal despues: ',subtot print 'total despues: ',tot print 'avg despues: ',prom print 'qda despues:',q_des | def compute_nc_compra(self, cr, uid, ids, scl_obj, q_mov,tot,prom,q_des): subtot = 0.0 print 'q mov: ',q_mov print 'qda antes: ',q_des print 'subtotal antes: ',subtot print 'total antes: ',tot print 'avg antes: ',prom if scl_obj.parent_id and scl_obj.parent_id.invoice_price_unit: cost_pad = scl_obj.parent_id.invoice_price_unit else: print 'PADRE SIN PRECIO UNITARIOOOO' cost_pad = 0.0 print 'precio unitario del padre:',cost_pad q_des-=q_mov print 'realizando calculo nc compra:' subtot = cost_pad*q_mov tot -= subtot if q_des > 0: prom = tot/q_des else: prom = 0 print 'subtotal despues: ',subtot print 'total despues: ',tot print 'avg despues: ',prom print 'qda despues:',q_des res = (q_des,subtot,tot,prom) return res | 62ca858ba796453e95db5d16001d237fb203c2e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/62ca858ba796453e95db5d16001d237fb203c2e9/stock_card.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
67,
14202,
67,
2919,
354,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
31648,
67,
2603,
16,
1043,
67,
81,
1527,
16,
3307,
16,
17401,
16,
85,
67,
5489,
4672,
720,
3307,
273,
374,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
67,
14202,
67,
2919,
354,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
31648,
67,
2603,
16,
1043,
67,
81,
1527,
16,
3307,
16,
17401,
16,
85,
67,
5489,
4672,
720,
3307,
273,
374,... | |
def update_ids(xmldoc, connection, verbose = False): | def update_ids(connection, verbose = False): | def update_ids(xmldoc, connection, verbose = False): """ For internal use only. """ table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100 * i / len(table_elems)), tbl.applyKeyMapping() if verbose: print >>sys.stderr, "updating IDs: 100%" # reset ID mapping for next document dbtables.idmap_reset(connection) | 203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
1089,
67,
2232,
12,
4071,
16,
3988,
273,
1083,
4672,
3536,
2457,
2713,
999,
1338,
18,
3536,
1014,
67,
292,
7424,
273,
2025,
2434,
18,
588,
3471,
10401,
12,
80,
360,
355,
91,
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,
225,
1652,
1089,
67,
2232,
12,
4071,
16,
3988,
273,
1083,
4672,
3536,
2457,
2713,
999,
1338,
18,
3536,
1014,
67,
292,
7424,
273,
2025,
2434,
18,
588,
3471,
10401,
12,
80,
360,
355,
91,
18,
... |
debug(" domain %s is in user block-list", domain) | _debug(" domain %s is in user block-list", domain) | def domain_return_ok(self, domain, request): # Liberal check of. This is here as an optimization to avoid # having to load lots of MSIE cookie files unless necessary. req_host, erhn = eff_request_host(request) if not req_host.startswith("."): req_host = "."+req_host if not erhn.startswith("."): erhn = "."+erhn if not (req_host.endswith(domain) or erhn.endswith(domain)): #debug(" request domain %s does not match cookie domain %s", # req_host, domain) return False | e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e3485b205e7bc77f437c4e5fc2d8b00eefb7fc77/cookielib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
67,
2463,
67,
601,
12,
2890,
16,
2461,
16,
590,
4672,
468,
10560,
11612,
866,
434,
18,
225,
1220,
353,
2674,
487,
392,
14850,
358,
4543,
468,
7999,
358,
1262,
328,
6968,
434,
490... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2461,
67,
2463,
67,
601,
12,
2890,
16,
2461,
16,
590,
4672,
468,
10560,
11612,
866,
434,
18,
225,
1220,
353,
2674,
487,
392,
14850,
358,
4543,
468,
7999,
358,
1262,
328,
6968,
434,
490... |
if xlib_props and ( _xlib_atom('_NET_WM_STATE_FULLSCREEN') in xlib_props.value or ( _xlib_atom('_NET_WM_STATE_MAXIMIZED_HORZ') in xlib_props.value and _xlib_atom('_NET_WM_STATE_MAXIMIZED_VERT') in xlib_props.value ) ): | if xlib_props and ( _xlib_atom('_NET_WM_STATE_FULLSCREEN') in xlib_props.value or ( state & gtk.gdk.WINDOW_STATE_MAXIMIZED and not state & gtk.gdk.WINDOW_STATE_FULLSCREEN and (_xlib_atom('_NET_WM_STATE_MAXIMIZED_HORZ') in xlib_props.value and _xlib_atom('_NET_WM_STATE_MAXIMIZED_VERT') in xlib_props.value) ) ): | def bounds_chk(self, jitter=None, state=None): if state is not None and self.get_state() & state: return True xlib_props = self._xlib_win.get_property( _xlib_atom('_NET_WM_STATE'), X.AnyPropertyType, 0, 100 ) if xlib_props and ( _xlib_atom('_NET_WM_STATE_FULLSCREEN') in xlib_props.value or ( _xlib_atom('_NET_WM_STATE_MAXIMIZED_HORZ') in xlib_props.value and _xlib_atom('_NET_WM_STATE_MAXIMIZED_VERT') in xlib_props.value ) ): return True if jitter is not None: screen = self.get_screen() if max(it.imap(abs, it.imap( op.sub, self.get_size(), (screen.get_width(), screen.get_height()) ))) <= jitter: return True return False | 4481a3fd5a9f5e8f825d7e8509813a3ff1531ca7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11594/4481a3fd5a9f5e8f825d7e8509813a3ff1531ca7/wm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4972,
67,
27038,
12,
2890,
16,
24519,
33,
7036,
16,
919,
33,
7036,
4672,
309,
919,
353,
486,
599,
471,
365,
18,
588,
67,
2019,
1435,
473,
919,
30,
327,
1053,
619,
2941,
67,
9693,
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,
4972,
67,
27038,
12,
2890,
16,
24519,
33,
7036,
16,
919,
33,
7036,
4672,
309,
919,
353,
486,
599,
471,
365,
18,
588,
67,
2019,
1435,
473,
919,
30,
327,
1053,
619,
2941,
67,
9693,
273... |
This chapter presents a treament of the ideas behind our charting | This chapter presents a treatment of the ideas behind our charting | def checkMood(moodName): return (moodName in ('happy','sad','ok')) | 480ddc7ee60644c7eb01e84635ac95a989b25e42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/480ddc7ee60644c7eb01e84635ac95a989b25e42/ch2_graphics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
49,
4773,
12,
81,
4773,
461,
4672,
327,
261,
81,
4773,
461,
316,
7707,
76,
438,
2074,
17023,
87,
361,
17023,
601,
26112,
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,
866,
49,
4773,
12,
81,
4773,
461,
4672,
327,
261,
81,
4773,
461,
316,
7707,
76,
438,
2074,
17023,
87,
361,
17023,
601,
26112,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if level > 3: output('<TD COLSPAN="%s"></TD>' % level) elif level > 1: output('<TD></TD>' * level) | if level > 2: output('<TD COLSPAN="%s"></TD>' % level) elif level > 0: output('<TD></TD>' * level) | def tpRenderTABLE(self, root_url, url, state, substate, data, colspan, section, md, treeData, level=0, args=None): have_arg=args.has_key try: items=self.tpValues() except: items=None if not items and have_arg('leaves'): items=1 tpUrl=self.tpURL() url = (url and ('%s/%s' % (url, tpUrl))) or tpUrl treeData['tree-item-url']=url treeData['tree-level']=level treeData['tree-item-expanded']=0 try: id=self.tpId() except: id=None if id is None: try: id=self._p_oid except: id=None if id is None: id=pyid(self) exp=0 sub=None output=data.append # Add prefix output('<TR>\n') # Add +/- icon if items: if level: if level > 3: output( '<TD COLSPAN="%s"></TD>' % (level-1)) elif level > 1: output('<TD></TD>' * (level-1)) output('<TD WIDTH="16"></TD>\n') output('<TD WIDTH="16" VALIGN="TOP">') for i in range(len(substate)): sub=substate[i] if sub[0]==id: exp=i+1 break if exp: treeData['tree-item-expanded']=1 del substate[exp-1] output('<A HREF="%s?tree-state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoMinus)) substate.append(sub) else: substate.append([id]) output('<A HREF="%s?tree-state=%s">%s</A>' % (root_url,quote(str(state)[1:-1]+','), icoPlus)) del substate[-1] output('</TD>\n') else: if level > 3: output('<TD COLSPAN="%s"></TD>' % level) elif level > 1: output('<TD></TD>' * level) output('<TD WIDTH="16"></TD>\n') # add item text dataspan=colspan-level output('<TD%s VALIGN="TOP">' % (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or '')) output(section(self, md)) output('</TD>\n</TR>\n') if exp: level=level+1 dataspan=colspan-level if level > 3: h='<TD COLSPAN="%s"></TD>' % (level-1) elif level > 1: h='<TD></TD>' * (level-1) else: h='' if have_arg('header'): if md.has_key(args['header']): output(md.getitem(args['header'],0)( self, md, standard_html_header=( '<TR>%s<TD WIDTH="16"></TD>' '<TD%s VALIGN="TOP">' % (h, (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''))), standard_html_footer='</TD></TR>', )) if items==1: # leaves treeData['-tree-substate-']=sub treeData['tree-level']=level md._push(treeData) output(md.getitem(args['leaves'],0)( self,md, standard_html_header=( '<TR>%s<TD WIDTH="16"></TD>' '<TD%s VALIGN="TOP">' % (h, (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''))), standard_html_footer='</TD></TR>', )) md._pop(1) elif have_arg('expand'): treeData['-tree-substate-']=sub treeData['tree-level']=level md._push(treeData) output(md.getitem(args['expand'],0)(self,md)) md._pop(1) else: __traceback_info__=sub, args, state, substate for item in items: if len(sub)==1: sub.append([]) data=tpRenderTABLE(item, root_url,url,state,sub[1],data, colspan, section, md, treeData, level, args) if not sub[1]: del sub[1] if have_arg('footer'): if md.has_key(args['footer']): output(md.getitem(args['footer'],0)( self, md, standard_html_header=( '<TR>%s<TD WIDTH="16"></TD>' '<TD%s VALIGN="TOP">' % (h, (dataspan > 1 and (' COLSPAN="%s"' % dataspan) or ''))), standard_html_footer='</TD></TR>', )) return data | 3ccf0135f7d39206314b0f01e08ce87179009a79 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3ccf0135f7d39206314b0f01e08ce87179009a79/TreeTag.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8071,
3420,
7775,
12,
2890,
16,
1365,
67,
718,
16,
880,
16,
919,
16,
720,
2019,
16,
501,
16,
20856,
16,
2442,
16,
3481,
16,
2151,
751,
16,
1801,
33,
20,
16,
833,
33,
7036,
4672,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8071,
3420,
7775,
12,
2890,
16,
1365,
67,
718,
16,
880,
16,
919,
16,
720,
2019,
16,
501,
16,
20856,
16,
2442,
16,
3481,
16,
2151,
751,
16,
1801,
33,
20,
16,
833,
33,
7036,
4672,
22... |
finally: fp.close() | def main(): usage = "profile.py [-o output_file_path] [-s sort] scriptfile [arg] ..." parser = OptionParser(usage=usage) parser.allow_interspersed_args = False parser.add_option('-o', '--outfile', dest="outfile", help="Save stats to <outfile>", default=None) parser.add_option('-s', '--sort', dest="sort", help="Sort order when printing to stdout, based on pstats.Stats class", default=-1) if not sys.argv[1:]: parser.print_usage() sys.exit(2) (options, args) = parser.parse_args() if (len(args) > 0): sys.argv[:] = args sys.path.insert(0, os.path.dirname(sys.argv[0])) fp = open(sys.argv[0]) try: script = fp.read() finally: fp.close() run('exec(%r)' % script, options.outfile, options.sort) else: parser.print_usage() return parser | 9b14fce4a995e27520dbe92e462e584970061724 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/9b14fce4a995e27520dbe92e462e584970061724/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
4084,
273,
315,
5040,
18,
2074,
23059,
83,
876,
67,
768,
67,
803,
65,
23059,
87,
1524,
65,
2728,
768,
306,
3175,
65,
18483,
2082,
273,
18862,
12,
9167,
33,
9167,
13,
2082,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
4084,
273,
315,
5040,
18,
2074,
23059,
83,
876,
67,
768,
67,
803,
65,
23059,
87,
1524,
65,
2728,
768,
306,
3175,
65,
18483,
2082,
273,
18862,
12,
9167,
33,
9167,
13,
2082,... | |
cachefile = open(self.WEATHERCACHE,'r') newlist = map(string.rstrip, cachefile.readlines()) temperature,icon = newlist cachefile.close() | try: cachefile = open(self.WEATHERCACHE,'r') newlist = map(string.rstrip, cachefile.readlines()) temperature,icon = newlist cachefile.close() except IOError: print 'WEATHER: error reading cache. Using fake weather.' return '0', 'sun.png' | def checkweather(self): # We don't want to do this every 30 seconds, so we need # to cache the date somewhere. # # First check the age of the cache. # if (os.path.isfile(self.WEATHERCACHE) == 0 or \ (abs(time.time() - os.path.getmtime(self.WEATHERCACHE)) > 3600)): weather = pymetar.MetarReport() try: weather.fetchMetarReport(self.METARCODE) if (weather.getTemperatureCelsius()): temperature = '%2d' % weather.getTemperatureCelsius() else: temperature = '0' # Make it a string to match above. if weather.getPixmap(): icon = weather.getPixmap() + '.png' else: icon = 'sun.png' cachefile = open(self.WEATHERCACHE,'w+') cachefile.write(temperature + '\n') cachefile.write(icon + '\n') cachefile.close() except: # HTTP Problems, use cache. Wait till next try. cachefile = open(self.WEATHERCACHE,'r') newlist = map(string.rstrip, cachefile.readlines()) temperature,icon = newlist cachefile.close() | 9a73920f2cfc6eb9d6c0f6fa42e0ead3b7d1a1e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/9a73920f2cfc6eb9d6c0f6fa42e0ead3b7d1a1e8/idlebar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
1814,
4806,
12,
2890,
4672,
468,
1660,
2727,
1404,
2545,
358,
741,
333,
3614,
5196,
3974,
16,
1427,
732,
1608,
468,
358,
1247,
326,
1509,
22234,
18,
468,
468,
5783,
866,
326,
9388,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1814,
4806,
12,
2890,
4672,
468,
1660,
2727,
1404,
2545,
358,
741,
333,
3614,
5196,
3974,
16,
1427,
732,
1608,
468,
358,
1247,
326,
1509,
22234,
18,
468,
468,
5783,
866,
326,
9388,
... |
pass | seek["time"] = _("Untimed") | def __writeSavedSeeks (self, seekNumber): """ Writes saved seek strings for both the Seek Panel and the Challenge Panel """ min, gain, variant, ratingRange, color, rated, manual = self.__getSeekEditorDialogValues() isUntimedGame = True if min is 0 else False radioText = self.__getNameOfTimeControl(min, gain) self.savedSeekRadioTexts[seekNumber-1] = radioText self.__writeSeekRadioLabels() seek = [] challenge = [] if isUntimedGame: pass elif gain > 0: seek.append("%d min + %d sec/move" % (min, gain)) challenge.append("%d min + %d sec/move" % (min, gain)) else: seek.append("%d min" % (min)) challenge.append("%d min" % (min)) if variant != NORMALCHESS and not isUntimedGame: seek.append("%s" % variants[variant].name) challenge.append("%s" % variants[variant].name) if ratingRange[0] > 0: ratingText = "%d" % ratingRange[0] if ratingRange[1] == 9999: ratingText += "↑" else: ratingText += "-%d" % ratingRange[1] seek.append(ratingText) elif ratingRange[1] != 9999: seek.append("%d↓" % ratingRange[1]) if color == WHITE: seek.append(_("White")) challenge.append(_("White")) elif color == BLACK: seek.append(_("Black")) challenge.append(_("Black")) if rated and not isUntimedGame: seek.append(_("Rated")) challenge.append(_("Rated")) if manual: seek.append(_("Manual")) seekText = ", ".join(seek) challengeText = ", ".join(challenge) if seekNumber == 1: self.widgets["seek1RadioLabel"].set_text(seekText) self.widgets["challenge1RadioLabel"].set_text(challengeText) elif seekNumber == 2: self.widgets["seek2RadioLabel"].set_text(seekText) self.widgets["challenge2RadioLabel"].set_text(challengeText) else: self.widgets["seek3RadioLabel"].set_text(seekText) self.widgets["challenge3RadioLabel"].set_text(challengeText) | d29f291e2b68981e77b9413248abc5f4e586b518 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/d29f291e2b68981e77b9413248abc5f4e586b518/ICLounge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2626,
16776,
16134,
87,
261,
2890,
16,
6520,
1854,
4672,
3536,
30053,
5198,
6520,
2064,
364,
3937,
326,
15363,
23641,
471,
326,
1680,
8525,
23641,
3536,
1131,
16,
17527,
16,
5437,
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,
1001,
2626,
16776,
16134,
87,
261,
2890,
16,
6520,
1854,
4672,
3536,
30053,
5198,
6520,
2064,
364,
3937,
326,
15363,
23641,
471,
326,
1680,
8525,
23641,
3536,
1131,
16,
17527,
16,
5437,
16... |
fontSize = 12. | fontSize = 12 defns="ttfn t1fn ttf t1f testCp1252 enc senc ts utext fontSize ttf.face ttf.face.charWidths ttf.face.defaultWidth t1f.widths t1f.encName t1f.substitutionFonts _fonts" rcv = getrc(defns) | def test_instanceStringWidth(self): from reportlab.pdfbase.pdfmetrics import registerFont, _py_getFont from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFont(ttfn) t1f = _py_getFont(t1fn) testCp1252 = 'copyright %s trademark %s registered %s ReportLab! Ol%s!' % (chr(169), chr(153),chr(174), chr(0xe9)) enc='cp1252' senc = 'utf8' ts = 'ABCDEF\xce\x91\xce\xb2G' utext = 'ABCDEF\xce\x91\xce\xb2G'.decode(senc) fontSize = 12. def tfunc(f,ts,fontSize,enc): w1 = f.stringWidth(ts,fontSize,enc) w2 = f._py_stringWidth(ts,fontSize,enc) assert abs(w1-w2)<1e-10,"f(%r).stringWidthU(%r,%s,%r)-->%r != f._py_stringWidth(...)-->%r" % (f,ts,fontSize,enc,w1,w2) tfunc(t1f,testCp1252,fontSize,enc) tfunc(t1f,ts,fontSize,senc) tfunc(t1f,utext,fontSize,senc) tfunc(ttf,ts,fontSize,senc) tfunc(ttf,testCp1252,fontSize,enc) tfunc(ttf,utext,fontSize,senc) | ff2e54029ea3fa1ebe70a04b934bf428696c1312 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/ff2e54029ea3fa1ebe70a04b934bf428696c1312/test_rl_accel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1336,
780,
2384,
12,
2890,
4672,
628,
2605,
7411,
18,
7699,
1969,
18,
7699,
9597,
1930,
1744,
5711,
16,
389,
2074,
67,
588,
5711,
628,
2605,
7411,
18,
7699,
1969,
18,
748,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1336,
780,
2384,
12,
2890,
4672,
628,
2605,
7411,
18,
7699,
1969,
18,
7699,
9597,
1930,
1744,
5711,
16,
389,
2074,
67,
588,
5711,
628,
2605,
7411,
18,
7699,
1969,
18,
748,
22... |
tmp=open(tmpname,'wb') | tmp=DamnOpenFile(tmpname,'wb') | def run(self): for module in self.modules: if not module['about'].has_key('url'): self.postEvent(module,'cannot') elif module['about']['url'] not in self.downloaded: self.downloaded.append(module['about']['url']) http=urllib2.urlopen(module['about']['url']) checkingfor=[module] for module2 in self.modules: if module2['about'].has_key('url'): if module2['about']['url']==module['about']['url'] and module2 not in checkingfor: checkingfor.append(module2) match=False html='' for i in http: html+=i for module2 in checkingfor: res=re.search('<tt>'+re.escape(module2['name'])+'</tt>.*?Latest\s+version\s*:\s*<tt>([^<>]+)</tt>.*?Available\s+at\s*:\s*<a href="([^"]+)"',html,re.IGNORECASE) if not res: self.postEvent(module2,'error') else: vers=DamnHtmlEntities(res.group(1)) if vers!=DamnUnicode(module2['version']): url=DamnHtmlEntities(res.group(2)).strip() if not REGEX_HTTP_GENERIC.match(url): self.postEvent(module2,'error') else: try: http=urllib2.urlopen(url) tmpname=DamnTempFile() tmp=open(tmpname,'wb') for i in http: tmp.write(i) tmp.close() http.close() DamnInstallModule(tmpname) self.postEvent(module2,(vers,url)) except: self.postEvent(module2,'error') else: self.postEvent(module2,'uptodate') | eb32c3f0350ac5e4cc4ce63c81f04bfa758a966a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/eb32c3f0350ac5e4cc4ce63c81f04bfa758a966a/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
364,
1605,
316,
365,
18,
6400,
30,
309,
486,
1605,
3292,
21071,
29489,
5332,
67,
856,
2668,
718,
11,
4672,
365,
18,
2767,
1133,
12,
2978,
11189,
12892,
6134,
1327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
364,
1605,
316,
365,
18,
6400,
30,
309,
486,
1605,
3292,
21071,
29489,
5332,
67,
856,
2668,
718,
11,
4672,
365,
18,
2767,
1133,
12,
2978,
11189,
12892,
6134,
1327,
... |
if not run_tpl: | if not run_tpl and not '_run.py' in tpl_name: | def create_workflow(self): """ !!! Note: 1 level parent=master assumed !!! """ rdict = dict(request.params) for x in ['RequestID','Template','Subrequests']: if not x in rdict: return S_ERROR('Required parameter %s is not specified' % x) try: id = long(rdict['RequestID']) tpl_name = str(request.params['Template']) sstr = str(request.params['Subrequests']) if sstr: slist = [long(x) for x in sstr.split(',')] else: slist = [] sdict = dict.fromkeys(slist,None) del rdict['RequestID'] del rdict['Template'] del rdict['Subrequests'] except Exception, e: return S_ERROR('Wrong parameters (%s)' % str(e)) | a13b743e378a696dcffe076cd201c2c77a323148 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12767/a13b743e378a696dcffe076cd201c2c77a323148/ProductionRequest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
13815,
12,
2890,
4672,
3536,
401,
8548,
3609,
30,
404,
1801,
982,
33,
7525,
12034,
401,
8548,
3536,
436,
1576,
273,
2065,
12,
2293,
18,
2010,
13,
364,
619,
316,
10228,
691,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
13815,
12,
2890,
4672,
3536,
401,
8548,
3609,
30,
404,
1801,
982,
33,
7525,
12034,
401,
8548,
3536,
436,
1576,
273,
2065,
12,
2293,
18,
2010,
13,
364,
619,
316,
10228,
691,
73... |
if self.SamplesperPixel > 1: if self.BitsAllocated == 8: arr = arr.reshape(self.SamplesperPixel, self.Rows, self.Columns) else: raise NotImplementedError, "This code only handles SamplesPerPixel > 1 if Bits Allocated = 8" else: arr = arr.reshape(self.Rows, self.Columns) | arr = arr.reshape(self.Rows, self.Columns) | def _PixelDataNumpy(self): """Return a NumPy array of the pixel data. | 91796b5ef5488a17cb13a70c62aace0a6daa4ab3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5900/91796b5ef5488a17cb13a70c62aace0a6daa4ab3/dataset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9037,
751,
2578,
2074,
12,
2890,
4672,
3536,
990,
279,
6805,
9413,
526,
434,
326,
4957,
501,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9037,
751,
2578,
2074,
12,
2890,
4672,
3536,
990,
279,
6805,
9413,
526,
434,
326,
4957,
501,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
allDayCanvas.widget.OnSelectItem(canvasItem) | allDayCanvas.widget.OnSelectItem(canvasItem.GetItem()) | def SelectItem(self): """ Select the item in chandler (summary view or calendar view selection) """ #if not in the Calendar view (select in the summary view) #check the button state button = App_ns.ApplicationBarEventButton buttonState = button.widget.IsToggled() if not buttonState: App_ns.summary.select(self.item) #if in the Calendar view (select by clicking on the TimedCanvasItem) else: timedCanvas = App_ns.TimedEventsCanvas allDayCanvas = App_ns.AllDayEventsCanvas for canvasItem in reversed(allDayCanvas.widget.canvasItemList): if canvasItem._item == self.item: allDayCanvas.widget.OnSelectItem(canvasItem) break for canvasItem in reversed(timedCanvas.widget.canvasItemList): if canvasItem._item == self.item: timedCanvas.widget.OnSelectItem(canvasItem) break | 2b893744bbbe69399ade75cf67fc82d5bda2d9a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/2b893744bbbe69399ade75cf67fc82d5bda2d9a8/QAUITestAppLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6766,
1180,
12,
2890,
4672,
3536,
6766,
326,
761,
316,
462,
464,
749,
261,
7687,
1476,
578,
5686,
1476,
4421,
13,
3536,
468,
430,
486,
316,
326,
5542,
1476,
261,
4025,
316,
326,
4916,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6766,
1180,
12,
2890,
4672,
3536,
6766,
326,
761,
316,
462,
464,
749,
261,
7687,
1476,
578,
5686,
1476,
4421,
13,
3536,
468,
430,
486,
316,
326,
5542,
1476,
261,
4025,
316,
326,
4916,
... |
str(item[i+21].contents[0]).strip(), year, | str(item[i+21].contents[0]).strip().replace(',', '.'), year.replace('--', '-'), | def grades_update(output): from BeautifulSoup import BeautifulSoup try: soup = BeautifulSoup(output) grades = [] i = 0 item = soup.findAll('table')[13].findAll('td') length_all_td = len(item) semesters = soup.findAll('table')[13].findAll('td', 'groupHeader') lessons = soup.findAll('table')[13].findAll('td', 'topBorderLight') while i < length_all_td: item0 = item[i] if item0 in semesters: grades.append([str(item0.contents[0])]) if item0 in lessons: year = str(item[i+6].contents[0].i.contents[0]).strip() year = year[:10] + year[-9:] if year == '--': year = '-' grades.append([ str(item0.contents[0]).strip(), str(item[i+1].contents[0]).strip(), str(item[i+2].contents[0]).strip(), str(item[i+3].contents[0]).strip(), str(item[i+4].contents[0]).strip(), str(item[i+5].span.contents[0]).strip(), year, ]) try: if item[i+9].contents[1][-3:] == '(Θ)' or item[i+9].contents[1][-3:] == '(Ε)': year = str(item[i+14].contents[0].i.contents[0]).strip() year = year[:10] + year[-9:] grades.append([ str(item[i+9].contents[1]).strip(), '', str(item[i+10].i.contents[0]).strip(), str(item[i+11].contents[0]).strip(), str(item[i+12].contents[0]).strip(), str(item[i+13].contents[0]).strip(), year, ]) year = str(item[i+22].contents[0].i.contents[0]) year = year[:10] + year[-9:] grades.append([ str(item[i+17].contents[i]).strip(), '', str(item[i+18].i.contents[0]).strip(), str(item[i+19].contents[0]).strip(), str(item[i+20].contents[0]).strip(), str(item[i+21].contents[0]).strip(), year, ]) i += 11 except: pass i += 6 try: if item0.contents[0][:6] == 'Σύνολα': grades.append([ str(item0.b.contents[0]), str(item[i+1].contents[1].contents[0]).strip(), str(item[i+1].contents[3].contents[0]).strip(), str(item[i+1].contents[5].contents[0]).strip(), str(item[i+1].contents[7].contents[0]).strip(), str(i), ]) i += 1 except: pass i += 1 general = soup.findAll('table')[13].findAll('tr', 'subHeaderBack')[-1] grades.append([ str(general.b.contents[2][-2:]), str(general.contents[1].span.contents[0]), str(general.contents[1].b.contents[3].contents[0]), str(general.contents[1].b.contents[5].contents[0]), str(general.contents[1].b.contents[7].contents[0]), ]) return grades except: return None | cbe1c80fa5cf7f026b4dc17b3d9680f2014a71b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11011/cbe1c80fa5cf7f026b4dc17b3d9680f2014a71b9/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24396,
67,
2725,
12,
2844,
4672,
628,
28132,
1930,
28132,
225,
775,
30,
15418,
273,
28132,
12,
2844,
13,
24396,
273,
5378,
277,
273,
374,
761,
273,
15418,
18,
4720,
1595,
2668,
2121,
613... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24396,
67,
2725,
12,
2844,
4672,
628,
28132,
1930,
28132,
225,
775,
30,
15418,
273,
28132,
12,
2844,
13,
24396,
273,
5378,
277,
273,
374,
761,
273,
15418,
18,
4720,
1595,
2668,
2121,
613... |
signal_handler = signal.signal(signal.SIGINT, signal.SIG_IGN) kernel32 = ctypes.windll.kernel32 kernel32.GenerateConsoleCtrlEvent(0, 0) signal.signal(signal.SIGINT, signal_handler) | self._set_handler_to_ignore_one_sigint() ctypes.windll.kernel32.GenerateConsoleCtrlEvent(0, 0) def _set_handler_to_ignore_one_sigint(self): orig_handler = signal.getsignal(signal.SIGINT) signal.signal(signal.SIGINT, lambda signum, frame: signal.signal(signal.SIGINT, orig_handler)) | def send_terminate(self, signal_name): if os.name != 'nt': signal_to_send = getattr(signal, signal_name) pid = self._process.pid os.kill(pid, signal_to_send) else: signal_handler = signal.signal(signal.SIGINT, signal.SIG_IGN) kernel32 = ctypes.windll.kernel32 kernel32.GenerateConsoleCtrlEvent(0, 0) signal.signal(signal.SIGINT, signal_handler) | 061ac3811e5949c7d26964da4c3c63aa3eccfb59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/061ac3811e5949c7d26964da4c3c63aa3eccfb59/ProcessManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
30017,
12,
2890,
16,
4277,
67,
529,
4672,
309,
1140,
18,
529,
480,
296,
496,
4278,
4277,
67,
869,
67,
4661,
273,
3869,
12,
10420,
16,
4277,
67,
529,
13,
4231,
273,
365,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
30017,
12,
2890,
16,
4277,
67,
529,
4672,
309,
1140,
18,
529,
480,
296,
496,
4278,
4277,
67,
869,
67,
4661,
273,
3869,
12,
10420,
16,
4277,
67,
529,
13,
4231,
273,
365,
631... |
params['TransactionAmount.Value'] = str(transactionAmount) | params['TransactionAmount.Amount'] = str(transactionAmount) | def pay(self, transactionAmount, senderTokenId, chargeFeeTo="Recipient", callerReference=None, senderReference=None, recipientReference=None, senderDescription=None, recipientDescription=None, callerDescription=None, metadata=None, transactionDate=None, reserve=False): """ Make a payment transaction. You must specify the amount. This can also perform a Reserve request if 'reserve' is set to True. """ params = {} params['SenderTokenId'] = senderTokenId params['TransactionAmount.Value'] = str(transactionAmount) params['TransactionAmount.CurrencyCode'] = "USD" params['ChargeFeeTo'] = chargeFeeTo #params['RecipientTokenId'] = boto.config.get("FPS", "recipient_token") #params['CallerTokenId'] = boto.config.get("FPS", "caller_token") if(transactionDate != None): params['TransactionDate'] = transactionDate if(senderReference != None): params['SenderReference'] = senderReference if(recipientReference != None): params['RecipientReference'] = recipientReference if(senderDescription != None): params['SenderDescription'] = senderDescription if(recipientDescription != None): params['RecipientDescription'] = recipientDescription if(callerDescription != None): params['CallerDescription'] = callerDescription if(metadata != None): params['MetaData'] = metadata if(transactionDate != None): params['TransactionDate'] = transactionDate if(callerReference == None): callerReference = uuid.uuid4() params['CallerReference'] = callerReference if reserve: response = self.make_request("Reserve", params) else: response = self.make_request("Pay", params) body = response.read() if(response.status == 200): rs = ResultSet() h = handler.XmlHandler(rs, self) xml.sax.parseString(body, h) return rs else: raise FPSResponseError(response.status, response.reason, body) | 7449e3919d9838d9939fdcd107f3c93b047e7389 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1098/7449e3919d9838d9939fdcd107f3c93b047e7389/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8843,
12,
2890,
16,
2492,
6275,
16,
5793,
1345,
548,
16,
13765,
14667,
774,
1546,
18241,
3113,
4894,
2404,
33,
7036,
16,
5793,
2404,
33,
7036,
16,
8027,
2404,
33,
7036,
16,
5793,
3291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8843,
12,
2890,
16,
2492,
6275,
16,
5793,
1345,
548,
16,
13765,
14667,
774,
1546,
18241,
3113,
4894,
2404,
33,
7036,
16,
5793,
2404,
33,
7036,
16,
8027,
2404,
33,
7036,
16,
5793,
3291,
... |
current_hunk = binhunk(changed[bfile[2:]][1]) | current_hunk = binhunk(changed[bfile[2:]]) | def scangitpatch(fp, firstline): '''git patches can modify a file, then copy that file to a new file, but expect the source to be the unmodified form. So we scan the patch looking for that case so we can do the copies ahead of time.''' | 545f4d8d558fec3c96fc1546200fe77944791dac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/545f4d8d558fec3c96fc1546200fe77944791dac/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
888,
539,
305,
2272,
12,
7944,
16,
1122,
1369,
4672,
9163,
6845,
16482,
848,
5612,
279,
585,
16,
1508,
1610,
716,
585,
358,
279,
394,
585,
16,
1496,
4489,
326,
1084,
358,
506,
326,
304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
888,
539,
305,
2272,
12,
7944,
16,
1122,
1369,
4672,
9163,
6845,
16482,
848,
5612,
279,
585,
16,
1508,
1610,
716,
585,
358,
279,
394,
585,
16,
1496,
4489,
326,
1084,
358,
506,
326,
304... |
def __reorder(self,nid,path,neworder): | def __reorder(self, sender, nid,path,neworder): | def __reorder(self,nid,path,neworder): actual_nid = self.tree.get_node_for_path(path) if nid == actual_nid: if path: rowref = self.get_iter(path) else: rowref = None self.rows_reordered(path,rowref,neworder) else: raise Exception('path/node mismatch in reorder') | 5769cda57bd6dd56cde8eef409018822db4ccf9d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/5769cda57bd6dd56cde8eef409018822db4ccf9d/treemodel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
266,
1019,
12,
2890,
16,
5793,
16,
19416,
16,
803,
16,
2704,
1019,
4672,
3214,
67,
31030,
273,
365,
18,
3413,
18,
588,
67,
2159,
67,
1884,
67,
803,
12,
803,
13,
309,
19416,
422... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
266,
1019,
12,
2890,
16,
5793,
16,
19416,
16,
803,
16,
2704,
1019,
4672,
3214,
67,
31030,
273,
365,
18,
3413,
18,
588,
67,
2159,
67,
1884,
67,
803,
12,
803,
13,
309,
19416,
422... |
if address.state: query += ' ' + address.state.name | if address.subdivision: query += ' ' + address.subdivision.name | def get_google_maps_url(self, cursor, user, ids, name, arg, context=None): if context is None: context = {} res = {} lang = context.get('language', 'en_US')[:2] for address in self.browse(cursor, user, ids, context=context): query = '' if address.street: query += ' ' + address.street if address.streetbis: query += ' ' + address.streetbis if address.zip: query += ' ' + address.zip if address.city: query += ' ' + address.city if address.country: query += ' ' + address.country.name if address.state: query += ' ' + address.state.name if query.strip(): res[address.id] = 'http://maps.google.com/maps?hl=%s&q=%s' % \ (lang, urllib.quote(query.strip().encode('utf-8'))) else: res[address.id] = '' return res | 56abc587b480b6ede20512053d901153728b433e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9271/56abc587b480b6ede20512053d901153728b433e/address.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9536,
67,
10711,
67,
718,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
400,
273,
2618,
3303,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9536,
67,
10711,
67,
718,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
400,
273,
2618,
3303,
... |
for line in file.readlines(): | for line in file.xreadlines(): | def findnames(file, prefix=""): names = {} for line in file.readlines(): if line[0] == '!': continue fields = line.split() name, tag = fields[0], fields[-1] if tag == 'd' and name.endswith('_H'): continue if name.startswith(prefix): names[name] = tag return names | 3765bd23f1517b1a04fc6472a2ca1e8ea61a227f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3765bd23f1517b1a04fc6472a2ca1e8ea61a227f/undoc_symbols.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
1973,
12,
768,
16,
1633,
1546,
6,
4672,
1257,
273,
2618,
364,
980,
316,
585,
18,
92,
896,
3548,
13332,
309,
980,
63,
20,
65,
422,
11817,
4278,
1324,
1466,
273,
980,
18,
4939,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1973,
12,
768,
16,
1633,
1546,
6,
4672,
1257,
273,
2618,
364,
980,
316,
585,
18,
92,
896,
3548,
13332,
309,
980,
63,
20,
65,
422,
11817,
4278,
1324,
1466,
273,
980,
18,
4939,
1... |
print '%s %s %s' % ('DIRAC SE'.ljust(20),('Size (%s)' % unit).ljust(20),'Files'.ljust(20)) print '-'*50 for se in sortList(totalUsage.keys()): | print '%s %s %s' % ( 'DIRAC SE'.ljust( 20 ), ( 'Size (%s)' % unit ).ljust( 20 ), 'Files'.ljust( 20 ) ) print '-' * 50 for se in sortList( totalUsage.keys() ): | def usage(): print 'Usage: %s [<options>] <Directory>' % (Script.scriptName) print ' Get a summary of the storage usage <for an optionally supplied directory>.' print ' The usage can be given in any of the following units: (MB,GB,TB,PB)' print ' The sites options should be a space or comma separated list e.g. --Sites="CNAF-RAW,GRIDKA-RAW" or --Sites="CNAF-RAW GRIDKA-RAW"' print ' Type "%s --help" for the available options and syntax' % Script.scriptName DIRAC.exit(2) | d2db378c63ced0c70abdfd0e1e47c60e42f24767 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d2db378c63ced0c70abdfd0e1e47c60e42f24767/dirac-dms-storage-usage-summary.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
306,
32,
2116,
34,
65,
411,
2853,
1870,
738,
261,
3651,
18,
4263,
461,
13,
1172,
296,
968,
279,
4916,
434,
326,
2502,
4084,
411,
1884,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
296,
5357,
30,
738,
87,
306,
32,
2116,
34,
65,
411,
2853,
1870,
738,
261,
3651,
18,
4263,
461,
13,
1172,
296,
968,
279,
4916,
434,
326,
2502,
4084,
411,
1884,
392,
... |
err_log= err_log + '\n\nNumber of statements : '+ str(len([bkst_list])) err_log= err_log + '\nNumber of error :'+ str(nb_err) +'\n' | err_log += '\n\nNumber of statements : '+ str(len([bkst_list])) err_log += '\nNumber of error :'+ str(nb_err) +'\n' | def _coda_parsing(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) codafile = data['form']['coda'] jur_id = data['form']['journal_id'] def_pay_acc = data['form']['def_payable'] def_rec_acc = data['form']['def_receivable'] str_log = "" err_log = "Errors:\n------\n" nb_err=0 std_log='' str_log1 = "Coda File is Imported : " str_not='' str_not1='' bank_statement={} bank_statement_lines={} bank_statements=[] recordlist = base64.decodestring(codafile).split('\n')#remove \r by dhaval recordlist.pop() for line in recordlist: if line[0] == '0': # header data bank_statement["bank_statement_line"]={} bank_statement['date'] = str2date(line[5:11]) bank_statement['journal_id']=data['form']['journal_id'] period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))]) bank_statement['period_id'] = period_id[0] bank_statement['state']='draft' elif line[0] == '1': # old balance data bal_start = list2float(line[43:58]) if line[42] == '1': bal_start = - bal_start bank_statement["balance_start"]= bal_start bank_statement["acc_number"]=line[5:17] bank_statement["acc_holder"]=line[64:90] elif line[0]=='2': # movement data record 2 if line[1]=='1': # movement data record 2.1 if bank_statement_lines.has_key(line[2:6]): continue st_line = {} st_line['extra_note'] = '' st_line['statement_id']=0 st_line['ref'] = line[2:10] st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")), st_line_amt = list2float(line[32:47]) if line[61]=='1': st_line['name']=line[65:77] else: st_line['name']=line[62:115] st_line['free_comm'] = st_line['name'] st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")), st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")), st_line['partner_id']=0 if line[31] == '1': st_line_amt = - st_line_amt st_line['account_id'] = def_pay_acc else: st_line['account_id'] = def_rec_acc st_line['amount'] = st_line_amt bank_statement_lines[line[2:6]]=st_line bank_statement["bank_statement_line"]=bank_statement_lines elif line[1] == '2': st_line_name = line[2:6] bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']}) elif line[1] == '3': # movement data record 3.1 st_line_name = line[2:6] st_line_partner_acc = str(line[10:47]).strip() cntry_number=line[10:47].strip() contry_name=line[47:125].strip() bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)]) bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name}) if bank_ids: bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context) if line and bank.partner_id: bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id}) if bank_statement_lines[st_line_name]['amount'] < 0 : bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id}) else : bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id}) else: nb_err += 1 err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name) bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']}) bank_statement["bank_statement_line"]=bank_statement_lines elif line[0]=='3': if line[1] == '1': st_line_name = line[2:6] bank_statement_lines[st_line_name]['extra_note'] += line[40:113] elif line[1] == '2': st_line_name = line[2:6] bank_statement_lines[st_line_name]['extra_note'] += line[10:115] elif line[1] == '3': st_line_name = line[2:6] bank_statement_lines[st_line_name]['extra_note'] += line[10:100] elif line[0]=='8': # new balance record bal_end = list2float(line[42:57]) if line[41] == '1': bal_end = - bal_end bank_statement["balance_end_real"]= bal_end elif line[0]=='9': # footer record bank_statements.append(bank_statement) #end for bkst_list=[] for statement in bank_statements: try: bk_st_id = pool.get('account.bank.statement').create(cr,uid,{ 'journal_id': statement['journal_id'], 'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")), 'period_id':statement['period_id'], 'balance_start': statement["balance_start"], 'balance_end_real': statement["balance_end_real"], 'state':'draft', }) lines=statement["bank_statement_line"] for value in lines: line=lines[value] reconcile_id = False rec_id = pool.get('account.move.line').search(cr, uid, [('name','=',line['name']),('account_id.reconcile','=',True)]) if rec_id: reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, { 'line_ids': [(6, 0, rec_id)] }, context=context) str_not1 = '' if line['partner_id'] == 0: nb_err+=1 err_log += '\nThe bank account %s is not defined for the partner %s.'%(cntry_number,contry_name) if line.has_key('contry_name') and line.has_key('cntry_number'): str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0]) id=pool.get('account.bank.statement.line').create(cr,uid,{ 'name':line['name'], 'date': line['date'], 'amount': line['amount'], 'partner_id':line['partner_id'] or 0, 'account_id':line['account_id'], 'statement_id': bk_st_id, 'reconcile_id': reconcile_id, 'note':str_not1, 'ref':line['ref'], }) cr.commit() str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"]) std_log = std_log + "\nDate : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\ %(statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"])) bkst_list.append(bk_st_id) except osv.except_osv, e: cr.rollback() nb_err+=1 err_log= err_log +'\n Application Error : ' + str(e) raise # REMOVEME except Exception, e: cr.rollback() nb_err+=1 err_log= err_log +'\n System Error : '+str(e) raise # REMOVEME except : cr.rollback() nb_err+=1 err_log= err_log +'\n Unknown Error' raise err_log= err_log + '\n\nNumber of statements : '+ str(len([bkst_list])) err_log= err_log + '\nNumber of error :'+ str(nb_err) +'\n' pool.get('account.coda').create(cr, uid,{ 'name':codafile, 'statement_id':bk_st_id, 'note':str_log1+str_not+std_log+err_log, 'journal_id':data['form']['journal_id'], 'date':time.strftime("%Y-%m-%d"), 'user_id':uid, }) return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_id':bk_st_id} | 2b8aba5dfb833d1f9a101218c2280e6361bd57e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/2b8aba5dfb833d1f9a101218c2280e6361bd57e2/coda_import.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1559,
69,
67,
24979,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
11012,
69,
768,
273,
501,
3292,
687,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1559,
69,
67,
24979,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
11012,
69,
768,
273,
501,
3292,
687,... |
def process_translations(self, doctree, translation): """ Replace translatable nodes with their translated doctree. """ if not translation: return settings, source = doctree.settings, doctree['source'] parser = RSTParser() for node, msg in extract_messages(doctree): ctx = node.parent patch = new_document(source, settings) msgstr = translation.ugettext(msg) if not msgstr or msgstr == msg: continue parser.parse(msgstr, patch) assert isinstance(patch[0], nodes.paragraph) node.children = patch[0].children | def filter_messages(self, doctree): """ Filter system messages from a doctree. """ filterlevel = self.config.keep_warnings and 2 or 5 for node in doctree.traverse(nodes.system_message): if node['level'] < filterlevel: node.parent.remove(node) | 38e1e7770f98f3e041d14f7b949f5f69909f60a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/38e1e7770f98f3e041d14f7b949f5f69909f60a4/environment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
67,
6833,
12,
2890,
16,
31263,
992,
4672,
3536,
4008,
2619,
2743,
628,
279,
31263,
992,
18,
3536,
1034,
2815,
273,
365,
18,
1425,
18,
10102,
67,
12103,
471,
576,
578,
1381,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
67,
6833,
12,
2890,
16,
31263,
992,
4672,
3536,
4008,
2619,
2743,
628,
279,
31263,
992,
18,
3536,
1034,
2815,
273,
365,
18,
1425,
18,
10102,
67,
12103,
471,
576,
578,
1381,
364,
... | |
rate(60) pass | rate(60) if scene.kb.keys: s = scene.kb.getkey() if s == "s": ser.write(chr(0)) elif s=="r": ser.write(chr(130)) elif s=="o": use_outer_line = not use_outer_line elif s=="l": use_lines = not use_lines elif s=="p": use_points = not use_points elif s=="i": use_intensity = not use_intensity zero_intensity_ring.visible = use_intensity | def read_in(): global in_frame, init_level, angle, index, speed_rpm nb_errors = 0 while True: try: time.sleep(0.00001) # do not hog the processor power if init_level == 0 : # start byte b = ord(ser.read(1)) if b == 0xFA : init_level = 1 else: init_level = 0 elif init_level == 1: # position index b = ord(ser.read(1)) if b >= 0xA0 and b <= 0xF9 : index = b - 0xA0 init_level = 2 else: init_level = 0 elif init_level == 2 : # speed b_speed = [ ord(b) for b in ser.read(2)] # data b_data0 = [ ord(b) for b in ser.read(4)] b_data1 = [ ord(b) for b in ser.read(4)] b_data2 = [ ord(b) for b in ser.read(4)] b_data3 = [ ord(b) for b in ser.read(4)] # for the checksum, we need all the data of the packet... # this could be collected in a more elegent fashion... all_data = [ 0xFA, index+0xA0 ] + b_speed + b_data0 + b_data1 + b_data2 + b_data3 # checksum b_checksum = [ ord(b) for b in ser.read(2) ] incoming_checksum = int(b_checksum[0]) + (int(b_checksum[1]) << 8) # verify that the received checksum is equal to the one computed from the data if checksum(all_data) == incoming_checksum: speed_rpm = float( b_speed[0] | (b_speed[1] << 8) ) / 64.0 label_speed.text = "RPM : " + str(speed_rpm) update_view(index * 4 + 0, b_data0[0], b_data0[1], b_data0[2], b_data0[3]) update_view(index * 4 + 1, b_data1[0], b_data1[1], b_data1[2], b_data1[3]) update_view(index * 4 + 2, b_data2[0], b_data2[1], b_data2[2], b_data2[3]) update_view(index * 4 + 3, b_data3[0], b_data3[1], b_data3[2], b_data3[3]) else: # the checksum does not match, something went wrong... nb_errors +=1 label_errors.text = "errors: "+str(nb_errors) # display the samples in an error state update_view(index * 4 + 0, 0, 0x80, 0, 0) update_view(index * 4 + 1, 0, 0x80, 0, 0) update_view(index * 4 + 2, 0, 0x80, 0, 0) update_view(index * 4 + 3, 0, 0x80, 0, 0) init_level = 0 # reset and wait for the next packet else: # default, should never happen... init_level = 0 except : traceback.print_exc(file=sys.stdout) | 7e79bd8b6a9f13952a2c0437da2cc4de3f87703c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13852/7e79bd8b6a9f13952a2c0437da2cc4de3f87703c/XV-11_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
267,
13332,
2552,
316,
67,
3789,
16,
1208,
67,
2815,
16,
5291,
16,
770,
16,
8632,
67,
86,
7755,
225,
4264,
67,
4324,
273,
374,
1323,
1053,
30,
775,
30,
813,
18,
19607,
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,
855,
67,
267,
13332,
2552,
316,
67,
3789,
16,
1208,
67,
2815,
16,
5291,
16,
770,
16,
8632,
67,
86,
7755,
225,
4264,
67,
4324,
273,
374,
1323,
1053,
30,
775,
30,
813,
18,
19607,
12,
... |
self.assertEqual(m, t.__dict__[meth]) | self.assertEqual(getattr(m, 'im_func', m), t.__dict__[meth]) | def binop_test(self, a, b, res, expr="a+b", meth="__add__"): d = {'a': a, 'b': b} | e95ce49aa005020c50b0d820a37ca320fb92be85 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/e95ce49aa005020c50b0d820a37ca320fb92be85/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4158,
556,
67,
3813,
12,
2890,
16,
279,
16,
324,
16,
400,
16,
3065,
1546,
69,
15,
70,
3113,
7917,
1546,
972,
1289,
14437,
4672,
302,
273,
13666,
69,
4278,
279,
16,
296,
70,
4278,
324... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4158,
556,
67,
3813,
12,
2890,
16,
279,
16,
324,
16,
400,
16,
3065,
1546,
69,
15,
70,
3113,
7917,
1546,
972,
1289,
14437,
4672,
302,
273,
13666,
69,
4278,
279,
16,
296,
70,
4278,
324... |
len1 = l1.length | len1 = l1.ll_length() | def ll_extend(l1, l2): len1 = l1.length len2 = l2.ll_length() newlength = len1 + len2 _ll_list_resize_ge(l1, newlength) items = l1.items source = l2.ll_items() i = 0 j = len1 while i < len2: items[j] = source[i] i += 1 j += 1 | afabe8603c579750f81fa9c16896184dfa4a53b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/afabe8603c579750f81fa9c16896184dfa4a53b8/rlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
14313,
12,
80,
21,
16,
328,
22,
4672,
562,
21,
273,
328,
21,
18,
2906,
67,
2469,
1435,
562,
22,
273,
328,
22,
18,
2906,
67,
2469,
1435,
394,
2469,
273,
562,
21,
397,
562,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6579,
67,
14313,
12,
80,
21,
16,
328,
22,
4672,
562,
21,
273,
328,
21,
18,
2906,
67,
2469,
1435,
562,
22,
273,
328,
22,
18,
2906,
67,
2469,
1435,
394,
2469,
273,
562,
21,
397,
562,... |
self.assert_(set(self._box.get_labels()) == set(['foo', 'bar'])) | self.assertEqual(set(self._box.get_labels()), set(['foo', 'bar'])) | def test_labels(self): # Get labels from the mailbox self.assertEqual(self._box.get_labels(), []) msg0 = mailbox.BabylMessage(self._template % 0) msg0.add_label('foo') key0 = self._box.add(msg0) self.assertEqual(self._box.get_labels(), ['foo']) msg1 = mailbox.BabylMessage(self._template % 1) msg1.set_labels(['bar', 'answered', 'foo']) key1 = self._box.add(msg1) self.assert_(set(self._box.get_labels()) == set(['foo', 'bar'])) msg0.set_labels(['blah', 'filed']) self._box[key0] = msg0 self.assert_(set(self._box.get_labels()) == set(['foo', 'bar', 'blah'])) self._box.remove(key1) self.assertEqual(set(self._box.get_labels()), set(['blah'])) | 9d1fae6c21b9661e8074aa8a166635ba69122b4b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/9d1fae6c21b9661e8074aa8a166635ba69122b4b/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5336,
12,
2890,
4672,
468,
968,
3249,
628,
326,
14187,
365,
18,
11231,
5812,
12,
2890,
6315,
2147,
18,
588,
67,
5336,
9334,
5378,
13,
1234,
20,
273,
14187,
18,
38,
24383,
80,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5336,
12,
2890,
4672,
468,
968,
3249,
628,
326,
14187,
365,
18,
11231,
5812,
12,
2890,
6315,
2147,
18,
588,
67,
5336,
9334,
5378,
13,
1234,
20,
273,
14187,
18,
38,
24383,
80,... |
this = apply(_quickfix.new_UnderlyingStrikePrice, args) | this = _quickfix.new_UnderlyingStrikePrice(*args) | def __init__(self, *args): this = apply(_quickfix.new_UnderlyingStrikePrice, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
14655,
6291,
1585,
2547,
5147,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
14655,
6291,
1585,
2547,
5147,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,... |
if self.mass_bins: self.add_var_opt("mass-bins", mass_bins) | if mass_bins: self.add_var_opt("mass-bins", mass_bins) | def __init__(self, job, dag, veto_segments_name, database, id, p_node=[],instruments = "H1,H2,L1", mass_bins="0,50,85,inf", live_time_program="thinca"): pipeline.CondorDAGNode.__init__(self,job) #FIXME make temp space? #self.add_var_opt("tmp-space","/tmp") if self.mass_bins: self.add_var_opt("mass-bins", mass_bins) self.add_var_opt("live-time-program",live_time_program) self.add_var_opt("veto-segments-name",veto_segments_name) self.add_var_arg(database) self.add_macro("macroid", id) for p in p_node: self.add_parent(p) dag.add_node(self) | c431ade39e244bb868bb31a9e8b17867db2021ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/c431ade39e244bb868bb31a9e8b17867db2021ce/highmass_post_process.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1719,
16,
22940,
16,
331,
11453,
67,
12838,
67,
529,
16,
2063,
16,
612,
16,
293,
67,
2159,
22850,
6487,
22818,
87,
273,
315,
44,
21,
16,
44,
22,
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,
1001,
2738,
972,
12,
2890,
16,
1719,
16,
22940,
16,
331,
11453,
67,
12838,
67,
529,
16,
2063,
16,
612,
16,
293,
67,
2159,
22850,
6487,
22818,
87,
273,
315,
44,
21,
16,
44,
22,
16,
... |
print '<tr>' | print '<tr bgcolor=" | def GET(self): # yes, this is a bit of a mess web.header('Content-Type','text/html; charset=utf-8', unique=True) web.header('Refresh','60', unique=True) print "<html>\n<head><title>Import status</title>" print "<style>th { vertical-align: bottom; text-align: left }</style>" print "</head><body>" print "<h1>Import status</h1>" print "<table>" print "<tr><th>Archive ID</th><th>import</th><th>loaded</th><th>input<br>(rec/sec)</th>" print "<th>no match<br>(%)</th>" print "<th>load<br>(rec/sec)</th>" print "<th>last update<br>(secs)</th><th>running<br>(hours)</th>" print "<th>progress</th>" print "<th>remaining<br>(hours)</th>" print "</tr>" cur_time = time() total_recs = 0 total_t = 0 total_load = 0 total_rec_per_sec = 0 total_load_per_sec = 0 for k in server_read('keys'): if k.endswith('2'): continue | 621b214377096c533b1e70ab16cd3be9336e5eff /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3913/621b214377096c533b1e70ab16cd3be9336e5eff/status.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4978,
12,
2890,
4672,
468,
12465,
16,
333,
353,
279,
2831,
434,
279,
12755,
3311,
18,
3374,
2668,
1350,
17,
559,
17023,
955,
19,
2620,
31,
4856,
33,
3158,
17,
28,
2187,
3089,
33,
5510,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4978,
12,
2890,
4672,
468,
12465,
16,
333,
353,
279,
2831,
434,
279,
12755,
3311,
18,
3374,
2668,
1350,
17,
559,
17023,
955,
19,
2620,
31,
4856,
33,
3158,
17,
28,
2187,
3089,
33,
5510,... |
text = sum.findtext("", None).strip() | text = sum.text.strip() | def IsRietveldSubmitted(ui, clname, hex): feed = XMLGet(ui, "/rss/issue/" + clname) if feed is None: return False for sum in feed.findall("{http://www.w3.org/2005/Atom}entry/{http://www.w3.org/2005/Atom}summary"): text = sum.findtext("", None).strip() m = re.match('\*\*\* Submitted as [^*]*?([0-9a-f]+) \*\*\*', text) if m is not None and len(m.group(1)) >= 8 and hex.startswith(m.group(1)): return True return False | 0e816f5972b2bebe62960e6066cb87c75bb009dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6483/0e816f5972b2bebe62960e6066cb87c75bb009dd/codereview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2585,
54,
6213,
90,
488,
28882,
12,
4881,
16,
927,
529,
16,
3827,
4672,
4746,
273,
3167,
967,
12,
4881,
16,
2206,
25151,
19,
13882,
4898,
397,
927,
529,
13,
309,
4746,
353,
599,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2585,
54,
6213,
90,
488,
28882,
12,
4881,
16,
927,
529,
16,
3827,
4672,
4746,
273,
3167,
967,
12,
4881,
16,
2206,
25151,
19,
13882,
4898,
397,
927,
529,
13,
309,
4746,
353,
599,
30,
... |
[(1, 19, 16, 13, 10, 7, 4), (2, 17, 11, 5, 20, 14, 8), (3, 12, 21, 9, 18, 6, 15)] | [(1, 4, 10, 16, 7, 19, 13), (2, 8, 5, 20, 11, 14, 17), (3, 12, 9, 15, 6, 18, 21)] | def tau123(T1, T2): """ Compute the tau_i representation for a bitrade (T1, T2). See the functions tau1, tau2, and tau3 for the mathematical definitions. RETURNS: (cells_map, t1, t2, t3) where cells_map is a map to/from the filled cells of T1, and t1, t2, t3 are the tau1, tau2, tau3 permutations. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: (a, b, c, G) = pq_group_bitrade_generators(3, 7) sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: print T1 [0 6 4] [1 0 5] [2 1 6] [3 2 0] [4 3 1] [5 4 2] [6 5 3] sage: print T2 [6 4 0] [0 5 1] [1 6 2] [2 0 3] [3 1 4] [4 2 5] [5 3 6] sage: (cells_map, t1, t2, t3) = tau123(T1, T2) sage: print cells_map {1: (0, 0), 2: (0, 1), 3: (0, 2), 4: (1, 0), 5: (1, 1), 6: (1, 2), 7: (2, 0), 8: (2, 1), 9: (2, 2), 10: (3, 0), 11: (3, 1), 12: (3, 2), 13: (4, 0), (2, 1): 8, 15: (4, 2), 16: (5, 0), 17: (5, 1), 18: (5, 2), 19: (6, 0), 20: (6, 1), 21: (6, 2), (5, 1): 17, (4, 0): 13, (1, 2): 6, (3, 0): 10, (5, 0): 16, (2, 2): 9, (4, 1): 14, (1, 1): 5, (3, 2): 12, (0, 0): 1, (6, 0): 19, 14: (4, 1), (4, 2): 15, (1, 0): 4, (0, 1): 2, (6, 1): 20, (3, 1): 11, (2, 0): 7, (6, 2): 21, (5, 2): 18, (0, 2): 3} sage: print cells_map_as_square(cells_map, max(T1.nrows(), T1.ncols())) [ 1 2 3 -1 -1 -1 -1] [ 4 5 6 -1 -1 -1 -1] [ 7 8 9 -1 -1 -1 -1] [10 11 12 -1 -1 -1 -1] [13 14 15 -1 -1 -1 -1] [16 17 18 -1 -1 -1 -1] [19 20 21 -1 -1 -1 -1] sage: t1 [3, 1, 2, 6, 4, 5, 9, 7, 8, 12, 10, 11, 15, 13, 14, 18, 16, 17, 21, 19, 20] sage: t2 [19, 17, 12, 1, 20, 15, 4, 2, 18, 7, 5, 21, 10, 8, 3, 13, 11, 6, 16, 14, 9] sage: print t3 [5, 9, 13, 8, 12, 16, 11, 15, 19, 14, 18, 1, 17, 21, 4, 20, 3, 7, 2, 6, 10] sage: t1.to_cycles() [(1, 3, 2), (4, 6, 5), (7, 9, 8), (10, 12, 11), (13, 15, 14), (16, 18, 17), (19, 21, 20)] sage: t2.to_cycles() [(1, 19, 16, 13, 10, 7, 4), (2, 17, 11, 5, 20, 14, 8), (3, 12, 21, 9, 18, 6, 15)] sage: t3.to_cycles() [(1, 5, 12), (2, 9, 19), (3, 13, 17), (4, 8, 15), (6, 16, 20), (7, 11, 18), (10, 14, 21)] The product t1*t2*t3 is the identity, i.e. it fixes every point: sage: len((t1*t2*t3).fixed_points()) == T1.nr_filled_cells() True """ assert is_bitrade(T1, T2) cells_map = T1.filled_cells_map() t1 = tau1(T1, T2, cells_map) t2 = tau2(T1, T2, cells_map) t3 = tau3(T1, T2, cells_map) return (cells_map, t1, t2, t3) | 494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12284,
12936,
12,
56,
21,
16,
399,
22,
4672,
3536,
8155,
326,
12284,
67,
77,
4335,
364,
279,
2831,
354,
323,
261,
56,
21,
16,
399,
22,
2934,
2164,
326,
4186,
12284,
21,
16,
12284,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12284,
12936,
12,
56,
21,
16,
399,
22,
4672,
3536,
8155,
326,
12284,
67,
77,
4335,
364,
279,
2831,
354,
323,
261,
56,
21,
16,
399,
22,
2934,
2164,
326,
4186,
12284,
21,
16,
12284,
22... |
\url{http://www.math.unicaen.fr/~simon/}. | http://www.math.unicaen.fr/~simon/. | def rank(self,verbose=0, lim1=5, lim3=50, limtriv=10, maxprob=20, limbigprime=30): r""" Return the rank of this elliptic curve, if it can be determined. | 16c5d6f4b590776892987400ecee6a836886ccbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/16c5d6f4b590776892987400ecee6a836886ccbb/ell_number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
11369,
33,
20,
16,
20167,
21,
33,
25,
16,
20167,
23,
33,
3361,
16,
20167,
313,
427,
33,
2163,
16,
943,
7748,
33,
3462,
16,
20167,
14002,
16382,
33,
5082,
4672,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
11369,
33,
20,
16,
20167,
21,
33,
25,
16,
20167,
23,
33,
3361,
16,
20167,
313,
427,
33,
2163,
16,
943,
7748,
33,
3462,
16,
20167,
14002,
16382,
33,
5082,
4672,
43... |
certList = crypto.load_certificate_chain( crypto.FILETYPE_PEM, pemData ) | certList = GSI.crypto.load_certificate_chain( GSI.crypto.FILETYPE_PEM, pemData ) | def generateChainFromResponse( self, pemData ): """ Generate a X509 Chain from the pkey and the pem data passed as the argument Return : S_OK( X509Chain ) / S_ERROR """ if not self.__valid: return S_ERROR( "No request loaded" ) try: certList = crypto.load_certificate_chain( crypto.FILETYPE_PEM, pemData ) except Exception, e: return S_ERROR( "Can't load pem data: %s" % str(e) ) chain = X509Chain() chain.setChain( certList ) chain.setPKey( self.__pkeyObj ) return chain | 2f18b097d946a737cb6f9da80779a6520e4d7a69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/2f18b097d946a737cb6f9da80779a6520e4d7a69/X509Request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
3893,
1265,
1064,
12,
365,
16,
12141,
751,
262,
30,
3536,
6654,
279,
1139,
5995,
7824,
628,
326,
19291,
471,
326,
12141,
501,
2275,
487,
326,
1237,
2000,
294,
348,
67,
3141,
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,
2103,
3893,
1265,
1064,
12,
365,
16,
12141,
751,
262,
30,
3536,
6654,
279,
1139,
5995,
7824,
628,
326,
19291,
471,
326,
12141,
501,
2275,
487,
326,
1237,
2000,
294,
348,
67,
3141,
12,
... |
component = Component(self.__env, name) | component = Component(self.env_open(), name) | def _do_component_remove(self, name): component = Component(self.__env, name) component.delete() | 132f03448459e7c8907500129479bb5f6c5bc47a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/132f03448459e7c8907500129479bb5f6c5bc47a/admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
4652,
67,
4479,
12,
2890,
16,
508,
4672,
1794,
273,
5435,
12,
2890,
18,
3074,
67,
3190,
9334,
508,
13,
1794,
18,
3733,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
4652,
67,
4479,
12,
2890,
16,
508,
4672,
1794,
273,
5435,
12,
2890,
18,
3074,
67,
3190,
9334,
508,
13,
1794,
18,
3733,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return (objects, output_dir) | raise TypeError, \ "'libraries' (if supplied) must be a list of strings" if library_dirs is None: library_dirs = self.library_dirs elif type (library_dirs) in (ListType, TupleType): library_dirs = list (library_dirs) + (self.library_dirs or []) else: raise TypeError, \ "'library_dirs' (if supplied) must be a list of strings" if runtime_library_dirs is None: runtime_library_dirs = self.runtime_library_dirs elif type (runtime_library_dirs) in (ListType, TupleType): runtime_library_dirs = (list (runtime_library_dirs) + (self.runtime_library_dirs or [])) else: raise TypeError, \ "'runtime_library_dirs' (if supplied) " + \ "must be a list of strings" return (libraries, library_dirs, runtime_library_dirs) | def _fix_link_args (self, objects, output_dir, takes_libs=0, libraries=None, library_dirs=None): """Typecheck and fix up some of the arguments supplied to the 'link_*' methods and return the fixed values. Specifically: ensure that 'objects' is a list; if output_dir is None, use self.output_dir; ensure that 'libraries' and 'library_dirs' are both lists, and augment them with 'self.libraries' and 'self.library_dirs'. If 'takes_libs' is true, return a tuple (objects, output_dir, libraries, library_dirs; else return (objects, output_dir).""" | f5ea4ac3c8b9b33f9d4584b2e24479be1f355257 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f5ea4ac3c8b9b33f9d4584b2e24479be1f355257/ccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
904,
67,
1232,
67,
1968,
261,
2890,
16,
2184,
16,
876,
67,
1214,
16,
5530,
67,
21571,
33,
20,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
4672,
3536,
559,
1893,
471,
2917... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
904,
67,
1232,
67,
1968,
261,
2890,
16,
2184,
16,
876,
67,
1214,
16,
5530,
67,
21571,
33,
20,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
4672,
3536,
559,
1893,
471,
2917... |
elif k.startswith("em|"): keys = list(toHex(i) for i in bridgedb.Bridges.chopString(v, bridgedb.Bridges.ID_LEN)) cur.executemany("INSERT INTO EmailedBridges ( email, id ) " "SELECT ?, id FROM Bridges WHERE hex_key = ?", [(k[3:],i) for i in keys]) elif k.startswith("sp|"): | elif k.startswith("sp|") or k.startswith("em|"): | def openOrConvertDatabase(sqlite_file, db_file): """Open a sqlite database, converting it from a db file if needed.""" if os.path.exists(sqlite_file): return openDatabase(sqlite_file) conn = sqlite3.Connection(sqlite_file) cur = conn.cursor() cur.executescript(SCHEMA1_SCRIPT) conn.commit() import anydbm try: db = anydbm.open(db_file, 'r') except anydbm.error: return conn try: for k in db.keys(): v = db[k] if k.startswith("sp|"): assert len(k) == 23 cur.execute("INSERT INTO Bridges ( hex_key, distributor ) " "VALUES (?, ?)", (toHex(k[3:]),v)) for k in db.keys(): v = db[k] if k.startswith("fs|"): assert len(k) == 23 cur.execute("UPDATE Bridges SET first_seen = ? " "WHERE hex_key = ?", (v, toHex(k[3:]))) elif k.startswith("ls|"): assert len(k) == 23 cur.execute("UPDATE Bridges SET last_seen = ? " "WHERE hex_key = ?", (v, toHex(k[3:]))) elif k.startswith("em|"): keys = list(toHex(i) for i in bridgedb.Bridges.chopString(v, bridgedb.Bridges.ID_LEN)) cur.executemany("INSERT INTO EmailedBridges ( email, id ) " "SELECT ?, id FROM Bridges WHERE hex_key = ?", [(k[3:],i) for i in keys]) elif k.startswith("sp|"): pass else: logging.warn("Unrecognized key %r", k) except: conn.rollback() os.unlink(sqlite_file) raise conn.commit() return conn | 5c9c3469c9a0be7c31fadcb4939c7ebf56dd9594 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5458/5c9c3469c9a0be7c31fadcb4939c7ebf56dd9594/Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
1162,
2723,
4254,
12,
19460,
67,
768,
16,
1319,
67,
768,
4672,
3536,
3678,
279,
16184,
2063,
16,
14540,
518,
628,
279,
1319,
585,
309,
3577,
12123,
309,
1140,
18,
803,
18,
1808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
1162,
2723,
4254,
12,
19460,
67,
768,
16,
1319,
67,
768,
4672,
3536,
3678,
279,
16184,
2063,
16,
14540,
518,
628,
279,
1319,
585,
309,
3577,
12123,
309,
1140,
18,
803,
18,
1808,
... |
if not self.default: default_adapter = component.queryAdapter(instance, IFieldDefaultProvider, name=self.__name__) if default_adapter is not None: return default_adapter() return self.default | else: return self.default | def getDefault(self, instance): """Return the default value to be used for initializing this field""" dm = self.default_method if dm: if isinstance(dm, basestring) and shasattr(instance, dm): method = getattr(instance, dm) return method() elif callable(dm): return dm() else: raise ValueError('%s.default_method is neither a method of %s' ' nor a callable' % (self.getName(), instance.__class__)) if not self.default: default_adapter = component.queryAdapter(instance, IFieldDefaultProvider, name=self.__name__) if default_adapter is not None: return default_adapter() return self.default | 7ceff8c470eae33b4a063061230f3f8948cfaf8b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12165/7ceff8c470eae33b4a063061230f3f8948cfaf8b/Field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4829,
12,
2890,
16,
791,
4672,
3536,
990,
326,
805,
460,
358,
506,
1399,
364,
22584,
333,
652,
8395,
9113,
273,
365,
18,
1886,
67,
2039,
309,
9113,
30,
309,
1549,
12,
10956,
16,
10699,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4829,
12,
2890,
16,
791,
4672,
3536,
990,
326,
805,
460,
358,
506,
1399,
364,
22584,
333,
652,
8395,
9113,
273,
365,
18,
1886,
67,
2039,
309,
9113,
30,
309,
1549,
12,
10956,
16,
10699,... |
result += str(value) | if isinstance(value, Lob): value = value.getInputStream().read() result += "<![CDATA[" + str(value) + "]]>" | def exportProcess(self, item, depth=0): | e0c9b52eed2ed5c199c480d1a30037243a0c5b15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/e0c9b52eed2ed5c199c480d1a30037243a0c5b15/Sharing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
2227,
12,
2890,
16,
761,
16,
3598,
33,
20,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
2227,
12,
2890,
16,
761,
16,
3598,
33,
20,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.stopcomm = False | self.stopSocketReader = False | def waitforconn(self, function): """ <Purpose> Waits for a connection to a port. Calls function with a socket-like object if it succeeds. | 802ffb0e90c264395b89f378837f0cc01b983c79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/802ffb0e90c264395b89f378837f0cc01b983c79/NATLayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
1884,
4646,
12,
2890,
16,
445,
4672,
3536,
411,
10262,
4150,
34,
678,
12351,
364,
279,
1459,
358,
279,
1756,
18,
23665,
445,
598,
279,
2987,
17,
5625,
733,
309,
518,
21933,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2529,
1884,
4646,
12,
2890,
16,
445,
4672,
3536,
411,
10262,
4150,
34,
678,
12351,
364,
279,
1459,
358,
279,
1756,
18,
23665,
445,
598,
279,
2987,
17,
5625,
733,
309,
518,
21933,
18,
2... |
handlerId = self.widgets["editSeekDialog"].connect("response", onResponse) title = _("Edit Seek: ") + self.widgets[radioname % seeknumber].get_label()[:-1] | title = _("Edit Seek: ") + self.widgets["seek%dRadio" % seeknumber].get_label()[:-1] | def onResponse (dialog, response): self.widgets["editSeekDialog"].hide() self.widgets["editSeekDialog"].disconnect(handlerId) for i in range(1,4): self.widgets[buttonname % i].set_sensitive(True) self.widgets[opbuttonname % i].set_sensitive(True) if configbutton in self.connections: self.widgets[configbutton].disconnect(self.connections[configbutton]) self.connections[configbutton] = \ self.widgets[configbutton].connect("clicked", configbuttoncallee, seeknumber) if response != gtk.RESPONSE_OK: return self.__saveSeekEditor(seeknumber) self.__writeSavedSeeks(seeknumber) | d29f291e2b68981e77b9413248abc5f4e586b518 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/d29f291e2b68981e77b9413248abc5f4e586b518/ICLounge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1064,
261,
12730,
16,
766,
4672,
365,
18,
18148,
9614,
4619,
16134,
6353,
6,
8009,
11248,
1435,
365,
18,
18148,
9614,
4619,
16134,
6353,
6,
8009,
20177,
12,
4176,
548,
13,
364,
277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1064,
261,
12730,
16,
766,
4672,
365,
18,
18148,
9614,
4619,
16134,
6353,
6,
8009,
11248,
1435,
365,
18,
18148,
9614,
4619,
16134,
6353,
6,
8009,
20177,
12,
4176,
548,
13,
364,
277,... |
code.append('EI') if returnInMemory: return code cachedname = os.path.splitext(filename)[0] + '.a85' f = open(cachedname,'wb') f.write(join(code, LINEEND)+LINEEND) f.close() if rl_config._verbose: print 'cached image as %s' % cachedname | while dataline <> "": code.append(dataline) dataline = outstream.read(60) code.append('EI') if returnInMemory: return code f = open(cachedname,'wb') f.write(join(code, LINEEND)+LINEEND) f.close() if rl_config._verbose: print 'cached image as %s' % cachedname | def cacheImageFile(filename, returnInMemory=0): "Processes image as if for encoding, saves to a file with .a85 extension." from reportlab.lib.utils import PIL_Image import zlib img1 = PIL_Image.open(filename) img = img1.convert('RGB') imgwidth, imgheight = img.size code = [] code.append('BI') # begin image # this describes what is in the image itself code.append('/W %s /H %s /BPC 8 /CS /RGB /F [/A85 /Fl]' % (imgwidth, imgheight)) code.append('ID') #use a flate filter and Ascii Base 85 raw = img.tostring() assert(len(raw) == imgwidth * imgheight, "Wrong amount of data for image") compressed = zlib.compress(raw) #this bit is very fast... encoded = _AsciiBase85Encode(compressed) #...sadly this isn't #write in blocks of 60 characters per line outstream = cStringIO.StringIO(encoded) dataline = outstream.read(60) while dataline <> "": code.append(dataline) dataline = outstream.read(60) code.append('EI') if returnInMemory: return code #save it to a file cachedname = os.path.splitext(filename)[0] + '.a85' f = open(cachedname,'wb') f.write(join(code, LINEEND)+LINEEND) f.close() if rl_config._verbose: print 'cached image as %s' % cachedname | 2933359555b63580a00dd827dd7e6f0d0418138f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/2933359555b63580a00dd827dd7e6f0d0418138f/pdfutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1247,
2040,
812,
12,
3459,
16,
327,
382,
6031,
33,
20,
4672,
315,
10599,
1316,
487,
309,
364,
2688,
16,
14649,
358,
279,
585,
598,
263,
69,
7140,
2710,
1199,
225,
628,
2605,
7411,
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,
1247,
2040,
812,
12,
3459,
16,
327,
382,
6031,
33,
20,
4672,
315,
10599,
1316,
487,
309,
364,
2688,
16,
14649,
358,
279,
585,
598,
263,
69,
7140,
2710,
1199,
225,
628,
2605,
7411,
18,
... |
'int* _D%(name)s = %(name)s->nd;\n' \ '%(type)s* %(name)s_data = %(name)s->data;\n' | 'int _D%(name)s = %(name)s->nd;\n' \ '%(type)s* %(name)s_data = (%(type)s*) %(name)s->data;\n' | def standard_decl_code(self): type = numeric_to_blitz_type_mapping[self.numeric_type] name = self.name templ = '// %(name)s array declaration\n' \ 'PyArrayObject* %(name)s = py_to_numpy(py_%(name)s,"%(name)s");\n' \ 'int* _N%(name)s = %(name)s->dimensions;\n' \ 'int* _S%(name)s = %(name)s->strides;\n' \ 'int* _D%(name)s = %(name)s->nd;\n' \ '%(type)s* %(name)s_data = %(name)s->data;\n' code = templ % locals() return code | fbeedee8e7a99b9628832898379f8da9e132c43d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/fbeedee8e7a99b9628832898379f8da9e132c43d/standard_array_spec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4529,
67,
8840,
67,
710,
12,
2890,
4672,
618,
273,
6389,
67,
869,
67,
3083,
305,
94,
67,
723,
67,
6770,
63,
2890,
18,
5246,
67,
723,
65,
508,
273,
365,
18,
529,
13988,
273,
12084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4529,
67,
8840,
67,
710,
12,
2890,
4672,
618,
273,
6389,
67,
869,
67,
3083,
305,
94,
67,
723,
67,
6770,
63,
2890,
18,
5246,
67,
723,
65,
508,
273,
365,
18,
529,
13988,
273,
12084,
... |
return string.atoi(v) | if v: return string.atoi(v) raise ValueError, 'Empty entry when integer expected' | def field2int(v): try: v=v.read() except: v=str(v) return string.atoi(v) | e4d209501bbb231c07d5e6c2f30b761bb8a056fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e4d209501bbb231c07d5e6c2f30b761bb8a056fc/Publish.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
652,
22,
474,
12,
90,
4672,
775,
30,
331,
33,
90,
18,
896,
1435,
1335,
30,
331,
33,
701,
12,
90,
13,
225,
309,
331,
30,
327,
533,
18,
270,
11359,
12,
90,
13,
1002,
2068,
16,
296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
652,
22,
474,
12,
90,
4672,
775,
30,
331,
33,
90,
18,
896,
1435,
1335,
30,
331,
33,
701,
12,
90,
13,
225,
309,
331,
30,
327,
533,
18,
270,
11359,
12,
90,
13,
1002,
2068,
16,
296,... |
return self.file.read(size) | chunks = [] read = 0 while read < size: data = self.file.read(min(size-read, 4096)) if not data: break read += len(data) chunks.append(data) return b''.join(chunks) | def read(self, size): """Read 'size' bytes from remote.""" return self.file.read(size) | 94448afc2448648679db2638ebbc3bbbee6f391a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/94448afc2448648679db2638ebbc3bbbee6f391a/imaplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
4672,
3536,
1994,
296,
1467,
11,
1731,
628,
2632,
12123,
327,
365,
18,
768,
18,
896,
12,
1467,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
4672,
3536,
1994,
296,
1467,
11,
1731,
628,
2632,
12123,
327,
365,
18,
768,
18,
896,
12,
1467,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ax = pylab.axes([0.1, 0.1, 0.9, 0.9], frameon=False) ax.set_xticks([]) ax.set_yticks([]) ax.legend(patch_ls, legend_ls, loc='upper right', handlelen=0.02) pd.left_1st_ax.set_xlim([pd.min_x-0.2, pd.max_x+0.2]) pd.right_1st_ax.set_xlim([pd.min_x-0.2, pd.max_x+0.2]) | ax1.legend(patch_ls, legend_ls, loc='upper left', handlelen=0.02) xlim_cushion = (pd.max_x-pd.min_x)/20 xlim_ls = [pd.min_x-xlim_cushion, pd.max_x+xlim_cushion] if pd.left_1st_ax and pd.right_1st_ax: pd.left_1st_ax.set_xlim(xlim_ls) pd.right_1st_ax.set_xlim(xlim_ls) if preset_xlim: xlim_ls = preset_xlim ax1.set_xlim(xlim_ls) for ax in pd.ax_ls: ax.set_xlim(xlim_ls) ax1.set_xlabel('score cutoff') ax1.set_ylabel('candidate/non-candidate') if title: ax1.title.set_text(title) | def plotCurve(cls, rdata, no_of_top_snps_info, min_distance_info, output_fname=None, need_svg=False): """ 2008-10-29 draw candidate ratio, non-candidate ratio, pvalues etc against score cutoff at different distances. """ sys.stderr.write("Plotting curves ... ") pylab.clf() #fig = Figure() fig = pylab.gcf() #canvas = FigureCanvasAgg(fig) #calculate the number of rows needed according to how many score_rank_data, always two-column pylab.subplots_adjust(left=0.08, right=0.92,bottom = 0.05, hspace = 0.3) no_of_rows = rdata.data_matrix.shape[1] legend_ls = [] patch_ls = [] pd = PassingData(left_1st_ax = None, right_1st_ax = None, min_x = None, max_x = None) for i in range(rdata.data_matrix.shape[1]): pd = cls.plotSubCurve(rdata, no_of_top_snps_info, min_distance_info, i, no_of_rows=no_of_rows, \ legend_ls=legend_ls, patch_ls=patch_ls, pd=pd) #put a main title and single legend for all plots ax = pylab.axes([0.1, 0.1, 0.9, 0.9], frameon=False) ax.set_xticks([]) ax.set_yticks([]) ax.legend(patch_ls, legend_ls, loc='upper right', handlelen=0.02) pd.left_1st_ax.set_xlim([pd.min_x-0.2, pd.max_x+0.2]) pd.right_1st_ax.set_xlim([pd.min_x-0.2, pd.max_x+0.2]) """ #put a main title and single legend for all plots ax = pylab.axes([0.1, 0.1, 0.8, 0.85], frameon=False) ax.set_xticks([]) ax.set_yticks([]) title = '%s by %s'%(self.results_id, self.list_type_id) ax.set_title(title) """ if output_fname: pylab.savefig('%s'%output_fname, dpi=300) if need_svg: pylab.savefig('%s.svg'%output_fname, dpi=300) sys.stderr.write("Done.\n") | a419170eae9b455921b4003eb7af109dabd831e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/a419170eae9b455921b4003eb7af109dabd831e2/DrawTopSNPTest2DMapForOneRM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
9423,
12,
6429,
16,
24291,
16,
1158,
67,
792,
67,
3669,
67,
8134,
1121,
67,
1376,
16,
1131,
67,
8969,
67,
1376,
16,
876,
67,
12749,
33,
7036,
16,
1608,
67,
11451,
33,
8381,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
9423,
12,
6429,
16,
24291,
16,
1158,
67,
792,
67,
3669,
67,
8134,
1121,
67,
1376,
16,
1131,
67,
8969,
67,
1376,
16,
876,
67,
12749,
33,
7036,
16,
1608,
67,
11451,
33,
8381,
467... |
self.stats.reverse_order() | if self.stats: self.stats.reverse_order() else: print("No statistics object is loaded.", file=self.stream) | def do_reverse(self, line): self.stats.reverse_order() return 0 | 3e4f2ec7047dfec4ced9ec1ee791eaa837655b8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/3e4f2ec7047dfec4ced9ec1ee791eaa837655b8e/pstats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
9845,
12,
2890,
16,
980,
4672,
309,
365,
18,
5296,
30,
365,
18,
5296,
18,
9845,
67,
1019,
1435,
469,
30,
1172,
2932,
2279,
7691,
733,
353,
4203,
1199,
16,
585,
33,
2890,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
9845,
12,
2890,
16,
980,
4672,
309,
365,
18,
5296,
30,
365,
18,
5296,
18,
9845,
67,
1019,
1435,
469,
30,
1172,
2932,
2279,
7691,
733,
353,
4203,
1199,
16,
585,
33,
2890,
18,... |
self.zone_refresh.stop_timer() | self.zone_refresh.shutdown() | def test_run_timer(self): """This case will run timer in daemon thread. The zone's next_refresh_time is less than now, so zonemgr will do zone refresh immediately. The zone's state will become "refreshing". Then closing the socket ,the timer will stop, and throw a ZonemgrException.""" time1 = time.time() self.zone_refresh._zonemgr_refresh_info = { ("sd.cn.", "IN"):{ 'last_refresh_time': time1 - 7200, 'next_refresh_time': time1 - 1, 'zone_soa_rdata': 'a.dns.cn. root.cnnic.cn. 2009073105 7200 3600 2419200 21600', 'zone_state': ZONE_OK} } self.zone_refresh._check_sock = self.zone_refresh._master_socket listener = threading.Thread(target = self.zone_refresh.run_timer, args = ()) listener.setDaemon(True) listener.start() # Sleep 1 sec to ensure that the timer thread has enough time to run. time.sleep(1) # Shut down the timer thread self.zone_refresh.stop_timer() # After running timer, the zone's state should become "refreshing". zone_state = self.zone_refresh._zonemgr_refresh_info[ZONE_NAME_CLASS1_IN]["zone_state"] self.assertTrue("refresh_timeout" in self.zone_refresh._zonemgr_refresh_info[ZONE_NAME_CLASS1_IN].keys()) self.assertTrue(zone_state == ZONE_REFRESHING) | c5a9ab2da56fc81874bd9c434ab7907afa578f9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6792/c5a9ab2da56fc81874bd9c434ab7907afa578f9a/zonemgr_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2681,
67,
12542,
12,
2890,
4672,
3536,
2503,
648,
903,
1086,
5441,
316,
8131,
2650,
18,
1021,
4157,
1807,
1024,
67,
9144,
67,
957,
353,
5242,
2353,
2037,
16,
1427,
998,
265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2681,
67,
12542,
12,
2890,
4672,
3536,
2503,
648,
903,
1086,
5441,
316,
8131,
2650,
18,
1021,
4157,
1807,
1024,
67,
9144,
67,
957,
353,
5242,
2353,
2037,
16,
1427,
998,
265,
... |
where ``child(x)`` returns the childs of the node ``x`` of the forest. | where ``children(x)`` returns the children of the node ``x`` of the forest. | def search_forest_iterator(roots, childs): """ INPUT: - ``roots``: a list (or iterable) - ``childs``: a function returning a list (or iterable) Returns an iterator on the nodes of the forest having the given roots, and where ``child(x)`` returns the childs of the node ``x`` of the forest. EXAMPLES:: sage: from sage.combinat.backtrack import search_forest_iterator sage: list(search_forest_iterator([[]], lambda l: [l+[0], l+[1]] if len(l) < 3 else [])) [[], [0], [0, 0], [0, 0, 0], [0, 0, 1], [0, 1], [0, 1, 0], [0, 1, 1], [1], [1, 0], [1, 0, 0], [1, 0, 1], [1, 1], [1, 1, 0], [1, 1, 1]] """ #Invariant: stack[i] contains an iterator for the siblings of the i-th node of the current branch stack = [iter(roots)] while len(stack) > 0: # Try to get the next node at this depth try: node = stack[-1].next() except StopIteration: #If there are no more, go back up the tree # We also need to check if we've exhausted all # possibilities stack.pop() continue yield node stack.append( iter(childs(node)) ) | 0c5cb94bdc0dba9150cb164c00100196aa13fa7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/0c5cb94bdc0dba9150cb164c00100196aa13fa7e/backtrack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
67,
1405,
334,
67,
9838,
12,
22078,
16,
21619,
4672,
3536,
12943,
30,
225,
300,
12176,
22078,
10335,
30,
279,
666,
261,
280,
6087,
13,
225,
300,
12176,
3624,
87,
10335,
30,
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,
1623,
67,
1405,
334,
67,
9838,
12,
22078,
16,
21619,
4672,
3536,
12943,
30,
225,
300,
12176,
22078,
10335,
30,
279,
666,
261,
280,
6087,
13,
225,
300,
12176,
3624,
87,
10335,
30,
279,
... |
result = Project.dirty_test_paths(self) if self.store.want_debian(): result.append(self.installed_debian_source_path()) return result | return Project.dirty_test_paths(self) + \ DebianMixin.dirty_test_paths(self) | def dirty_test_paths(self): result = Project.dirty_test_paths(self) if self.store.want_debian(): result.append(self.installed_debian_source_path()) return result | e78ffdbf735f50b9f1f463d9c8eb95ba3dc48cde /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14832/e78ffdbf735f50b9f1f463d9c8eb95ba3dc48cde/pb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9603,
67,
3813,
67,
4481,
12,
2890,
4672,
563,
273,
5420,
18,
18013,
67,
3813,
67,
4481,
12,
2890,
13,
309,
365,
18,
2233,
18,
17369,
67,
31888,
2779,
13332,
563,
18,
6923,
12,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9603,
67,
3813,
67,
4481,
12,
2890,
4672,
563,
273,
5420,
18,
18013,
67,
3813,
67,
4481,
12,
2890,
13,
309,
365,
18,
2233,
18,
17369,
67,
31888,
2779,
13332,
563,
18,
6923,
12,
2890,
... |
Return '' if no cooked data available otherwise. Don't block | Return b'' if no cooked data available otherwise. Don't block | def read_lazy(self): """Process and return data that's already in the queues (lazy). | 326ef86b41f6cb43653ace4abaf10445c8f1501c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/326ef86b41f6cb43653ace4abaf10445c8f1501c/telnetlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
15998,
12,
2890,
4672,
3536,
2227,
471,
327,
501,
716,
1807,
1818,
316,
326,
11897,
261,
15998,
2934,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
15998,
12,
2890,
4672,
3536,
2227,
471,
327,
501,
716,
1807,
1818,
316,
326,
11897,
261,
15998,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if platform.system() == "FreeBSD": cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'tempcrontab=`mktemp -t tempcrontab` && crontab -l | sed ' \ + '\'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep else: cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else tempcrontab=`mktemp` && ' \ + 'crontab -l | sed \'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep | cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'modifiedCrontab=`mktemp -t tempcrontab.XXXXX` && crontab -l | ' \ + 'sed \'/start_seattle.sh/d\' > ${modifiedCrontab} && ' \ + 'crontab ${modifiedCrontab} && rm -rf ${modifiedCrontab}; fi' \ + os.linesep | def add_seattle_to_crontab(): """ <Purpose> Adds an entry to the crontab to run seattle automatically at boot. <Arguments> None. <Exceptions> OSError if cron is not installed on this system. <Side Effects> Adds an entry to the crontab. <Returns> True if an entry for seattle was successfully added to the crontab, False otherwise. """ # Check to see if the crontab has already been modified to run seattle. crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: raise AlreadyInstalledError("An entry for seattle was already detected " \ + "in the crontab.") # Since seattle is not already installed, modify crontab to run seattle at # boot. # Get the service vessel where standard error produced from cron will be # written. service_vessel = servicelogger.get_servicevessel() # The crontab entry is different if running on FreeBSD because the mktemp # command works differently on this system. if platform.system() == "FreeBSD": cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else ' \ + 'tempcrontab=`mktemp -t tempcrontab` && crontab -l | sed ' \ + '\'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep else: cron_line_entry = '@reboot if [ -e "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" ]; then "' + SEATTLE_FILES_DIR + os.sep \ + get_starter_file_name() + '" >> "' + SEATTLE_FILES_DIR + os.sep \ + service_vessel + '/cronlog.txt" 2>&1; else tempcrontab=`mktemp` && ' \ + 'crontab -l | sed \'/start_seattle.sh/d\' > ${tempcrontab} && ' \ + 'crontab ${tempcrontab} && rm ${tempcrontab}; fi' + os.linesep # Generate a temp file with the user's crontab plus our task. temp_crontab_file = tempfile.NamedTemporaryFile() temp_crontab_file.write(crontab_contents_stdout) temp_crontab_file.write(cron_line_entry) temp_crontab_file.flush() # Now, replace the crontab with that temp file and remove(close) the # tempfile. replace_crontab = subprocess.Popen(["crontab",temp_crontab_file.name], stdout=subprocess.PIPE, stderr=subprocess.PIPE) replace_crontab.wait() temp_crontab_file.close() # Finally, confirm that seattle was successfully added to the crontab and note # the result in the configuration file ('nodeman.cfg'). config = persist.restore_object('nodeman.cfg') crontab_contents_stdout,crontab_contents_stderr = \ subprocess.Popen(["crontab", "-l"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() if get_starter_file_name() in crontab_contents_stdout: config['crontab_updated_for_2009_installer'] = True persist.commit_object(config,'nodeman.cfg') return True else: # Although the default setting for # config['crontab_updated_for_2009_installer'] = False, it should still be # set in the event that there was a previous installer which set this value # to True, but now for whatever reason, installation in the crontab failed. config['crontab_updated_for_2009_installer'] = False persist.commit_object(config,'nodeman.cfg') return False | 40356acb04edaf1e6bc2f3b93efb1140a08e7d75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/40356acb04edaf1e6bc2f3b93efb1140a08e7d75/seattleinstaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
307,
4558,
298,
67,
869,
67,
3353,
30335,
13332,
3536,
411,
10262,
4150,
34,
15605,
392,
1241,
358,
326,
4422,
30335,
358,
1086,
695,
4558,
298,
6635,
622,
4835,
18,
225,
411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
307,
4558,
298,
67,
869,
67,
3353,
30335,
13332,
3536,
411,
10262,
4150,
34,
15605,
392,
1241,
358,
326,
4422,
30335,
358,
1086,
695,
4558,
298,
6635,
622,
4835,
18,
225,
411,
... |
buf.append(i[:(w-y-len(buf)-1)/factor]) | buf_len = len(buf) rest = w-y-buf_len buf.append(i[:rest/factor]) | def _wrap(text, width, indent, firstindent): if not text: return '' text = text.strip() s = [] pos = 0 for i in rx.finditer(text): if i.start() > pos: s.extend(text[pos:i.start()].split()) s.append(i.group()) pos = i.end() if pos < len(text): s.extend(text[pos:].split()) ss = [s[0]] #get first element character is asian char flag flag = unicodedata.east_asian_width(s[0][0]) != 'Na' for i in range(1, len(s)): f = unicodedata.east_asian_width(s[i][0]) != 'Na' if f and f == flag: ss[-1] = ss[-1] + s[i] else: ss.append(s[i]) flag = f s = ss t = [] y = 0 buf = [] x = 0 while s: i = s.pop(0) if unicodedata.east_asian_width(i[0]) != 'Na': factor = 2 else: factor = 1 if x == 0: w = width - len(firstindent) step = firstindent else: w = width - len(indent) step = indent length = y + len(i)*factor + len(buf) if length == w: buf.append(i) t.append(step + ' '.join(buf)) x = 1 buf = [] y = 0 elif length > w: if factor == 2 or (factor==1 and len(i) * factor >= w): buf.append(i[:(w-y-len(buf)-1)/factor]) t.append(step + ' '.join(buf)) x = 1 s.insert(0, i[(w-y-len(buf)-1)/2:]) buf = [] y = 0 continue else: t.append(step + ' '.join(buf)) x = 1 s.insert(0, i) buf = [] y = 0 continue else: buf.append(i) y += factor * len(i) if buf: t.append(step + ' '.join(buf)) return cr.join(t) | 8bf42d52cd9dbef73540588b7c0c57ae17cd8821 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/686/8bf42d52cd9dbef73540588b7c0c57ae17cd8821/wraptext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4113,
12,
955,
16,
1835,
16,
3504,
16,
1122,
9355,
4672,
309,
486,
977,
30,
327,
875,
977,
273,
977,
18,
6406,
1435,
272,
273,
5378,
949,
273,
374,
364,
277,
316,
8581,
18,
4720... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4113,
12,
955,
16,
1835,
16,
3504,
16,
1122,
9355,
4672,
309,
486,
977,
30,
327,
875,
977,
273,
977,
18,
6406,
1435,
272,
273,
5378,
949,
273,
374,
364,
277,
316,
8581,
18,
4720... |
csv_reader = csv.DictReader(input_csv_file, delimiter=',') | def ImportMsOutlookCsv(self, input_csv_file, output_csv_file, dry_run=False): """Imports an MS Outlook contacts/profiles CSV file into the contact list. | 21e1db21cdf94a770441b581bec9057b04405739 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11/21e1db21cdf94a770441b581bec9057b04405739/shared_contacts_profiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
6947,
1182,
7330,
16759,
12,
2890,
16,
810,
67,
6715,
67,
768,
16,
876,
67,
6715,
67,
768,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
13347,
392,
9238,
2976,
7330,
14841,
19,
183... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
6947,
1182,
7330,
16759,
12,
2890,
16,
810,
67,
6715,
67,
768,
16,
876,
67,
6715,
67,
768,
16,
10299,
67,
2681,
33,
8381,
4672,
3536,
13347,
392,
9238,
2976,
7330,
14841,
19,
183... | |
if in_subset: | if in_subset: | def _do_element(self, node, initial_other_attrs = []): '''_do_element(self, node, initial_other_attrs = []) -> None Process an element (and its children).''' | eac45ef0ae4c46468fce1a5d88da06c712dbb153 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/eac45ef0ae4c46468fce1a5d88da06c712dbb153/c14n.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
2956,
12,
2890,
16,
756,
16,
2172,
67,
3011,
67,
7039,
273,
5378,
4672,
9163,
67,
2896,
67,
2956,
12,
2890,
16,
756,
16,
2172,
67,
3011,
67,
7039,
273,
5378,
13,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2896,
67,
2956,
12,
2890,
16,
756,
16,
2172,
67,
3011,
67,
7039,
273,
5378,
4672,
9163,
67,
2896,
67,
2956,
12,
2890,
16,
756,
16,
2172,
67,
3011,
67,
7039,
273,
5378,
13,
317,
... |
output = capture_output(stats.print_stats, self.limit) output_callers = capture_output( stats.print_callers, self.limit) body += '<pre style="%s">%s\n%s</pre>' % ( self.style, cgi.escape(output), cgi.escape(output_callers)) | stats.print_stats(self.limit) stats.print_callers(self.limit) output = output.getvalue() body += '<pre style="%s">%s</pre>' % ( self.style, cgi.escape(output)) | def run_app(): body.extend(self.app(environ, replace_start_response)) | 496fca63a1e4e37e3b0b141ae2c99615873968a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/496fca63a1e4e37e3b0b141ae2c99615873968a0/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2910,
13332,
1417,
18,
14313,
12,
2890,
18,
2910,
12,
28684,
16,
1453,
67,
1937,
67,
2740,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2910,
13332,
1417,
18,
14313,
12,
2890,
18,
2910,
12,
28684,
16,
1453,
67,
1937,
67,
2740,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
test_svn() | test_svn(use_tee=1) test_cl(use_tee=1) | def test_svn(): s,o = exec_command(['svn','status']) assert s,(s,o) | f061375e2cd34559bb1d08fe7e7d82dc700a1792 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/f061375e2cd34559bb1d08fe7e7d82dc700a1792/exec_command.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
31505,
13332,
272,
16,
83,
273,
1196,
67,
3076,
12,
3292,
31505,
17023,
2327,
19486,
1815,
272,
16,
12,
87,
16,
83,
13,
225,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
31505,
13332,
272,
16,
83,
273,
1196,
67,
3076,
12,
3292,
31505,
17023,
2327,
19486,
1815,
272,
16,
12,
87,
16,
83,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
print fss.delItem("ROOT") | def listItems(self, key): if key == "": key = "." path = self._keyToPath(key) return [self._stripPrefix(fn) for fn in glob.glob(path+"/*")] | a7a1944d24a0c3e0bb622941475acb2c7d37e769 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4231/a7a1944d24a0c3e0bb622941475acb2c7d37e769/FSStorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
3126,
12,
2890,
16,
498,
4672,
309,
498,
422,
1408,
30,
498,
273,
4585,
589,
273,
365,
6315,
856,
774,
743,
12,
856,
13,
327,
306,
2890,
6315,
6406,
2244,
12,
4293,
13,
364,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
666,
3126,
12,
2890,
16,
498,
4672,
309,
498,
422,
1408,
30,
498,
273,
4585,
589,
273,
365,
6315,
856,
774,
743,
12,
856,
13,
327,
306,
2890,
6315,
6406,
2244,
12,
4293,
13,
364,
229... | |
data = [] | data = AllAccesses() | def read_data(filename): fd = open(filename) fds = {} try: data = [] just_seeked = None for line in fd: line = line.strip() if line[0] == 'o': fdnum, filename = line[1:].split(',', 1) fds[int(fdnum)] = filename continue if line[0] == 'r': fdnum, offset, len = map(int, line[1:].split(',', 2)) filename = fds.get(fdnum, str(fdnum)) data.append((filename, offset, len, line[0])) continue if line[0] == 'w': fdnum, offset, len = map(int, line[1:].split(',', 2)) filename = fds.get(fdnum, str(fdnum)) data.append((filename, offset, len, line[0])) continue if line[0] == 's': fdnum = int(line[1:-1]) data.append((filename, 0, 0, line[0])) continue return data finally: fd.close() | 41c7d61ab9bb6e87bf2693e344905ff5346ece77 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/569/41c7d61ab9bb6e87bf2693e344905ff5346ece77/draw_positions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
892,
12,
3459,
4672,
5194,
273,
1696,
12,
3459,
13,
284,
2377,
273,
2618,
775,
30,
501,
273,
4826,
1862,
281,
1435,
2537,
67,
16508,
329,
273,
599,
364,
980,
316,
5194,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
892,
12,
3459,
4672,
5194,
273,
1696,
12,
3459,
13,
284,
2377,
273,
2618,
775,
30,
501,
273,
4826,
1862,
281,
1435,
2537,
67,
16508,
329,
273,
599,
364,
980,
316,
5194,
30,
... |
def manage_beforeDelete(self,object,container): self.uninstall() | def manage_beforeDelete(self,object,container): self.uninstall() | b2d9a612ab73c1170668345a070045e3e24e14b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/b2d9a612ab73c1170668345a070045e3e24e14b2/InstalledProduct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
5771,
2613,
12,
2890,
16,
1612,
16,
3782,
4672,
365,
18,
28872,
1435,
225,
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,
10680,
67,
5771,
2613,
12,
2890,
16,
1612,
16,
3782,
4672,
365,
18,
28872,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
AABFeGl0UHJvY2VzcwAAAFJlZ0Nsb3NlS2V5AAAAUHJvcGVydHlTaGVldEEAAFRleHRPdXRBAABm cmVlAABFbmRQYWludAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | AABFeGl0UHJvY2VzcwAAAFJlZ0Nsb3NlS2V5AAAAUHJvcGVydHlTaGVldEEAAFRleHRPdXRBAABl eGl0AABFbmRQYWludAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | def get_exe_bytes (self): import base64 return base64.decodestring (EXEDATA) | bde4b3adef4075407ed2396d5d01b9da498c96ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bde4b3adef4075407ed2396d5d01b9da498c96ec/bdist_wininst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14880,
67,
3890,
261,
2890,
4672,
1930,
1026,
1105,
327,
1026,
1105,
18,
4924,
1145,
371,
261,
2294,
2056,
3706,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14880,
67,
3890,
261,
2890,
4672,
1930,
1026,
1105,
327,
1026,
1105,
18,
4924,
1145,
371,
261,
2294,
2056,
3706,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
session.queue_declare(queue='q1') | def test_exchange_acl(self): """ Test various modes for exchange acl """ aclf = ACLFile() aclf.write('acl deny bob@QPID create exchange name=testEx durable=true passive=true\n') aclf.write('acl deny bob@QPID create exchange name=ex1 type=direct\n') aclf.write('acl deny bob@QPID access exchange name=myEx\n') aclf.write('acl deny bob@QPID bind exchange name=myEx queuename=q1 routingkey=rk1\n') aclf.write('acl deny bob@QPID unbind exchange name=myEx queuename=q1 routingkey=rk1\n') aclf.write('acl deny bob@QPID delete exchange name=myEx\n') aclf.write('acl allow all all') aclf.close() self.reload_acl() session = self.get_session('bob','bob') try: session.exchange_declare(exchange='testEx', durable='true', passive='true') self.fail("ACL should deny exchange create request with name=testEx durable=true passive=true"); except qpid.session.SessionException, e: self.assertEqual(530,e.args[0].error_code) session = self.get_session('bob','bob') try: session.exchange_declare(exchange='ex1', type='direct') self.fail("ACL should deny exchange create request with name=ex1 type=direct"); except qpid.session.SessionException, e: self.assertEqual(530,e.args[0].error_code) session = self.get_session('bob','bob') try: session.exchange_declare(exchange='myXml', type='direct') session.queue_declare(queue='q1') except qpid.session.SessionException, e: if (530 == e.args[0].error_code): self.fail("ACL should allow exchange create request for myXml with any parameter"); | 45a65deb5c6f5ed4b18891b623102d9061fa1213 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/198/45a65deb5c6f5ed4b18891b623102d9061fa1213/acl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16641,
67,
10150,
12,
2890,
4672,
3536,
7766,
11191,
12382,
364,
7829,
7895,
3536,
7895,
74,
273,
10098,
812,
1435,
7895,
74,
18,
2626,
2668,
10150,
17096,
800,
70,
36,
53,
165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16641,
67,
10150,
12,
2890,
4672,
3536,
7766,
11191,
12382,
364,
7829,
7895,
3536,
7895,
74,
273,
10098,
812,
1435,
7895,
74,
18,
2626,
2668,
10150,
17096,
800,
70,
36,
53,
165... | |
Subwidget Class --------- ----- label Label message Message""" | Subwidget Class --------- ----- label Label message Message""" | def __getitem__(self,key): | 22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
856,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
856,
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... |
""" | """ | def restoreWindowSizes(self): """ Created: 15.08.2005, KP Description: Restores the window sizes that may be changed by setRenderWIndowSize """ self.visWin.SetDefaultSize(self.visWin.origSize) self.sidebarWin.SetDefaultSize(self.sidebarWin.origSize) self.sliderWin.SetDefaultSize(self.sliderWin.origSize) self.toolWin.SetDefaultSize(self.toolWin.origSize) self.OnSize(None) | 228d177ed04eda3e5752ade67b1e400d3b569646 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/228d177ed04eda3e5752ade67b1e400d3b569646/Visualizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
3829,
11923,
12,
2890,
4672,
3536,
12953,
30,
4711,
18,
6840,
18,
6976,
25,
16,
1475,
52,
6507,
30,
6320,
3485,
326,
2742,
8453,
716,
2026,
506,
3550,
635,
444,
3420,
59,
3866,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5217,
3829,
11923,
12,
2890,
4672,
3536,
12953,
30,
4711,
18,
6840,
18,
6976,
25,
16,
1475,
52,
6507,
30,
6320,
3485,
326,
2742,
8453,
716,
2026,
506,
3550,
635,
444,
3420,
59,
3866,
5... |
time0 = index0 * dt - 500 time1 = min(DateTime().secs, time0 + max_ingest_time) | time0 = max(DateTime().secs - opt.max_lookback_time, index0 * dt - 500) time1 = DateTime().secs | def update_stats(colname, interval, msid=None): max_ingest_time = 3e9 dt = {'5min': 328, 'daily': 86400}[interval] ft['msid'] = colname ft['interval'] = interval stats_file = msid_files['stats'].abs logger.info('Updating stats file %s', stats_file) if not os.path.exists(msid_files['statsdir'].abs): os.makedirs(msid_files['statsdir'].abs) stats = tables.openFile(stats_file, mode='a', filters=tables.Filters(complevel=5, complib='zlib')) try: index0 = stats.root.data.cols.index[-1] + 1 except tables.NoSuchNodeError: index0 = DateTime('2000:001:00:00:00').secs // dt if msid is None: time0 = index0 * dt - 500 # fetch a little extra telemetry time1 = min(DateTime().secs, time0 + max_ingest_time) msid = fetch.MSID(colname, time0, time1, filter_bad=True) indexes = np.arange(index0, msid.times[-1] / dt, dtype=np.int32) times = indexes * dt if len(times) > 2: rows = np.searchsorted(msid.times, times) vals_stats = calc_stats_vals(msid.vals, rows, indexes, interval) if not opt.dry_run: try: stats.root.data.append(vals_stats) logger.info(' Adding %d records', len(vals_stats)) except tables.NoSuchNodeError: table = stats.createTable(stats.root, 'data', vals_stats, "%s sampling" % interval, expectedrows=2e7) stats.root.data.flush() stats.close() return msid | 4a7b2c8afe195a29877f3cb52e4014c20bbb09f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12512/4a7b2c8afe195a29877f3cb52e4014c20bbb09f8/update_archive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
5296,
12,
1293,
529,
16,
3673,
16,
4086,
350,
33,
7036,
4672,
943,
67,
310,
395,
67,
957,
273,
890,
73,
29,
3681,
273,
13666,
25,
1154,
4278,
3847,
28,
16,
296,
26790,
4278... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
5296,
12,
1293,
529,
16,
3673,
16,
4086,
350,
33,
7036,
4672,
943,
67,
310,
395,
67,
957,
273,
890,
73,
29,
3681,
273,
13666,
25,
1154,
4278,
3847,
28,
16,
296,
26790,
4278... |
raise osv.except_osv("Warning", "Cannot set supplier in this form. Please create a new relation.") | raise osv.except_osv(_("Warning"), _("Cannot set supplier in this form. Please create a new relation.")) | def write(self, cr, user, ids, vals, context={}): res = {} update = "update product_supplierinfo set sequence = %s where name = %d" relations = self.browse(cr, user, ids) for rel, idn in zip(relations, ids): # cannot change supplier here. Must create a new relation: original_supplier_id = rel.supplier_id.id if not original_supplier_id: raise osv.except_osv("Warning", "Please choose a supplier.") | 38b7e0364c8ad95f17846bc9d6aeb4f228d29a75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/38b7e0364c8ad95f17846bc9d6aeb4f228d29a75/library_editor_supplier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
5773,
16,
819,
12938,
4672,
400,
273,
2618,
1089,
273,
315,
2725,
3017,
67,
2859,
5742,
1376,
444,
3102,
273,
738,
87,
1625,
508,
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,
1045,
12,
2890,
16,
4422,
16,
729,
16,
3258,
16,
5773,
16,
819,
12938,
4672,
400,
273,
2618,
1089,
273,
315,
2725,
3017,
67,
2859,
5742,
1376,
444,
3102,
273,
738,
87,
1625,
508,
273,
... |
if sys.platform == 'win32' and sys.version_info[0] <= 2 and sys.version_info[1] <= 5: ref = '(1e+010+0j)' else: ref = '(1e+10+0j)' assert_equal(str(tp(1e10)), ref, | assert_equal(str(tp(1e10)), _REF[tp(1e10)], | def check_complex_type(tp): for x in [0, 1,-1, 1e20] : assert_equal(str(tp(x)), str(complex(x)), err_msg='Failed str formatting for type %s' % tp) assert_equal(str(tp(x*1j)), str(complex(x*1j)), err_msg='Failed str formatting for type %s' % tp) assert_equal(str(tp(x + x*1j)), str(complex(x + x*1j)), err_msg='Failed str formatting for type %s' % tp) if tp(1e10).itemsize > 8: assert_equal(str(tp(1e10)), str(complex(1e10)), err_msg='Failed str formatting for type %s' % tp) else: if sys.platform == 'win32' and sys.version_info[0] <= 2 and sys.version_info[1] <= 5: ref = '(1e+010+0j)' else: ref = '(1e+10+0j)' assert_equal(str(tp(1e10)), ref, err_msg='Failed str formatting for type %s' % tp) | 733feabcdba9aae2dbc1d71ec17c9b7483e68a1f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/733feabcdba9aae2dbc1d71ec17c9b7483e68a1f/test_print.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
14259,
67,
723,
12,
6834,
4672,
364,
619,
316,
306,
20,
16,
404,
16,
17,
21,
16,
404,
73,
3462,
65,
294,
1815,
67,
9729,
12,
701,
12,
6834,
12,
92,
13,
3631,
609,
12,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
14259,
67,
723,
12,
6834,
4672,
364,
619,
316,
306,
20,
16,
404,
16,
17,
21,
16,
404,
73,
3462,
65,
294,
1815,
67,
9729,
12,
701,
12,
6834,
12,
92,
13,
3631,
609,
12,
14... |
if self.editCommand and self.editCommand.struct: | if self.editCommand is not None and self.editCommand.hasValidStructure(): | def _currentSelectionParams(self): """ NOT CALLED YET. This needs commandSequencer to treat various edit controllers as commands. Until then, the 'model_changed' method (and thus this method) will never be called. Returns a tuple containing current selection parameters. These parameters are then used to decide whether updating widgets in this property manager is needed when L{self.model_changed} or L{self.selection_changed} methods are called. @return: A tuple that contains following selection parameters - Total number of selected atoms (int) - Selected Atom if a single atom is selected, else None - Position vector of the single selected atom or None @rtype: tuple @NOTE: The method name may be renamed in future. Its possible that there are other groupboxes in the PM that need to be updated when something changes in the glpane. """ selectedStrands = [] selectedSegments = [] if self.editCommand and self.editCommand.struct: selectedStrands = self.editCommand.struct.getSelectedStrands() selectedSegments = self.editCommand.struct.getSelectedSegments() return (selectedStrands, selectedSegments) | 3fbac43f0a3fcb545b2eb64da2fd9f24ee8a1079 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/3fbac43f0a3fcb545b2eb64da2fd9f24ee8a1079/BuildDna_PropertyManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2972,
6233,
1370,
12,
2890,
4672,
3536,
4269,
385,
27751,
1624,
1584,
18,
1220,
4260,
1296,
1761,
372,
23568,
358,
10116,
11191,
3874,
12403,
487,
4364,
18,
30608,
1508,
16,
326,
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,
389,
2972,
6233,
1370,
12,
2890,
4672,
3536,
4269,
385,
27751,
1624,
1584,
18,
1220,
4260,
1296,
1761,
372,
23568,
358,
10116,
11191,
3874,
12403,
487,
4364,
18,
30608,
1508,
16,
326,
296,... |
gr2 = m.group(2) | rest = m.group(1) while rest.startswith('/PLACEHOLD'): rest = rest[10:] | def fix_object_code(path): tp = get_object_type(path) if tp is None: return f = open(path, 'r+b') data = f.read() matches = list(placehold_pat.finditer(data)) if not matches: f.close() return if verbose: print "Fixing placeholders in:", path for m in matches: gr2 = m.group(2) # this should not be necessary as the regular expression is # evaluated from left to right, meaning that greediness of # the placeholder repetition comes before the greedy group2 while gr2.startswith('/PLACEHOLD'): gr2 = gr2[10:] if tp.startswith('MachO-') and gr2.startswith('/'): # deprecated: because we now use rpath on OSX as well r = find_lib(gr2[1:]) else: assert gr2 == '' or gr2.startswith(':') rpaths = list(_targets) # extend the list with rpath which were already in the binary, # if any rpaths.extend(p for p in gr2.split(':') if p) r = ':'.join(rpaths) if alt_replace_func is not None: r = alt_replace_func(r) padding = len(m.group(0)) - len(r) if padding < 1: # we need at least one null-character raise Exception("placeholder %r too short" % m.group(0)) r += padding * '\0' assert m.start() + len(r) == m.end() f.seek(m.start()) f.write(r) f.close() | bb1673cddc909e3c704b4a0d3a4807a59d207f4a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7707/bb1673cddc909e3c704b4a0d3a4807a59d207f4a/object_code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
1612,
67,
710,
12,
803,
4672,
8071,
273,
336,
67,
1612,
67,
723,
12,
803,
13,
309,
8071,
353,
599,
30,
327,
225,
284,
273,
1696,
12,
803,
16,
296,
86,
15,
70,
6134,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1612,
67,
710,
12,
803,
4672,
8071,
273,
336,
67,
1612,
67,
723,
12,
803,
13,
309,
8071,
353,
599,
30,
327,
225,
284,
273,
1696,
12,
803,
16,
296,
86,
15,
70,
6134,
501,
... |
if myCoords.pixelValue == "Null": | if myCoords.pixelValue == "NULL": | def find_coords(params): if params.extraTargetCode == '': print """found no extra target code, will only search for target code of obsID \n""" params.extraTargetCode = 'ouk;ohuoenuiuc' #dummy extra target code print "searching..." # get subData in obsID in case i need it later params.sciencePhase, params.orbit, params.targetCode = \ params.obsID.split('_') # use mappt on given file to create output file from where to read the # lon/lat to search for params.mapptFile = params.obsID + '_mappt.csv' get_ground_from_image(params) print "done mapping" myCoords = Coordinates() myCoords.sample = params.inputSample myCoords.line = params.inputLine myCoords.longitude, myCoords.latitude = get_values_from_csv(params, myCoords, 'Longitude', 'Latitude') if myCoords.pixelValue == "Null": print "Given Coordinates do not seem to have a valid pixel value. Check!" sys.exit(1) print """ Your input sample: {0} line: {1} was determined to be latitude: {2:5.2f} longitude: {3:5.2f}""".format(params.inputSample, params.inputLine, float(myCoords.latitude), float(myCoords.longitude)) print "\n Now searching for these coordinates in all mosaicked cubes with "\ "target code", params.targetCode foundFiles = [] zeros = [] # creating t (=search tuple) to remove potential 'None' type (=not defined) l = [] for i in [params.targetCode, params.extraTargetCode]: if i: l.append(i) # if one is None, skip it. t = tuple(l) # get list of all folders that match the targetcode(s) tobeScanned = [] os.chdir(DEST_BASE) for elem in t: tobeScanned.extend(glob.glob('*_' + elem)) for folder in tobeScanned: fpath = os.path.join(DEST_BASE, folder) # there shouldn't be a FILE (!) that ends with just a target code # but just in case: if not os.path.isdir(fpath): continue mosaics = glob.glob(os.path.join(fpath, "*.mos.cub")) for mosaic in mosaics: print 'Scanning', mosaic params.mosaicPath = os.path.join(fpath, mosaic) get_image_from_ground(params, myCoords) myCoords.sample, myCoords.line = \ get_values_from_csv(params, myCoords, 'Sample', 'Line') if not myCoords.pixelValue == "Null" : if any([myCoords.sample < 0, myCoords.line < 0]): zeros.append(mosaic) params.map_sample_offset = \ get_rounded_int_str_from_value(myCoords.sample) params.map_line_offset = \ get_rounded_int_str_from_value(myCoords.line) params.store_row() else: zeros.append(mosaic) print "Found {0} files with non-zero pixel values and {1} out-liers:"\ .format(len(params.data), len(zeros)) params.write_out() print 'Find results in', params.outputFileName | c17ad1877a4f6767404a00a820efd2be2c0715b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3185/c17ad1877a4f6767404a00a820efd2be2c0715b3/find_isis_coordinates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
9076,
12,
2010,
4672,
309,
859,
18,
7763,
2326,
1085,
422,
875,
30,
1172,
3536,
7015,
1158,
2870,
1018,
981,
16,
903,
1338,
1623,
364,
1018,
981,
434,
7160,
734,
521,
82,
839... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9076,
12,
2010,
4672,
309,
859,
18,
7763,
2326,
1085,
422,
875,
30,
1172,
3536,
7015,
1158,
2870,
1018,
981,
16,
903,
1338,
1623,
364,
1018,
981,
434,
7160,
734,
521,
82,
839... |
self.check_sizeof(longdict, h + 3*l + 3*p + 8*(l + 2*p) + 16*(l + 2*p)) | self.check_sizeof(longdict, size(h + '3P3P') + (8+16)*size('P2P')) | def test_specialtypes(self): i = self.i l = self.l p = self.p h = self.headersize # dict self.check_sizeof({}, h + 3*l + 3*p + 8*(l + 2*p)) longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8} self.check_sizeof(longdict, h + 3*l + 3*p + 8*(l + 2*p) + 16*(l + 2*p)) # list self.check_sizeof([], h + l + p + l) self.check_sizeof([1, 2, 3], h + l + p + l + 3*l) # unicode usize = len(u'\0'.encode('unicode-internal')) samples = [u'', u'1'*100] # we need to test for both sizes, because we don't know if the string # has been cached for s in samples: basicsize = h + l + p + l + p + usize * (len(s) + 1) self.check_sizeof(s, basicsize,\ size2=basicsize + sys.getsizeof(str(s))) # XXX trigger caching encoded version as Python string s = samples[1] try: getattr(sys, s) except AttributeError: pass finally: self.check_sizeof(s, basicsize + sys.getsizeof(str(s))) | 300a10ceb1febf233333c4843a55c526b4019feb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/300a10ceb1febf233333c4843a55c526b4019feb/test_sys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
2352,
12,
2890,
4672,
277,
273,
365,
18,
77,
328,
273,
365,
18,
80,
293,
273,
365,
18,
84,
366,
273,
365,
18,
2485,
554,
468,
2065,
365,
18,
1893,
67,
1467,
792,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9371,
2352,
12,
2890,
4672,
277,
273,
365,
18,
77,
328,
273,
365,
18,
80,
293,
273,
365,
18,
84,
366,
273,
365,
18,
2485,
554,
468,
2065,
365,
18,
1893,
67,
1467,
792,
23... |
for i,label in enumerate(images.keys()): if indexes[label] != 1: | for i,label in enumerate(indexes.keys()): if len(indexes[label]) < 1: | def insertQscanTable(self,images=None,thumbs=None,indexes=None): """ Inserts a table constructured of thumbnails linked to larger Qscan plots. It accounts for the ifo present in the coinc via qCoinc. The method expects a lists of URLs """ if images.keys() != indexes.keys(): sys.write.stderr("Error: insertQscanTable ifo keys malformed.\n") #Generate Image Labels channelNames=list() for ifo in images.keys(): channelNames.extend([os.path.basename(x).split("_",1)[1].rsplit("_",3)[0].split(":",1)[1] \ for x in images[ifo]]) uniqChannelNames=list() lastName=None channelNames.sort() while channelNames: myName=channelNames.pop() if lastName != myName: lastName=myName uniqChannelNames.append(myName) #Create table object rowCount=len(uniqChannelNames)+1 colCount=len(images.keys())+1 myTable=self.wikiTable(rowCount,colCount) myTable.setTableStyle("text-align:center") #Make title row myTable.data[0][0]="" for i,label in enumerate(images.keys()): if indexes[label] != 1: myTable.data[0][i+1]=" %s "%label else: myIndexURL="%s"%indexes[label][0] myTable.data[0][i+1]="%s"%self.makeExternalLink(myIndexURL,label) #Fill in table with thumbnails and links for i,channel in enumerate(uniqChannelNames): for j,key in enumerate(images.keys()): try: imageIndex=[x.__contains__(channel) \ for x in images[key]].index(True) imageURL=images[key][imageIndex] thumbIndex=[x.__contains__(channel) \ for x in thumbs[key]].index(True) thumbURL=thumbs[key][thumbIndex] myTable.data[i+1][0]=" %s "%(channel) myTable.data[i+1][j+1]=self.linkedRemoteImage(thumbURL,\ imageURL) except: myTable.data[i+1][j+1]="Unavailable" self.insertTable(myTable) | b70b4fcde32aaece5660335ff3ea1009958cd810 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/b70b4fcde32aaece5660335ff3ea1009958cd810/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
53,
9871,
1388,
12,
2890,
16,
7369,
33,
7036,
16,
451,
10099,
33,
7036,
16,
11265,
33,
7036,
4672,
3536,
8040,
87,
279,
1014,
4872,
2862,
434,
30526,
8459,
358,
10974,
2238,
9871,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
53,
9871,
1388,
12,
2890,
16,
7369,
33,
7036,
16,
451,
10099,
33,
7036,
16,
11265,
33,
7036,
4672,
3536,
8040,
87,
279,
1014,
4872,
2862,
434,
30526,
8459,
358,
10974,
2238,
9871,
... |
self._duration = None | def reset(self): self.stop() self.play_from_time = None self.started_playing = STOPPED self._duration = None | 3869050e26533a7a494127258a8efea28f121986 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/3869050e26533a7a494127258a8efea28f121986/vlc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
12,
2890,
4672,
365,
18,
5681,
1435,
365,
18,
1601,
67,
2080,
67,
957,
273,
599,
365,
18,
14561,
67,
1601,
310,
273,
17815,
12120,
365,
6315,
8760,
273,
599,
2,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
12,
2890,
4672,
365,
18,
5681,
1435,
365,
18,
1601,
67,
2080,
67,
957,
273,
599,
365,
18,
14561,
67,
1601,
310,
273,
17815,
12120,
365,
6315,
8760,
273,
599,
2,
-100,
-100,
-100,... | |
yn.x = 50 yn.y = 0 yn.testValue = 1 | yn.x = 15 yn.y = 25 yn.size = 70 yn.testValue = 0 | def demo(self): D = shapes.Drawing(200, 100) yn = YesNo0() yn.x = 50 yn.y = 0 yn.testValue = 1 yn.draw() D.add(yn) labelFontSize = 10 D.add(shapes.String(yn.x+(yn.size/2),(yn.y-(1.2*labelFontSize)), self.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) return D | 9e1ac96d5b69772a6c97fc0c1be0dbddf9cdc82c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/9e1ac96d5b69772a6c97fc0c1be0dbddf9cdc82c/signsandsymbols.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21477,
12,
2890,
4672,
463,
273,
14736,
18,
26885,
12,
6976,
16,
2130,
13,
677,
82,
273,
19925,
2279,
20,
1435,
677,
82,
18,
92,
273,
4711,
677,
82,
18,
93,
273,
6969,
677,
82,
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,
21477,
12,
2890,
4672,
463,
273,
14736,
18,
26885,
12,
6976,
16,
2130,
13,
677,
82,
273,
19925,
2279,
20,
1435,
677,
82,
18,
92,
273,
4711,
677,
82,
18,
93,
273,
6969,
677,
82,
18,
... |
tech_xml = getTechXMLFromRaw(md) for pn in parameternames: try: print "finding parameter " + pn.name + " in metadata" dfile = Dataset_File.objects.get(pk=current_df_id) if pn.is_numeric: value = getParameterFromTechXML(tech_xml, pn.name) if value != None: | tech_xml = getTechXMLFromRaw(md) for pn in parameternames: try: print "finding parameter " + pn.name + " in metadata" dfile = Dataset_File.objects.get(pk=current_df_id) if pn.is_numeric: value = getParameterFromTechXML(tech_xml, pn.name) if value != None: dp = DatafileParameter(dataset_file=dfile, name=pn, \ string_value=None, numerical_value=float(value)) dp.save() else: | def process_simple(self, filename, created_by, expid=None): | 31b2cedfb33b0065d7fdcc5c8ce916439347646c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11933/31b2cedfb33b0065d7fdcc5c8ce916439347646c/ProcessExperiment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
9647,
12,
2890,
16,
1544,
16,
2522,
67,
1637,
16,
1329,
350,
33,
7036,
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... | [
1,
1,
1,
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,
1207,
67,
9647,
12,
2890,
16,
1544,
16,
2522,
67,
1637,
16,
1329,
350,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise ValueError, "n must be >= -2" if len(self.__qn) < n+3: self.pn(n) | raise ValueError, "n must be at least -2" if n > len(self._x): raise ValueError, "n must be at most %s"%len(self._x) try: return self.__qn[n+2] except (AttributeError, IndexError): pass self.pn(n) | def qn(self, n): """ Return the denominator of the n-th partial convergent, computed using the recurrence. | 72d76d4dfd77ae16eb0814a69f210ece3e32711b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/72d76d4dfd77ae16eb0814a69f210ece3e32711b/contfrac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31054,
12,
2890,
16,
290,
4672,
3536,
2000,
326,
15030,
434,
326,
290,
17,
451,
4702,
14581,
75,
319,
16,
8470,
1450,
326,
25939,
18,
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,
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,
31054,
12,
2890,
16,
290,
4672,
3536,
2000,
326,
15030,
434,
326,
290,
17,
451,
4702,
14581,
75,
319,
16,
8470,
1450,
326,
25939,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.pid = os.fork() | gc_was_enabled = gc.isenabled() gc.disable() try: self.pid = os.fork() except: if gc_was_enabled: gc.enable() raise | def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (POSIX version)""" | 8138692153ef07c83ede437a1f8894804271bf2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/8138692153ef07c83ede437a1f8894804271bf2a/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8837,
67,
3624,
12,
2890,
16,
833,
16,
9070,
16,
675,
4177,
67,
4293,
16,
1746,
67,
74,
2377,
16,
7239,
16,
1550,
16,
26182,
67,
31276,
16,
11850,
1376,
16,
6710,
7133,
16,
5972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8837,
67,
3624,
12,
2890,
16,
833,
16,
9070,
16,
675,
4177,
67,
4293,
16,
1746,
67,
74,
2377,
16,
7239,
16,
1550,
16,
26182,
67,
31276,
16,
11850,
1376,
16,
6710,
7133,
16,
5972... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.