rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
_login_splitter = re.compile('([a-zA-Z])+=(".*?"|.*?),?') | _login_splitter = re.compile('([a-zA-Z]+)=(".*?"|.*?),?') | def getCancelMessage(self): """Override: Specify the cancel message for an HTTP Authentication.""" return "You must log in." | aae0d112c1bf40b9433ec92f03f11926bf49e378 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/aae0d112c1bf40b9433ec92f03f11926bf49e378/Dibbler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12006,
2183,
1079,
12,
2890,
4672,
3536,
6618,
30,
21664,
326,
3755,
883,
364,
392,
2239,
8665,
12123,
327,
315,
6225,
1297,
613,
316,
1199,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12006,
2183,
1079,
12,
2890,
4672,
3536,
6618,
30,
21664,
326,
3755,
883,
364,
392,
2239,
8665,
12123,
327,
315,
6225,
1297,
613,
316,
1199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
sage: B3(1/2,1/2,1/2).mlist() [[(1/2, -1/2, -1/2), 1], [(-1/2, 1/2, -1/2), 1], [(1/2, 1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(-1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(-1/2, 1/2, 1/2), 1]] """ | sage: sorted(B3(1/2,1/2,1/2).mlist()) [[(-1/2, -1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(-1/2, 1/2, -1/2), 1], [(-1/2, 1/2, 1/2), 1], [(1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1], [(1/2, 1/2, 1/2), 1]] """ | def mlist(self): """ Returns a list of weights in self with their multiplicities. EXAMPLES:: sage: B3 = WeylCharacterRing(['B',3]) sage: B3(1/2,1/2,1/2).mlist() [[(1/2, -1/2, -1/2), 1], [(-1/2, 1/2, -1/2), 1], [(1/2, 1/2, 1/2), 1], [(1/2, 1/2, -1/2), 1], [(-1/2, -1/2, 1/2), 1], [(-1/2, -1/2, -1/2), 1], [(1/2, -1/2, 1/2), 1], [(-1/2, 1/2, 1/2), 1]] """ | a6b2a205dd28fe40cc7065c8e2affb912677dd03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a6b2a205dd28fe40cc7065c8e2affb912677dd03/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
1098,
12,
2890,
4672,
3536,
2860,
279,
666,
434,
5376,
316,
365,
598,
3675,
3309,
1780,
1961,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
605,
23,
273,
678,
402,
80,
7069... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
1098,
12,
2890,
4672,
3536,
2860,
279,
666,
434,
5376,
316,
365,
598,
3675,
3309,
1780,
1961,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
605,
23,
273,
678,
402,
80,
7069... |
mspace = h5s.create_simple(selection.mshape) | mspace = h5s.create_simple(mshape) | def __getitem__(self, args): """ Read a slice from the HDF5 dataset. | 28762c5d752feb66b13d86b6449ad3c35ad9a87c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10380/28762c5d752feb66b13d86b6449ad3c35ad9a87c/highlevel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
833,
4672,
3536,
2720,
279,
2788,
628,
326,
21673,
25,
3709,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
833,
4672,
3536,
2720,
279,
2788,
628,
326,
21673,
25,
3709,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
1: request accepted 1, <data>: request accepted with request specific data 0: request denied | - 1: request accepted - 1, <data>: request accepted with request specific data - 0: request denied | def gotGlobalRequest(self, requestType, data): """we got a global request. pretty much, this is just used by the client to request that we forward a port from the server to the client. returns either: 1: request accepted 1, <data>: request accepted with request specific data 0: request denied """ return 0 | 1d60580e1bbd13b8e0033a128f0d6e1149f57888 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1d60580e1bbd13b8e0033a128f0d6e1149f57888/connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2363,
5160,
691,
12,
2890,
16,
27179,
16,
501,
4672,
3536,
1814,
2363,
279,
2552,
590,
18,
225,
7517,
9816,
16,
333,
353,
2537,
1399,
635,
326,
1004,
358,
590,
716,
732,
5104,
279,
175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2363,
5160,
691,
12,
2890,
16,
27179,
16,
501,
4672,
3536,
1814,
2363,
279,
2552,
590,
18,
225,
7517,
9816,
16,
333,
353,
2537,
1399,
635,
326,
1004,
358,
590,
716,
732,
5104,
279,
175... |
if not sendonly: channel._closed = True channel._receiveclosed.set() | def _local_close(self, id, remoteerror=None, sendonly=False): channel = self._channels.get(id) if channel is None: # channel already in "deleted" state if remoteerror: remoteerror.warn() else: # state transition to "closed" state if remoteerror: channel._remoteerrors.append(remoteerror) if not sendonly: # otherwise #--> "sendonly" channel._closed = True # --> "closed" channel._receiveclosed.set() queue = channel._items if queue is not None: queue.put(ENDMARKER) self._no_longer_opened(id) | a11367a619d454cdc8d967d0dbef651510fee688 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7009/a11367a619d454cdc8d967d0dbef651510fee688/gateway_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3729,
67,
4412,
12,
2890,
16,
612,
16,
2632,
1636,
33,
7036,
16,
1366,
3700,
33,
8381,
4672,
1904,
273,
365,
6315,
9114,
18,
588,
12,
350,
13,
309,
1904,
353,
599,
30,
468,
1904... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3729,
67,
4412,
12,
2890,
16,
612,
16,
2632,
1636,
33,
7036,
16,
1366,
3700,
33,
8381,
4672,
1904,
273,
365,
6315,
9114,
18,
588,
12,
350,
13,
309,
1904,
353,
599,
30,
468,
1904... | |
GNU CLISP ... (...) (built ...) ... """ import subprocess p = subprocess.Popen('clisp --version', shell=True, stdin=subprocess.PIPE, stdout = subprocess.PIPE, stderr=subprocess.PIPE) return AsciiArtString(p.stdout.read()) | 'Version information is given by lisp.console().' """ return "Version information is given by lisp.console()." | def version(self): """ Returns the version of Lisp being used. | b5e86549d32b0636e2e08b6f2fe438625f26cf7f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/b5e86549d32b0636e2e08b6f2fe438625f26cf7f/lisp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1177,
12,
2890,
4672,
3536,
2860,
326,
1177,
434,
511,
23831,
3832,
1399,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1177,
12,
2890,
4672,
3536,
2860,
326,
1177,
434,
511,
23831,
3832,
1399,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
user, path = self.mucous.BrowseShares.CurrentDir() self.mucous.Transfers.FolderDownload(user, path + "\\") | user, path = self.mucous.BrowseShares.CurrentDir() self.mucous.Transfers.FolderDownload(user, path + "\\") | def ExecuteBrowse(self): try: the_list = self.List() #username = self.mucous.BrowseShares.current user, path = self.mucous.BrowseShares.CurrentFile() mode = self.mucous.BrowseShares.selected if mode == "directories": number = self.mucous.BrowseShares.scrolling[mode]-self.mucous.BrowseShares.dimensions["directories"]["start"] if self.position == 0: # Download # CHANGED 12/17/2007 Josh Leder # Transfers.FolderDownload strips the end of the path for some reason # so I am adding a trailing path delimiter (which will be discarded) # to prevent going an extra level up in the folder hierarchy # I'm also changing CurrentFile() to CurrentDir() which seems to make # a lot more sense. :) user, path = self.mucous.BrowseShares.CurrentDir() self.mucous.Transfers.FolderDownload(user, path + "\\") return 0 elif self.position == 1: user, path = self.mucous.BrowseShares.CurrentDir() self.mucous.Help.Log("status", "[%d] %s" % (number, path)) return 0 else: self.position -= 2 elif mode == "files": #user, path = self.mucous.BrowseShares.CurrentFile() mode = "files" number = self.mucous.BrowseShares.scrolling[mode] if self.position == 0: # Download self.mucous.Transfers.RetryDownload(user, path) return 0 elif self.position == 1: # Download Dir user, path = self.mucous.BrowseShares.CurrentDir() self.mucous.Transfers.FolderDownload(user, path + "\\") return 0 elif self.position == 2: self.mucous.Help.Log("status", "[%d] %s" % (number+1, path)) return 0 else: self.position -= 3 | 24e2af7c83d22b6200353e78a10acd7415a8acd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8737/24e2af7c83d22b6200353e78a10acd7415a8acd3/MucousPopup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
27304,
12,
2890,
4672,
775,
30,
326,
67,
1098,
273,
365,
18,
682,
1435,
468,
5053,
273,
365,
18,
81,
5286,
1481,
18,
27304,
24051,
18,
2972,
729,
16,
589,
273,
365,
18,
81,
528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
27304,
12,
2890,
4672,
775,
30,
326,
67,
1098,
273,
365,
18,
682,
1435,
468,
5053,
273,
365,
18,
81,
5286,
1481,
18,
27304,
24051,
18,
2972,
729,
16,
589,
273,
365,
18,
81,
528... |
unsigned int uiValue; | Py_UCS4 value; | typedef struct | 03aaac1855cddd96aaf9d4a024a00ec0073823f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/03aaac1855cddd96aaf9d4a024a00ec0073823f3/GenUCNHash.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
618,
536,
1958,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
618,
536,
1958,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
os.exit(1) | sys.exit(1) | def getVideoCodec(folder): """Get the video codec from the streaminfo.xml for the file""" #open the XML containing information about this file infoDOM = xml.dom.minidom.parse(os.path.join(folder, 'streaminfo.xml')) #error out if its the wrong XML if infoDOM.documentElement.tagName != "file": fatalError("This does not look like a stream info file (%s)" % os.path.join(folder, 'streaminfo.xml')) nodes = infoDOM.getElementsByTagName("video") if nodes.length == 0: write("Didn't find any video elements in stream info file!!!") write(""); os.exit(1) if nodes.length > 1: write("Found more than one video element in stream info file!!!") node = nodes[0] return node.attributes["codec"].value | af8f7d695d6986430abbf46f2f453ede50aa214b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/af8f7d695d6986430abbf46f2f453ede50aa214b/mythburn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
10083,
11008,
12,
5609,
4672,
3536,
967,
326,
6191,
9196,
628,
326,
1407,
1376,
18,
2902,
364,
326,
585,
8395,
225,
468,
3190,
326,
3167,
4191,
1779,
2973,
333,
585,
1123,
8168,
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,
336,
10083,
11008,
12,
5609,
4672,
3536,
967,
326,
6191,
9196,
628,
326,
1407,
1376,
18,
2902,
364,
326,
585,
8395,
225,
468,
3190,
326,
3167,
4191,
1779,
2973,
333,
585,
1123,
8168,
273... |
sage: j3 = H3.jucys_murphy(3); j3 | sage: j3 = H3.jucys_murphy(3); j3 | def jucys_murphy(self, k): """ Returns the Jucys-Murphy element J_k of the Hecke algebra. The Jucys-Murphy elements generate the maximal commutative sub-algebra of the Hecke algebra. EXAMPLES:: sage: H3 = HeckeAlgebraSymmetricGroupT(QQ,3) sage: j2 = H3.jucys_murphy(2); j2 q*T[1, 2, 3] + (q-1)*T[2, 1, 3] sage: j3 = H3.jucys_murphy(3); j3 q^2*T[1, 2, 3] + (q^2-q)*T[1, 3, 2] + (q-1)*T[3, 2, 1] sage: j2*j3 == j3*j2 True sage: H3.jucys_murphy(1) Traceback (most recent call last): ... ValueError: k must be between 2 and n (= 3) """ if k not in range(2, self.n+1): raise ValueError, "k must be between 2 and n (= %s)"%self.n | 7d542614e0f23dfadf84366cf4d78957d13b9fc4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/7d542614e0f23dfadf84366cf4d78957d13b9fc4/symmetric_group_algebra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
525,
5286,
1900,
67,
81,
295,
844,
93,
12,
2890,
16,
417,
4672,
3536,
2860,
326,
804,
5286,
1900,
17,
49,
295,
844,
93,
930,
804,
67,
79,
434,
326,
670,
762,
73,
524,
29087,
18,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
525,
5286,
1900,
67,
81,
295,
844,
93,
12,
2890,
16,
417,
4672,
3536,
2860,
326,
804,
5286,
1900,
17,
49,
295,
844,
93,
930,
804,
67,
79,
434,
326,
670,
762,
73,
524,
29087,
18,
10... |
self.__data_group=path self.__data_signal=signal | self.__data_group.append(path) self.__data_signal.append(signal) | def set_data(self,path,signal=1): if self.__avail_data.has_key((path,signal)): self.__data_group=path self.__data_signal=signal else: raise ValueError,"Invalid data specified (%s,%d)" % (path,signal) | ee5677c7ab09c8d6e0825220aa8ec3f4a2dc5345 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/762/ee5677c7ab09c8d6e0825220aa8ec3f4a2dc5345/nexus_dst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
892,
12,
2890,
16,
803,
16,
10420,
33,
21,
4672,
309,
365,
16186,
842,
671,
67,
892,
18,
5332,
67,
856,
12443,
803,
16,
10420,
3719,
30,
365,
16186,
892,
67,
1655,
18,
6923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
892,
12,
2890,
16,
803,
16,
10420,
33,
21,
4672,
309,
365,
16186,
842,
671,
67,
892,
18,
5332,
67,
856,
12443,
803,
16,
10420,
3719,
30,
365,
16186,
892,
67,
1655,
18,
6923,... |
if mask[i][j]: outputfile.write(str(self.data[i][j])) | if mask[i,j]: outputfile.write(str(self.data[i,j])) | def _savedata(self, jobname, gid, aid, geneindex, expindex): # Save the clustered data. if self.genename == None: genename = self.geneid else: genename = self.genename (ngenes, nexps) = numpy.shape(self.data) try: outputfile = open(jobname+'.cdt', 'w') except IOError: raise IOError("Unable to open output file") if self.mask: mask = self.mask else: mask = numpy.ones((ngenes,nexps), int) if self.gweight: gweight = self.gweight else: gweight = numpy.ones(ngenes) if self.eweight: eweight = self.eweight else: eweight = numpy.ones(nexps) if gid: outputfile.write('GID\t') outputfile.write(self.uniqid) outputfile.write('\tNAME\tGWEIGHT') # Now add headers for data columns. for j in expindex: outputfile.write('\t%s' % self.expid[j]) outputfile.write('\n') if aid: outputfile.write("AID") if gid: outputfile.write('\t') outputfile.write("\t\t") for j in expindex: outputfile.write('\tARRY%dX' % j) outputfile.write('\n') outputfile.write('EWEIGHT') if gid: outputfile.write('\t') outputfile.write('\t\t') for j in expindex: outputfile.write('\t%f' % eweight[j]) outputfile.write('\n') for i in geneindex: if gid: outputfile.write('GENE%dX\t' % i) outputfile.write("%s\t%s\t%f" % (self.geneid[i], genename[i], gweight[i])) for j in expindex: outputfile.write('\t') if mask[i][j]: outputfile.write(str(self.data[i][j])) outputfile.write('\n') outputfile.close() | f0e46c903da5db516162da71235bde40e8d0bd6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/f0e46c903da5db516162da71235bde40e8d0bd6c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14077,
396,
12,
2890,
16,
1719,
529,
16,
11399,
16,
20702,
16,
7529,
1615,
16,
1329,
1615,
4672,
468,
7074,
326,
2855,
329,
501,
18,
309,
365,
18,
4507,
1069,
422,
599,
30,
3157,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14077,
396,
12,
2890,
16,
1719,
529,
16,
11399,
16,
20702,
16,
7529,
1615,
16,
1329,
1615,
4672,
468,
7074,
326,
2855,
329,
501,
18,
309,
365,
18,
4507,
1069,
422,
599,
30,
3157,
... |
def main(import_): args = [('sys.modules', bench_cache, 5, 500000), ('source', bench_importing_source, 5, 10000)] test_msg = "{test}, {number} times (best of {repeat}):" result_msg = "{result:.2f} secs" gc.disable() try: for name, meth, repeat, number in args: result = meth(import_, repeat, number) print(test_msg.format(test=name, repeat=repeat, number=number).ljust(40), result_msg.format(result=result).rjust(10)) finally: gc.enable() | def main(import_, repeat=3): __builtins__.__import__ = import_ benchmarks = from_cache, builtin_mod for benchmark in benchmarks: print(benchmark.__doc__, "[", end=' ') sys.stdout.flush() results = [] for result in benchmark(repeat): results.append(result) print(result, end=' ') sys.stdout.flush() print("]", "best is", max(results)) | def main(import_): args = [('sys.modules', bench_cache, 5, 500000), ('source', bench_importing_source, 5, 10000)] test_msg = "{test}, {number} times (best of {repeat}):" result_msg = "{result:.2f} secs" gc.disable() try: for name, meth, repeat, number in args: result = meth(import_, repeat, number) print(test_msg.format(test=name, repeat=repeat, number=number).ljust(40), result_msg.format(result=result).rjust(10)) finally: gc.enable() | 23cf5743aef2b8c2baa023ec3f7493c7e139027a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/23cf5743aef2b8c2baa023ec3f7493c7e139027a/benchmark.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
5666,
67,
16,
7666,
33,
23,
4672,
1001,
12406,
2679,
972,
16186,
5666,
972,
273,
1930,
67,
14128,
87,
273,
628,
67,
2493,
16,
15273,
67,
1711,
364,
14128,
316,
14128,
87,
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,
2774,
12,
5666,
67,
16,
7666,
33,
23,
4672,
1001,
12406,
2679,
972,
16186,
5666,
972,
273,
1930,
67,
14128,
87,
273,
628,
67,
2493,
16,
15273,
67,
1711,
364,
14128,
316,
14128,
87,
30,... |
except ValueError: | except: | def create(self, cr, uid, data, context=None): if context is None: context = {} user_id = super(res_users, self).create(cr, uid, data, context) data_obj = self.pool.get('ir.model.data') try: data_id = data_obj._get_id(cr, uid, 'crm', 'ir_ui_view_sc_calendar0') view_id = data_obj.browse(cr, uid, data_id, context=context).res_id self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = { 'user_id': user_id}, context=context) except ValueError: # Tolerate a missing shortcut. See product/product.py for similar code. logging.getLogger('orm').warning('Skipped Products shortcut for user "%s"', data.get('name','<new')) return user_id | e76438c44944c4ea3729652ec0e47900a6759449 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e76438c44944c4ea3729652ec0e47900a6759449/crm_meeting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
729,
67,
350,
273,
2240,
12,
455,
67,
5577,
16,
365,
2934,
2640,
12,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
729,
67,
350,
273,
2240,
12,
455,
67,
5577,
16,
365,
2934,
2640,
12,
33... |
if not self.locks.has_key(newid) : self.locks[newid] = threading.Lock() | self.locks.create_lock(newid) | def new_task_id(self) : newid = self.backend.new_task_id() if not newid : k = 0 pid = self.dic["pid"] newid = "%s@%s" %(k,pid) while self.tasks.has_key(str(newid)) : k += 1 newid = "%s@%s" %(k,pid) if not self.locks.has_key(newid) : self.locks[newid] = threading.Lock() return newid | 4daef5a2d0aef4d6b8dd91b378a4e0dbaa39d69d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/4daef5a2d0aef4d6b8dd91b378a4e0dbaa39d69d/datastore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
67,
4146,
67,
350,
12,
2890,
13,
294,
394,
350,
273,
365,
18,
9993,
18,
2704,
67,
4146,
67,
350,
1435,
309,
486,
394,
350,
294,
417,
273,
374,
4231,
273,
365,
18,
15859,
9614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
67,
4146,
67,
350,
12,
2890,
13,
294,
394,
350,
273,
365,
18,
9993,
18,
2704,
67,
4146,
67,
350,
1435,
309,
486,
394,
350,
294,
417,
273,
374,
4231,
273,
365,
18,
15859,
9614,
... |
while True: | try: | def __output(conn): while True: data = conn.recv(1024) if not data:break sys.stdout.write(data) sys.stdout.flush() | 9801b81657adc4545e3ca836a3838fec4aa9f5a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10502/9801b81657adc4545e3ca836a3838fec4aa9f5a2/rm_pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2844,
12,
4646,
4672,
775,
30,
501,
273,
1487,
18,
18334,
12,
2163,
3247,
13,
309,
486,
501,
30,
8820,
2589,
18,
10283,
18,
2626,
12,
892,
13,
2589,
18,
10283,
18,
11330,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2844,
12,
4646,
4672,
775,
30,
501,
273,
1487,
18,
18334,
12,
2163,
3247,
13,
309,
486,
501,
30,
8820,
2589,
18,
10283,
18,
2626,
12,
892,
13,
2589,
18,
10283,
18,
11330,
1435,
... |
module_list.add(file) | module_list.add(file[:-4]) | def get_module_list(): module_list = set() if os.path.exists(MODULES_PATH) and os.path.isdir(MODULES_PATH): for file in os.listdir(MODULES_PATH): if os.path.isdir(OPJ(MODULES_PATH, file)): module_list.add(file) elif file[-4:] == '.zip': module_list.add(file) module_list.update(EGG_MODULES.keys()) module_list.add('ir') module_list.add('workflow') module_list.add('res') module_list.add('webdav') return list(module_list) | f61347147f577ffd12cbebfa8906258a00a79208 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/f61347147f577ffd12cbebfa8906258a00a79208/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2978,
67,
1098,
13332,
1605,
67,
1098,
273,
444,
1435,
309,
1140,
18,
803,
18,
1808,
12,
12194,
55,
67,
4211,
13,
471,
1140,
18,
803,
18,
291,
1214,
12,
12194,
55,
67,
4211,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2978,
67,
1098,
13332,
1605,
67,
1098,
273,
444,
1435,
309,
1140,
18,
803,
18,
1808,
12,
12194,
55,
67,
4211,
13,
471,
1140,
18,
803,
18,
291,
1214,
12,
12194,
55,
67,
4211,... |
writeline(global_functions_hdr, " | writeline(global_functions_hdr, "#ifdef LIBXML_THREAD_ENABLED") | 0ba59239d92a0ea82d6515f15cc0723a61ef7400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/0ba59239d92a0ea82d6515f15cc0723a61ef7400/build_glob.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2518,
3027,
12,
6347,
67,
10722,
67,
16587,
16,
6619,
430,
536,
23983,
4201,
67,
21730,
67,
13560,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2518,
3027,
12,
6347,
67,
10722,
67,
16587,
16,
6619,
430,
536,
23983,
4201,
67,
21730,
67,
13560,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
cty.POINTER(Display), [], | cty.POINTER(Display), [], | def fl_cur_fs_(): """ fl_cur_fs_() -> XFontStruct class """ retval = _fl_cur_fs_() return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
1397,
67,
2556,
67,
13332,
3536,
1183,
67,
1397,
67,
2556,
67,
1435,
317,
1139,
5711,
3823,
667,
3536,
225,
5221,
273,
389,
2242,
67,
1397,
67,
2556,
67,
1435,
327,
5221,
282... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
1397,
67,
2556,
67,
13332,
3536,
1183,
67,
1397,
67,
2556,
67,
1435,
317,
1139,
5711,
3823,
667,
3536,
225,
5221,
273,
389,
2242,
67,
1397,
67,
2556,
67,
1435,
327,
5221,
282... |
self.rtm.tasks.setTags(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, tags = tagstxt) | result = self.rtm.tasks.setTags(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, tags = tagstxt) transaction_ids.append(result.transaction.id) | def set_tags(self, tags): ''' Sets a new set of tags to a task. Old tags are deleted. ''' #RTM accept tags without "@" as prefix, and lowercase tags = [tag[1:].lower() for tag in tags] #formatting them in a comma-separated string if len(tags) > 0: tagstxt = reduce(lambda x,y: x + ", " + y, tags) else: tagstxt = "" self.rtm.tasks.setTags(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, tags = tagstxt) | fffe3b9f55f5154c782ebf92f94d5c77ce8b695b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/fffe3b9f55f5154c782ebf92f94d5c77ce8b695b/backend_rtm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4156,
12,
2890,
16,
2342,
4672,
9163,
11511,
279,
394,
444,
434,
2342,
358,
279,
1562,
18,
18613,
2342,
854,
4282,
18,
9163,
468,
12185,
49,
2791,
2342,
2887,
18265,
487,
1633,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4156,
12,
2890,
16,
2342,
4672,
9163,
11511,
279,
394,
444,
434,
2342,
358,
279,
1562,
18,
18613,
2342,
854,
4282,
18,
9163,
468,
12185,
49,
2791,
2342,
2887,
18265,
487,
1633,
... |
counter.plus(redirectTargetPage.site) | counter.plus(redirectTargetPage.site()) | def batchLoaded(self, counter): """ This is called by a worker to tell us that the promised batch of pages was loaded. In other words, all the pages in self.pending have already been preloaded. | f26d76644fc8019e697195041c809c1410e6c4e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/f26d76644fc8019e697195041c809c1410e6c4e9/interwiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2581,
8835,
12,
2890,
16,
3895,
4672,
3536,
1220,
353,
2566,
635,
279,
4322,
358,
9276,
584,
716,
326,
3012,
5918,
2581,
434,
4689,
1703,
4203,
18,
657,
1308,
4511,
16,
777,
326,
4689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2581,
8835,
12,
2890,
16,
3895,
4672,
3536,
1220,
353,
2566,
635,
279,
4322,
358,
9276,
584,
716,
326,
3012,
5918,
2581,
434,
4689,
1703,
4203,
18,
657,
1308,
4511,
16,
777,
326,
4689,
... |
if isinstance(value, package_relation_list): | if isinstance(value, PackageRelation): | def process_package(self, in_entry, vars): e = package() for key, value in in_entry.iteritems(): if isinstance(value, package_relation_list): self.process_relation(key, e, in_entry, vars) elif key == 'Description': self.process_description(e, in_entry, vars) elif key[:2] == 'X-': pass else: e[key] = self.substitute(value, vars) return e | 136c33d961d0ff02562a22ebb9d444eca0f3f543 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/136c33d961d0ff02562a22ebb9d444eca0f3f543/gencontrol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
5610,
12,
2890,
16,
316,
67,
4099,
16,
4153,
4672,
425,
273,
2181,
1435,
364,
498,
16,
460,
316,
316,
67,
4099,
18,
2165,
3319,
13332,
309,
1549,
12,
1132,
16,
7508,
3963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
5610,
12,
2890,
16,
316,
67,
4099,
16,
4153,
4672,
425,
273,
2181,
1435,
364,
498,
16,
460,
316,
316,
67,
4099,
18,
2165,
3319,
13332,
309,
1549,
12,
1132,
16,
7508,
3963,
... |
def suffix2mask (n): "return a mask of n bits as a long integer" return (1L << (32 - n)) - 1 def mask2suffix (mask): """return suff for given bit mask""" return 32 - int(math.log(mask+1, 2)) def dq2mask (ip): | def cidr2mask (n): "return a mask where the n left-most of 32 bits are set" return ((1L << n) - 1) << (32-n) def netmask2mask (ip): | def suffix2mask (n): "return a mask of n bits as a long integer" return (1L << (32 - n)) - 1 | 2ecd0206d653574af32efa1ae225b3e5ad4ef5d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/2ecd0206d653574af32efa1ae225b3e5ad4ef5d6/ip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3758,
22,
4455,
261,
82,
4672,
315,
2463,
279,
3066,
434,
290,
4125,
487,
279,
1525,
3571,
6,
327,
261,
21,
48,
2296,
261,
1578,
300,
290,
3719,
300,
404,
282,
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,
3758,
22,
4455,
261,
82,
4672,
315,
2463,
279,
3066,
434,
290,
4125,
487,
279,
1525,
3571,
6,
327,
261,
21,
48,
2296,
261,
1578,
300,
290,
3719,
300,
404,
282,
2,
-100,
-100,
-100,
-... |
while panel.Affirmed(): panel.SetResult(filepathCtrl.GetValue()) | def Configure(self, foobar2000Path=None): if foobar2000Path is None: foobar2000Path = self.GetFoobar2000Path() if foobar2000Path is None: foobar2000Path = os.path.join( eg.folderPath.ProgramFiles, "foobar2000", "foobar2000.exe" ) panel = eg.ConfigPanel() filepathCtrl = eg.FileBrowseButton( panel, size=(320,-1), initialValue=foobar2000Path, startDirectory=eg.folderPath.ProgramFiles, labelText="", fileMask = "Foobar2000 executable|foobar2000.exe|All-Files (*.*)|*.*", buttonText=eg.text.General.browse, ) panel.AddLabel("Path to foobar2000 executable:") panel.AddCtrl(filepathCtrl) while panel.Affirmed(): panel.SetResult(filepathCtrl.GetValue()) | c9bc474560de72f76a83aa0e27116937e21322eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8076/c9bc474560de72f76a83aa0e27116937e21322eb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11758,
12,
2890,
16,
18261,
947,
297,
17172,
743,
33,
7036,
4672,
309,
18261,
947,
297,
17172,
743,
353,
599,
30,
18261,
947,
297,
17172,
743,
273,
365,
18,
967,
42,
83,
947,
297,
1717... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11758,
12,
2890,
16,
18261,
947,
297,
17172,
743,
33,
7036,
4672,
309,
18261,
947,
297,
17172,
743,
353,
599,
30,
18261,
947,
297,
17172,
743,
273,
365,
18,
967,
42,
83,
947,
297,
1717... | |
print 'MYSELF %s %s RECEIVED %s %s' % (my_hostname, my_port, host, port) | def mdns_callback(self, added, fullname, host, port): # NB: Filter out myself. added_list = [] removed_list = [] # First check to see if it's myself. my_hostname, my_port = app.sharing_manager.mdns_myself() print 'MYSELF %s %s RECEIVED %s %s' % (my_hostname, my_port, host, port) if my_hostname == host and my_port == port: return # Need to come up with a unique ID for the share. Use # (name, host, port) share_id = (fullname, host, port) info = messages.SharingInfo(share_id, fullname, host, port) if added: added_list.append(info) else: removed_list.append(share_id) # XXX we should not be simply stopping because the mDNS share # disappears. AND we should not be calling this from backend # due to RACE! item = app.playback_manager.get_playing_item() remote_item = False if item and item.remote: remote_item = True if remote_item and item.host == host and item.port == port: app.playback_manager.stop(save_resume_time=False) # XXX should not remove this tab if it is currently mounted. The # mDNS going away just means it is no longer published, doesn't # mean it's not available. message = messages.TabsChanged('sharing', added_list, [], removed_list) message.send_to_frontend() | 5d9eaacb6803409c74f2d8680e2b5202142fe67b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/5d9eaacb6803409c74f2d8680e2b5202142fe67b/sharing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3481,
2387,
67,
3394,
12,
2890,
16,
3096,
16,
13321,
16,
1479,
16,
1756,
4672,
468,
20096,
30,
4008,
596,
3399,
2890,
18,
3096,
67,
1098,
273,
5378,
3723,
67,
1098,
273,
5378,
468,
578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3481,
2387,
67,
3394,
12,
2890,
16,
3096,
16,
13321,
16,
1479,
16,
1756,
4672,
468,
20096,
30,
4008,
596,
3399,
2890,
18,
3096,
67,
1098,
273,
5378,
3723,
67,
1098,
273,
5378,
468,
578... | |
else: continue | def run(options): found = report.results_by_label(options.output_dir) labels = {} for label in sorted(found): for filter in options.x_label + options.y_label: if filter(label): break else: continue tests = labels.setdefault(label, {}) # XXX for test in sorted(found[label]): times, paths_vs = found[label][test] path = times[max(times)] abs_path = os.path.join(options.output_dir, path) if not os.path.isfile(os.path.join(abs_path, 'funkload.xml')): abs_path = report.build_html_report(options, abs_path) path = os.path.basename(abs_path) test_d = tests.setdefault( test, dict(report=path, name=test.rsplit('.', 1)[-1], diffs={})) diffs = test_d['diffs'] for label_vs in sorted(labels): tests_vs = labels[label_vs] if label == label_vs or test not in tests_vs: continue test_vs_d = tests_vs[test] path_vs = test_vs_d['report'] diffs_vs = test_vs_d['diffs'] if os.path.dirname(path_vs) not in paths_vs: diff_path = report.build_diff_report( options, abs_path, os.path.join(options.output_dir, path_vs)) diff_path = os.path.basename(diff_path) diffs_vs[label] = diff_path diffs[label_vs] = diff_path return build_index(options.output_dir, labels) | 75dc54f059b4cc18b4f9732a1256f97f54a02006 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9007/75dc54f059b4cc18b4f9732a1256f97f54a02006/label.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2116,
4672,
1392,
273,
2605,
18,
4717,
67,
1637,
67,
1925,
12,
2116,
18,
2844,
67,
1214,
13,
3249,
273,
2618,
364,
1433,
316,
3115,
12,
7015,
4672,
364,
1034,
316,
702,
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,
1086,
12,
2116,
4672,
1392,
273,
2605,
18,
4717,
67,
1637,
67,
1925,
12,
2116,
18,
2844,
67,
1214,
13,
3249,
273,
2618,
364,
1433,
316,
3115,
12,
7015,
4672,
364,
1034,
316,
702,
18,
... | |
ACTIONS = Option.ACTIONS + ("extendResetDefault",) STORE_ACTIONS = Option.STORE_ACTIONS + ("extendResetDefault",) TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extendResetDefault",) ALWAYS_TYPED_ACTIONS = Option.ALWAYS_TYPED_ACTIONS + ("extendResetDefault",) | ACTIONS = Option.ACTIONS + ("extendResetDefault", "appendResetDefault") STORE_ACTIONS = Option.STORE_ACTIONS + ("extendResetDefault", "appendResetDefault") TYPED_ACTIONS = Option.TYPED_ACTIONS + ("extendResetDefault", "appendResetDefault") ALWAYS_TYPED_ACTIONS = Option.ALWAYS_TYPED_ACTIONS + ("extendResetDefault", "appendResetDefault") | def check_pathstring(option, opt, value): return value.split(':') | 4f2b1b2bc6a5e1aac8f432abb14bdafad0ee9a99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/4f2b1b2bc6a5e1aac8f432abb14bdafad0ee9a99/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
803,
1080,
12,
3482,
16,
2153,
16,
460,
4672,
327,
460,
18,
4939,
2668,
2497,
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,
... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
803,
1080,
12,
3482,
16,
2153,
16,
460,
4672,
327,
460,
18,
4939,
2668,
2497,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
else | else: | def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 948) else quickfix.IntField.__init__(self, 948, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
2468,
8875,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
2468,
8875,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
27... |
""" | """ | def fl_create_browser(type, x, y, w, h, label): """ fl_create_browser(type, x, y, w, h, label) -> object """ retval = _fl_create_browser(type, x, y, w, h, label) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
2640,
67,
11213,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
11213,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
2640,
67,
11213,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
11213,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
13,
... |
printed_file = '__file__==%r' % expected_file | printed_file = '__file__==%a' % expected_file | def _check_output(self, script_name, exit_code, data, expected_file, expected_argv0, expected_path0, expected_package): if verbose > 1: print("Output from test script %r:" % script_name) print(data) self.assertEqual(exit_code, 0) printed_file = '__file__==%r' % expected_file printed_package = '__package__==%r' % expected_package printed_argv0 = 'sys.argv[0]==%r' % expected_argv0 printed_path0 = 'sys.path[0]==%r' % expected_path0 printed_cwd = 'cwd==%r' % os.getcwd() if verbose > 1: print('Expected output:') print(printed_file) print(printed_package) print(printed_argv0) print(printed_cwd) self.assertIn(printed_file.encode('utf-8'), data) self.assertIn(printed_package.encode('utf-8'), data) self.assertIn(printed_argv0.encode('utf-8'), data) self.assertIn(printed_path0.encode('utf-8'), data) self.assertIn(printed_cwd.encode('utf-8'), data) | ea5b4e536a569fc4fcc34436ce71ec6b5a0ff90d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/ea5b4e536a569fc4fcc34436ce71ec6b5a0ff90d/test_cmd_line_script.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
2844,
12,
2890,
16,
2728,
67,
529,
16,
2427,
67,
710,
16,
501,
16,
2665,
67,
768,
16,
2665,
67,
19485,
20,
16,
2665,
67,
803,
20,
16,
2665,
67,
5610,
4672,
309,
3988... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
67,
2844,
12,
2890,
16,
2728,
67,
529,
16,
2427,
67,
710,
16,
501,
16,
2665,
67,
768,
16,
2665,
67,
19485,
20,
16,
2665,
67,
803,
20,
16,
2665,
67,
5610,
4672,
309,
3988... |
_children['{%s}eventStatus' % gdata.GDATA_NAMESPACE] = ('event_status', | _children['{%s}eventStatus' % gdata.GDATA_NAMESPACE] = ('event_status', | def __init__(self, value='false', *args, **kwargs): atom.AtomBase.__init__(self, *args, **kwargs) self.value = value | 220fb3846b34b52b462236a865acc3580b5bf99c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/220fb3846b34b52b462236a865acc3580b5bf99c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
460,
2218,
5743,
2187,
380,
1968,
16,
2826,
4333,
4672,
3179,
18,
3641,
2171,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
460,
2218,
5743,
2187,
380,
1968,
16,
2826,
4333,
4672,
3179,
18,
3641,
2171,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
113... |
return self._nextAdjacentNode(node.parent) | if node.parent: return self._nextAdjacentNode(node.parent) return None | def _nextAdjacentNode(self, node): if node.next: res = node.next.getFirstLeaf() or node.next return res return self._nextAdjacentNode(node.parent) | 91be6a8b9c3220a8979d13286b6698d999f0ac44 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/91be6a8b9c3220a8979d13286b6698d999f0ac44/treecleaner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4285,
17886,
25897,
907,
12,
2890,
16,
756,
4672,
309,
756,
18,
4285,
30,
400,
273,
756,
18,
4285,
18,
588,
3759,
9858,
1435,
578,
756,
18,
4285,
327,
400,
327,
365,
6315,
4285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
4285,
17886,
25897,
907,
12,
2890,
16,
756,
4672,
309,
756,
18,
4285,
30,
400,
273,
756,
18,
4285,
18,
588,
3759,
9858,
1435,
578,
756,
18,
4285,
327,
400,
327,
365,
6315,
4285,
... |
self.jobDB.setJobAttribute(job,'Status',status, update=True) | def updateJobStatus(self,job,status,minorstatus=None): """This method updates the job status in the JobDB. """ self.log.debug("self.jobDB.setJobAttribute("+str(job)+",Status,"+status+" update=True)") self.jobDB.setJobAttribute(job,'Status',status, update=True) if minorstatus: self.log.debug("self.jobDB.setJobAttribute("+str(job)+","+minorstatus+",update=True)") self.jobDB.setJobAttribute(job,'ApplicationStatus',minorstatus,update=True) | a6debbed9900a8e23c472e793e54d6837cc52921 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/a6debbed9900a8e23c472e793e54d6837cc52921/JobSanityAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
23422,
12,
2890,
16,
4688,
16,
2327,
16,
17364,
2327,
33,
7036,
4672,
3536,
2503,
707,
4533,
326,
1719,
1267,
316,
326,
3956,
2290,
18,
3536,
365,
18,
1330,
18,
4148,
2932,
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,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
23422,
12,
2890,
16,
4688,
16,
2327,
16,
17364,
2327,
33,
7036,
4672,
3536,
2503,
707,
4533,
326,
1719,
1267,
316,
326,
3956,
2290,
18,
3536,
365,
18,
1330,
18,
4148,
2932,
2890,
... | |
temp = tempfile.mktemp('.h') shutil.copyfile(filename, temp) f = file(temp, 'a') f.write('\n\n'+tail) | if hasattr(tempfile, 'mkstemp'): f_no, temp = tempfile.mkstemp('.h') f = file(temp, 'a') os.close(f_no) else: temp = tempfile.mktemp('.h') f = file(temp, 'a') f.write(' f.write(tail) f.write('\n') | def AppendTail(self, filename, tail): '''Creates a temporary file, appends the text tail to it, and returns the filename of the file. ''' temp = tempfile.mktemp('.h') shutil.copyfile(filename, temp) f = file(temp, 'a') f.write('\n\n'+tail) f.close() return temp | 92ff4ab76fe4cbfe44794fcade7f38f49fdf7f3c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9978/92ff4ab76fe4cbfe44794fcade7f38f49fdf7f3c/CppParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6181,
12363,
12,
2890,
16,
1544,
16,
5798,
4672,
9163,
2729,
279,
6269,
585,
16,
8144,
326,
977,
5798,
358,
518,
16,
471,
1135,
326,
1544,
434,
326,
585,
18,
9163,
309,
3859,
12,
5814,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6181,
12363,
12,
2890,
16,
1544,
16,
5798,
4672,
9163,
2729,
279,
6269,
585,
16,
8144,
326,
977,
5798,
358,
518,
16,
471,
1135,
326,
1544,
434,
326,
585,
18,
9163,
309,
3859,
12,
5814,... |
return hasattr(x, '_proxy_attr__proxy') | hasattr(x, 'x._proxy_attr__dont_mess_with_me_unless_you_know_what_youre_doing') | def is_proxy_attr(x): return hasattr(x, '_proxy_attr__proxy') | 34865d4577575a214163bb59a5d287b7df2430a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/34865d4577575a214163bb59a5d287b7df2430a9/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
5656,
67,
1747,
12,
92,
4672,
3859,
12,
92,
16,
296,
92,
6315,
5656,
67,
1747,
972,
72,
1580,
67,
81,
403,
67,
1918,
67,
3501,
67,
28502,
67,
19940,
67,
79,
3338,
67,
2377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
67,
5656,
67,
1747,
12,
92,
4672,
3859,
12,
92,
16,
296,
92,
6315,
5656,
67,
1747,
972,
72,
1580,
67,
81,
403,
67,
1918,
67,
3501,
67,
28502,
67,
19940,
67,
79,
3338,
67,
2377... |
if action != None and self.slideshow_mode == True: return | def zoom_to_fit_window(self, action): if action != None and self.slideshow_mode == True: return if self.userimage != "" and (self.slideshow_mode == True or self.UIManager.get_widget('/MainMenu/ViewMenu/Fit').get_property('sensitive') == True): self.last_mode = self.open_mode_fit self.last_image_action_was_fit = True # Calculate zoomratio needed to fit to window: win_width = self.available_image_width() win_height = self.available_image_height() img_width = self.originalimg.get_width() img_height = self.originalimg.get_height() if self.orientation == 1: # Image is rotated, swap img_width and img_height: img_width, img_height = img_height, img_width width_ratio = float(img_width)/win_width height_ratio = float(img_height)/win_height if width_ratio < height_ratio: max_ratio = height_ratio else: max_ratio = width_ratio self.zoomratio = 1/float(max_ratio) if self.slideshow_mode == False: self.set_zoom_sensitivities() self.put_zoom_image_to_window() self.update_statusbar() return | 0445f1d38bc0317dd647f4a079165e30c1fb53af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/0445f1d38bc0317dd647f4a079165e30c1fb53af/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7182,
67,
869,
67,
7216,
67,
5668,
12,
2890,
16,
1301,
4672,
309,
365,
18,
1355,
2730,
480,
1408,
471,
261,
2890,
18,
2069,
4369,
13606,
67,
3188,
422,
1053,
578,
365,
18,
5370,
1318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7182,
67,
869,
67,
7216,
67,
5668,
12,
2890,
16,
1301,
4672,
309,
365,
18,
1355,
2730,
480,
1408,
471,
261,
2890,
18,
2069,
4369,
13606,
67,
3188,
422,
1053,
578,
365,
18,
5370,
1318,
... | |
"HE2": atom_info("H", 0, "H'"), | "HE2": atom_info("H", 0, "H"), | def keys(self): return ("element_symbol", "ionic_state", "scattering_label") | 46b20303e8ed53745807da84c39cb29f25aa3911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/46b20303e8ed53745807da84c39cb29f25aa3911/residue_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
7566,
2956,
67,
7175,
3113,
315,
285,
335,
67,
2019,
3113,
315,
31320,
310,
67,
1925,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
7566,
2956,
67,
7175,
3113,
315,
285,
335,
67,
2019,
3113,
315,
31320,
310,
67,
1925,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
""" % (len(seqs), len(seqs[0]), format) | """ % (len(seqs), len(seqs[0]), format2) | def writeNexus(out, names, seqs, format="pep", options=None, seqwidth=1000): # setup options if options is None: options = {} # determine sequence format if format == "pep": format = "protein" elif format == "dna": format = "dna" else: raise Exception("unknown sequence format") # write Nexus file header print >>out, """\ | 53f951f1710157d559ce91f0c4b7da93d90f290a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8482/53f951f1710157d559ce91f0c4b7da93d90f290a/mrbayes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
50,
21029,
12,
659,
16,
1257,
16,
19472,
16,
740,
1546,
29363,
3113,
702,
33,
7036,
16,
3833,
2819,
33,
18088,
4672,
468,
3875,
702,
309,
702,
353,
599,
30,
702,
273,
2618,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
50,
21029,
12,
659,
16,
1257,
16,
19472,
16,
740,
1546,
29363,
3113,
702,
33,
7036,
16,
3833,
2819,
33,
18088,
4672,
468,
3875,
702,
309,
702,
353,
599,
30,
702,
273,
2618,
225,
... |
logger.log("bwmon: ** %(slice)s %(class)s capped at %(new_maxexemptrate)s/s " % params) | logger.log("bwmon: ** %(slice)s %(class)s capped at %(new_maxrate)s/s " % params) | def notify(self, new_maxrate, new_maxexemptrate, usedbytes, usedi2bytes): """ Notify the slice it's being capped. """ # Prepare message parameters from the template message = "" params = {'slice': self.name, 'hostname': socket.gethostname(), 'since': time.asctime(time.gmtime(self.time)) + " GMT", 'until': time.asctime(time.gmtime(self.time + period)) + " GMT", 'date': time.asctime(time.gmtime()) + " GMT", 'period': format_period(period)} | 9ce0d803975411f43ded4f8844c6eed314d670e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6995/9ce0d803975411f43ded4f8844c6eed314d670e1/bwmon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
12,
2890,
16,
394,
67,
1896,
5141,
16,
394,
67,
1896,
338,
351,
6723,
340,
16,
1399,
3890,
16,
1399,
77,
22,
3890,
4672,
3536,
10918,
326,
2788,
518,
1807,
3832,
3523,
1845,
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,
5066,
12,
2890,
16,
394,
67,
1896,
5141,
16,
394,
67,
1896,
338,
351,
6723,
340,
16,
1399,
3890,
16,
1399,
77,
22,
3890,
4672,
3536,
10918,
326,
2788,
518,
1807,
3832,
3523,
1845,
18,
... |
return {'nom':' ','type':' ','etiket':' ','date':-1,'ip1':-1,'ip2':-1,'ip3':-1,'handle':-2,'nxt':0,'fileref':None} | """Return a dict of allowed Keys/Vals""" return {'nom':' ','type':' ','etiket':' ','datev':-1,'ip1':-1,'ip2':-1,'ip3':-1,'handle':-2,'nxt':0,'fileref':None} | def allowedKeysVals(self): return {'nom':' ','type':' ','etiket':' ','date':-1,'ip1':-1,'ip2':-1,'ip3':-1,'handle':-2,'nxt':0,'fileref':None} | 17a09153447b58f67bbac52edd65343131cc36bc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1808/17a09153447b58f67bbac52edd65343131cc36bc/rpnstd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2935,
2396,
13169,
12,
2890,
4672,
327,
13666,
12306,
11,
2497,
565,
3316,
723,
11,
2497,
225,
3316,
278,
1766,
278,
11,
2497,
5411,
3316,
712,
4278,
17,
21,
11189,
625,
21,
4278,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2935,
2396,
13169,
12,
2890,
4672,
327,
13666,
12306,
11,
2497,
565,
3316,
723,
11,
2497,
225,
3316,
278,
1766,
278,
11,
2497,
5411,
3316,
712,
4278,
17,
21,
11189,
625,
21,
4278,
17,
... |
if type(darts) == int: darts = [darts] | def highlight(self, darts, color = qt.Qt.yellow): """highlight(darts) Highlight the given darts (can be any iterable returning labels or Dart objects).""" | 54ffb4bc4e99d33d7061e1f25f35fa20ad242ffa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/54ffb4bc4e99d33d7061e1f25f35fa20ad242ffa/mapdisplay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8839,
12,
2890,
16,
302,
485,
87,
16,
2036,
273,
25672,
18,
23310,
18,
19227,
4672,
3536,
15978,
12,
72,
485,
87,
13,
31386,
326,
864,
302,
485,
87,
261,
4169,
506,
1281,
6087,
5785,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8839,
12,
2890,
16,
302,
485,
87,
16,
2036,
273,
25672,
18,
23310,
18,
19227,
4672,
3536,
15978,
12,
72,
485,
87,
13,
31386,
326,
864,
302,
485,
87,
261,
4169,
506,
1281,
6087,
5785,
... | |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for records based on a search domain. :param cr: database cursor :param user: current user id :param args: list of tuples specifying the search domain [('field_name', 'operator', value), ...]. Pass an empty list to match all records. :param offset: optional number of results to skip in the returned values (default: 0) :param limit: optional max number of records to return (default: **None**) :param order: optional columns to sort by (default: self._order=id ) :param context: optional context arguments, like lang, time zone :type context: dictionary :param count: optional (default: **False**), if **True**, returns only the number of records matching the criteria, not their ids :return: id or list of ids of records matching the criteria :rtype: integer or list of integers :raise AccessError: * if user tries to bypass access rules for read on the requested object. **Expressing a search domain (args)** Each tuple in the search domain needs to have 3 elements, in the form: **('field_name', 'operator', value)**, where: * **field_name** must be a valid name of field of the object model, possibly following many-to-one relationships using dot-notation, e.g 'street' or 'partner_id.country' are valid values. * **operator** must be a string with a valid comparison operator from this list: ``=, !=, >, >=, <, <=, like, ilike, in, not in, child_of, parent_left, parent_right`` The semantics of most of these operators are obvious. The ``child_of`` operator will look for records who are children or grand-children of a given record, according to the semantics of this model (i.e following the relationship field named by ``self._parent_name``, by default ``parent_id``. * **value** must be a valid value to compare with the values of **field_name**, depending on its type. Domain criteria can be combined using 3 logical operators than can be added between tuples: '**&**' (logical AND, default), '**|**' (logical OR), '**!**' (logical NOT). These are **prefix** operators and the arity of the '**&**' and '**|**' operator is 2, while the arity of the '**!**' is just 1. Be very careful about this when you combine them the first time. Here is an example of searching for Partners named *ABC* from Belgium and Germany whose language is not english :: [('name','=','ABC'),'!',('language.code','=','en_US'),'|',('country_id.code','=','be'),('country_id.code','=','de')) The '&' is omitted as it is the default, and of course we could have used '!=' for the language, but what this domain really represents is:: (name is 'ABC' AND (language is NOT english) AND (country is Belgium OR Germany)) """ return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) def _search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): """ Private implementation of search() method, allowing specifying the uid to use for the access right check. This is useful for example when filling in the selection list for a drop-down and avoiding access rights errors, by specifying ``access_rights_uid=1`` to bypass access rights check, but not ir.rules! :param access_rights_uid: optional user ID to use when checking access rights (not for ir.rules, this is only for ir.model.access) """ | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): raise NotImplementedError(_('The search method is not implemented on this object !')) | fb1b59cc7592103b77e5eba54e06b0470f245930 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/fb1b59cc7592103b77e5eba54e06b0470f245930/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
3536,
5167,
364,
3853,
2511,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
3536,
5167,
364,
3853,
2511,
603,
... |
errReply = None currTime = time.time() | def _checkRemCmdTimeouts(self, cmdVarIter): """Helper function for checkCmdTimeouts. Check the remaining command variables in cmdVarIter. If a timeout is found, time out that one command and schedule myself to run again shortly (thereby giving other events a chance to run). | 0bf1972ecff43f5038342922e39a02c6bb08528d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/425/0bf1972ecff43f5038342922e39a02c6bb08528d/cmdkeydispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
1933,
5931,
2694,
87,
12,
2890,
16,
1797,
1537,
2360,
4672,
3536,
2276,
445,
364,
866,
5931,
2694,
87,
18,
2073,
326,
4463,
1296,
3152,
316,
1797,
1537,
2360,
18,
971,
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,
389,
1893,
1933,
5931,
2694,
87,
12,
2890,
16,
1797,
1537,
2360,
4672,
3536,
2276,
445,
364,
866,
5931,
2694,
87,
18,
2073,
326,
4463,
1296,
3152,
316,
1797,
1537,
2360,
18,
971,
279,
... | |
subject_line = msg[:30].lstrip().split('\n', 1)[0].lower() return re.sub('[\W]+', '-', subject_line).strip('-') | subject_line = msg.split('\n', 1)[0].lstrip().lower() return re.sub('[\W]+', '-', subject_line).strip('-')[:30] | def patch_name_from_msg(msg): """Return a string to be used as a patch name. This is generated from the first 30 characters of the top line of the string passed as argument.""" if not msg: return None subject_line = msg[:30].lstrip().split('\n', 1)[0].lower() return re.sub('[\W]+', '-', subject_line).strip('-') | 50dec9eae9cd8b6acd0e239dddd64586aec30df0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/50dec9eae9cd8b6acd0e239dddd64586aec30df0/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
67,
529,
67,
2080,
67,
3576,
12,
3576,
4672,
3536,
990,
279,
533,
358,
506,
1399,
487,
279,
4729,
508,
18,
1220,
353,
4374,
628,
326,
1122,
5196,
3949,
434,
326,
1760,
980,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
67,
529,
67,
2080,
67,
3576,
12,
3576,
4672,
3536,
990,
279,
533,
358,
506,
1399,
487,
279,
4729,
508,
18,
1220,
353,
4374,
628,
326,
1122,
5196,
3949,
434,
326,
1760,
980,
434,
... |
part.state_del(prog.state_get()) | part.state_del(p + " 0.00") | def animation_del(self, name): stopname = "@%s@stop" % name stopprog = self.program_get(stopname) if not stopprog: return for p in stopprog.targets: prog = self.program_get(p) for pp in prog.targets: part = self._edje.part_get(pp) if part: part.state_del(prog.state_get()) self.program_del(p) self.program_del(stopname) self.event_emit("animation.removed", name) self._animations.pop(self._animations.index(name)) self._modified = True | 0ed991a04dc88184842ba847251bca7adcd47944 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/0ed991a04dc88184842ba847251bca7adcd47944/editable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8794,
67,
3771,
12,
2890,
16,
508,
4672,
2132,
529,
273,
8787,
9,
87,
36,
5681,
6,
738,
508,
2132,
14654,
273,
365,
18,
12890,
67,
588,
12,
5681,
529,
13,
309,
486,
2132,
14654,
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,
8794,
67,
3771,
12,
2890,
16,
508,
4672,
2132,
529,
273,
8787,
9,
87,
36,
5681,
6,
738,
508,
2132,
14654,
273,
365,
18,
12890,
67,
588,
12,
5681,
529,
13,
309,
486,
2132,
14654,
30,
... |
if i < plot_points: | if i > 0 and i < plot_points-1: | def _call(self, funcs, xrange, parametric=False, polar=False, label='', **kwds): options = dict(self.options) for k, v in kwds.iteritems(): options[k] = v | 37ab5e42e90fae7b2a3e87f595d940f7436685d4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/37ab5e42e90fae7b2a3e87f595d940f7436685d4/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
12,
2890,
16,
15630,
16,
12314,
16,
579,
1591,
33,
8381,
16,
24244,
33,
8381,
16,
1433,
2218,
2187,
2826,
25577,
4672,
702,
273,
2065,
12,
2890,
18,
2116,
13,
364,
417,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
12,
2890,
16,
15630,
16,
12314,
16,
579,
1591,
33,
8381,
16,
24244,
33,
8381,
16,
1433,
2218,
2187,
2826,
25577,
4672,
702,
273,
2065,
12,
2890,
18,
2116,
13,
364,
417,
16,
... |
raise ValueError(_('%s is no valid URI')) | raise ValueError(_(u'%s is no valid URI')) | def __init__(self, *args): """Accepts one or two arguments. If there is only one argument, it is parsed according to `uri_pattern`, if there are two arguments, the first one is the scheme, the second the location""" # make sure module is initialized, so that we have a backendmanager # available self.scheme = None self.location = None | 7caf7af8620f36787fcc5d3a1634ba919cd8202c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/7caf7af8620f36787fcc5d3a1634ba919cd8202c/phonebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
3536,
26391,
1245,
578,
2795,
1775,
18,
971,
1915,
353,
1338,
1245,
1237,
16,
518,
353,
2707,
4888,
358,
1375,
1650,
67,
4951,
9191,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
3536,
26391,
1245,
578,
2795,
1775,
18,
971,
1915,
353,
1338,
1245,
1237,
16,
518,
353,
2707,
4888,
358,
1375,
1650,
67,
4951,
9191,
309,
... |
queue = child.children + queue | queue = list(child.children) + queue | def fold(self, expr, klass, op, constructor): from pymbolic import is_constant | 5d7f533b14fdbad56016c1e6e401b938a6a45b1d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12571/5d7f533b14fdbad56016c1e6e401b938a6a45b1d/constant_folder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11590,
12,
2890,
16,
3065,
16,
7352,
16,
1061,
16,
3885,
4672,
628,
2395,
12164,
1930,
353,
67,
14384,
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,
11590,
12,
2890,
16,
3065,
16,
7352,
16,
1061,
16,
3885,
4672,
628,
2395,
12164,
1930,
353,
67,
14384,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
root.title(' WSPR 2.20 by K1JT') | root.title(' WSPR 2.21 by K1JT') | def readinit(): global nparam,mrudir try: for i in range(len(params)): if badlist.count(i)>0: print 'Skipping bad entry in WSPR.INI:\a',params[i] continue key,value=params[i].split() if key == 'WSPRGeometry': root.geometry(value) elif key == 'MyCall': options.MyCall.set(value) elif key == 'MyGrid': options.MyGrid.set(value) elif key == 'CWID': advanced.idint.set(value) elif key == 'dBm': options.dBm.set(value) elif key == 'PctTx': ipctx.set(value) elif key == 'PttPort': options.PttPort.set(value) elif key == 'CatPort': options.CatPort.set(value) elif key == 'AudioIn': value=value.replace("#"," ") g.DevinName.set(value) try: g.ndevin.set(int(value[:2])) except: g.ndevin.set(0) options.DevinName.set(value) elif key == 'AudioOut': value=value.replace("#"," ") g.DevoutName.set(value) try: g.ndevout.set(int(value[:2])) except: g.ndevout.set(0) options.DevoutName.set(value) elif key == 'BFOfreq': advanced.bfofreq.set(value) elif key == 'Acal': advanced.Acal.set(value) elif key == 'Bcal': advanced.Bcal.set(value) elif key == 'CalEnable': advanced.encal.set(value) elif key == 'IQmode': iq.iqmode.set(value) elif key == 'IQrx': iq.iqrx.set(value) elif key == 'IQtx': iq.iqtx.set(value) elif key == 'FIQ': iq.fiq.set(value) elif key == 'Ntxdb': advanced.isc1.set(value) elif key == 'Ntxbal': iq.isc2.set(value) elif key == 'Ntxbalf': iq.isc2a.set(value) elif key == 'Ntxpha': iq.isc3.set(value) elif key == 'Ntxphaf': iq.isc3a.set(value) elif key == 'PTTmode': options.pttmode.set(value) elif key == 'CATenable': options.cat_enable.set(value) elif key == 'SerialRate': options.serial_rate.set(int(value)) elif key == 'DataBits': options.databits.set(int(value)) elif key == 'StopBits': options.stopbits.set(int(value)) elif key == 'Handshake': options.serial_handshake.set(value.replace("#"," ") ) elif key == 'Rig': t=value.replace("#"," ") options.rig.set(t) options.rignum.set(int(t[:4])) elif key == 'Nsave': nsave.set(value) elif key == 'Upload': upload.set(value) elif key == 'Idle': idle.set(value) elif key == 'Debug': ndebug.set(value) elif key == 'WatScale': sc1.set(value) elif key == 'WatOffset': sc2.set(value) elif key == 'Palette': g.cmap=value elif key == 'freq0_600': freq0[1]=float(value) elif key == 'freq0_160': freq0[2]=float(value) elif key == 'freq0_80': freq0[3]=float(value) elif key == 'freq0_60': freq0[4]=float(value) elif key == 'freq0_40': freq0[5]=float(value) elif key == 'freq0_30': freq0[6]=float(value) elif key == 'freq0_20': freq0[7]=float(value) elif key == 'freq0_17': freq0[8]=float(value) elif key == 'freq0_15': freq0[9]=float(value) elif key == 'freq0_12': freq0[10]=float(value) elif key == 'freq0_10': freq0[11]=float(value) elif key == 'freq0_6': freq0[12]=float(value) elif key == 'freq0_4': freq0[13]=float(value) elif key == 'freq0_2': freq0[14]=float(value) elif key == 'freq0_other': freq0[15]=float(value) elif key == 'freqtx_600': freqtx[1]=float(value) elif key == 'freqtx_160': freqtx[2]=float(value) elif key == 'freqtx_80': freqtx[3]=float(value) elif key == 'freqtx_60': freqtx[4]=float(value) elif key == 'freqtx_40': freqtx[5]=float(value) elif key == 'freqtx_30': freqtx[6]=float(value) elif key == 'freqtx_20': freqtx[7]=float(value) elif key == 'freqtx_17': freqtx[8]=float(value) elif key == 'freqtx_15': freqtx[9]=float(value) elif key == 'freqtx_12': freqtx[10]=float(value) elif key == 'freqtx_10': freqtx[11]=float(value) elif key == 'freqtx_6': freqtx[12]=float(value) elif key == 'freqtx_4': freqtx[13]=float(value) elif key == 'freqtx_2': freqtx[14]=float(value) elif key == 'freqtx_other': freqtx[15]=float(value) elif key == 'iband': iband.set(value) elif key == 'StartIdle': start_idle.set(value) elif key == 'NoBeep': no_beep.set(value) elif key == 'Ygain': w.acom1.gain=float(value) elif key == 'Phdeg': w.acom1.phase=float(value)/57.2957795 elif key == 'Reject': w.acom1.reject=float(value) elif key == 'RxApply': iq.iqrxapp.set(value) elif key == 'MRUdir': mrudir=value.replace("#"," ") nparam=i except: badlist.append(i) nparam=i | b75c6e992aca8de930da84d79fd3cb38408acbb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2394/b75c6e992aca8de930da84d79fd3cb38408acbb1/wspr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
2738,
13332,
2552,
290,
891,
16,
21387,
1100,
481,
775,
30,
364,
277,
316,
1048,
12,
1897,
12,
2010,
3719,
30,
309,
5570,
1098,
18,
1883,
12,
77,
13,
34,
20,
30,
1172,
296,
1687... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
13332,
2552,
290,
891,
16,
21387,
1100,
481,
775,
30,
364,
277,
316,
1048,
12,
1897,
12,
2010,
3719,
30,
309,
5570,
1098,
18,
1883,
12,
77,
13,
34,
20,
30,
1172,
296,
1687... |
format = ' %' + directive | format = '%' + directive strf_output = time.strftime(format, tt) | def test_strptime(self): tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'): format = ' %' + directive try: time.strptime(time.strftime(format, tt), format) except ValueError: self.fail('conversion specifier: %r failed.' % format) | e042601251e74a1c5bac287c936daa076b1f9a80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e042601251e74a1c5bac287c936daa076b1f9a80/test_time.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
701,
10650,
12,
2890,
4672,
3574,
273,
813,
18,
75,
10838,
12,
2890,
18,
88,
13,
364,
8655,
316,
7707,
69,
2187,
296,
37,
2187,
296,
70,
2187,
296,
38,
2187,
296,
71,
2187,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
701,
10650,
12,
2890,
4672,
3574,
273,
813,
18,
75,
10838,
12,
2890,
18,
88,
13,
364,
8655,
316,
7707,
69,
2187,
296,
37,
2187,
296,
70,
2187,
296,
38,
2187,
296,
71,
2187,... |
topmenucolor='', bck_search='', bck_search_ar='', europe='', europe_ar='', rightportletoutline='', entire_site_font='', entire_site_font_ar='', headings_font='', headings_font_ar='', main_navigation_font='', main_navigation_font_ar='', left_second_font='', left_second_font_ar='', left_third_font='', left_third_font_ar='', left_title_font='', left_title_font_ar='', left_title_color='', left_title_bg='', left_title_border='', left_active_bg='', left_active_color='', left_active_size='', right_bg='', right_font='', right_font_ar='', right_color='', right_size='', right_title_font='', right_title_font_ar='', right_title_color='', right_title_size='', bread_color='', bread_size='', bread_size_ar='', breadbar_bg='', search_bg='', quick_bg='', quick_right_border='', search_left_border='', breadbar_middle_bg='', breadbar_middle_width='', breadbar_upper_border='', breadbar_lower_border='', search_bgimg=' ', search_bgimg_ar=' ', quick_bgimg=' ', quick_bgimg_ar=' ', bg_search='', bg_search_ar='', bg_quickaccess='', bg_quickaccess_ar='', breadbar_bgimg=' ', breadbar_bgimg_ar=' ', REQUEST=None): | topmenucolor='', bck_search='', bck_search_ar='', europe='', europe_ar='', rightportletoutline='', entire_site_font='', entire_site_font_ar='', headings_font='', headings_font_ar='', main_navigation_font='', main_navigation_font_ar='', left_second_font='', left_second_font_ar='', left_third_font='', left_third_font_ar='', left_title_font='', left_title_font_ar='', left_title_color='', left_title_bg='', left_title_border='', left_active_bg='', left_active_color='', left_active_size='', right_bg='', right_font='', right_font_ar='', right_color='', right_size='', right_title_font='', right_title_font_ar='', right_title_color='', right_title_size='', bread_color='', bread_size='', bread_size_ar='', breadbar_bg='', search_bg='', quick_bg='', quick_right_border='', search_left_border='', breadbar_middle_bg='', breadbar_middle_width='', breadbar_upper_border='', breadbar_lower_border='', search_bgimg=' ', search_bgimg_ar=' ', quick_bgimg=' ', quick_bgimg_ar=' ', bg_search='', bg_search_ar='', bg_quickaccess='', bg_quickaccess_ar='', breadbar_bgimg=' ', breadbar_bgimg_ar=' ', REQUEST=None): | def admin_appearance(self, bckg_left='', bckg_left_ar='', bck_topmenu='', topmenucolor='', bck_search='', bck_search_ar='', europe='', europe_ar='', rightportletoutline='', entire_site_font='', entire_site_font_ar='', headings_font='', headings_font_ar='', main_navigation_font='', main_navigation_font_ar='', left_second_font='', left_second_font_ar='', left_third_font='', left_third_font_ar='', left_title_font='', left_title_font_ar='', left_title_color='', left_title_bg='', left_title_border='', left_active_bg='', left_active_color='', left_active_size='', right_bg='', right_font='', right_font_ar='', right_color='', right_size='', right_title_font='', right_title_font_ar='', right_title_color='', right_title_size='', bread_color='', bread_size='', bread_size_ar='', breadbar_bg='', search_bg='', quick_bg='', quick_right_border='', search_left_border='', breadbar_middle_bg='', breadbar_middle_width='', breadbar_upper_border='', breadbar_lower_border='', search_bgimg=' ', search_bgimg_ar=' ', quick_bgimg=' ', quick_bgimg_ar=' ', bg_search='', bg_search_ar='', bg_quickaccess='', bg_quickaccess_ar='', breadbar_bgimg=' ', breadbar_bgimg_ar=' ', REQUEST=None): """ """ scheme = self.getLayoutTool().getCurrentSkinScheme() style = scheme._getOb('style') style_src = style.document_src() buf = '' #upload images self.handle_scheme_img_upload(scheme, 'bckg_left.jpg', bckg_left) self.handle_scheme_img_upload(scheme, 'bckg_left_ar.jpg', bckg_left_ar) self.handle_scheme_img_upload(scheme, 'bck_search.jpg', bck_search) self.handle_scheme_img_upload(scheme, 'bck_search_ar.jpg', bck_search_ar) self.handle_scheme_img_upload(scheme, 'europe.jpg', europe) self.handle_scheme_img_upload(scheme, 'europe_ar.jpg', europe_ar) | ffeb211164a19371c4ffa202b70c9aa9c9628d54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/ffeb211164a19371c4ffa202b70c9aa9c9628d54/SEMIDESite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3981,
67,
438,
27668,
12,
2890,
16,
324,
363,
75,
67,
4482,
2218,
2187,
324,
363,
75,
67,
4482,
67,
297,
2218,
2187,
324,
363,
67,
3669,
5414,
2218,
2187,
1760,
5414,
3266,
2218,
2187,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3981,
67,
438,
27668,
12,
2890,
16,
324,
363,
75,
67,
4482,
2218,
2187,
324,
363,
75,
67,
4482,
67,
297,
2218,
2187,
324,
363,
67,
3669,
5414,
2218,
2187,
1760,
5414,
3266,
2218,
2187,... |
if not inick.startswith(cfg.dc_to_irc_prefix): | if not matches_dc_to_irc_prefix(inick): | def dc_from_irc(inick): # Decode an IRC-encoded DC nick, for use in Dtella. # Verify prefix if not inick.startswith(cfg.dc_to_irc_prefix): raise NickError("Bad prefix") dnick = inick[len(cfg.dc_to_irc_prefix):] if not dnick: raise NickError("Nothing after prefix") n_escapes = 0 for c in dnick: if c == '`': n_escapes += 1 if n_escapes: head, tail = dnick.rsplit('-', 1) escapes = base_convert(tail, base36_chars, escape_chars, n_escapes) if len(escapes) != n_escapes: raise NickError("Unknown escape sequence") dnick = '' n_escapes = 0 for c in head: if c == '`': dnick += escapes[n_escapes] n_escapes += 1 else: dnick += c return dnick | 4b7a3977ead0ebd1c1d1c13730249b9de6994387 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4752/4b7a3977ead0ebd1c1d1c13730249b9de6994387/bridge_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6744,
67,
2080,
67,
481,
71,
12,
267,
1200,
4672,
468,
6209,
392,
467,
11529,
17,
10787,
21533,
10909,
16,
364,
999,
316,
463,
88,
1165,
69,
18,
225,
468,
8553,
1633,
309,
486,
1885,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6744,
67,
2080,
67,
481,
71,
12,
267,
1200,
4672,
468,
6209,
392,
467,
11529,
17,
10787,
21533,
10909,
16,
364,
999,
316,
463,
88,
1165,
69,
18,
225,
468,
8553,
1633,
309,
486,
1885,
... |
y_shape = (self.stored_steps_output[i],)+args[i+n_seqs].shape[1:] | y_shape = (self.stored_steps_output[i],)+arg_shape | def scan(self,fn, args, n_seqs, n_outs, seqs_taps, outs_taps, n_steps, go_backwards, inplace_map): | c710fb2d0d68057263fd4c86a8765f1dbe5a678c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/c710fb2d0d68057263fd4c86a8765f1dbe5a678c/scan.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
12,
2890,
16,
4293,
16,
833,
16,
290,
67,
22437,
16,
290,
67,
20125,
16,
19472,
67,
88,
6679,
16,
28266,
67,
88,
6679,
16,
225,
290,
67,
8986,
16,
1960,
67,
823,
6397,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4135,
12,
2890,
16,
4293,
16,
833,
16,
290,
67,
22437,
16,
290,
67,
20125,
16,
19472,
67,
88,
6679,
16,
28266,
67,
88,
6679,
16,
225,
290,
67,
8986,
16,
1960,
67,
823,
6397,
16,
11... |
return os.path.join(os.path.dirname(sys.executable), "Makefile") | return os.path.join(os.path.dirname(os.path.realpath(sys.executable)), "Makefile") | def get_makefile_filename(): """Return full pathname of installed Makefile from the Python build.""" if python_build: return os.path.join(os.path.dirname(sys.executable), "Makefile") lib_dir = get_python_lib(plat_specific=1, standard_lib=1) return os.path.join(lib_dir, "config", "Makefile") | 6fe4970b903c3a5b646f6d30ad62e22255daeca1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/6fe4970b903c3a5b646f6d30ad62e22255daeca1/sysconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
6540,
768,
67,
3459,
13332,
3536,
990,
1983,
9806,
434,
5876,
4344,
768,
628,
326,
6600,
1361,
12123,
309,
5790,
67,
3510,
30,
327,
1140,
18,
803,
18,
5701,
12,
538,
18,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6540,
768,
67,
3459,
13332,
3536,
990,
1983,
9806,
434,
5876,
4344,
768,
628,
326,
6600,
1361,
12123,
309,
5790,
67,
3510,
30,
327,
1140,
18,
803,
18,
5701,
12,
538,
18,
803,
... |
if self._pages is None: self._load_pages() return pagename in self._pages.keys() | """Whether a page with the specified name exists.""" self._update_index() return pagename in self._index.keys() | def has_page(self, pagename): if self._pages is None: self._load_pages() return pagename in self._pages.keys() | 6392f2a70e74c43e37782a00df9b97e7e92a6a57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/6392f2a70e74c43e37782a00df9b97e7e92a6a57/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
2433,
12,
2890,
16,
4262,
1069,
4672,
309,
365,
6315,
7267,
353,
599,
30,
365,
6315,
945,
67,
7267,
1435,
327,
4262,
1069,
316,
365,
6315,
7267,
18,
2452,
1435,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
2433,
12,
2890,
16,
4262,
1069,
4672,
309,
365,
6315,
7267,
353,
599,
30,
365,
6315,
945,
67,
7267,
1435,
327,
4262,
1069,
316,
365,
6315,
7267,
18,
2452,
1435,
2,
-100,
-100,... |
def setColor(value,weightLimits,colorMap): if not (weightLimits[0]-weightLimits[1])==0: normalizedWeight=normalizeWeight(value,weightLimits) color=colorMap(normalizedWeight) | def setColor(value,valueLimits,colorMap): """ Converts a numerical value to a color. The value is scaled linearly to the range (0...1) using the function normalizeValue and the limits valueLimits. This scaled value is used to pick a color from the given colormap. The colormap should take in values in the range (0...1) and produce a three-tuple containing an RGB color, as in (r,g,b). """ if not (valueLimits[0]-valueLimits[1])==0: normalizedValue=normalizeValue(value,valueLimits) color=colorMap(normalizedValue) | def setColor(value,weightLimits,colorMap): # Set edge color by weight (no other option implemented thus far) if not (weightLimits[0]-weightLimits[1])==0: normalizedWeight=normalizeWeight(value,weightLimits) color=colorMap(normalizedWeight) else: color=(0.5,0.5,0.5) # gray if all weights are equal return color | 1b046154581ac107eda7faef67d10c4c19528a4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/1b046154581ac107eda7faef67d10c4c19528a4c/visuals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16207,
12,
1132,
16,
4865,
12768,
16,
3266,
863,
4672,
468,
1000,
3591,
2036,
635,
3119,
261,
2135,
1308,
1456,
8249,
12493,
10247,
13,
309,
486,
261,
4865,
12768,
63,
20,
65,
17,
4865,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16207,
12,
1132,
16,
4865,
12768,
16,
3266,
863,
4672,
468,
1000,
3591,
2036,
635,
3119,
261,
2135,
1308,
1456,
8249,
12493,
10247,
13,
309,
486,
261,
4865,
12768,
63,
20,
65,
17,
4865,
... |
path = join(self.meta_dir, 'inst', fn) | path = join(self.meta_dir, fn) | def run(self, fn): path = join(self.meta_dir, 'inst', fn) if not isfile(path): return from subprocess import call call([sys.executable, path], cwd=dirname(path)) | 22fc7c778d08adf4fead8705371040e52742182f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7707/22fc7c778d08adf4fead8705371040e52742182f/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
2295,
4672,
589,
273,
1233,
12,
2890,
18,
3901,
67,
1214,
16,
2295,
13,
309,
486,
8814,
12,
803,
4672,
327,
628,
6652,
1930,
745,
745,
3816,
9499,
18,
17751,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
2295,
4672,
589,
273,
1233,
12,
2890,
18,
3901,
67,
1214,
16,
2295,
13,
309,
486,
8814,
12,
803,
4672,
327,
628,
6652,
1930,
745,
745,
3816,
9499,
18,
17751,
16,
... |
return self._executeSingleStorageElementFunction(storageElementName,storageDirectory,'getDirectorySize') else: return self._executeStorageElementFunction(storageElementName,storageDirectory,'getDirectorySize') def getStorageListDirectory(self,storageDirectory,storageElementName,singleDirectory=False): | return self._executeSingleStorageElementFunction( storageElementName, storageDirectory, 'getDirectorySize' ) else: return self._executeStorageElementFunction( storageElementName, storageDirectory, 'getDirectorySize' ) def getStorageListDirectory( self, storageDirectory, storageElementName, singleDirectory=False ): | def getStorageDirectorySize(self,storageDirectory,storageElementName,singleDirectory=False): """ Obtain the size of the storage directories | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13840,
2853,
1225,
12,
2890,
16,
5697,
2853,
16,
5697,
30584,
16,
7526,
2853,
33,
8381,
4672,
3536,
24850,
326,
963,
434,
326,
2502,
6402,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13840,
2853,
1225,
12,
2890,
16,
5697,
2853,
16,
5697,
30584,
16,
7526,
2853,
33,
8381,
4672,
3536,
24850,
326,
963,
434,
326,
2502,
6402,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
originator = "remote" else: originator = "local" | def _handle_SCInvitationChangedState(self, inv, data): if data.state == "INCOMING": remote_media = [media.media for media in inv.get_offered_remote_sdp().media if media.port != 0] # TODO: check if the To header/request URI is one of ours if not any(supported_media in remote_media for supported_media in ["audio"]): inv.disconnect(415) else: inv.respond_to_invite_provisionally(180) session = Session() session._inv = inv session.remote_user_agent = data.headers.get("User-Agent", None) self.inv_mapping[inv] = session caller_uri = inv.caller_uri ringtone = self.ringtone_config.get_ringtone_for_sipuri(inv.caller_uri) if ringtone is not None: session._ringtone = WaveFile(ringtone) session._change_state("INCOMING") self.notification_center.post_notification("SCSessionNewIncoming", session, TimestampedNotificationData(has_audio="audio" in remote_media)) else: session = self.inv_mapping.get(inv, None) if session is None: return session._lock.acquire() try: prev_session_state = session.state if data.state == "EARLY" and inv.is_outgoing and hasattr(data, "code") and data.code == 180: self.notification_center.post_notification("SCSessionGotRingIndication", session, TimestampedNotificationData()) elif data.state == "CONNECTING": self.notification_center.post_notification("SCSessionWillStart", session, TimestampedNotificationData()) if inv.is_outgoing: session.remote_user_agent = data.headers.get("Server", None) if session.remote_user_agent is None: session.remote_user_agent = data.headers.get("User-Agent", None) elif data.state == "CONFIRMED": session._change_state("ESTABLISHED") if data.prev_state == "CONNECTING": self.notification_center.post_notification("SCSessionDidStart", session, TimestampedNotificationData()) # TODO: if data.prev_state == "REINVITING" and a stream is being added, # evaluate there sult and emit either SCSessionAcceptedStreamProposal # or SCSessionRejectedStreamProposal if session._queue: session._process_queue() elif data.state == "REINVITED": current_remote_sdp = inv.get_active_remote_sdp() proposed_remote_sdp = inv.get_offered_remote_sdp() if proposed_remote_sdp.version == current_remote_sdp.version: if current_remote_sdp != proposed_remote_sdp: # same version, but not identical SDP inv.respond_to_reinvite(488) else: # same version, same SDP, respond with the already present local SDP inv.set_offered_local_sdp(inv.get_active_local_sdp()) inv.respond_to_reinvite(200) elif proposed_remote_sdp.version == current_remote_sdp.version + 1: for attr in ["user", "id", "net_type", "address_type", "address"]: if getattr(proposed_remote_sdp, attr) != getattr(current_remote_sdp, attr): # difference in contents of o= line inv.respond_to_reinvite(488) return current_remote_media = [media.media for media in current_remote_sdp.media if media.port != 0] proposed_remote_media = [media.media for media in proposed_remote_sdp.media if media.port != 0] notification_dict = {} notification_dict["has_audio"] = "audio" not in current_remote_media and "audio" in proposed_remote_media if True in notification_dict.values(): inv.respond_to_reinvite(180) session._change_state("PROPOSED") self.notification_center.post_notification("SCSessionGotStreamProposal", session, TimestampedNotificationData(**notification_dict)) else: inv.set_offered_local_sdp(session._make_next_sdp(False)) inv.respond_to_reinvite(200) else: # version increase is not exactly one more inv.respond_to_reinvite(488) elif data.state == "DISCONNECTED": del self.inv_mapping[inv] if hasattr(data, "headers"): if session.remote_user_agent is None: session.remote_user_agent = data.headers.get("Server", None) if session.remote_user_agent is None: session.remote_user_agent = data.headers.get("User-Agent", None) originator = "remote" else: originator = "local" session._stop_media() session._inv = None session._change_state("TERMINATED") if prev_session_state != "TERMINATING" and data.prev_state != "CONFIRMED": failure_data = TimestampedNotificationData(originator=originator) if hasattr(data, "code"): if hasattr(data, "headers") and "Warning" in data.headers: failure_data.reason = "%s (%s)" % (data.reason, data.headers["Warning"][2]) else: failure_data.reason = data.reason else: failure_data.reason = session._sdpneg_failure_reason self.notification_center.post_notification("SCSessionDidFail", session, failure_data) self.notification_center.post_notification("SCSessionDidEnd", session, TimestampedNotificationData(originator=originator)) finally: session._lock.release() | ab75c9bbb2b87eb260451a4812a9ede9cb8f4ed0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/ab75c9bbb2b87eb260451a4812a9ede9cb8f4ed0/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
2312,
19896,
5033,
1119,
12,
2890,
16,
2198,
16,
501,
4672,
309,
501,
18,
2019,
422,
315,
706,
4208,
1360,
6877,
2632,
67,
5829,
273,
306,
5829,
18,
5829,
364,
3539,
316... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
2312,
19896,
5033,
1119,
12,
2890,
16,
2198,
16,
501,
4672,
309,
501,
18,
2019,
422,
315,
706,
4208,
1360,
6877,
2632,
67,
5829,
273,
306,
5829,
18,
5829,
364,
3539,
316... | |
def mult_ncerr(left,right,**kwargs): | def mult_ncerr(left, right, **kwargs): | def mult_ncerr(left,right,**kwargs): """ This function multiplies two objects (SOM, SO or tuple[val,val_err2]) and returns the result of the multiplication in an SOM. The function does not handle the case of tuple/tuple. Parameters: ---------- -> left Object on the left of the multiplication sign -> right Object on the right of the multiplication sign -> kwargs is a list of key word arguments that the function accepts: axis=<y or x> This is the axis one wishes to manipulate. If no argument is given the default value is y axis_pos=<number> This is position of the axis in the axis array. If no argument is given, the default value is 0 Returns: ------- <- A SOM or SO containing the results of the multiplication Exceptions: ---------- <- TypeError is raised if the tuple/tuple case is presented to the function <- IndexError is raised if the two SOMs do not contain the same number of spectra <- RunTimeError is raised if the x-axis units of the SOMs do not match <- RunTimeError is raised if the y-axis units of the SOMs do not match <- RunTimeError is raised if the x-axes of the two SOs are not equal """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(left,right) (l_descr,r_descr)=hlr_utils.get_descr(left,right) # error check information if (r_descr=="SOM" and l_descr!="SOM") \ or (r_descr=="SO" and l_descr=="number"): left,right = hlr_utils.swap_args(left,right) l_descr,r_descr = hlr_utils.swap_args(l_descr,r_descr) elif r_descr=="SOM" and l_descr=="SOM": hlr_utils.hlr_math_compatible(left,l_descr,right,r_descr) elif l_descr=="number" and r_descr=="number": raise RuntimeError, "tuple, tuple operation is not supported!" else: pass # Check for axis keyword argument try: axis = kwargs["axis"] except KeyError: axis = "y" # Check for axis_pos keyword argument try: axis_pos = kwargs["axis_pos"] except KeyError: axis_pos = 0 result=hlr_utils.copy_som_attr(result,res_descr,left,l_descr,right,r_descr) # iterate through the values import array_manip for i in range(hlr_utils.get_length(left,right)): val1 = hlr_utils.get_value(left,i,l_descr,axis,axis_pos) err2_1 = hlr_utils.get_err2(left,i,l_descr,axis,axis_pos) val2 = hlr_utils.get_value(right,i,r_descr,axis,axis_pos) err2_2 = hlr_utils.get_err2(right,i,r_descr,axis,axis_pos) (descr_1,descr_2)=hlr_utils.get_descr(val1, val2) hlr_utils.hlr_math_compatible(val1, descr_1, val2, descr_2) value=array_manip.mult_ncerr(val1, err2_1, val2, err2_2) map_so = hlr_utils.get_map_so(left,None,i) hlr_utils.result_insert(result,res_descr,value,map_so,axis,axis_pos) return result | e39979325b6fc8a32b6f5159862092edaf952c8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/e39979325b6fc8a32b6f5159862092edaf952c8b/hlr_mult_ncerr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1778,
67,
14202,
370,
12,
4482,
16,
2145,
16,
2826,
4333,
4672,
3536,
1220,
445,
3309,
5259,
2795,
2184,
261,
55,
1872,
16,
7460,
578,
3193,
63,
1125,
16,
1125,
67,
370,
22,
5717,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1778,
67,
14202,
370,
12,
4482,
16,
2145,
16,
2826,
4333,
4672,
3536,
1220,
445,
3309,
5259,
2795,
2184,
261,
55,
1872,
16,
7460,
578,
3193,
63,
1125,
16,
1125,
67,
370,
22,
5717,
471,... |
def getDescriptors(self, trans, examples, buckets): | def getDescriptors(self, translator, examples, buckets): | def getDescriptors(self, trans, examples, buckets): tcoeff_names = [] descriptors = [] # used for managing continuous atts for i in range(len(trans)): t = trans[i] tc = ["%s"%t.attr.name] d = t.description() #print tc[0],d if d[0]==0: # continuous values = self.bucketize(examples, t.attr, buckets) tc += values descriptors.append((i,-1)) else: # nominal x = 0 for n in d[2]: if n!='': tc.append(n) descriptors.append((i,x)) x += 1 tcoeff_names.append(tc) return descriptors, tcoeff_names | d5d765a106ee2fda0789f07a6a122d52f838cef9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/d5d765a106ee2fda0789f07a6a122d52f838cef9/orngLinVis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
8379,
12,
2890,
16,
8333,
16,
10991,
16,
9169,
4672,
1715,
15548,
1403,
67,
1973,
273,
5378,
14215,
273,
5378,
468,
1399,
364,
30632,
17235,
15687,
364,
277,
316,
1048,
12,
1897,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
8379,
12,
2890,
16,
8333,
16,
10991,
16,
9169,
4672,
1715,
15548,
1403,
67,
1973,
273,
5378,
14215,
273,
5378,
468,
1399,
364,
30632,
17235,
15687,
364,
277,
316,
1048,
12,
1897,
1... |
os.kill(pid,sig) | if sys.platform=="win32": subprocess.Popen ("taskkill /F /T /PID %i"%pid, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) else: os.kill(pid,signal.SIGKILL) | def killr (pid, sig): if sys.platform!="win32": names=os.listdir("/proc/") for name in names: try: f = open("/proc/" + name +"/stat","r") line = f.readline() words = string.split(line) if words[3]==str(pid): debugOutput("Found in " + name) killr(int(name), sig) except IOError: pass try: os.kill(pid,sig) except: pass | 025790af866b8b72d6a1915839839f93479497b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1233/025790af866b8b72d6a1915839839f93479497b7/worker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
86,
261,
6610,
16,
3553,
4672,
309,
2589,
18,
9898,
5,
1546,
8082,
1578,
6877,
1257,
33,
538,
18,
1098,
1214,
2932,
19,
9381,
4898,
13,
364,
508,
316,
1257,
30,
775,
30,
284,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
86,
261,
6610,
16,
3553,
4672,
309,
2589,
18,
9898,
5,
1546,
8082,
1578,
6877,
1257,
33,
538,
18,
1098,
1214,
2932,
19,
9381,
4898,
13,
364,
508,
316,
1257,
30,
775,
30,
284,
2... |
def CheckChangeOnUpload(input_api, output_api): | _LICENSE_HEADER = ( r".*? Copyright \(c\) 20\d\d The Chromium Authors\. All rights reserved\." "\n" r".*? Use of this source code is governed by a BSD-style license that can " "be\n" r".*? found in the LICENSE file\." "\n" ) def _CommonChecks(input_api, output_api): | def CheckChangeOnUpload(input_api, output_api): results = [] # What does this code do? # It loads the default black list (e.g. third_party, experimental, etc) and # add our black list (breakpad, skia and v8 are still not following # google style and are not really living this repository). # See presubmit_support.py InputApi.FilterSourceFile for the (simple) usage. black_list = input_api.DEFAULT_BLACK_LIST + EXCLUDED_PATHS sources = lambda x: input_api.FilterSourceFile(x, black_list=black_list) results.extend(input_api.canned_checks.CheckLongLines( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoTabs( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasNoStrayWhitespace( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckChangeHasBugField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeHasTestField( input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeSvnEolStyle( input_api, output_api, sources)) results.extend(input_api.canned_checks.CheckSvnForCommonMimeTypes( input_api, output_api)) return results | 1f7b4176c3b8db732c8cc1842283d78908aa9cf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/1f7b4176c3b8db732c8cc1842283d78908aa9cf6/PRESUBMIT.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
389,
6065,
23396,
67,
7557,
273,
261,
436,
6,
23498,
25417,
30103,
71,
64,
13,
4200,
64,
72,
64,
72,
1021,
1680,
520,
5077,
3123,
1383,
5834,
4826,
14989,
8735,
64,
1199,
1548,
82,
6,
436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
389,
6065,
23396,
67,
7557,
273,
261,
436,
6,
23498,
25417,
30103,
71,
64,
13,
4200,
64,
72,
64,
72,
1021,
1680,
520,
5077,
3123,
1383,
5834,
4826,
14989,
8735,
64,
1199,
1548,
82,
6,
436,
... |
tempfile.tempdir = old_tempfile_tempdir | tempfile.tempdir = None | def setUp(self): self.int_32_max = 0x100000000 self.homeDir = os.path.join(tempfile.gettempdir(), 'db_home') try: os.mkdir(self.homeDir) except os.error: pass tempfile.tempdir = self.homeDir self.filename = os.path.split(tempfile.mktemp())[1] tempfile.tempdir = old_tempfile_tempdir | 2e64c19d86a97d873d97c60d7ba85a5b4a298f32 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/2e64c19d86a97d873d97c60d7ba85a5b4a298f32/test_sequence.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
474,
67,
1578,
67,
1896,
273,
374,
92,
21,
12648,
365,
18,
8712,
1621,
273,
1140,
18,
803,
18,
5701,
12,
5814,
768,
18,
588,
5814,
1214,
9334,
296,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
474,
67,
1578,
67,
1896,
273,
374,
92,
21,
12648,
365,
18,
8712,
1621,
273,
1140,
18,
803,
18,
5701,
12,
5814,
768,
18,
588,
5814,
1214,
9334,
296,
19... |
""" When width > 1, alias text is drawn using a couple of different paths through the underlying C++ code. This test the slower of the two which uses the agg::rasterizer_scanline_aa C++ code. We've set the line join to bevel to trigger this path. | """ When width > 1, alias text is drawn using a couple of different paths through the underlying C++ code. This test the slower of the two which uses the agg::rasterizer_scanline_aa C++ code. We've set the line join to bevel to trigger this path. | def test_alias_width_two_scanline_aa(self): """ When width > 1, alias text is drawn using a couple of different paths through the underlying C++ code. This test the slower of the two which uses the agg::rasterizer_scanline_aa C++ code. We've set the line join to bevel to trigger this path. """ gc = GraphicsContextArray((3, 2), pix_format="rgb24") # clear background to white values (255, 255, 255) gc.clear((1.0, 1.0, 1.0)) # single horizontal line across bottom of buffer gc.move_to(0, 0) gc.line_to(3, 0) # Settings allow the 2nd fastest path. gc. set_stroke_color((0.0, 0.0, 0.0)) # black gc.set_antialias(False) gc.set_line_width(2) gc.set_line_cap(kiva.CAP_ROUND) gc.set_line_join(kiva.JOIN_BEVEL) gc.stroke_path() # test a single color channel. desired = array(((255, 255, 255), ( 0, 0, 0)),UInt8) actual = gc.bmp_array[:,:,0] assert_arrays_equal(actual, desired) | ffaa755758d0641fe7c70006db7e0ae9dbc4b1c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/ffaa755758d0641fe7c70006db7e0ae9dbc4b1c2/stroke_path_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4930,
67,
2819,
67,
15415,
67,
9871,
1369,
67,
7598,
12,
2890,
4672,
3536,
5203,
1835,
405,
404,
16,
2308,
977,
353,
19377,
1450,
279,
1825,
2268,
434,
3775,
2953,
3059,
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,
1842,
67,
4930,
67,
2819,
67,
15415,
67,
9871,
1369,
67,
7598,
12,
2890,
4672,
3536,
5203,
1835,
405,
404,
16,
2308,
977,
353,
19377,
1450,
279,
1825,
2268,
434,
3775,
2953,
3059,
326,
... |
if compareVersions(ai_item['version'], | if compareVersions(ai_item['version'], | def getInstalledVersion(pl): """ Attempts to determine the currently installed version of the item described by pl """ if 'receipts' in pl: for receipt in pl['receipts']: installedpkgvers = \ munkicommon.getInstalledPackageVersion(receipt['packageid']) munkicommon.display_debug2("Looking for %s, version %s" % (receipt['packageid'], receipt['version'])) if compareVersions(installedpkgvers, receipt['version']) == 2: # version is higher installedversion = "newer than %s" % pl['version'] return installedversion if compareVersions(installedpkgvers, receipt['version']) == -1: # version is lower installedversion = "older than %s" % pl['version'] return installedversion # if we get here all reciepts match return pl['version'] if 'installs' in pl: for install_item in pl['installs']: if install_item['type'] == 'application': name = install_item.get('CFBundleName') bundleid = install_item.get('CFBundleIdentifier') munkicommon.display_debug2( "Looking for application %s, version %s" % (name, install_item.get('CFBundleIdentifier'))) try: # check default location for app filepath = os.path.join(install_item['path'], 'Contents', 'Info.plist') pl = FoundationPlist.readPlist(filepath) installedappvers = pl.get('CFBundleShortVersionString') except FoundationPlist.NSPropertyListSerializationException: # that didn't work, fall through to the slow way # using System Profiler appinfo = [] appdata = getAppData() if appdata: for ad_item in appdata: if bundleid: if 'path' in ad_item: if getAppBundleID(ad_item['path']) == \ bundleid: appinfo.append(ad_item) elif name: if '_name' in ad_item: if ad_item['_name'] == name: appinfo.append(ad_item) for ai_item in appinfo: if 'version' in ai_item: if compareVersions(ai_item['version'], maxversion) == 2: # version is higher maxversion = ai_item['version'] installedappvers = maxversion if compareVersions(installedappvers, install_item['CFBundleShortVersionString']) == 2: # version is higher installedversion = "newer than %s" % pl['version'] return installedversion if compareVersions(installedappvers, install_item['CFBundleShortVersionString']) == -1: # version is lower installedversion = "older than %s" % pl['version'] return installedversion # if we get here all app versions match return pl['version'] # if we fall through to here we have no idea what version we have return "UNKNOWN" | 5350042f4ddfb098468c8d75b15dfa28757b9321 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/5350042f4ddfb098468c8d75b15dfa28757b9321/updatecheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7854,
334,
4502,
1444,
12,
412,
4672,
3536,
6020,
9585,
358,
4199,
326,
4551,
5876,
1177,
434,
326,
761,
11893,
635,
886,
3536,
309,
296,
8606,
27827,
11,
316,
886,
30,
364,
16030,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7854,
334,
4502,
1444,
12,
412,
4672,
3536,
6020,
9585,
358,
4199,
326,
4551,
5876,
1177,
434,
326,
761,
11893,
635,
886,
3536,
309,
296,
8606,
27827,
11,
316,
886,
30,
364,
16030,
316,
... |
self._run_lock = threading.Lock() self._suspend_lock = threading.RLock() | self._run_lock = threading.Lock() self._suspend_lock = threading.RLock() | def __init__(self, thread=None): """ Initialize a Task, creating a new thread if needed. """ if not getattr(self, "_engine", None): # first time called self._default_lock = threading.Lock() self._default = self.__class__._std_default.copy() self._info = self.__class__._std_info.copy() | f4a57517a120a887d16fdb111b654e9c930aec09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/f4a57517a120a887d16fdb111b654e9c930aec09/Task.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2650,
33,
7036,
4672,
3536,
9190,
279,
3837,
16,
4979,
279,
394,
2650,
309,
3577,
18,
3536,
309,
486,
3869,
12,
2890,
16,
4192,
8944,
3113,
599,
4672,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2650,
33,
7036,
4672,
3536,
9190,
279,
3837,
16,
4979,
279,
394,
2650,
309,
3577,
18,
3536,
309,
486,
3869,
12,
2890,
16,
4192,
8944,
3113,
599,
4672,
46... |
s,o=exec_command('python -c "import sys;sys.exit(15)"') | s,o=exec_command('python -c "import sys;sys.exit(15)"',**kws) | def test_posix(): s,o=exec_command("echo Hello") assert s==0 and o=='Hello',(s,o) s,o=exec_command('echo $AAA') assert s==0 and o=='',(s,o) s,o=exec_command('echo "$AAA"',AAA='Tere') assert s==0 and o=='Tere',(s,o) s,o=exec_command('echo "$AAA"') assert s==0 and o=='',(s,o) os.environ['BBB'] = 'Hi' s,o=exec_command('echo "$BBB"') assert s==0 and o=='Hi',(s,o) s,o=exec_command('echo "$BBB"',BBB='Hey') assert s==0 and o=='Hey',(s,o) s,o=exec_command('echo "$BBB"') assert s==0 and o=='Hi',(s,o) s,o=exec_command('this_is_not_a_command') assert s!=0 and o!='',(s,o) s,o=exec_command('echo path=$PATH') assert s==0 and o!='',(s,o) s,o=exec_command('python -c "import sys,os;sys.stderr.write(os.name)"') assert s==0 and o=='posix',(s,o) s,o=exec_command('python -c "raise \'Ignore me.\'"') assert s==1 and o,(s,o) s,o=exec_command('python -c "import sys;sys.stderr.write(\'0\');sys.stderr.write(\'1\');sys.stderr.write(\'2\')"') assert s==0 and o=='012',(s,o) s,o=exec_command('python -c "import sys;sys.exit(15)"') assert s==15 and o=='',(s,o) s,o=exec_command('python -c "print \'Heipa\'"') assert s==0 and o=='Heipa',(s,o) print 'ok' | 59c6f7c8809104ffcc97e2083529ae4111b41755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/59c6f7c8809104ffcc97e2083529ae4111b41755/exec_command.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
24463,
13332,
272,
16,
83,
33,
4177,
67,
3076,
2932,
12946,
20889,
7923,
1815,
272,
631,
20,
471,
320,
18920,
18601,
2187,
12,
87,
16,
83,
13,
225,
272,
16,
83,
33,
4177,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
24463,
13332,
272,
16,
83,
33,
4177,
67,
3076,
2932,
12946,
20889,
7923,
1815,
272,
631,
20,
471,
320,
18920,
18601,
2187,
12,
87,
16,
83,
13,
225,
272,
16,
83,
33,
4177,
6... |
name=models.CharField(max_length=64) note=models.CharField(max_length=128,blank=True) | name=models.CharField(max_length=256) note=models.CharField(max_length=256,blank=True) | def resetCoupling(self,closures=False): # we had some couplings, but we need to get rid of them for some reason # (usually because we've just change model) cgs=self.couplinggroup_set.all() if len(cgs)<>0: assert(len(cgs)==1,'Expect only one coupling group for simulation %s'%self) cg=cgs[0] cg.delete() # now put back the ones from the model cg=self.updateCoupling() if closures:cg.propagateClosures() | e6eff692bdd0eae3b9262d5b10c0df927e10f320 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7019/e6eff692bdd0eae3b9262d5b10c0df927e10f320/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
39,
28322,
12,
2890,
16,
7550,
8421,
33,
8381,
4672,
468,
732,
9323,
2690,
276,
24911,
899,
16,
1496,
732,
1608,
358,
336,
10911,
434,
2182,
364,
2690,
3971,
468,
261,
407,
3452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
39,
28322,
12,
2890,
16,
7550,
8421,
33,
8381,
4672,
468,
732,
9323,
2690,
276,
24911,
899,
16,
1496,
732,
1608,
358,
336,
10911,
434,
2182,
364,
2690,
3971,
468,
261,
407,
3452,
... |
new_sources.append(base + ".c") | new_sources.append(base + target_ext) | def swig_sources (self, sources): | 2d9479c1fc4cccefa7f9ca72d93d67e6130aa129 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2d9479c1fc4cccefa7f9ca72d93d67e6130aa129/build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1352,
360,
67,
10141,
261,
2890,
16,
5550,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1352,
360,
67,
10141,
261,
2890,
16,
5550,
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... |
toaddrs = ','.split(prompt("To")) | toaddrs = prompt("To").split(',') | def prompt(prompt): sys.stdout.write(prompt + ": ") return sys.stdin.readline().strip() | 11cd61222cd0f846220b7518c4ab2af39336159f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/11cd61222cd0f846220b7518c4ab2af39336159f/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6866,
12,
13325,
4672,
2589,
18,
10283,
18,
2626,
12,
13325,
397,
6398,
9369,
327,
2589,
18,
21772,
18,
896,
1369,
7675,
6406,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
6866,
12,
13325,
4672,
2589,
18,
10283,
18,
2626,
12,
13325,
397,
6398,
9369,
327,
2589,
18,
21772,
18,
896,
1369,
7675,
6406,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
subprocess.Popen([self._path_to_driver(), self.filename_to_uri(results_filename)]) | uri = self.filename_to_uri(results_filename) if self._options.use_drt: webbrowser.open(uri, new=1) else: subprocess.Popen([self._path_to_driver(), uri]) | def show_results_html_file(self, results_filename): subprocess.Popen([self._path_to_driver(), self.filename_to_uri(results_filename)]) | cf1f77344415bb9b04972241be2805d0da5fc602 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/cf1f77344415bb9b04972241be2805d0da5fc602/chromium.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
4717,
67,
2620,
67,
768,
12,
2890,
16,
1686,
67,
3459,
4672,
6652,
18,
52,
3190,
3816,
2890,
6315,
803,
67,
869,
67,
7407,
9334,
365,
18,
3459,
67,
869,
67,
1650,
12,
4717,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
67,
4717,
67,
2620,
67,
768,
12,
2890,
16,
1686,
67,
3459,
4672,
6652,
18,
52,
3190,
3816,
2890,
6315,
803,
67,
869,
67,
7407,
9334,
365,
18,
3459,
67,
869,
67,
1650,
12,
4717,... |
sage: Permutations([1,2,3]).count() 6 | def count(self): """ EXAMPLES: sage: Permutations([1,2,3]).count() 6 sage: Permutations([1,2,2]).count() 3 """ lmset = __builtin__.list(mset) mset_list = map(lambda x: lmset.index(x), lmset) d = {} for i in mset_list: d[i] = d.get(i, 0) + 1 | 2cd989d0145c5f5058eae905bd3f0d97a625d18d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/2cd989d0145c5f5058eae905bd3f0d97a625d18d/permutation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1056,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
13813,
22190,
3816,
21,
16,
22,
16,
22,
65,
2934,
1883,
1435,
890,
3536,
14966,
542,
273,
1001,
24553,
25648,
1098,
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,
1056,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
13813,
22190,
3816,
21,
16,
22,
16,
22,
65,
2934,
1883,
1435,
890,
3536,
14966,
542,
273,
1001,
24553,
25648,
1098,
12,
... | |
sig.update(repr(time.time())) | if not self.invariant: import time sig.update(repr(time.time())) | def __init__(self, encoding=rl_config.defaultEncoding, dummyoutline=0, compression=rl_config.pageCompression, invariant=rl_config.invariant): #self.defaultStreamFilters = [PDFBase85Encode, PDFZCompress] # for testing! #self.defaultStreamFilters = [PDFZCompress] # for testing! assert encoding in ['MacRomanEncoding', 'WinAnsiEncoding', 'MacRoman', 'WinAnsi'], 'Unsupported encoding %s' % encoding if encoding[-8:] <> 'Encoding': encoding = encoding + 'Encoding' | 3913b4770c7ff833e239029bbedfa1afe83b973e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/3913b4770c7ff833e239029bbedfa1afe83b973e/pdfdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2688,
33,
1321,
67,
1425,
18,
1886,
4705,
16,
9609,
25134,
33,
20,
16,
9154,
33,
1321,
67,
1425,
18,
2433,
15270,
16,
22514,
33,
1321,
67,
1425,
18,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2688,
33,
1321,
67,
1425,
18,
1886,
4705,
16,
9609,
25134,
33,
20,
16,
9154,
33,
1321,
67,
1425,
18,
2433,
15270,
16,
22514,
33,
1321,
67,
1425,
18,
26... |
return lambda fn, value : [TestItem(fn,False,"LICENSE '%s' is not recommed, better use '%s'" % (value,valid_licenses[value])),None][toInt(valid_licenses[value] != True)] | return lambda fn, value : [None,TestItem(fn,False,"LICENSE '%s' is not recommed, better use '%s'" % (value,valid_licenses[value])),None][valid_licenses[value] != True] | def license3(): return lambda fn, value : [TestItem(fn,False,"LICENSE '%s' is not recommed, better use '%s'" % (value,valid_licenses[value])),None][toInt(valid_licenses[value] != True)] | 929eb1c6b4355fabc79e4c5ff2eb91408974a0ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/929eb1c6b4355fabc79e4c5ff2eb91408974a0ad/content_checker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8630,
23,
13332,
327,
3195,
2295,
16,
460,
294,
306,
4709,
1180,
12,
4293,
16,
8381,
10837,
6065,
23396,
1995,
87,
11,
353,
486,
283,
832,
2937,
16,
7844,
999,
1995,
87,
4970,
738,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8630,
23,
13332,
327,
3195,
2295,
16,
460,
294,
306,
4709,
1180,
12,
4293,
16,
8381,
10837,
6065,
23396,
1995,
87,
11,
353,
486,
283,
832,
2937,
16,
7844,
999,
1995,
87,
4970,
738,
261... |
self.hboxlayout61.addItem(spacerItem59) self.gridlayout37.addLayout(self.hboxlayout61,0,0,1,1) | self.gridlayout33.addItem(spacerItem59,0,1,1,1) | def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint())) | 752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
13943,
12,
2890,
16,
2177,
1386,
2556,
6353,
4672,
2177,
1386,
2556,
6353,
18,
542,
16707,
2932,
1299,
1386,
2556,
6353,
7923,
2177,
1386,
2556,
6353,
18,
15169,
12,
23310,
4670,
18,... |
for entry in locales: | newlocales = locales for locale in locales: if len(locale) > 2 and locale[2] == "_": topLevelLocale = locale[0:2] if not topLevelLocale in locales: self._console.warn("Base locale %s not specified, trying to add it." % topLevelLocale) newlocales[:0] = [topLevelLocale] for entry in newlocales: | def getLocalizationData(self, locales): self._console.debug("Generating localization data...") self._console.indent() | 999e6df3805dcc3f2e1126153ea8b9596e70910f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/999e6df3805dcc3f2e1126153ea8b9596e70910f/Locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6993,
1588,
751,
12,
2890,
16,
6922,
4672,
365,
6315,
8698,
18,
4148,
2932,
21755,
17981,
501,
7070,
13,
365,
6315,
8698,
18,
9355,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6993,
1588,
751,
12,
2890,
16,
6922,
4672,
365,
6315,
8698,
18,
4148,
2932,
21755,
17981,
501,
7070,
13,
365,
6315,
8698,
18,
9355,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
@returns: string id @rtype: string | @param default: the default to return if the key does not exist @type default: varies @return: either the default (if the key did not exist) or the value of the key in the metadata dict @rtype: varies | def getId(self): """ This should return an id that's unique enough for caching purposes. | 59504844fd8818e17c3c37e7fd57f7a19af892d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/59504844fd8818e17c3c37e7fd57f7a19af892d3/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2634,
12,
2890,
4672,
3536,
1220,
1410,
327,
392,
612,
716,
1807,
3089,
7304,
364,
11393,
13694,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2634,
12,
2890,
4672,
3536,
1220,
1410,
327,
392,
612,
716,
1807,
3089,
7304,
364,
11393,
13694,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
length = entry[1] element = entry[2] | ent_size = entry[1] length = entry[2] element = entry[3] | def handle_byte_array(entry): length = entry[1] element = entry[2] newItems = [] write("[\n") indent() value = read_value(length) end_of_array = Input.tell() + value index = 0 while Input.tell() < end_of_array: write("%d = "%index) value = handle_element(element) write("\n") newItems.append(value) index += 1 dedent() write("]") return newItems | abd32a55dfe68962be88fe32d76cd6777ead9446 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/abd32a55dfe68962be88fe32d76cd6777ead9446/coff-dump.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
7229,
67,
1126,
12,
4099,
4672,
3281,
67,
1467,
273,
1241,
63,
21,
65,
769,
273,
1241,
63,
22,
65,
930,
273,
1241,
63,
23,
65,
225,
394,
3126,
273,
5378,
225,
1045,
2932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
7229,
67,
1126,
12,
4099,
4672,
3281,
67,
1467,
273,
1241,
63,
21,
65,
769,
273,
1241,
63,
22,
65,
930,
273,
1241,
63,
23,
65,
225,
394,
3126,
273,
5378,
225,
1045,
2932,
... |
def readlines(self, sizehint='ignored'): if self.closed: return [] lines=[] while 1: buf=m2.bio_gets(self.bio, 80) if buf is None: break lines.append(buf) return lines | def readlines(self, sizehint='ignored'): if self.closed: return [] lines=[] while 1: buf=m2.bio_gets(self.bio, 80) if buf is None: break lines.append(buf) return lines | def readlines(self, sizehint='ignored'): if self.closed: return [] lines=[] while 1: buf=m2.bio_gets(self.bio, 80) if buf is None: break lines.append(buf) return lines | 76e0455e2bbdba0a89ff1c01f4c5df2a797d8288 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/76e0455e2bbdba0a89ff1c01f4c5df2a797d8288/BIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17546,
12,
2890,
16,
963,
11317,
2218,
24055,
11,
4672,
309,
365,
18,
12204,
30,
327,
5378,
2362,
33,
8526,
1323,
404,
30,
1681,
33,
81,
22,
18,
21010,
67,
14665,
12,
2890,
18,
21010,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17546,
12,
2890,
16,
963,
11317,
2218,
24055,
11,
4672,
309,
365,
18,
12204,
30,
327,
5378,
2362,
33,
8526,
1323,
404,
30,
1681,
33,
81,
22,
18,
21010,
67,
14665,
12,
2890,
18,
21010,
... |
Default: ' | Default: " | def get_font(self, bold, oblique): """ Get the font based on bold and italic flags. """ if bold and oblique: return self.fonts[FONT_BOLDOBLIQUE] elif bold: return self.fonts[FONT_BOLD] elif oblique: return self.fonts[FONT_OBLIQUE] else: return self.fonts[FONT_NORMAL] | ce29ab54003233e3eec94111fa76fe1a2a752e3c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6148/ce29ab54003233e3eec94111fa76fe1a2a752e3c/img.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5776,
12,
2890,
16,
13068,
16,
3768,
549,
1857,
4672,
3536,
968,
326,
3512,
2511,
603,
13068,
471,
31709,
2943,
18,
3536,
309,
13068,
471,
3768,
549,
1857,
30,
327,
365,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5776,
12,
2890,
16,
13068,
16,
3768,
549,
1857,
4672,
3536,
968,
326,
3512,
2511,
603,
13068,
471,
31709,
2943,
18,
3536,
309,
13068,
471,
3768,
549,
1857,
30,
327,
365,
18,
2... |
self.counter = 1 instance.SyncCapabilities(mcl, 1000) | mcl._tc = 1 instance.SyncCapabilities(mcl, 10) | def begin(self, mcl): self.counter = 1 instance.SyncCapabilities(mcl, 1000) | b9525ce84ef4e735fe0f3992cbf1baa6453b4604 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/b9525ce84ef4e735fe0f3992cbf1baa6453b4604/test2_csp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2376,
12,
2890,
16,
312,
830,
4672,
365,
18,
7476,
273,
404,
791,
18,
4047,
14012,
12,
81,
830,
16,
4336,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2376,
12,
2890,
16,
312,
830,
4672,
365,
18,
7476,
273,
404,
791,
18,
4047,
14012,
12,
81,
830,
16,
4336,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if n.data.message_id == message_id: | if n.data.message_id == message.message_id: | def deliver_message(self, content, content_type='text/plain', to_uri=None): events = ['MSRPChatDidDeliverMessage', 'MSRPChatDidNotDeliverMessage'] with self.linked_notifications(events, sender=self.chat_transport) as q: message_id = self.send_message(content, content_type, to_uri) while True: n = q.wait() if n.data.message_id == message_id: if n.name == 'MSRPChatDidDeliverMessage': return n.data else: raise CannotDeliverError(code=n.data.code, reason=n.data.reason, message_id=n.data.message_id) | 7af97fe23c327834e66dfbbfca2430afcdecd0cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/7af97fe23c327834e66dfbbfca2430afcdecd0cd/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11795,
67,
2150,
12,
2890,
16,
913,
16,
913,
67,
723,
2218,
955,
19,
7446,
2187,
358,
67,
1650,
33,
7036,
4672,
2641,
273,
10228,
3537,
54,
52,
14163,
18250,
20813,
1079,
2187,
296,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11795,
67,
2150,
12,
2890,
16,
913,
16,
913,
67,
723,
2218,
955,
19,
7446,
2187,
358,
67,
1650,
33,
7036,
4672,
2641,
273,
10228,
3537,
54,
52,
14163,
18250,
20813,
1079,
2187,
296,
35... |
return [] | return [] | def tryLight(self, queue): """check for "light" (quick) built-in functions. Return codes: 0 - give up; 1 - continue, [...] list of binding lists""" con, pred, subj, obj = self.quad | 9014f1b29ec001a58490a448dc6782aa1860acf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/9014f1b29ec001a58490a448dc6782aa1860acf4/llyn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
775,
12128,
12,
2890,
16,
2389,
4672,
3536,
1893,
364,
315,
5099,
6,
261,
19525,
13,
6650,
17,
267,
4186,
18,
2000,
6198,
30,
225,
374,
300,
8492,
731,
31,
225,
404,
300,
1324,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
775,
12128,
12,
2890,
16,
2389,
4672,
3536,
1893,
364,
315,
5099,
6,
261,
19525,
13,
6650,
17,
267,
4186,
18,
2000,
6198,
30,
225,
374,
300,
8492,
731,
31,
225,
404,
300,
1324,
16,
2... |
(T_eval, TR) = numpy.linalg.eig(tls_group.T) | (T_eval, TR) = numpy.linalg.eig(tls_group.T) | def refmac5_prep(xyzin, tlsin_list, xyzout, tlsout): """Use TLS model + Uiso for each atom. Output xyzout with the residual Uiso only. """ ## load structure struct = FileIO.LoadStructure(fil = xyzin) ## load and construct TLS groups tls_group_list = [] tls_file = TLS.TLSFile() tls_file.set_file_format(TLS.TLSFileFormatTLSOUT()) tls_file_format = TLS.TLSFileFormatTLSOUT() for tlsin in tlsin_list: tls_desc_list = tls_file_format.load(open(tlsin, "r")) for tls_desc in tls_desc_list: tls_file.tls_desc_list.append(tls_desc) tls_group = tls_desc.construct_tls_group_with_atoms(struct) tls_group.tls_desc = tls_desc tls_group_list.append(tls_group) ## set the extra Uiso for each atom for tls_group in tls_group_list: ## minimal/maximal amount of Uiso which has to be added ## to the group's atoms to to make Uiso == Uiso_tls min_Uiso = 0.0 max_Uiso = 0.0 for atm, Utls in tls_group.iter_atm_Utls(): tls_tf = numpy.trace(Utls) / 3.0 ref_tf = numpy.trace(atm.get_U()) / 3.0 if ref_tf > tls_tf: max_Uiso = max(ref_tf - tls_tf, max_Uiso) else: min_Uiso = max(tls_tf - ref_tf, min_Uiso) ## reduce the TLS group T tensor by min_Uiso so that ## a PDB file can be written out where all atoms ## Uiso == Uiso_tls ## we must rotate the T tensor to its primary axes before ## subtracting min_Uiso magnitude from it (T_eval, TR) = numpy.linalg.eig(tls_group.T) T = numpy.dot(TR, numpy.dot(tls_group.T, numpy.transpose(TR))) ## FIXME: allclose(some_array, some_scalar) ## The next three lines appear to cause this def to crash, 2007-10-04 #assert numpy.allclose(T[0,1], 0.0) #assert numpy.allclose(T[0,2], 0.0) #assert numpy.allclose(T[1,2], 0.0) T[0,0] = T[0,0] - min_Uiso T[1,1] = T[1,1] - min_Uiso T[2,2] = T[2,2] - min_Uiso ## now take some of the smallest principal component of T and ## move it into the individual atomic temperature factors min_T = min(T[0,0], min(T[1,1], T[2,2])) sub_T = min_T * 0.50 add_Uiso = min_T - sub_T T[0,0] = T[0,0] - sub_T T[1,1] = T[1,1] - sub_T T[2,2] = T[2,2] - sub_T ## rotate T back to original orientation tls_group.T = numpy.dot( numpy.transpose(TR), numpy.dot(T, TR)) ## reset the TLS tensor values in the TLSDesc object so they can be ## saved tls_group.tls_desc.set_tls_group(tls_group) ## set atm.temp_factor for atm, Utls in tls_group.iter_atm_Utls(): tls_tf = numpy.trace(Utls) / 3.0 ref_tf = numpy.trace(atm.get_U()) / 3.0 if ref_tf > tls_tf: atm.temp_factor = ((add_Uiso) + ref_tf - tls_tf)*Constants.U2B atm.U = None else: atm.temp_factor = (add_Uiso) * Constants.U2B atm.U = None FileIO.SaveStructure(fil = xyzout, struct = struct) tls_file.save(open(tlsout, "w")) | 927f30c52e2fba131cd408196ada5dd0e1ef93a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/927f30c52e2fba131cd408196ada5dd0e1ef93a9/tls_calcs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1278,
5821,
25,
67,
19109,
12,
17177,
267,
16,
6871,
267,
67,
1098,
16,
14779,
659,
16,
6871,
659,
4672,
3536,
3727,
8098,
938,
397,
587,
9699,
364,
1517,
3179,
18,
3633,
14779,
659,
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,
1278,
5821,
25,
67,
19109,
12,
17177,
267,
16,
6871,
267,
67,
1098,
16,
14779,
659,
16,
6871,
659,
4672,
3536,
3727,
8098,
938,
397,
587,
9699,
364,
1517,
3179,
18,
3633,
14779,
659,
5... |
resp = self.publish(path=portal_url, basic=editor_auth) self.assertEqual(resp.getStatus(), 200) | def test_tab_visibility(self): """Only Editor can view seo tab""" rexp = re.compile('<a\s+[^>]*' \ 'href="[a-zA-Z0-9\:\/_-]*/@@seo-context-properties"[^>]*>'\ '\s*SEO Properties\s*</a>', re.I|re.S) res = self.publish(path=self.portal_url).getBody() self.assertEqual(rexp.search(res), None) res = self.publish(path=self.portal_url, basic=self.member_auth).getBody() self.assertEqual(rexp.search(res), None) res = self.publish(path=self.portal_url, basic=self.editor_auth).getBody() self.assertNotEqual(rexp.search(res), None) | def test_bug_24_at_plone_org(self): member_id = 'test_member' editor_id = 'test_editor' test_pswd = 'pswd' uf = self.portal.acl_users uf.userFolderAddUser(member_id, test_pswd, ['Member'], []) uf.userFolderAddUser(editor_id, test_pswd, ['Member','Editor'], []) | 543d3b5e0707066a3ac116a70ea326c2dcf7a5ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10421/543d3b5e0707066a3ac116a70ea326c2dcf7a5ae/testBugs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
925,
67,
3247,
67,
270,
67,
412,
476,
67,
3341,
12,
2890,
4672,
3140,
67,
350,
273,
296,
3813,
67,
5990,
11,
4858,
67,
350,
273,
296,
3813,
67,
9177,
11,
1842,
67,
1121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
925,
67,
3247,
67,
270,
67,
412,
476,
67,
3341,
12,
2890,
4672,
3140,
67,
350,
273,
296,
3813,
67,
5990,
11,
4858,
67,
350,
273,
296,
3813,
67,
9177,
11,
1842,
67,
1121,
... |
logger.info("Ball on special tile") self._tileType = tile | if self._gameIsAlive: logger.info("Ball on special tile") self._tileType = tile | def _onBallIntoSpecialTile(self, tile ,entry): logger.info("Ball on special tile") self._tileType = tile | b67111356fce76f14ee7dd4e1ca881849c92a07d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7999/b67111356fce76f14ee7dd4e1ca881849c92a07d/game.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
265,
38,
454,
5952,
12193,
9337,
12,
2890,
16,
4769,
269,
4099,
4672,
309,
365,
6315,
13957,
2520,
10608,
30,
1194,
18,
1376,
2932,
38,
454,
603,
4582,
4769,
7923,
225,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
265,
38,
454,
5952,
12193,
9337,
12,
2890,
16,
4769,
269,
4099,
4672,
309,
365,
6315,
13957,
2520,
10608,
30,
1194,
18,
1376,
2932,
38,
454,
603,
4582,
4769,
7923,
225,
365,
6315,
... |
yield check_complex_value, np.abs, np.inf, np.nan, np.inf, 0 | yield check_real_value, np.abs, np.inf, np.nan, np.inf | def test_cabs_inf_nan(self): x, y = [], [] | ada6b6321174169fbfa16490491e0218545947de /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/ada6b6321174169fbfa16490491e0218545947de/test_umath_complex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
5113,
67,
10625,
67,
13569,
12,
2890,
4672,
619,
16,
677,
273,
5378,
16,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
5113,
67,
10625,
67,
13569,
12,
2890,
4672,
619,
16,
677,
273,
5378,
16,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 110) else quickfix.DoubleField.__init__(self, 110, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
20168,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
20168,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
... |
self.osd_box = gui.Rectangle(pos, size, 0xaa000000) | self.osd_box = gui.Rectangle(pos, size, 0xaa000000L) | def drawosd(self): """ draw the image osd """ if self.osd_text: # if osd_text is preset, remove it self.osd_text.unparent() self.osd_text = None newosd = False else: # it's a new osd, let it move in newosd = True | cd7dbd49674aa293e2679120739f8102a04038f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/cd7dbd49674aa293e2679120739f8102a04038f9/viewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
538,
72,
12,
2890,
4672,
3536,
3724,
326,
1316,
1140,
72,
3536,
309,
365,
18,
538,
72,
67,
955,
30,
468,
309,
1140,
72,
67,
955,
353,
12313,
16,
1206,
518,
365,
18,
538,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
538,
72,
12,
2890,
4672,
3536,
3724,
326,
1316,
1140,
72,
3536,
309,
365,
18,
538,
72,
67,
955,
30,
468,
309,
1140,
72,
67,
955,
353,
12313,
16,
1206,
518,
365,
18,
538,
72,
... |
if long.match(text): option = long.group(0) elif short_long.match(text): option = short_long.group(0) | elif match.search('(-[-\w]+)', text): option = match[1] | def getopt(self): """Get option name(s) and argument type from option header.""" text = self.header option = '' arg = '' # Typical option header styles long = re.compile('(-[-\w]+)') short_long = re.compile('(-\w), --[-\w]+') long_arg = re.compile('(-[-\w]+) \[?(\w+)]?') short_long_arg = re.compile('(-\w) (\w+), --[-\w]+=\w+') # -foo if long.match(text): option = long.group(0) # -f, --foobar elif short_long.match(text): option = short_long.group(0) # -foo ARG elif long_arg.match(text): option, arg = long_arg.groups() # -f ARG, --foobar=ARG elif short_long_arg.match(text): option, arg = short_long_arg.groups() | 87af7849b0cf7c3c517637d593b8089cd3246ceb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/87af7849b0cf7c3c517637d593b8089cd3246ceb/manpage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3838,
12,
2890,
4672,
3536,
967,
1456,
508,
12,
87,
13,
471,
1237,
618,
628,
1456,
1446,
12123,
977,
273,
365,
18,
3374,
1456,
273,
875,
1501,
273,
875,
468,
16973,
1706,
1456,
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,
336,
3838,
12,
2890,
4672,
3536,
967,
1456,
508,
12,
87,
13,
471,
1237,
618,
628,
1456,
1446,
12123,
977,
273,
365,
18,
3374,
1456,
273,
875,
1501,
273,
875,
468,
16973,
1706,
1456,
14... |
filetag.tag().artist = artistentry.get_text() | filetag.tag().artist = entries[1].get_text() | def editwindow_applyall(self, button, item, filetags, titleentry, artistentry, albumentry, yearentry, trackentry, genreentry, commententry): filetagnum = 0 for filetag in filetags: filetagnum = filetagnum + 1 if item == "title": filetag.tag().title = titleentry.get_text() elif item == "album": filetag.tag().album = albumentry.get_text() elif item == "artist": filetag.tag().artist = artistentry.get_text() elif item == "year": if len(yearentry.get_text()) > 0: filetag.tag().year = int(yearentry.get_text()) else: filetag.tag().year = 0 elif item == "track": filetag.tag().track = filetagnum elif item == "genre": filetag.tag().genre = genreentry.get_text() elif item == "comment": filetag.tag().comment = commententry.get_text() if item == "track": # Update the entry for the current song: trackentry.set_text(str(filetags[self.filetagnum].tag().track)) | 8e7f75d3649afea0782df60c0cbc0b9c2fb7cc04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/8e7f75d3649afea0782df60c0cbc0b9c2fb7cc04/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
5668,
67,
9010,
454,
12,
2890,
16,
3568,
16,
761,
16,
661,
278,
1341,
16,
2077,
4099,
16,
15469,
4099,
16,
14844,
4099,
16,
677,
73,
7892,
698,
16,
3298,
4099,
16,
3157,
2842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
5668,
67,
9010,
454,
12,
2890,
16,
3568,
16,
761,
16,
661,
278,
1341,
16,
2077,
4099,
16,
15469,
4099,
16,
14844,
4099,
16,
677,
73,
7892,
698,
16,
3298,
4099,
16,
3157,
2842,
... |
for t in self._types.keys(): if self._types[t]['update']: update_types.append(t) | update_types = [ti[0] for ti in self.getChangedSchema() if ti[1]] | def manage_updateSchema(self, REQUEST=None): """Make sure all objects' schema are up to date""" | b9ae4b1f416be2a606a7ac40b22a9cbe66f10590 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b9ae4b1f416be2a606a7ac40b22a9cbe66f10590/ArchetypeTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
2725,
3078,
12,
2890,
16,
12492,
33,
7036,
4672,
3536,
6464,
3071,
777,
2184,
11,
1963,
854,
731,
358,
1509,
8395,
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,
10680,
67,
2725,
3078,
12,
2890,
16,
12492,
33,
7036,
4672,
3536,
6464,
3071,
777,
2184,
11,
1963,
854,
731,
358,
1509,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
selection = bpy.props.BoolVectorProperty(size = 32) | selection = bpy.props.BoolVectorProperty(size=32) | def object_invoke_func(self, context, event): wm = context.window_manager wm.invoke_props_dialog(self) return {'RUNNING_MODAL'} | 741f15c6190aef033040875a3ab218296a5ea1ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11963/741f15c6190aef033040875a3ab218296a5ea1ec/space_view3d_copy_attributes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
733,
67,
14407,
67,
644,
12,
2890,
16,
819,
16,
871,
4672,
18200,
273,
819,
18,
5668,
67,
4181,
18200,
18,
14407,
67,
9693,
67,
12730,
12,
2890,
13,
327,
13666,
29358,
67,
6720,
1013,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
733,
67,
14407,
67,
644,
12,
2890,
16,
819,
16,
871,
4672,
18200,
273,
819,
18,
5668,
67,
4181,
18200,
18,
14407,
67,
9693,
67,
12730,
12,
2890,
13,
327,
13666,
29358,
67,
6720,
1013,
... |
sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2), plot_points=400).show(aspect_ratio=1) | sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2), plot_points=400).show(aspect_ratio=1) | def region_plot(f, xrange, yrange, plot_points, incol, outcol, bordercol, borderstyle, borderwidth): r""" ``region_plot`` takes a boolean function of two variables, `f(x,y)` and plots the region where f is True over the specified ``xrange`` and ``yrange`` as demonstrated below. ``region_plot(f, (xmin, xmax), (ymin, ymax), ...)`` INPUT: - ``f`` -- a boolean function of two variables - ``(xmin, xmax)`` -- 2-tuple, the range of ``x`` values OR 3-tuple ``(x,xmin,xmax)`` - ``(ymin, ymax)`` -- 2-tuple, the range of ``y`` values OR 3-tuple ``(y,ymin,ymax)`` - ``plot_points`` -- integer (default: 100); number of points to plot in each direction of the grid - ``incol`` -- a color (default: ``'blue'``), the color inside the region - ``outcol`` -- a color (default: ``'white'``), the color of the outside of the region If any of these options are specified, the border will be shown as indicated, otherwise it is only implicit (with color ``incol``) as the border of the inside of the region. - ``bordercol`` -- a color (default: ``None``), the color of the border (``'black'`` if ``borderwidth`` or ``borderstyle`` is specified but not ``bordercol``) - ``borderstyle`` -- string (default: 'solid'), one of 'solid', 'dashed', 'dotted', 'dashdot' - ``borderwidth`` -- integer (default: None), the width of the border in pixels EXAMPLES: Here we plot a simple function of two variables:: sage: x,y = var('x,y') sage: region_plot(cos(x^2+y^2) <= 0, (x, -3, 3), (y, -3, 3)) Here we play with the colors:: sage: region_plot(x^2+y^3 < 2, (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray') An even more complicated plot, with dashed borders:: sage: region_plot(sin(x)*sin(y) >= 1/4, (x,-10,10), (y,-10,10), incol='yellow', bordercol='black', borderstyle='dashed', plot_points=250) A disk centered at the origin:: sage: region_plot(x^2+y^2<1, (x,-1,1), (y,-1,1)).show(aspect_ratio=1) A plot with more than one condition:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2)) Since it doesn't look very good, let's increase plot_points:: sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2), plot_points=400).show(aspect_ratio=1) #long time The first quadrant of the unit circle:: sage: region_plot([y>0, x>0, x^2+y^2<1], (x,-1.1, 1.1), (y,-1.1, 1.1), plot_points = 400).show(aspect_ratio=1) Here is another plot, with a huge border:: sage: region_plot(x*(x-1)*(x+1)+y^2<0, (x, -3, 2), (y, -3, 3), incol='lightblue', bordercol='gray', borderwidth=10, plot_points=50) If we want to keep only the region where x is positive:: sage: region_plot([x*(x-1)*(x+1)+y^2<0, x>-1], (x, -3, 2), (y, -3, 3), incol='lightblue', plot_points=50) Here we have a cut circle:: sage: region_plot([x^2+y^2<4, x>-1], (x, -2, 2), (y, -2, 2), incol='lightblue', bordercol='gray', plot_points=200).show(aspect_ratio=1) """ from sage.plot.plot import Graphics from sage.plot.misc import setup_for_eval_on_grid import numpy if not isinstance(f, (list, tuple)): f = [f] f = [equify(g) for g in f] g, ranges = setup_for_eval_on_grid(f, [xrange, yrange], plot_points) xrange,yrange=[r[:2] for r in ranges] xy_data_arrays = numpy.asarray([[[func(x, y) for x in xsrange(*ranges[0], include_endpoint=True)] for y in xsrange(*ranges[1], include_endpoint=True)] for func in g],dtype=float) xy_data_array=numpy.abs(xy_data_arrays.prod(axis=0)) # Now we need to set entries to negative iff all # functions were negative at that point. neg_indices = (xy_data_arrays<0).all(axis=0) xy_data_array[neg_indices]=-xy_data_array[neg_indices] from matplotlib.colors import ListedColormap incol = rgbcolor(incol) outcol = rgbcolor(outcol) cmap = ListedColormap([incol, outcol]) cmap.set_over(outcol) cmap.set_under(incol) g = Graphics() opt = contour_plot.options.copy() opt.pop('plot_points') opt.pop('fill') opt.pop('contours') opt.pop('frame') g.add_primitive(ContourPlot(xy_data_array, xrange,yrange, dict(plot_points=plot_points, contours=[-1e307, 0, 1e307], cmap=cmap, fill=True, **opt))) if bordercol or borderstyle or borderwidth: cmap = [rgbcolor(bordercol)] if bordercol else ['black'] linestyles = [borderstyle] if borderstyle else None linewidths = [borderwidth] if borderwidth else None opt.pop('linestyles') opt.pop('linewidths') g.add_primitive(ContourPlot(xy_data_array, xrange, yrange, dict(plot_points=plot_points, linestyles=linestyles, linewidths=linewidths, contours=[0], cmap=[bordercol], fill=False, **opt))) return g | ad2e839c7b6b537e0b898376a64eeb4c2dad298a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ad2e839c7b6b537e0b898376a64eeb4c2dad298a/contour_plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3020,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
3207,
67,
4139,
16,
316,
1293,
16,
596,
1293,
16,
5795,
1293,
16,
5795,
4060,
16,
5795,
2819,
4672,
436,
8395,
12176,
6858,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3020,
67,
4032,
12,
74,
16,
12314,
16,
677,
3676,
16,
3207,
67,
4139,
16,
316,
1293,
16,
596,
1293,
16,
5795,
1293,
16,
5795,
4060,
16,
5795,
2819,
4672,
436,
8395,
12176,
6858,
67,
... |
self.found_type = "" | def __init__(self, sound_file): Pipeline.__init__(self) self.sound_file = sound_file self.found_type = "" command = '%s location="%s" ! typefind name=typefinder ! fakesink' % \ (gstreamer_source, encode_filename(self.sound_file.get_uri())) self.add_command(command) self.add_signal("typefinder", "have-type", self.have_type) | a18793b0ad63f711dbec0cbd8e8e8a81457c6811 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/a18793b0ad63f711dbec0cbd8e8e8a81457c6811/soundconverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14190,
67,
768,
4672,
13671,
16186,
2738,
972,
12,
2890,
13,
365,
18,
29671,
67,
768,
273,
14190,
67,
768,
225,
1296,
273,
1995,
87,
2117,
11613,
87,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14190,
67,
768,
4672,
13671,
16186,
2738,
972,
12,
2890,
13,
365,
18,
29671,
67,
768,
273,
14190,
67,
768,
225,
1296,
273,
1995,
87,
2117,
11613,
87,
6,
... | |
def opening(self, node): s = u'' return s | def opening(s, node): r = u'' return r | def opening(self, node): s = u'' return s | 01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2/Packer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10890,
12,
2890,
16,
756,
4672,
272,
273,
582,
6309,
327,
272,
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,
10890,
12,
2890,
16,
756,
4672,
272,
273,
582,
6309,
327,
272,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if response.code == 404: raise errors.ResourceNotFound | if response.code == 404: raise errors.ResourceNotFound("The requested document %s was not found on this server" % uri.doc_selector) | def _cb_get_element(self, response, uri): """This is called when the document related to the element is retrieved.""" if response.code == 404: ## XXX raise errors.ResourceNotFound ## XXX result = element.get(response.data, uri.node_selector.element_selector) if not result: raise errors.ResourceNotFound return StatusResponse(200, response.etag, result) | 7a5df048938a6a80471471a865dd65ea2cb3ab16 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3446/7a5df048938a6a80471471a865dd65ea2cb3ab16/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7358,
67,
588,
67,
2956,
12,
2890,
16,
766,
16,
2003,
4672,
3536,
2503,
353,
2566,
1347,
326,
1668,
3746,
358,
326,
930,
353,
10295,
12123,
309,
766,
18,
710,
422,
7709,
30,
377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7358,
67,
588,
67,
2956,
12,
2890,
16,
766,
16,
2003,
4672,
3536,
2503,
353,
2566,
1347,
326,
1668,
3746,
358,
326,
930,
353,
10295,
12123,
309,
766,
18,
710,
422,
7709,
30,
377,
... |
os.unlink(path) | if os.path.exists(path): os.unlink(path) | def delete_books(self, paths, end_session=True): for path in paths: os.unlink(path) | 1401167eef87ab272fc66549d46f4747df39b962 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/1401167eef87ab272fc66549d46f4747df39b962/driver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
12567,
12,
2890,
16,
2953,
16,
679,
67,
3184,
33,
5510,
4672,
364,
589,
316,
2953,
30,
309,
1140,
18,
803,
18,
1808,
12,
803,
4672,
1140,
18,
318,
1232,
12,
803,
13,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
12567,
12,
2890,
16,
2953,
16,
679,
67,
3184,
33,
5510,
4672,
364,
589,
316,
2953,
30,
309,
1140,
18,
803,
18,
1808,
12,
803,
4672,
1140,
18,
318,
1232,
12,
803,
13,
225,
... |
if inspiral: print >> dag_fh, 'done', | def builddag(self,cache,bank,inspiral): chan = self.config['input']['channel-name'] site = chan[0] ifo = chan[0:2] dag_fh = open( self.basename + ".dag", "w" ) # jobs to generate the frame cache files for seg in self.segments: jobname = 'frcache_%s_%d_%d' % (site,seg.startpad,seg.endpad) print >> dag_fh, 'JOB %s %s.frcache.sub' % (jobname,self.basename), if cache: print >> dag_fh, 'done', print >> dag_fh, '\nVARS %s site="%s" frstart="%s" frend="%s"' % ( jobname, site, seg.startpad, seg.endpad ) for i in range(1,len(self.segments)): print >> dag_fh, 'PARENT frcache_%s_%s_%s CHILD frcache_%s_%s_%s' % ( site,self.segments[i-1].startpad,self.segments[i-1].endpad, site,self.segments[i].startpad,self.segments[i].endpad) # jobs to generate the template banks for seg in self.segments: parent = 'frcache_%s_%s_%s' % (site,seg.startpad,seg.endpad) for chunk in seg.chunks: jobname = 'tmpltbank_%s_%s_%s' % (ifo,chunk.start,chunk.end) print >> dag_fh, 'JOB %s %s.tmpltbank.sub' % (jobname,self.basename), if bank: print >> dag_fh, 'done', print >> dag_fh, """ | 4ca27a5b0a7f8de201852206b2020fba74fb2a68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/4ca27a5b0a7f8de201852206b2020fba74fb2a68/inspiral_pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25666,
330,
449,
346,
12,
2890,
16,
2493,
16,
10546,
16,
267,
1752,
481,
287,
4672,
3861,
273,
365,
18,
1425,
3292,
2630,
21712,
4327,
17,
529,
3546,
2834,
273,
3861,
63,
20,
65,
21479... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25666,
330,
449,
346,
12,
2890,
16,
2493,
16,
10546,
16,
267,
1752,
481,
287,
4672,
3861,
273,
365,
18,
1425,
3292,
2630,
21712,
4327,
17,
529,
3546,
2834,
273,
3861,
63,
20,
65,
21479... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.