rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
self.file_browser.handler_block(signal) | def __init__(self, rootdir=None, startdir=None): | 6f9f2c0f8d93d8b9b366e6ac9e4d614dd02826f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/735/6f9f2c0f8d93d8b9b366e6ac9e4d614dd02826f9/pyrenamer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1365,
1214,
33,
7036,
16,
787,
1214,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1365,
1214,
33,
7036,
16,
787,
1214,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
action="store", type="string", dest="home", default = None, | action="store", type="string", dest="home", default=None, | def add_user_parse_arguments(app, configuration): """Integrated help and options / arguments for « add user ».""" usage_text = """ %s user [--login] <login> %s user --firstname <firstname> --lastname <lastname> [--system] [--password "<password>"] [--gid=<primary_gid>] [--profile=<profile>] [--skel=<skel>] [--gecos=<given name>] [--home=<home_dir>] […]""" % ( stylize(ST_APPNAME, "%prog"), stylize(ST_APPNAME, "%prog")) parser = OptionParser(usage=usage_text, version=build_version_string(app, version)) # common behaviour group parser.add_option_group(common_behaviour_group(app, parser, 'add_user')) user = OptionGroup(parser, stylize(ST_OPTION, "Add user options ")) user.add_option('-l', "--login", "--name", action="store", type="string", dest="login", default = None, help="""Specify user's login (%s).""" % stylize( ST_IMPORTANT, "one of login or firstname+lastname arguments is required")) user.add_option('-e', "--gecos", action="store", type="string", dest="gecos", default = None, help="""Specify user's GECOS field. If given, GECOS takes precedence """ """on --firstname and --lastname, which will be silently """ """discarded. Default: autogenerated from firstname & lastname """ """if given, else from login.""") user.add_option('-p', "--password", action="store", type="string", dest="password", default = None, help="""Specify user's password (else will be autogenerated, %d """ """chars long).""" % configuration.users.min_passwd_size) user.add_option('-g', '--in-group', '--primary-group', '--gid', '--primary-gid', action="store", type="string", dest="primary_gid", default = None, help="""Specify user's future primary group (at your preference as """ """a group name or a GID). This parameter is overriden by the """ """profile argument if you specify both. Default: %s.""" % configuration.users.default_gid) user.add_option('-G', '--in-groups', '--auxilliary-groups', '--add-to-groups', action="store", type="string", dest="in_groups", default=None, help='''Specify future user's auxilliary groups (at your preference ''' '''as groupnames or GIDs, which can be mixed, and separated by ''' '''commas without spaces). These supplemental groups are added ''' '''to the list of groups defined by the profile, if you specify ''' '''both. Default: None.''') user.add_option('-s', "--system", action="store_true", dest="system", default = False, help="Create a system account instead of a standard user (root only).") user.add_option('-r', "--profile", action="store", type="string", dest="profile", default = None, help="""Profile which will be applied to the user. Default: None, """ """overrides primary group / GID.""") user.add_option('-u', "--uid", '--desired-uid', action="store", type="int", dest="uid", default = None, help="""manually specify an UID for the new user. This UID must be """ """free and inside the range %s - %s for a standard user, and """ """outside the range for a system account, else it will be """ """rejected and the user account won't be created. Default: """ """next free UID in the selected range.""" % ( stylize(ST_DEFAULT, configuration.users.uid_min), stylize(ST_DEFAULT, configuration.users.uid_max))) user.add_option('-H', "--home", action="store", type="string", dest="home", default = None, help="""Specify the user's home directory. Only valid for a system """ """account, else discarded because standard accounts have a """ """fixed home dir %s/<login>""" % configuration.users.base_path) user.add_option("-S", "--shell", action="store", type="string", dest="shell", default = None, help="""Specify user's shell, from the ones given by command """ """`get config shells`. Default: %s""" % configuration.users.default_shell) user.add_option('-K', "--skel", action="store", type="string", dest="skel", default = None, help="""Specify a particular skeleton to apply to home dir after """ """creation, instead of the profile or the primary-group """ """implicit skel. Default: the profile skel if profile given, """ """else %s.""" % configuration.users.default_skel) user.add_option("--firstname", action="store", type="string", dest="firstname", default = None, help="""Specify user's first name (required if --lastname is given,""" """overriden by GECOS).""") user.add_option("--lastname", action="store", type="string", dest="lastname", default = None, help="""Specify user's last name (required if --firstname is given, """ """overriden by GECOS).""") user.add_option("--no-create-home", action="store_true", dest="no_create_home", default = False, help="") user.add_option("--disabled-password", action="store_true", dest="disabled_password", default = False, help="") user.add_option("--disabled-login", action="store_true", dest="disabled_login", default = False, help="") parser.add_option_group(user) return parser.parse_args() | 461c24b546b5d0469c4e29582a85905d96b60351 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/461c24b546b5d0469c4e29582a85905d96b60351/argparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
1355,
67,
2670,
67,
7099,
12,
2910,
16,
1664,
4672,
3536,
11476,
690,
2809,
471,
702,
342,
1775,
364,
225,
131,
109,
527,
729,
225,
131,
124,
12123,
225,
4084,
67,
955,
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,
527,
67,
1355,
67,
2670,
67,
7099,
12,
2910,
16,
1664,
4672,
3536,
11476,
690,
2809,
471,
702,
342,
1775,
364,
225,
131,
109,
527,
729,
225,
131,
124,
12123,
225,
4084,
67,
955,
273,
... |
self.__set_current(name) | def push_patch(self, name, empty = False): """Pushes a patch on the stack """ unapplied = self.get_unapplied() assert(name in unapplied) | 532cdf94f80be6fb95682d9673c12a1d1aecf9a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/532cdf94f80be6fb95682d9673c12a1d1aecf9a0/stack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
67,
2272,
12,
2890,
16,
508,
16,
1008,
273,
1083,
4672,
3536,
7621,
281,
279,
4729,
603,
326,
2110,
3536,
640,
438,
3110,
273,
365,
18,
588,
67,
318,
438,
3110,
1435,
1815,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
67,
2272,
12,
2890,
16,
508,
16,
1008,
273,
1083,
4672,
3536,
7621,
281,
279,
4729,
603,
326,
2110,
3536,
640,
438,
3110,
273,
365,
18,
588,
67,
318,
438,
3110,
1435,
1815,
12,
... | |
def fftar(self, n): | def fftar(self, n=None): '''Fourier transform of AR polynomial, zero-padded at end to n Parameters ---------- n : int length of array after zero-padding Returns ------- fftar : ndarray fft of zero-padded ar polynomial ''' if n is None: n = len(self.ar) | def fftar(self, n): return fft.fft(self.padarr(self.ar, n)) | 684b683042373c8b8942d6959a27ab65aeed7ee5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/684b683042373c8b8942d6959a27ab65aeed7ee5/fftarma.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15741,
297,
12,
2890,
16,
290,
33,
7036,
4672,
9163,
42,
24775,
2510,
434,
6052,
16991,
16,
3634,
17,
6982,
785,
622,
679,
358,
290,
225,
7012,
12181,
290,
294,
509,
769,
434,
526,
183... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15741,
297,
12,
2890,
16,
290,
33,
7036,
4672,
9163,
42,
24775,
2510,
434,
6052,
16991,
16,
3634,
17,
6982,
785,
622,
679,
358,
290,
225,
7012,
12181,
290,
294,
509,
769,
434,
526,
183... |
'BuildRoot: %{_tmppath}/%{name}-buildroot', | 'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot', | def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version(), '%define release ' + self.release, '', 'Summary: ' + self.distribution.get_description(), ] | cf525241bb14c29f747e5fa3045a57bc80a74557 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cf525241bb14c29f747e5fa3045a57bc80a74557/bdist_rpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
67,
2793,
67,
768,
12,
2890,
4672,
3536,
4625,
326,
977,
434,
392,
534,
12728,
857,
585,
471,
327,
518,
487,
279,
666,
434,
2064,
261,
476,
1534,
980,
2934,
3536,
468,
6377,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6540,
67,
2793,
67,
768,
12,
2890,
4672,
3536,
4625,
326,
977,
434,
392,
534,
12728,
857,
585,
471,
327,
518,
487,
279,
666,
434,
2064,
261,
476,
1534,
980,
2934,
3536,
468,
6377,... |
xrd = -zqd | tmp = -zqd | def _buildResiduum(self, mol, zmatrix, n_atoms, phi, psi, init_pos): """ | bfcd9bbf8883b807c4b4f0c2104f99b7390da40d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/bfcd9bbf8883b807c4b4f0c2104f99b7390da40d/PeptideGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
607,
350,
89,
379,
12,
2890,
16,
12629,
16,
998,
5667,
16,
290,
67,
14937,
16,
7706,
16,
23921,
16,
1208,
67,
917,
4672,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
607,
350,
89,
379,
12,
2890,
16,
12629,
16,
998,
5667,
16,
290,
67,
14937,
16,
7706,
16,
23921,
16,
1208,
67,
917,
4672,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._searchforSeries(series_name).data[banners][self.season_key][self.banner_season_key].values() | self._searchforSeries(series_name).data[banners][self.season_key][self.banner_season_key].values() | def getGraphics(self, graphics_type): """Retrieve Poster or Fan Art or Banner or Episode image graphics URL(s) return None if no graphics URLs were found return a string of URLs """ banners=u'_banners' series_name=self.config['series_name'] season=self.config['season_num'] episode=self.config['episode_num'] episode_name=self.config['episode_name'] lang=self.config['local_language'] graphics=[] | 6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
17558,
12,
2890,
16,
17313,
67,
723,
4672,
3536,
5767,
5616,
264,
578,
478,
304,
9042,
578,
31218,
578,
512,
84,
11802,
1316,
17313,
1976,
12,
87,
13,
327,
599,
309,
1158,
17313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17558,
12,
2890,
16,
17313,
67,
723,
4672,
3536,
5767,
5616,
264,
578,
478,
304,
9042,
578,
31218,
578,
512,
84,
11802,
1316,
17313,
1976,
12,
87,
13,
327,
599,
309,
1158,
17313,
... |
fdoc_slot_n = IO.decode_link(tree_rsrc[tree_slot+4:tree_slot+8]) | fdoc_slot_r = tree_rsrc[tree_slot+4:tree_slot+8] fdoc_slot_n = IO.decode_link(fdoc_slot_r) | def index_word(self, word, doc_number, position): if word: prefix, suffix = word[0], word[1:] if prefix in self.children: subtree = self.children[prefix] else: # Get an empty slot slot_number = self.root.tree_handler._get_free_slot() # Update data structure on memoty subtree = self.children[prefix] = Tree(self.root, slot_number) # Update resource r = self.root.tree_handler.resource # Initialize the empty slot base = 16 + slot_number * 16 r[base:base+4] = IO.encode_character(prefix) r[base+4:base+8] = IO.encode_link(None) r[base+8:base+12] = IO.encode_link(None) # Prepend the new slot this_base = 16 + self.slot * 16 r[base+12:base+16] = r[this_base+8:this_base+12] r[this_base+8:this_base+12] = IO.encode_link(slot_number) subtree.index_word(suffix, doc_number, position) else: tree_handler = self.root.tree_handler tree_rsrc = tree_handler.resource docs_handler = self.root.docs_handler docs_rsrc = docs_handler.resource # Get the slot in the 'documents' resource tree_slot = 16 + self.slot * 16 fdoc_slot_n = IO.decode_link(tree_rsrc[tree_slot+4:tree_slot+8]) if doc_number in self.documents: positions = self.documents[doc_number] positions.append(position) # Update slot doc_slot_n = docs_handler._get_document_slot(fdoc_slot_n, doc_number) doc_slot = 12 + doc_slot_n * 12 frequency = len(positions) else: self.documents[doc_number] = positions = [position] # Update slot doc_slot_n = docs_handler._get_free_slot() doc_slot = 12 + doc_slot_n * 12 docs_rsrc[doc_slot:doc_slot+4] = IO.encode_uint32(doc_number) docs_rsrc[doc_slot+8:doc_slot+12] = IO.encode_link(fdoc_slot_n) tree_rsrc[tree_slot+4:tree_slot+8] = IO.encode_link(doc_slot_n) frequency = 1 docs_rsrc[doc_slot+4:doc_slot+8] = IO.encode_uint32(frequency) | 51eb36a817138ff485eeb1b9a616f10eb8b4fcc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/51eb36a817138ff485eeb1b9a616f10eb8b4fcc1/IIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
67,
1095,
12,
2890,
16,
2076,
16,
997,
67,
2696,
16,
1754,
4672,
309,
2076,
30,
1633,
16,
3758,
273,
2076,
63,
20,
6487,
2076,
63,
21,
26894,
309,
1633,
316,
365,
18,
5906,
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,
770,
67,
1095,
12,
2890,
16,
2076,
16,
997,
67,
2696,
16,
1754,
4672,
309,
2076,
30,
1633,
16,
3758,
273,
2076,
63,
20,
6487,
2076,
63,
21,
26894,
309,
1633,
316,
365,
18,
5906,
30,
... |
elif isinstance(unique, (list,tuple)): | elif isinstance(unique, (frozenset,list,tuple)): | def _matchUnique(cls, kw): """return a tuple of column names that will uniquely identify a row given the choices from kw """ for unique in cls._unique: if isinstance(unique, (unicode,str)): if kw.get(unique)!=None: return (unique,) elif isinstance(unique, (list,tuple)): for u in unique: if not kw.has_key(u): break else: return unique | d5f426b173d97747851601d398f8a044fc896b56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/d5f426b173d97747851601d398f8a044fc896b56/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1916,
6303,
12,
6429,
16,
5323,
4672,
3536,
2463,
279,
3193,
434,
1057,
1257,
716,
903,
30059,
9786,
279,
1027,
864,
326,
7246,
628,
5323,
3536,
364,
3089,
316,
2028,
6315,
6270,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1916,
6303,
12,
6429,
16,
5323,
4672,
3536,
2463,
279,
3193,
434,
1057,
1257,
716,
903,
30059,
9786,
279,
1027,
864,
326,
7246,
628,
5323,
3536,
364,
3089,
316,
2028,
6315,
6270,
30... |
return 1 | return self.robots[root].can_fetch(AGENTNAME, url) | def inroots(self, url): | 5df8e36b33b1c502cfa5ff922deda54da4d56580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5df8e36b33b1c502cfa5ff922deda54da4d56580/webchecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
22078,
12,
2890,
16,
880,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
316,
22078,
12,
2890,
16,
880,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
def command_ignore(self, args): | def command_ignore(self, arg): | def command_ignore(self, args): """ /ignore <nick> """ if len(args) != 1: self.command_help(['ignore']) return if self.current_room().name == 'Info' or not self.current_room().joined: return roomname = self.current_room().name nick = args[0] if not self.ignores.has_key(roomname): self.ignores[roomname] = set() # no need for any order if nick not in self.ignores[roomname]: self.ignores[roomname].add(nick) self.add_message_to_room(self.current_room(), _("%s is now ignored") % nick) else: self.add_message_to_room(self.current_room(), _("%s is already ignored") % nick) | 1c7377804051166c26f33457378524d192077c66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/1c7377804051166c26f33457378524d192077c66/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
67,
6185,
12,
2890,
16,
1501,
4672,
3536,
342,
6185,
411,
17091,
34,
3536,
309,
562,
12,
1968,
13,
480,
404,
30,
365,
18,
3076,
67,
5201,
12,
3292,
6185,
19486,
327,
309,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
67,
6185,
12,
2890,
16,
1501,
4672,
3536,
342,
6185,
411,
17091,
34,
3536,
309,
562,
12,
1968,
13,
480,
404,
30,
365,
18,
3076,
67,
5201,
12,
3292,
6185,
19486,
327,
309,
365,
... |
for lang in langs: ob._setLocalPropValue(property, lang, langs[lang]) | [ ob._setLocalPropValue(property, lang, langs[lang]) for lang in langs if langs[lang]!='' ] | def importNySMAPProject(self, param, id, attrs, content, properties, discussion, objects): #this method is called during the import process try: param = abs(int(param)) except: param = 0 if param == 3: #just try to delete the object try: self.manage_delObjects([id]) except: pass else: ob = self._getOb(id, None) if param in [0, 1] or (param==2 and ob is None): if param == 1: #delete the object if exists try: self.manage_delObjects([id]) except: pass addNySMAPProject(self, id=id, sortorder=attrs['sortorder'].encode('utf-8'), main_issues=attrs['main_issues'].encode('utf-8'), country=attrs['country'].encode('utf-8'), tools=attrs['tools'].encode('utf-8'), budget=attrs['budget'].encode('utf-8'), timeframe=attrs['timeframe'].encode('utf-8'), priority_area=attrs['priority_area'].encode('utf-8'), focus=attrs['focus'].encode('utf-8'), contributor=self.utEmptyToNone(attrs['contributor'].encode('utf-8')), discussion=abs(int(attrs['discussion'].encode('utf-8')))) ob = self._getOb(id) for property, langs in properties.items(): for lang in langs: ob._setLocalPropValue(property, lang, langs[lang]) ob.approveThis(approved=abs(int(attrs['approved'].encode('utf-8'))), approved_by=self.utEmptyToNone(attrs['approved_by'].encode('utf-8'))) if attrs['releasedate'].encode('utf-8') != '': ob.setReleaseDate(attrs['releasedate'].encode('utf-8')) ob.import_comments(discussion) self.recatalogNyObject(ob) | 22534f3e4b77eb0fa7a6ae1fac302552814653da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/22534f3e4b77eb0fa7a6ae1fac302552814653da/NySMAPProject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
50,
93,
7303,
2203,
4109,
12,
2890,
16,
579,
16,
612,
16,
3422,
16,
913,
16,
1790,
16,
14716,
16,
2184,
4672,
468,
2211,
707,
353,
2566,
4982,
326,
1930,
1207,
775,
30,
579,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
50,
93,
7303,
2203,
4109,
12,
2890,
16,
579,
16,
612,
16,
3422,
16,
913,
16,
1790,
16,
14716,
16,
2184,
4672,
468,
2211,
707,
353,
2566,
4982,
326,
1930,
1207,
775,
30,
579,
27... |
"ADD COLUMN \"%s\" VARCHAR(%d)" % \ (self._table,k,field.size)) | "ADD COLUMN \"%s\" %s" % \ (self._table, k, field.sql_type()[1])) | "has changed size (DB = %d, def = %d), strings will be truncated !" % \ (k, self._table, f_pg_size, field.size)) | 35daeab90752d94c8bf137429f2364a18751a3dc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/35daeab90752d94c8bf137429f2364a18751a3dc/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
315,
5332,
3550,
963,
261,
2290,
273,
738,
72,
16,
1652,
273,
738,
72,
3631,
2064,
903,
506,
15282,
29054,
738,
521,
261,
79,
16,
365,
6315,
2121,
16,
284,
67,
8365,
67,
1467,
16,
652,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
315,
5332,
3550,
963,
261,
2290,
273,
738,
72,
16,
1652,
273,
738,
72,
3631,
2064,
903,
506,
15282,
29054,
738,
521,
261,
79,
16,
365,
6315,
2121,
16,
284,
67,
8365,
67,
1467,
16,
652,
18,... |
problem_number = int(self.request.get('problem_number')) | problem_number = int(self.request.get('problem_number') or '0') | def get(self): user = users.get_current_user() if user: exid = self.request.get('exid') key = self.request.get('key') problem_number = int(self.request.get('problem_number')) num_problems = int(self.request.get('num_problems')) time_warp = self.request.get('time_warp') | 2238911fefe9db9f5c01a9933df7c48a22a9e710 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/2238911fefe9db9f5c01a9933df7c48a22a9e710/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
225,
729,
273,
3677,
18,
588,
67,
2972,
67,
1355,
1435,
309,
729,
30,
431,
350,
273,
365,
18,
2293,
18,
588,
2668,
338,
350,
6134,
498,
273,
365,
18,
2293,
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,
336,
12,
2890,
4672,
225,
729,
273,
3677,
18,
588,
67,
2972,
67,
1355,
1435,
309,
729,
30,
431,
350,
273,
365,
18,
2293,
18,
588,
2668,
338,
350,
6134,
498,
273,
365,
18,
2293,
18,
... |
email_host = email_parts[1] | email_host = email_parts[1].encode('ascii') | def clean_email(self): """ Make sure the e-mail address is sane """ email = self.cleaned_data['email'] email_parts = email.split("@") if len(email_parts) != 2: raise forms.ValidationError('E-mail addresses must be of the form "name@host"') | a7af1b14ff94b482bbeef9aa95dc438ae9b40218 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12041/a7af1b14ff94b482bbeef9aa95dc438ae9b40218/user_reg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
67,
3652,
12,
2890,
4672,
3536,
4344,
3071,
326,
425,
17,
4408,
1758,
353,
30426,
3536,
2699,
273,
365,
18,
6200,
329,
67,
892,
3292,
3652,
3546,
2699,
67,
6019,
273,
2699,
18,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
67,
3652,
12,
2890,
4672,
3536,
4344,
3071,
326,
425,
17,
4408,
1758,
353,
30426,
3536,
2699,
273,
365,
18,
6200,
329,
67,
892,
3292,
3652,
3546,
2699,
67,
6019,
273,
2699,
18,
4... |
def FirstScan_Button_clicked_cb(self, button, data=None): if self.search_count == 0: self.do_scan() else: self.reset_scan() return True def NextScan_Button_clicked_cb(self, button, data=None): | def Scan_Button_clicked_cb(self, button, data=None): | def FirstScan_Button_clicked_cb(self, button, data=None): if self.search_count == 0: # first scan self.do_scan() else: # new scan self.reset_scan() return True | f365924e6143036d1d9c74c5401adabe84f8f416 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4850/f365924e6143036d1d9c74c5401adabe84f8f416/GameConqueror.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5783,
7972,
67,
3616,
67,
7475,
329,
67,
7358,
12,
2890,
16,
3568,
16,
501,
33,
7036,
4672,
309,
365,
18,
3072,
67,
1883,
422,
374,
30,
468,
1122,
4135,
365,
18,
2896,
67,
9871,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5783,
7972,
67,
3616,
67,
7475,
329,
67,
7358,
12,
2890,
16,
3568,
16,
501,
33,
7036,
4672,
309,
365,
18,
3072,
67,
1883,
422,
374,
30,
468,
1122,
4135,
365,
18,
2896,
67,
9871,
1435... |
if dm in ["single", "toneburst", "diseqc_a_b", "diseqc_a_b_c_d"]: | if dm in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]: | def getSatListForNim(self, slotid): list = [] if (self.getNimType(slotid) == self.nimType["DVB-S"]): #print "slotid:", slotid #print "self.satellites:", self.satList[config.Nims[slotid].diseqcA.value] #print "diseqcA:", config.Nims[slotid].diseqcA.value configMode = config.Nims[slotid].configMode.value | 26a6141301937e0ef501b4cd7ae61b4f2293b7e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/26a6141301937e0ef501b4cd7ae61b4f2293b7e5/NimManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
270,
682,
1290,
50,
381,
12,
2890,
16,
4694,
350,
4672,
666,
273,
5378,
309,
261,
2890,
18,
588,
50,
381,
559,
12,
14194,
350,
13,
422,
365,
18,
82,
381,
559,
9614,
30199,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
270,
682,
1290,
50,
381,
12,
2890,
16,
4694,
350,
4672,
666,
273,
5378,
309,
261,
2890,
18,
588,
50,
381,
559,
12,
14194,
350,
13,
422,
365,
18,
82,
381,
559,
9614,
30199,
38,
... |
ldtpized_name = '%s%d' % (ldtpized_name_base, ldtpized_obj_index[abbrev_role]) | ldtpized_name = u'%s%d' % (ldtpized_name_base, ldtpized_obj_index[abbrev_role]) | def _appmap_pairs(self, gui): ldtpized_list = [] ldtpized_obj_index = {} for obj in self._list_objects(gui): abbrev_role, abbrev_name = self._ldtpize_accessible(obj) if abbrev_role in ldtpized_obj_index: ldtpized_obj_index[abbrev_role] += 1 else: ldtpized_obj_index[abbrev_role] = 0 if abbrev_name == '': ldtpized_name_base = abbrev_role ldtpized_name = '%s%d' % (ldtpized_name_base, ldtpized_obj_index[abbrev_role]) else: ldtpized_name_base = '%s%s' % (abbrev_role, abbrev_name) ldtpized_name = ldtpized_name_base i = 1 while ldtpized_name in ldtpized_list: ldtpized_name = '%s%d' % (ldtpized_name_base, i) i += 1 ldtpized_list.append(ldtpized_name) yield ldtpized_name, obj, '%s#%d' % (abbrev_role, ldtpized_obj_index[abbrev_role]) | f1d3b330c9cc7519afb68be535da1273a51f9270 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11266/f1d3b330c9cc7519afb68be535da1273a51f9270/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2910,
1458,
67,
11545,
12,
2890,
16,
13238,
4672,
16916,
6834,
1235,
67,
1098,
273,
5378,
16916,
6834,
1235,
67,
2603,
67,
1615,
273,
2618,
364,
1081,
316,
365,
6315,
1098,
67,
6911... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2910,
1458,
67,
11545,
12,
2890,
16,
13238,
4672,
16916,
6834,
1235,
67,
1098,
273,
5378,
16916,
6834,
1235,
67,
2603,
67,
1615,
273,
2618,
364,
1081,
316,
365,
6315,
1098,
67,
6911... |
rule = rule(r'\`\`', enter='escaped_code', leave='strong') | rule = rule(r'\`\`', enter='escaped_code', leave='escaped_code') | def parse(self, stream): stream.expect('emphasized_begin') children = parse_child_nodes(stream, self, 'emphasized_end') stream.expect('emphasized_end') return nodes.Emphasized(children) | 09fa578fd828d674ac6fd6ec2c84b8d45ff052d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8613/09fa578fd828d674ac6fd6ec2c84b8d45ff052d9/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
1407,
4672,
1407,
18,
12339,
2668,
351,
26377,
1235,
67,
10086,
6134,
2325,
273,
1109,
67,
3624,
67,
4690,
12,
3256,
16,
365,
16,
296,
351,
26377,
1235,
67,
409,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
1407,
4672,
1407,
18,
12339,
2668,
351,
26377,
1235,
67,
10086,
6134,
2325,
273,
1109,
67,
3624,
67,
4690,
12,
3256,
16,
365,
16,
296,
351,
26377,
1235,
67,
409,
61... |
except (xml.sax.SAXException, IOError): | except (xml.sax.SAXException, IOError, xml.sax.SAXNotRecognizedException): | def scrapeLinks(self,html,baseurl,setTitle = False,charset = None): try: if not charset is None: html = fixHTMLHeader(html,charset) xmldata = html parser = xml.sax.make_parser() parser.setFeature(xml.sax.handler.feature_namespaces, 1) if not charset is None: handler = RSSLinkGrabber(baseurl,charset) else: handler = RSSLinkGrabber(baseurl) parser.setContentHandler(handler) try: parser.parse(StringIO(xmldata)) except IOError, e: pass except: print "DTV: Warning couldn't parse HTML at %s" % baseurl traceback.print_exc() links = handler.links linkDict = {} for link in links: if link[0].startswith('http://') or link[0].startswith('https://'): if not linkDict.has_key(toUTF8Bytes(link[0],charset)): linkDict[toUTF8Bytes(link[0])] = {} if not link[1] is None: linkDict[toUTF8Bytes(link[0])]['title'] = toUTF8Bytes(link[1],charset).strip() if not link[2] is None: linkDict[toUTF8Bytes(link[0])]['thumbnail'] = toUTF8Bytes(link[2],charset) if setTitle and not handler.title is None: self.ufeed.beginChange() try: self.title = toUTF8Bytes(handler.title) finally: self.ufeed.endChange() return ([x[0] for x in links if x[0].startswith('http://') or x[0].startswith('https://')], linkDict) except (xml.sax.SAXException, IOError): (links, linkDict) = self.scrapeHTMLLinks(html,baseurl,setTitle=setTitle, charset=charset) return (links, linkDict) | d22c759d49e32d88a568424fd001888ffb0279ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/d22c759d49e32d88a568424fd001888ffb0279ac/feed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
888,
25360,
7100,
12,
2890,
16,
2620,
16,
1969,
718,
16,
542,
4247,
273,
1083,
16,
9999,
273,
599,
4672,
775,
30,
309,
486,
4856,
353,
599,
30,
1729,
273,
2917,
4870,
1864,
12,
2620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
888,
25360,
7100,
12,
2890,
16,
2620,
16,
1969,
718,
16,
542,
4247,
273,
1083,
16,
9999,
273,
599,
4672,
775,
30,
309,
486,
4856,
353,
599,
30,
1729,
273,
2917,
4870,
1864,
12,
2620,
... |
""" def __init__( self, ratio ): """Creates a new collide_circle_ratio callable. ratio is expected to be a floating point value used to scale the underlying sprite radius before checking for collisions. | """ def __init__(self, ratio): """creates a new collide_circle_ratio callable instance The given ratio is expected to be a floating point value used to scale the underlying sprite radius before checking for collisions. | def collide_circle( left, right ): """collision detection between two sprites, using circles. pygame.sprite.collide_circle(left, right): return bool Tests for collision between two sprites, by testing to see if two circles centered on the sprites overlap. If the sprites have a "radius" attribute, that is used to create the circle, otherwise a circle is created that is big enough to completely enclose the sprites rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. New in pygame 1.8.0 """ xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance ** 2 + ydistance ** 2 try: leftradiussquared = left.radius ** 2 except AttributeError: leftrect = left.rect leftradiussquared = ( leftrect.width ** 2 + leftrect.height ** 2 ) / 4 try: rightradiussquared = right.radius ** 2 except AttributeError: rightrect = right.rect rightradiussquared = ( rightrect.width ** 2 + rightrect.height ** 2 ) / 4 return distancesquared < leftradiussquared + rightradiussquared | d9760f3e4782abb02dd98080337626eefdad67ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/d9760f3e4782abb02dd98080337626eefdad67ee/sprite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
645,
8130,
67,
18970,
12,
2002,
16,
2145,
262,
30,
3536,
12910,
1951,
11649,
3086,
2795,
1694,
24047,
16,
1450,
5886,
9558,
18,
2395,
13957,
18,
1752,
796,
18,
1293,
8130,
67,
18970,
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,
645,
8130,
67,
18970,
12,
2002,
16,
2145,
262,
30,
3536,
12910,
1951,
11649,
3086,
2795,
1694,
24047,
16,
1450,
5886,
9558,
18,
2395,
13957,
18,
1752,
796,
18,
1293,
8130,
67,
18970,
12,... |
def __init__(self,varname,limit=None): self.varname = varname self.limit = limit def render(self, context): try: months = NewsItem.on_site.published().dates('date', 'month', order="DESC") except: months = None if self.limit is not None: months = list(months) months = months[:self.limit] context[self.varname] = months return '' | def __init__(self,varname,limit=None): self.varname = varname self.limit = limit def render(self, context): try: months = NewsItem.on_site.published().dates('date', 'month', order="DESC") except: months = None if self.limit is not None: months = list(months) months = months[:self.limit] context[self.varname] = months return '' | def months_with_news(parser, token): """ {% months_with_news 4 as months %} """ bits = token.split_contents() if len(bits) == 3: limit = None elif len(bits) == 4: try: limit = abs(int(bits[1])) except ValueError: raise template.TemplateSyntaxError("If provided, second argument to `months_with_news` must be a positive whole number.") if bits[-2].lower() != 'as': raise template.TemplateSyntaxError("Missing 'as' from 'months_with_news' template tag. Format is {% months_with_news 5 as months %}.") return MonthNode(bits[-1], limit=limit) | 2d3c8ed0ed7c2f6a9f8202b37fc595f1f8bfb7d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2484/2d3c8ed0ed7c2f6a9f8202b37fc595f1f8bfb7d6/news_tags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8846,
67,
1918,
67,
18443,
12,
4288,
16,
1147,
4672,
3536,
288,
9,
8846,
67,
1918,
67,
18443,
1059,
487,
8846,
738,
97,
3536,
4125,
273,
1147,
18,
4939,
67,
3980,
1435,
309,
562,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8846,
67,
1918,
67,
18443,
12,
4288,
16,
1147,
4672,
3536,
288,
9,
8846,
67,
1918,
67,
18443,
1059,
487,
8846,
738,
97,
3536,
4125,
273,
1147,
18,
4939,
67,
3980,
1435,
309,
562,
12,
... |
entries = client.build_entry_list(query=options.query, | entries = client.build_entry_list(user=options.owner or options.user, query=options.query, | def _run_tag(client, options, args): entries = client.build_entry_list(query=options.query, title=options.title, force_photos=True) if entries: client.TagPhotos(entries, options.tags) else: LOG.error('No matches for the title and/or query you gave.') | d82148b045998d53d49eea2bbef6519a75a0811e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/d82148b045998d53d49eea2bbef6519a75a0811e/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
67,
2692,
12,
2625,
16,
702,
16,
833,
4672,
3222,
273,
1004,
18,
3510,
67,
4099,
67,
1098,
12,
1355,
33,
2116,
18,
8443,
578,
702,
18,
1355,
16,
843,
33,
2116,
18,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2681,
67,
2692,
12,
2625,
16,
702,
16,
833,
4672,
3222,
273,
1004,
18,
3510,
67,
4099,
67,
1098,
12,
1355,
33,
2116,
18,
8443,
578,
702,
18,
1355,
16,
843,
33,
2116,
18,
2271,
... |
info = torrent.get_status(["name", "save_path", "move_completed", "move_on_completed_path"]) | info = torrent.get_status(["name", "save_path", "move_on_completed", "move_on_completed_path"]) | def execute_commands(self, torrent_id, event): torrent = component.get("TorrentManager").torrents[torrent_id] info = torrent.get_status(["name", "save_path", "move_completed", "move_on_completed_path"]) | d69b8e1099ad314eb6155c0aa14355882da7b507 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12915/d69b8e1099ad314eb6155c0aa14355882da7b507/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
7847,
12,
2890,
16,
17351,
67,
350,
16,
871,
4672,
17351,
273,
1794,
18,
588,
2932,
27266,
547,
1318,
20387,
13039,
547,
87,
63,
13039,
547,
67,
350,
65,
1123,
273,
17351,
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,
1836,
67,
7847,
12,
2890,
16,
17351,
67,
350,
16,
871,
4672,
17351,
273,
1794,
18,
588,
2932,
27266,
547,
1318,
20387,
13039,
547,
87,
63,
13039,
547,
67,
350,
65,
1123,
273,
17351,
18... |
print "<H3>Command line Arguments:</H3>" | print "<H3>Command Line Arguments:</H3>" | def print_arguments(): print print "<H3>Command line Arguments:</H3>" print print sys.argv print | 0d26876f7028b8e7829e651e18a2f2aa5b85c478 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d26876f7028b8e7829e651e18a2f2aa5b85c478/cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
7099,
13332,
1172,
1172,
3532,
44,
23,
34,
2189,
5377,
13599,
19814,
44,
23,
2984,
1172,
1172,
2589,
18,
19485,
1172,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
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,
1172,
67,
7099,
13332,
1172,
1172,
3532,
44,
23,
34,
2189,
5377,
13599,
19814,
44,
23,
2984,
1172,
1172,
2589,
18,
19485,
1172,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
r""" Fibonacci-type sequence based on subtraction: $a(0) = 1$, $a(1) = 2$ and $a(n) = a(n-2)-a(n-1)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A061084; a Fibonacci-type sequence based on subtraction: a(0) = 1, a(1) = 2 and a(n) = a(n-2)-a(n-1). sage: a(0) 1 sage: a(1) 2 sage: a(8) -29 sage: a(22) -24476 sage: a.list(12) [1, 2, -1, 3, -4, 7, -11, 18, -29, 47, -76, 123] sage: a.keyword ['sign', 'easy', 'nice'] AUTHOR: -- Jaap Spies (2007-01-18) """ def __init__(self): | def __init__(self): r""" Fibonacci-type sequence based on subtraction: $a(0) = 1$, $a(1) = 2$ and $a(n) = a(n-2)-a(n-1)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A061084; a Fibonacci-type sequence based on subtraction: a(0) = 1, a(1) = 2 and a(n) = a(n-2)-a(n-1). sage: a(0) 1 sage: a(1) 2 sage: a(8) -29 sage: a(22) -24476 sage: a.list(12) [1, 2, -1, 3, -4, 7, -11, 18, -29, 47, -76, 123] sage: a.keyword ['sign', 'easy', 'nice'] AUTHOR: -- Jaap Spies (2007-01-18) """ | def list(self, n): self._eval(n) # force computation return self._b[:n] | 69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
290,
4672,
365,
6315,
8622,
12,
82,
13,
282,
468,
2944,
16039,
327,
365,
6315,
70,
10531,
82,
65,
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,
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,
666,
12,
2890,
16,
290,
4672,
365,
6315,
8622,
12,
82,
13,
282,
468,
2944,
16039,
327,
365,
6315,
70,
10531,
82,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
def GetNumInvalidValues(self): | def GetNumInvalidValues(self, func): | def GetNumInvalidValues(self): """Overridden from Argument.""" return 2 | 51330b3a08d845da9815b843e020833e62577828 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/51330b3a08d845da9815b843e020833e62577828/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
2578,
1941,
1972,
12,
2890,
16,
1326,
4672,
3536,
22042,
2794,
628,
5067,
12123,
327,
576,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
2578,
1941,
1972,
12,
2890,
16,
1326,
4672,
3536,
22042,
2794,
628,
5067,
12123,
327,
576,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
print "End of svg." print self.picklelist | def EndElementHandler(self, name): if (self.wait_end_of != None): if (name == self.wait_end_of): self.wait_end_of = None else: return | b0960edd4ee4dd41f5a02508b5bede9378e8a56b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/b0960edd4ee4dd41f5a02508b5bede9378e8a56b/anim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4403,
1046,
1503,
12,
2890,
16,
508,
4672,
309,
261,
2890,
18,
7048,
67,
409,
67,
792,
480,
599,
4672,
309,
261,
529,
422,
365,
18,
7048,
67,
409,
67,
792,
4672,
365,
18,
7048,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4403,
1046,
1503,
12,
2890,
16,
508,
4672,
309,
261,
2890,
18,
7048,
67,
409,
67,
792,
480,
599,
4672,
309,
261,
529,
422,
365,
18,
7048,
67,
409,
67,
792,
4672,
365,
18,
7048,
67,
... | |
ctx2.set_session_cache_mode(0x0001) | ctx2.set_session_cache_mode(m2.SSL_SESS_CACHE_CLIENT) | def test_HTTPSConnection_resume_session(self): pid = self.start_server(self.args) try: from M2Crypto import httpslib ctx = SSL.Context() ctx.load_verify_locations(cafile='tests/ca.pem') ctx.load_cert('tests/x509.pem') ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 1) ctx.set_session_cache_mode(0x0001) c = httpslib.HTTPSConnection(srv_host, srv_port, ssl_context=ctx) c.request('GET', '/') ses = c.get_session() t = ses.as_text() data = c.getresponse().read() c.close() ctx2 = SSL.Context() ctx2.load_verify_locations(cafile='tests/ca.pem') ctx2.load_cert('tests/x509.pem') ctx2.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 1) ctx2.set_session_cache_mode(0x0001) c = httpslib.HTTPSConnection(srv_host, srv_port, ssl_context=ctx2) c.set_session(ses) c.request('GET', '/') ses2 = c.get_session() t2 = ses2.as_text() data = c.getresponse().read() c.close() assert t == t2, "Sessions did not match" finally: self.stop_server(pid) self.failIf(string.find(data, 's_server -quiet -www') == -1) | eb8c1f1658832c759990f9493b3ded34fd832742 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10522/eb8c1f1658832c759990f9493b3ded34fd832742/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
18657,
1952,
67,
25158,
67,
3184,
12,
2890,
4672,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18,
1968,
13,
775,
30,
628,
490,
22,
18048,
1930,
1062,
24760,
1103,
273,
7419... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18657,
1952,
67,
25158,
67,
3184,
12,
2890,
4672,
4231,
273,
365,
18,
1937,
67,
3567,
12,
2890,
18,
1968,
13,
775,
30,
628,
490,
22,
18048,
1930,
1062,
24760,
1103,
273,
7419... |
sendto = [sendto[0][1]] m = ['Subject: Well, it seemed to work', '', 'hi, mum!'] | return | def handle_Message(self, message): '''Handle an RFC822 Message | 5b882ec550d8e5780ceda2c62f7a71e6e7a7e1d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5b882ec550d8e5780ceda2c62f7a71e6e7a7e1d5/mailgw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
1079,
12,
2890,
16,
883,
4672,
9163,
3259,
392,
8372,
24532,
2350,
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,
1640,
67,
1079,
12,
2890,
16,
883,
4672,
9163,
3259,
392,
8372,
24532,
2350,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Index '0' adds the value into the first position, '1' to the second, and so on. Similarly, '-1' is the last position, '-2' second last, and so on. If the absolute value of the index is greater than the length of the list, the value is added at the end (positive index) or the beginning (negative index). An index can be given either as an integer or a string that can be converted to an integer. | Index '0' adds the value into the first position, '1' to the second, and so on. Similarly, '-1' is the last position, '-2' second last, and so on. If the absolute value of the index is greater than the length of the list, the value is added at the end (positive index) or the beginning (negative index). An index can be given either as an integer or a string that can be converted to an integer. | def insert_into_list(self, L, index, value): """Inserts 'value' into 'L' to the position specified with 'index'. Index '0' adds the value into the first position, '1' to the second, and so on. Similarly, '-1' is the last position, '-2' second last, and so on. If the absolute value of the index is greater than the length of the list, the value is added at the end (positive index) or the beginning (negative index). An index can be given either as an integer or a string that can be converted to an integer. Example: | Insert Into List | ${L1} | 0 | xxx | | Insert Into List | ${L2} | ${-1} | xxx | => ${L1} == ['xxx', 'a'] ${L2} == ['a', 'xxx', 'b'] """ L.insert(self._index_to_int(index), value) | 9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/9e3b0b6f2f5e1229f613f2fc11d15a4072f9d6db/Collections.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
18591,
67,
1098,
12,
2890,
16,
511,
16,
770,
16,
460,
4672,
3536,
14214,
296,
1132,
11,
1368,
296,
48,
11,
358,
326,
1754,
1269,
598,
296,
1615,
10332,
225,
3340,
296,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
67,
18591,
67,
1098,
12,
2890,
16,
511,
16,
770,
16,
460,
4672,
3536,
14214,
296,
1132,
11,
1368,
296,
48,
11,
358,
326,
1754,
1269,
598,
296,
1615,
10332,
225,
3340,
296,
20,
... |
format_string = self.varformatstr(name,n,rc,e) return [format_string%(round,rci,ei) for rci in range(rc) for ei in range(e)] def vars(self, name, round, rc=None, e=None): | format_string = self.varformatstr(name, n, rc, e) return [format_string % (nr, rci, ei) for rci in range(rc) for ei in range(e)] def vars(self, name, nr, rc=None, e=None): | def varstrs(self, name, round, rc = None, e = None): """ Return a list of strings representing variables in self. | 62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
569,
24432,
12,
2890,
16,
508,
16,
3643,
16,
4519,
273,
599,
16,
425,
273,
599,
4672,
3536,
2000,
279,
666,
434,
2064,
5123,
3152,
316,
365,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
569,
24432,
12,
2890,
16,
508,
16,
3643,
16,
4519,
273,
599,
16,
425,
273,
599,
4672,
3536,
2000,
279,
666,
434,
2064,
5123,
3152,
316,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
elif event.keyval in (ord('+'),ord('-'),ord('=')): | elif event.keyval in (ord('+'), ord('-'), ord('=')): | def _on_key_press(self, editable, event): if event.keyval in (gtk.keysyms.Tab, gtk.keysyms.Escape, gtk.keysyms.Return): if self.mode_cmd: self.mode_cmd = False if self.callback_process: self.callback_process(False, self, event) self.stop_emission("key-press-event") return True elif event.keyval in (ord('+'),ord('-'),ord('=')): self.mode_cmd = True self.date_get() if self.callback_process: self.callback_process(True, self, event) self.stop_emission("key-press-event") return True elif self.mode_cmd: if self.callback: self.callback(event) return True return False | 10a2aa8769477cf1b618e02c7d7f932cccd795d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/10a2aa8769477cf1b618e02c7d7f932cccd795d0/date_widget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
265,
67,
856,
67,
1028,
12,
2890,
16,
13754,
16,
871,
4672,
309,
871,
18,
856,
1125,
316,
261,
4521,
79,
18,
2452,
93,
959,
18,
5661,
16,
22718,
18,
2452,
93,
959,
18,
8448,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
265,
67,
856,
67,
1028,
12,
2890,
16,
13754,
16,
871,
4672,
309,
871,
18,
856,
1125,
316,
261,
4521,
79,
18,
2452,
93,
959,
18,
5661,
16,
22718,
18,
2452,
93,
959,
18,
8448,
1... |
debugMsg("Called Scene.__init__()") | def __init__(self): """ The init function """ BaseScene.__init__(self) debugMsg("Called Scene.__init__()") | 4f222f20603d60d4211aebe78e611261a483da10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/4f222f20603d60d4211aebe78e611261a483da10/scene.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
1021,
1208,
445,
3536,
3360,
14370,
16186,
2738,
972,
12,
2890,
13,
1198,
3332,
2932,
8185,
29347,
16186,
2738,
972,
1435,
7923,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
1021,
1208,
445,
3536,
3360,
14370,
16186,
2738,
972,
12,
2890,
13,
1198,
3332,
2932,
8185,
29347,
16186,
2738,
972,
1435,
7923,
2,
-100,
-100,
-100,... | |
dec = ephem.degrees(sign + mag.replace(' ', ':')) | dec = ephem.degrees(sign + ':'.join(mag.split())) | def standard_parse(line): """Read the date, RA, and dec from a USNO data file line.""" fields = re.split(r' +', line) dt = datetime(*strptime(fields[0][:-2], "%Y %b %d %H:%M:%S")[0:6]) date = ephem.Date(dt) ra = ephem.hours(fields[1].replace(' ', ':')) sign, mag = fields[2].split(None, 1) dec = ephem.degrees(sign + mag.replace(' ', ':')) return date, ra, dec | 1cde9b7d2cf6248fb0cd785d05d72a0b21f7f1c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10979/1cde9b7d2cf6248fb0cd785d05d72a0b21f7f1c8/test_usno.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4529,
67,
2670,
12,
1369,
4672,
3536,
1994,
326,
1509,
16,
26880,
16,
471,
2109,
628,
279,
11836,
3417,
501,
585,
980,
12123,
225,
1466,
273,
283,
18,
4939,
12,
86,
11,
282,
397,
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,
4529,
67,
2670,
12,
1369,
4672,
3536,
1994,
326,
1509,
16,
26880,
16,
471,
2109,
628,
279,
11836,
3417,
501,
585,
980,
12123,
225,
1466,
273,
283,
18,
4939,
12,
86,
11,
282,
397,
2187,... |
req.write("</pre></body></html>\n") | req.write("</p>\n") if html: req.write("</body></html>\n") linecache.clearcache() | def traceback(req, html=0): import traceback exc = sys.exc_info() if html: try: req.clear_headers() req.clear_output() req.set_header("Content-Type", "text/html; charset=iso-8859-1") except SequencingError: pass req.write("<html><head><title>jonpy traceback</title></head><body>" "<h1>jonpy traceback</h1><pre><b>") for line in traceback.format_exception_only(exc[0], exc[1]): if html: req.write(html_encode(line)) req.error(line) if html: req.write("</b>\n") lines = traceback.format_tb(exc[2]) lines.reverse() for line in lines: if html: req.write(html_encode(line)) req.error(line) if html: req.write("</pre></body></html>\n") | 87df7558c1b2e0b72fc536db3e1ff72612d20be2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/506/87df7558c1b2e0b72fc536db3e1ff72612d20be2/cgi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10820,
12,
3658,
16,
1729,
33,
20,
4672,
1930,
10820,
3533,
273,
2589,
18,
10075,
67,
1376,
1435,
309,
1729,
30,
775,
30,
1111,
18,
8507,
67,
2485,
1435,
1111,
18,
8507,
67,
2844,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10820,
12,
3658,
16,
1729,
33,
20,
4672,
1930,
10820,
3533,
273,
2589,
18,
10075,
67,
1376,
1435,
309,
1729,
30,
775,
30,
1111,
18,
8507,
67,
2485,
1435,
1111,
18,
8507,
67,
2844,
1435... |
testLastDownException, | def neverCalled(Event): self.neverCalledCalled = True | 256c9348759292b3d2768a243be442a321f0a417 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7300/256c9348759292b3d2768a243be442a321f0a417/Test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5903,
8185,
12,
1133,
4672,
365,
18,
4644,
502,
8185,
8185,
273,
1053,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5903,
8185,
12,
1133,
4672,
365,
18,
4644,
502,
8185,
8185,
273,
1053,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
now = datetime.datetime.now() | now = datetime.now() | def dumpMessage(conf, message): """Dump a message to our dumpfile""" dumpFile = conf.getDumpFile() # Be nice: Create dir if it's not there dumpDir = os.path.dirname(dumpFile) if not os.access(dumpDir, os.W_OK): if not createDir(dumpDir): log.error("Could not create dump dir") return False try: fd = open(dumpFile, 'a') now = datetime.datetime.now() prefix = "Failed mail at %s:\n" % now.strftime("%Y-%m-%d %H:%M:%S") fd.write(prefix) fd.write(message) fd.close return True except Exception, e: log.error("Creating dump entry failed: %s" % e) return False | 79c3808a1665606f36c9df390a0cb6a9494f848f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7360/79c3808a1665606f36c9df390a0cb6a9494f848f/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
1079,
12,
3923,
16,
883,
4672,
3536,
10628,
279,
883,
358,
3134,
4657,
768,
8395,
4657,
812,
273,
2195,
18,
588,
10628,
812,
1435,
468,
4823,
13752,
30,
1788,
1577,
309,
518,
1807,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
1079,
12,
3923,
16,
883,
4672,
3536,
10628,
279,
883,
358,
3134,
4657,
768,
8395,
4657,
812,
273,
2195,
18,
588,
10628,
812,
1435,
468,
4823,
13752,
30,
1788,
1577,
309,
518,
1807,... |
def __init__(self, title): Statistic.__init__(self, title) | def __init__(self, name, title): Statistic.__init__(self, name, title) | def __init__(self, title): Statistic.__init__(self, title) | b8888de85047fe93273e5989b691f6b75032d60e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2516/b8888de85047fe93273e5989b691f6b75032d60e/msvnstats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2077,
4672,
8269,
5846,
16186,
2738,
972,
12,
2890,
16,
2077,
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,
... | [
1,
1,
1,
1,
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,
2738,
972,
12,
2890,
16,
2077,
4672,
8269,
5846,
16186,
2738,
972,
12,
2890,
16,
2077,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if len(error_302_dict)>10 or req.error_302_dict.has_key(newurl): | if len(req.error_302_dict)>10 or \ req.error_302_dict.has_key(newurl): | def http_error_302(self, req, fp, code, msg, headers): if headers.has_key('location'): newurl = headers['location'] elif headers.has_key('uri'): newurl = headers['uri'] else: return nil = fp.read() fp.close() | 73d2ceabd55898495bbda39b438ff9ae179b389a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/73d2ceabd55898495bbda39b438ff9ae179b389a/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1062,
67,
1636,
67,
23,
3103,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
309,
1607,
18,
5332,
67,
856,
2668,
3562,
11,
4672,
394,
718,
273,
1607,
3292,
3562,
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,
1062,
67,
1636,
67,
23,
3103,
12,
2890,
16,
1111,
16,
4253,
16,
981,
16,
1234,
16,
1607,
4672,
309,
1607,
18,
5332,
67,
856,
2668,
3562,
11,
4672,
394,
718,
273,
1607,
3292,
3562,
35... |
console.stdoutln("NOTE: Skipping Jmol-animation section") | console.stdoutln("NOTE: Skipping Jmol-animation section") | def html_tls_graph_path(self, chain, ntls): """Generates the HTML table describing the path (set of tls groups) for the given number of segments(h, or ntls) """ ## class HTMLReport() cpartition = chain.partition_collection.get_chain_partition(ntls) if cpartition == None: return None | 80aaf2a14dfcc5b684aad61f8ca72e81b353162c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/80aaf2a14dfcc5b684aad61f8ca72e81b353162c/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
17116,
67,
4660,
67,
803,
12,
2890,
16,
2687,
16,
9513,
3251,
4672,
3536,
6653,
326,
3982,
1014,
16868,
326,
589,
261,
542,
434,
6871,
3252,
13,
364,
326,
864,
1300,
434,
515... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
17116,
67,
4660,
67,
803,
12,
2890,
16,
2687,
16,
9513,
3251,
4672,
3536,
6653,
326,
3982,
1014,
16868,
326,
589,
261,
542,
434,
6871,
3252,
13,
364,
326,
864,
1300,
434,
515... |
afile = pathstrip(afile_orig, strip) | abase, afile = pathstrip(afile_orig, strip) | def pathstrip(path, count=1): pathlen = len(path) i = 0 if count == 0: return path.rstrip() while count > 0: i = path.find('/', i) if i == -1: raise PatchError(_("unable to strip away %d dirs from %s") % (count, path)) i += 1 # consume '//' in the path while i < pathlen - 1 and path[i] == '/': i += 1 count -= 1 return path[i:].rstrip() | 0f03d21e1b86e103d964aafe13ceab2c32515854 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/0f03d21e1b86e103d964aafe13ceab2c32515854/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
589,
6406,
12,
803,
16,
1056,
33,
21,
4672,
589,
1897,
273,
562,
12,
803,
13,
277,
273,
374,
309,
1056,
422,
374,
30,
327,
589,
18,
86,
6406,
1435,
1323,
1056,
405,
374,
30,
277,
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,
589,
6406,
12,
803,
16,
1056,
33,
21,
4672,
589,
1897,
273,
562,
12,
803,
13,
277,
273,
374,
309,
1056,
422,
374,
30,
327,
589,
18,
86,
6406,
1435,
1323,
1056,
405,
374,
30,
277,
2... |
""" | Multi-edged and looped graphs are partially supported:: sage: G = Graph({0:[1,1]}, multiedges=True) sage: G.is_planar() True sage: G.is_planar(on_embedding={}) Traceback (most recent call last): ... NotImplementedError: Cannot compute with embeddings of multiple-edged or looped graphs. sage: G.is_planar(set_pos=True) Traceback (most recent call last): ... NotImplementedError: Cannot compute with embeddings of multiple-edged or looped graphs. sage: G.is_planar(set_embedding=True) Traceback (most recent call last): ... NotImplementedError: Cannot compute with embeddings of multiple-edged or looped graphs. sage: G.is_planar(kuratowski=True) (True, None) :: sage: G = graphs.CompleteGraph(5) sage: G = Graph(G, multiedges=True) sage: G.add_edge(0,1) sage: G.is_planar() False sage: b,k = G.is_planar(kuratowski=True) sage: b False sage: k.vertices() [0, 1, 2, 3, 4] """ if self.has_multiple_edges() or self.has_loops(): if set_embedding or (on_embedding is not None) or set_pos: raise NotImplementedError("Cannot compute with embeddings of multiple-edged or looped graphs.") else: return self.to_simple().is_planar(kuratowski=kuratowski) | def is_planar(self, on_embedding=None, kuratowski=False, set_embedding=False, set_pos=False): """ Returns True if the graph is planar, and False otherwise. This wraps the reference implementation provided by John Boyer of the linear time planarity algorithm by edge addition due to Boyer Myrvold. (See reference code in graphs.planarity). Note - the argument on_embedding takes precedence over set_embedding. This means that only the on_embedding combinatorial embedding will be tested for planarity and no _embedding attribute will be set as a result of this function call, unless on_embedding is None. REFERENCE: | f4b17f4b52cd1b718ad8681063497e6db1e794e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f4b17f4b52cd1b718ad8681063497e6db1e794e7/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
7088,
297,
12,
2890,
16,
603,
67,
23744,
33,
7036,
16,
417,
295,
270,
543,
7771,
77,
33,
8381,
16,
444,
67,
23744,
33,
8381,
16,
444,
67,
917,
33,
8381,
4672,
225,
5991,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
7088,
297,
12,
2890,
16,
603,
67,
23744,
33,
7036,
16,
417,
295,
270,
543,
7771,
77,
33,
8381,
16,
444,
67,
23744,
33,
8381,
16,
444,
67,
917,
33,
8381,
4672,
225,
5991,
1... |
if 'configure' in sys.argv: | def start(cwd, version, wafdir): # no script file here Logs.init_log() Context.waf_dir = wafdir Context.out_dir = Context.top_dir = Context.run_dir = cwd Context.g_module = imp.new_module('wscript') Context.g_module.root_path = cwd Context.Context.recurse = lambda x, y: getattr(Context.g_module, x.cmd, Utils.nada)(x) Context.g_module.configure = configure Context.g_module.build = build opt = Options.OptionsContext().execute() do_config = 'configure' in sys.argv try: os.stat(cwd + '/c4che') except: do_config = True if do_config: Context.create_context('configure').execute() if 'configure' in sys.argv: if 'clean' in sys.argv: Context.create_context('clean').execute() if 'build' in sys.argv: Context.create_context('build').execute() | ccb46c0874352a876bf9ac8d853d1dea04190fd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/ccb46c0874352a876bf9ac8d853d1dea04190fd5/dbdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
11089,
16,
1177,
16,
24103,
1214,
4672,
468,
1158,
2728,
585,
2674,
20238,
18,
2738,
67,
1330,
1435,
1772,
18,
91,
1727,
67,
1214,
273,
24103,
1214,
1772,
18,
659,
67,
1214,
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,
787,
12,
11089,
16,
1177,
16,
24103,
1214,
4672,
468,
1158,
2728,
585,
2674,
20238,
18,
2738,
67,
1330,
1435,
1772,
18,
91,
1727,
67,
1214,
273,
24103,
1214,
1772,
18,
659,
67,
1214,
2... | |
For more details see L{version.get_arch}. | For more details see L{win32.version.get_arch}. | def notify_create_process(self, event): """ Notify the creation of a new process. | 9b9a87aafdf9e3a2181062822565764bbc641e9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/9b9a87aafdf9e3a2181062822565764bbc641e9f/system.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
67,
2640,
67,
2567,
12,
2890,
16,
871,
4672,
3536,
10918,
326,
6710,
434,
279,
394,
1207,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
67,
2640,
67,
2567,
12,
2890,
16,
871,
4672,
3536,
10918,
326,
6710,
434,
279,
394,
1207,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
elif action == 'test-server': pass | elif action == 'test-server' or action == 'calculate-average': pass | def check_action(): """Check to make sure action is compatible with args""" global action arg_action_dict = {0: ['server'], 1: ['list-increments', 'list-increment-sizes', 'remove-older-than', 'list-at-time', 'list-changed-since', 'check-destination-dir'], 2: ['backup', 'restore', 'restore-as-of', 'compare']} l = len(args) if l == 0 and action not in arg_action_dict[l]: commandline_error("No arguments given") elif not action: if l == 2: pass # Will determine restore or backup later else: commandline_error("Switches missing or wrong number of arguments") elif action == 'test-server': pass # test-server takes any number of args elif l > 2 or action not in arg_action_dict[l]: commandline_error("Wrong number of arguments given.") | 8cd254f6a63846fd67e6a8b2549318859a86c8eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6202/8cd254f6a63846fd67e6a8b2549318859a86c8eb/Main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
1128,
13332,
3536,
1564,
358,
1221,
3071,
1301,
353,
7318,
598,
833,
8395,
2552,
1301,
1501,
67,
1128,
67,
1576,
273,
288,
20,
30,
10228,
3567,
17337,
404,
30,
10228,
1098,
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,
866,
67,
1128,
13332,
3536,
1564,
358,
1221,
3071,
1301,
353,
7318,
598,
833,
8395,
2552,
1301,
1501,
67,
1128,
67,
1576,
273,
288,
20,
30,
10228,
3567,
17337,
404,
30,
10228,
1098,
17,
... |
<div class="prevnext"><a><nevow:attr name="href" nevow:render="prevset_url"/>Previous</a> - <a><nevow:attr name="href" nevow:render="nextset_url"/>Next</a></div> | def remote_unsetFlags(self, context): self.onlyDistant = False self.onlyLocal = False return self.remote_browseResults(context, self.query.offset) | e4f711edb674f697cabd556d9a06c1751fb3f374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/e4f711edb674f697cabd556d9a06c1751fb3f374/webapplication.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2632,
67,
18579,
5094,
12,
2890,
16,
819,
4672,
365,
18,
3700,
5133,
970,
273,
1083,
365,
18,
3700,
2042,
273,
1083,
327,
365,
18,
7222,
67,
25731,
3447,
12,
2472,
16,
365,
18,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2632,
67,
18579,
5094,
12,
2890,
16,
819,
4672,
365,
18,
3700,
5133,
970,
273,
1083,
365,
18,
3700,
2042,
273,
1083,
327,
365,
18,
7222,
67,
25731,
3447,
12,
2472,
16,
365,
18,
2271,
... | |
sage: print A == B | sage: A == B | def __eq__(self, Q): """ Two latin squares are equal if the underlying matrices are equal. | 9087d14f978c663baae98e9a365c4a3aa2a6f24c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/9087d14f978c663baae98e9a365c4a3aa2a6f24c/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
2238,
4672,
3536,
16896,
30486,
31206,
854,
3959,
309,
326,
6808,
16415,
854,
3959,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
11253,
972,
12,
2890,
16,
2238,
4672,
3536,
16896,
30486,
31206,
854,
3959,
309,
326,
6808,
16415,
854,
3959,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def __init__(self): | def __init__(self, cat, pn, pvr, pm): | def __init__(self): ''' This is distribution specific so the information is provided by wrapper.py ''' self.config_protect = WebappConfig.wrapper.config_protect self.protect_prefix = WebappConfig.wrapper.protect_prefix self.update_command = WebappConfig.wrapper.update_command | 623e115340b2dccbf16ad0f515bcb7a6b35c7bfa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10458/623e115340b2dccbf16ad0f515bcb7a6b35c7bfa/protect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
6573,
16,
11059,
16,
9770,
86,
16,
7430,
4672,
9163,
1220,
353,
7006,
2923,
1427,
326,
1779,
353,
2112,
635,
4053,
18,
2074,
9163,
365,
18,
1425,
67,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
6573,
16,
11059,
16,
9770,
86,
16,
7430,
4672,
9163,
1220,
353,
7006,
2923,
1427,
326,
1779,
353,
2112,
635,
4053,
18,
2074,
9163,
365,
18,
1425,
67,
118... |
def on_spinHistorySize_value_changed(self, spinBtn): val = int(spinBtn.get_value()) | def on_historysize_spinbutton_value_changed(self, spin): val = int(spin.get_value()) | def on_spinHistorySize_value_changed(self, spinBtn): val = int(spinBtn.get_value()) self.client.set_int(GCONF_PATH + 'general/history_size', val) | 4f4ab35d5cb2363dd464e6b252d1c798bd01c2fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11147/4f4ab35d5cb2363dd464e6b252d1c798bd01c2fb/guake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
603,
67,
8189,
1467,
67,
22876,
5391,
67,
1132,
67,
6703,
12,
2890,
16,
12490,
4672,
1244,
273,
509,
12,
22876,
18,
588,
67,
1132,
10756,
365,
18,
2625,
18,
542,
67,
474,
12,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
603,
67,
8189,
1467,
67,
22876,
5391,
67,
1132,
67,
6703,
12,
2890,
16,
12490,
4672,
1244,
273,
509,
12,
22876,
18,
588,
67,
1132,
10756,
365,
18,
2625,
18,
542,
67,
474,
12,
43... |
Qd.MoveTo(left + 4, top + ascent) | Qd.MoveTo(int(left + 4), int(top + ascent)) | def listDefDraw(self, selected, cellRect, theCell, dataOffset, dataLen, theList): savedPort = Qd.GetPort() Qd.SetPort(theList.GetListPort()) savedClip = Qd.NewRgn() Qd.GetClip(savedClip) Qd.ClipRect(cellRect) savedPenState = Qd.GetPenState() Qd.PenNormal() Qd.EraseRect(cellRect) #draw the cell if it contains data ascent, descent, leading, size, hm = Fm.FontMetrics() linefeed = ascent + descent + leading if dataLen: left, top, right, bottom = cellRect data = theList.LGetCell(dataLen, theCell) lines = data.split("\r") line1 = lines[0] if len(lines) > 1: line2 = lines[1] else: line2 = "" Qd.MoveTo(left + 4, top + ascent) Qd.DrawText(line1, 0, len(line1)) if line2: Qd.MoveTo(left + 4, top + ascent + linefeed) Qd.DrawText(line2, 0, len(line2)) Qd.PenPat("\x11\x11\x11\x11\x11\x11\x11\x11") bottom = top + theList.cellSize[1] Qd.MoveTo(left, bottom - 1) Qd.LineTo(right, bottom - 1) if selected: self.listDefHighlight(selected, cellRect, theCell, dataOffset, dataLen, theList) #restore graphics environment Qd.SetPort(savedPort) Qd.SetClip(savedClip) Qd.DisposeRgn(savedClip) Qd.SetPenState(savedPenState) | 726b238860d6ec09a9ad1ca227390dddfdc01047 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/726b238860d6ec09a9ad1ca227390dddfdc01047/Wlists.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
3262,
6493,
12,
2890,
16,
3170,
16,
2484,
6120,
16,
326,
4020,
16,
501,
2335,
16,
501,
2891,
16,
326,
682,
4672,
5198,
2617,
273,
2238,
72,
18,
967,
2617,
1435,
2238,
72,
18,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
3262,
6493,
12,
2890,
16,
3170,
16,
2484,
6120,
16,
326,
4020,
16,
501,
2335,
16,
501,
2891,
16,
326,
682,
4672,
5198,
2617,
273,
2238,
72,
18,
967,
2617,
1435,
2238,
72,
18,
69... |
print "Error:", e | debug("[Error] %s" % e) | def init_job(userData): global username db = DB(host = DATABASE_HOST, user = DATABASE_USER, passwd = DATABASE_PASSWORD, db = DATABASE_NAME) g = DBGeneric(db.con) # StartupDelay checks to prevent too many connections to DB try: delay = userData['StartupDelay'] time.sleep(delay) except KeyError: pass # Check that argv[1] (processing kind) exists in DB or raise error res = g.execute("SELECT id FROM youpi_processing_kind WHERE name='%s'" % userData['Kind']) username = g.execute("SELECT username FROM auth_user WHERE id=%s" % userData['UserID'])[0][0] g.con.close() if not len(res): raise WrapperError, "Processing kind not supported: '%s'" % userData['Kind'] # Exports current hostname to ENV os.environ['HOSTNAME'] = socket.getfqdn() # Build per-user output path user_path = os.path.join(PROCESSING_OUTPUT, username) CLUSTER_OUTPUT_PATH = os.path.join(user_path, userData['Kind']) custom_dir = userData['ResultsOutputDir'] try: if not os.path.isdir(CLUSTER_OUTPUT_PATH): if not os.path.isdir(user_path): os.mkdir(user_path) # default 0777 used by mkdir does not work as expected with Condor + NFS # use chmod instead os.chmod(user_path, RWX_ALL) if not os.path.isdir(CLUSTER_OUTPUT_PATH): os.mkdir(CLUSTER_OUTPUT_PATH) os.chmod(CLUSTER_OUTPUT_PATH, RWX_ALL) if CLUSTER_OUTPUT_PATH != custom_dir: # A custom directory has been defined if not os.path.isdir(custom_dir): os.mkdir(custom_dir) os.chmod(custom_dir, RWX_ALL) # Finally, always use userData['ResultsOutputDir'] as output directory CLUSTER_OUTPUT_PATH = custom_dir except Exception, e: error_msg = "Could not create CLUSTER_OUTPUT_PATH directory (%s): %s\n\n*** Maybe check for a NFS issue (automount)?" % (CLUSTER_OUTPUT_PATH, e) error_msg += "\nResultsOutputDir=" + custom_dir start = getNowDateTime(time.time()) imgName, task_id, g = task_start_log(userData, start) task_end_log(userData, g, error_msg, task_id, 0, userData['Kind']) sys.exit(1) # Run processing process(userData, res[0][0], sys.argv[2:]) | 13b9a9b87ab9f25ee174dc029876ecccb77b01ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/13b9a9b87ab9f25ee174dc029876ecccb77b01ad/wrapper_processing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
4688,
12,
1355,
751,
4672,
2552,
2718,
225,
1319,
273,
2383,
12,
2564,
273,
17998,
67,
8908,
16,
729,
273,
17998,
67,
4714,
16,
19093,
273,
17998,
67,
13784,
16,
1319,
273,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
4688,
12,
1355,
751,
4672,
2552,
2718,
225,
1319,
273,
2383,
12,
2564,
273,
17998,
67,
8908,
16,
729,
273,
17998,
67,
4714,
16,
19093,
273,
17998,
67,
13784,
16,
1319,
273,
1... |
self._populate_rtm_task(task, rtm_task) | transaction_ids = [] try: self._populate_rtm_task(task, rtm_task, transaction_ids) except: self.rtm_proxy.unroll_changes(transaction_ids) raise | def set_task(self, task): """ See GenericBackend for an explanation of this function. """ if not self.rtm_proxy.is_authenticated(): return self.cancellation_point() tid = task.get_id() is_syncable = self._gtg_task_is_syncable_per_attached_tags(task) action, rtm_task_id = self.sync_engine.analyze_local_id( \ tid, \ self.datastore.has_task, \ self.rtm_proxy.has_rtm_task, \ is_syncable) Log.debug("GTG->RTM set task (%s, %s)" % (action, is_syncable)) | 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,
4146,
12,
2890,
16,
1562,
4672,
3536,
2164,
7928,
7172,
364,
392,
21285,
434,
333,
445,
18,
3536,
309,
486,
365,
18,
3797,
81,
67,
5656,
18,
291,
67,
14454,
13332,
327,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4146,
12,
2890,
16,
1562,
4672,
3536,
2164,
7928,
7172,
364,
392,
21285,
434,
333,
445,
18,
3536,
309,
486,
365,
18,
3797,
81,
67,
5656,
18,
291,
67,
14454,
13332,
327,
365,
... |
def fn(): s = const('hello') | def fn(n): s = [const('hello'), const('world')][n] | def fn(): s = const('hello') s1 = s[:3] s2 = s[3:] s3 = s[3:10] return s1+s2 == s and s2+s1 == const('lohel') and s1+s3 == s | b1e08c65fc6c170b763c5a162ad9f26731f932bd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6934/b1e08c65fc6c170b763c5a162ad9f26731f932bd/test_rstr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2295,
12,
82,
4672,
272,
273,
306,
10248,
2668,
23711,
19899,
1866,
2668,
18179,
6134,
6362,
82,
65,
272,
21,
273,
272,
10531,
23,
65,
272,
22,
273,
272,
63,
23,
26894,
272,
23,
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,
2295,
12,
82,
4672,
272,
273,
306,
10248,
2668,
23711,
19899,
1866,
2668,
18179,
6134,
6362,
82,
65,
272,
21,
273,
272,
10531,
23,
65,
272,
22,
273,
272,
63,
23,
26894,
272,
23,
273,
... |
class TestUnpackPython(BaseTest, AbstractTestUnpack): | class TestUnpackPython(AbstractTestUnpack, BaseTest): | def assert_manifest(self, required): alg_name = required.split('=', 1)[0] manifest.fixup_permissions(self.tmpdir) sha1 = alg_name + '=' + manifest.add_manifest_file(self.tmpdir, manifest.get_algorithm(alg_name)).hexdigest() self.assertEquals(sha1, required) | 9d68a5db8b11bac494a7593defb1ae9050e7605f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10543/9d68a5db8b11bac494a7593defb1ae9050e7605f/testunpack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
14357,
12,
2890,
16,
1931,
4672,
11989,
67,
529,
273,
1931,
18,
4939,
2668,
33,
2187,
404,
25146,
20,
65,
5643,
18,
904,
416,
67,
9612,
12,
2890,
18,
5645,
1214,
13,
6056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1815,
67,
14357,
12,
2890,
16,
1931,
4672,
11989,
67,
529,
273,
1931,
18,
4939,
2668,
33,
2187,
404,
25146,
20,
65,
5643,
18,
904,
416,
67,
9612,
12,
2890,
18,
5645,
1214,
13,
6056,
... |
('cygwin.*', 'cygwin'), | ('cygwin.*', 'unix'), | def mkpath (self, name, mode=0777): mkpath (name, mode, self.verbose, self.dry_run) | 9a0f7f6b1c4d5d3e435fa653f4a077feec866a0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9a0f7f6b1c4d5d3e435fa653f4a077feec866a0a/ccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
803,
261,
2890,
16,
508,
16,
1965,
33,
20,
14509,
4672,
5028,
803,
261,
529,
16,
1965,
16,
365,
18,
11369,
16,
365,
18,
25011,
67,
2681,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
803,
261,
2890,
16,
508,
16,
1965,
33,
20,
14509,
4672,
5028,
803,
261,
529,
16,
1965,
16,
365,
18,
11369,
16,
365,
18,
25011,
67,
2681,
13,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
os.makedirs(mount_path) | try: os.makedirs(mount_path) except: pass | def do_run(self, options, args): windows = platform == "Windows" if options.unmount: | 541006a76a12343a29852dec14beab20966e9909 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/541006a76a12343a29852dec14beab20966e9909/fsmount.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2681,
12,
2890,
16,
702,
16,
833,
4672,
225,
9965,
273,
4072,
422,
315,
10399,
6,
225,
309,
702,
18,
318,
4778,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
67,
2681,
12,
2890,
16,
702,
16,
833,
4672,
225,
9965,
273,
4072,
422,
315,
10399,
6,
225,
309,
702,
18,
318,
4778,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise ContentTooShortError("retrieval incomplete: got only %i out " | raise urllib.ContentTooShortError("retrieval incomplete: got only %i out " | def retrieve_resume(self, url, filename, reporthook=None, data=None): """retrieve_resume(url) returns (filename, headers) for a local object or (tempfilename, headers) for a remote object. | a388a992a240fb2ef5433f5944a5f9f847e90244 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12778/a388a992a240fb2ef5433f5944a5f9f847e90244/download.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
67,
25158,
12,
2890,
16,
880,
16,
1544,
16,
2071,
7825,
1184,
33,
7036,
16,
501,
33,
7036,
4672,
3536,
17466,
67,
25158,
12,
718,
13,
1135,
261,
3459,
16,
1607,
13,
364,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4614,
67,
25158,
12,
2890,
16,
880,
16,
1544,
16,
2071,
7825,
1184,
33,
7036,
16,
501,
33,
7036,
4672,
3536,
17466,
67,
25158,
12,
718,
13,
1135,
261,
3459,
16,
1607,
13,
364,
279,
1... |
density=None, pdflatex=None, locals={}): | density=None, pdflatex=None, engine=None, locals={}): | def eval(self, x, globals, strip=False, filename=None, debug=None, density=None, pdflatex=None, locals={}): """ INPUT: | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
619,
16,
10941,
16,
2569,
33,
8381,
16,
1544,
33,
7036,
16,
1198,
33,
7036,
16,
12142,
33,
7036,
16,
8169,
26264,
33,
7036,
16,
4073,
33,
7036,
16,
8985,
12938,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
619,
16,
10941,
16,
2569,
33,
8381,
16,
1544,
33,
7036,
16,
1198,
33,
7036,
16,
12142,
33,
7036,
16,
8169,
26264,
33,
7036,
16,
4073,
33,
7036,
16,
8985,
12938,
4... |
db = pooler.get_db_only(db_name) cr = db.cursor() cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ") res=cr.fetchone() if res and len(res): self.db_name_list.append(db_name) cr.close() | db, cr = None, None try: db = pooler.get_db_only(db_name) cr = db.cursor() cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'") if not cr.fetchone(): continue cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ") res = cr.fetchone() if res and len(res): self.db_name_list.append(db_name) finally: if cr is not None: cr.close() if db is not None: pooler.close_db(db_name) | def db_list(self): s = netsvc.LocalService('db') result = s.list() self.db_name_list=[] for db_name in result: db = pooler.get_db_only(db_name) cr = db.cursor() cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ") res=cr.fetchone() if res and len(res): self.db_name_list.append(db_name) cr.close() return self.db_name_list | fac5d5213a2550d6c48c4e12d6fa166062f2f4da /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/fac5d5213a2550d6c48c4e12d6fa166062f2f4da/abstracted_fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1319,
67,
1098,
12,
2890,
4672,
272,
273,
21954,
4227,
18,
25635,
2668,
1966,
6134,
563,
273,
272,
18,
1098,
1435,
365,
18,
1966,
67,
529,
67,
1098,
33,
8526,
364,
1319,
67,
529,
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,
1319,
67,
1098,
12,
2890,
4672,
272,
273,
21954,
4227,
18,
25635,
2668,
1966,
6134,
563,
273,
272,
18,
1098,
1435,
365,
18,
1966,
67,
529,
67,
1098,
33,
8526,
364,
1319,
67,
529,
316,
... |
l = traceback.extract_tb(tb, limit) return ['%s:%s:%s\n' % x[:-1] for x in l] | l = extract_tb(tb, limit) return ['%s:%s:%s\n' % (filename, lineno, method) for filename, lineno, method, _ in l] | def emacs_format_exception(eType, eValue, tb, limit=None): """Compact traceback formatting, parseable by emacs compile-mode. """ # TODO: hide trial frames like plain_format_exception l = traceback.extract_tb(tb, limit) return ['%s:%s:%s\n' % x[:-1] for x in l] | 63f87e7c91d0c84da440f07605d57b639add5878 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/63f87e7c91d0c84da440f07605d57b639add5878/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
801,
28965,
67,
2139,
67,
4064,
12,
73,
559,
16,
425,
620,
16,
8739,
16,
1800,
33,
7036,
4672,
3536,
16863,
10820,
10407,
16,
1109,
429,
635,
801,
28965,
4074,
17,
3188,
18,
3536,
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,
801,
28965,
67,
2139,
67,
4064,
12,
73,
559,
16,
425,
620,
16,
8739,
16,
1800,
33,
7036,
4672,
3536,
16863,
10820,
10407,
16,
1109,
429,
635,
801,
28965,
4074,
17,
3188,
18,
3536,
225,... |
return http.Response(stream='success') | return HTMLResponse(stream='success') | def render(self, ctx): self.worksheet.hide_all() return http.Response(stream='success') | 2c1a5997a8830efcfb475993e5f1efb45ed121ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2c1a5997a8830efcfb475993e5f1efb45ed121ea/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
365,
18,
1252,
8118,
18,
11248,
67,
454,
1435,
327,
1062,
18,
1064,
12,
3256,
2218,
4768,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
365,
18,
1252,
8118,
18,
11248,
67,
454,
1435,
327,
1062,
18,
1064,
12,
3256,
2218,
4768,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
fails = err.detected_type != PACKAGE_DICTIONARY | fails = err.detected_type == PACKAGE_DICTIONARY | def test_emunpack(err, package_contents, xpi_package): if err.get_resource("em:unpack") != "true": # Covers bug 597255 # Dictionaries should always be unpacked fails = err.detected_type != PACKAGE_DICTIONARY if not fails: # Search for unpack-worthy files for file_ in package_contents: if fnmatch.fnmatch(file_, "components/*.exe") or \ fnmatch.fnmatch(file_, "*.ico"): fails = True break if fails: err.warning(("testcases_packagelayout", "test_emunpack", "should_be_true"), "Add-on should set <em:unpack> to true", "The add-on meets criteria that would indicate " "performance issues if <em:unpack> is not set to true " "in the install.rdf file.") else: # Covers bug 551714 # This only applies to FF4 if not err.get_resource("ff4"): return for file_ in package_contents: if fnmatch.fnmatch(file_, ".jar"): err.warning(("testcases_packagelayout", "test_emunpack", "should_be_false"), "Add-on contains JAR files with <em:unpack>", "The add-on sets <em:unpack> to true in " "install.rdf, but contains JAR files. This can " "result in performance issues. It is recommended " "that you no longer use JAR files to package your " "chrome files.") break | 18d16d19309a82a6b3ad47673831d1adc92fbff5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12985/18d16d19309a82a6b3ad47673831d1adc92fbff5/packagelayout.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
351,
17309,
12,
370,
16,
2181,
67,
3980,
16,
619,
7259,
67,
5610,
4672,
225,
309,
393,
18,
588,
67,
3146,
2932,
351,
30,
17309,
7923,
480,
315,
3767,
6877,
468,
385,
23042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
351,
17309,
12,
370,
16,
2181,
67,
3980,
16,
619,
7259,
67,
5610,
4672,
225,
309,
393,
18,
588,
67,
3146,
2932,
351,
30,
17309,
7923,
480,
315,
3767,
6877,
468,
385,
23042,
... |
nodelist = advertise.lookup(startstate) | nodelist = advertise.lookup(startstate, maxvals = 10*1024*1024) | def locateandprocessvessels(statefunctionargtuplelist, uniquename, sleeptime, acceptnewnode=False,parallelinstances=1): """ <Purpose> Looks up a public key and then calls a function on a set of nodes <Arguments> statefunctionargtuplelist: A list of tuples with a: start state : publickey end state : publickey nodeerrorfunction : called when there is an error in contacting the node. This function has the first argument already provided : the node name (IP address). nodeprocessfunction : called to change the node state. This function has the first two arguments already provided, the node handle and the node name. nodeprocessfunction args list : list of arguments to the nodeprocessfunction. uniquename: A unique name for this action that can be used for logging and to ensure multiple copies aren't running sleeptime: The amount of time to sleep between lookups / node processing acceptnewnode: Allow a new node to have the following key. Will create a new key and add a per node key to the database parallelinstances: The number of concurrent events that should process nodes. <Exceptions> None <Side Effects> Ensures there is only one lookup for this key happening at a time <Returns> This function runs forever (unless there is a fatal error) """ logfn = "log."+str(uniquename) # set up the circular logger (at least 50 MB buffer) loggerfo = logging.circular_logger(logfn, 50*1024*1024) # redirect standard out / error to the circular log buffer sys.stdout = loggerfo sys.stderr = loggerfo lockname = "polling."+uniquename time_updatetime(34612) # get a unique lock based upon the key if runonce.getprocesslock(lockname) != True: # Someone else has the lock... print time.ctime(),"The lock is held. Exiting" return print time.ctime(),"Starting..." # BUG: There could be a nasty race here where a node isn't seen as in a # state because it doesn't advertise in time to be listed. # This will be fixed when we fix the NM advertisement bug (next update) so # I'll leave it in for now. cachednodelist = [] while True: for statefunctionargtuple in statefunctionargtuplelist: startstate = statefunctionargtuple[0] endstate = statefunctionargtuple[1] nodeerrorfunction = statefunctionargtuple[2] nodeprocessfunction = statefunctionargtuple[3] args = statefunctionargtuple[4:] # I likely need to do something smart here when this fails... nodelist = advertise.lookup(startstate) # shuffle the nodelist to avoid reoccurring failures on processing # the same node over and over -- allows us to eventually process # other nodes random.shuffle(nodelist) print time.ctime(),"For start state '"+str(startstate['e'])[:10]+"...' found nodelist:",nodelist | 1ecbb28312b5a51354329d5d3b509bf9871bc7c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/1ecbb28312b5a51354329d5d3b509bf9871bc7c8/pollinglib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10627,
464,
2567,
90,
403,
10558,
12,
2019,
915,
3175,
88,
89,
412,
5449,
16,
15426,
1069,
16,
272,
11182,
10650,
16,
2791,
2704,
2159,
33,
8381,
16,
18054,
10162,
33,
21,
4672,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10627,
464,
2567,
90,
403,
10558,
12,
2019,
915,
3175,
88,
89,
412,
5449,
16,
15426,
1069,
16,
272,
11182,
10650,
16,
2791,
2704,
2159,
33,
8381,
16,
18054,
10162,
33,
21,
4672,
3536,
... |
sep = string.count(src, '\r\n') < string.count(src, '\n') and '\n' or '\r\n' srclines = string.split(src, sep) | sep = src.count('\r\n') < src.count('\n') and '\n' or '\r\n' srclines = src.split(sep) | def getFunctions(self, module): from Explorers import Explorer extPath = self.getExtPath(module) | 98cda4c49b17d3296fc5632de5467f70704f3dd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/98cda4c49b17d3296fc5632de5467f70704f3dd5/ExtMethDlg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7503,
12,
2890,
16,
1605,
4672,
628,
1312,
412,
280,
414,
1930,
1312,
11766,
1110,
743,
273,
365,
18,
588,
2482,
743,
12,
2978,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7503,
12,
2890,
16,
1605,
4672,
628,
1312,
412,
280,
414,
1930,
1312,
11766,
1110,
743,
273,
365,
18,
588,
2482,
743,
12,
2978,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.assertEquals("\x00\x00\x00\x00\x00\x11\x11\x00", ex.object) | self.assertEquals(b"\x00\x00\x00\x00\x00\x11\x11\x00", ex.object) | def test_decode_error_attributes(self): if sys.maxunicode > 0xffff: try: "\x00\x00\x00\x00\x00\x11\x11\x00".decode("unicode_internal") except UnicodeDecodeError as ex: self.assertEquals("unicode_internal", ex.encoding) self.assertEquals("\x00\x00\x00\x00\x00\x11\x11\x00", ex.object) self.assertEquals(4, ex.start) self.assertEquals(8, ex.end) else: self.fail() | 6fc8f9b52c4d85aff4ba2e172c9f747e84f22412 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/6fc8f9b52c4d85aff4ba2e172c9f747e84f22412/test_codecs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3922,
67,
1636,
67,
4350,
12,
2890,
4672,
309,
2589,
18,
1896,
9124,
405,
374,
20431,
30,
775,
30,
1548,
92,
713,
64,
92,
713,
64,
92,
713,
64,
92,
713,
64,
92,
713,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3922,
67,
1636,
67,
4350,
12,
2890,
4672,
309,
2589,
18,
1896,
9124,
405,
374,
20431,
30,
775,
30,
1548,
92,
713,
64,
92,
713,
64,
92,
713,
64,
92,
713,
64,
92,
713,
64,
... |
res = oRequest.getNumSubRequests('removal') | res = oRequest.getNumSubRequests( 'removal' ) | def executeRequest(self): ################################################ # Get a request from request DB gMonitor.addMark( "Iteration", 1 ) res = self.RequestDBClient.getRequest('removal') if not res['OK']: gLogger.info("RemovalAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("RemovalAgent.execute: No requests to be executed found.") return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] sourceServer= res['Value']['Server'] try: jobID = int(res['Value']['JobID']) except: jobID = 0 gLogger.info("RemovalAgent.execute: Obtained request %s" % requestName) | 639c184ef75c7730d44d5168750f1731c63bf98b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/639c184ef75c7730d44d5168750f1731c63bf98b/RemovalAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
691,
12,
2890,
4672,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
314,
7187,
18,
1289,
3882,
12,
315,
10795,
3113,
404,
262,
400,
273,
365,
18,
691,
2290,
1227,
18,
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,
1836,
691,
12,
2890,
4672,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
314,
7187,
18,
1289,
3882,
12,
315,
10795,
3113,
404,
262,
400,
273,
365,
18,
691,
2290,
1227,
18,
5... |
has_attach = data[2][1] headers = self._GetPotentiallyLargeStringProp(prop_ids[3], data[3]) | headers = self._GetPotentiallyLargeStringProp(prop_ids[2], data[2]) | def _GetMessageText(self): # This is finally reliable. The only messages this now fails for # are for "forwarded" messages, where the forwards are actually # in an attachment. Later. # Note we *dont* look in plain text attachments, which we arguably # should. from spambayes import mboxutils | 6ed38ae3740a6cba6e38e22e9aeabc0cccc1a448 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/6ed38ae3740a6cba6e38e22e9aeabc0cccc1a448/msgstore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
967,
1079,
1528,
12,
2890,
4672,
468,
1220,
353,
3095,
31024,
18,
225,
1021,
1338,
2743,
333,
2037,
6684,
364,
468,
854,
364,
315,
1884,
11804,
6,
2743,
16,
1625,
326,
24578,
854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
1079,
1528,
12,
2890,
4672,
468,
1220,
353,
3095,
31024,
18,
225,
1021,
1338,
2743,
333,
2037,
6684,
364,
468,
854,
364,
315,
1884,
11804,
6,
2743,
16,
1625,
326,
24578,
854,
... |
field = self.getField('text') | def manage_afterAdd(self, item, container): """ Fix text when created througt webdav Guess the right mimetype from the id/data """ ATCTContent.manage_afterAdd(self, item, container) | af3229ac69b497cbe5377473197e67dd79279eac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/af3229ac69b497cbe5377473197e67dd79279eac/ATDocument.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
5205,
986,
12,
2890,
16,
761,
16,
1478,
4672,
3536,
12139,
977,
1347,
2522,
286,
303,
637,
88,
3311,
20752,
30282,
326,
2145,
12595,
628,
326,
612,
19,
892,
3536,
14464,
1268,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
5205,
986,
12,
2890,
16,
761,
16,
1478,
4672,
3536,
12139,
977,
1347,
2522,
286,
303,
637,
88,
3311,
20752,
30282,
326,
2145,
12595,
628,
326,
612,
19,
892,
3536,
14464,
1268,... | |
self.__lc = self.base_ring()(self._singular_().leadcoef().sage_poly(self.parent())) | c = self._singular_().leadcoef().sage_poly(self.parent()) self.__lc = self.base_ring()(c.constant_coefficient()) | def lc(self): """ Returns the leading (or initial) coefficient of a polynomial with respect to the monomial ordering. | 63d041c83c8a08bdd9921f9de4e191f4f97a7284 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/63d041c83c8a08bdd9921f9de4e191f4f97a7284/polynomial_singular_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9109,
12,
2890,
4672,
3536,
2860,
326,
7676,
261,
280,
2172,
13,
16554,
434,
279,
16991,
598,
8762,
358,
326,
312,
4708,
649,
9543,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9109,
12,
2890,
4672,
3536,
2860,
326,
7676,
261,
280,
2172,
13,
16554,
434,
279,
16991,
598,
8762,
358,
326,
312,
4708,
649,
9543,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
- ``l`` - length of variable list (default:None = r\*c) | - ``l`` - length of variable list (default: ``None`` = r\*c) | def field_polynomials(self, name, i, l=None): """ Return list of field polynomials for a given round - given by its number `i` - and name. | 361ee6a2b2c797fdc77944b615cb058df81aca2e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/361ee6a2b2c797fdc77944b615cb058df81aca2e/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
652,
67,
3915,
13602,
87,
12,
2890,
16,
508,
16,
277,
16,
328,
33,
7036,
4672,
3536,
2000,
666,
434,
652,
16991,
87,
364,
279,
864,
3643,
300,
864,
635,
2097,
1300,
1375,
77,
68,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
652,
67,
3915,
13602,
87,
12,
2890,
16,
508,
16,
277,
16,
328,
33,
7036,
4672,
3536,
2000,
666,
434,
652,
16991,
87,
364,
279,
864,
3643,
300,
864,
635,
2097,
1300,
1375,
77,
68,
300... |
else: patt = '(.*?)(\s[%s]{8,})' % wild_chars m = compile(patt, re.S).match(text) if m and m.group(2).strip() and precChar(m.group(1)[-1:]) and \ endswith(text, wild_end): _text, _map = m.group(1), text[len(m.group(1)):] if _map: | def extractIncompleteMap(text, html): """Return text, html and the incomplete wild map if exist.""" | 6a6a7015f6893b483a6e1585e1b0a92fb57a37f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8560/6a6a7015f6893b483a6e1585e1b0a92fb57a37f0/parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
27531,
863,
12,
955,
16,
1729,
4672,
3536,
990,
977,
16,
1729,
471,
326,
14715,
23578,
852,
309,
1005,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2608,
27531,
863,
12,
955,
16,
1729,
4672,
3536,
990,
977,
16,
1729,
471,
326,
14715,
23578,
852,
309,
1005,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
tmpinnerhbox.Add((foldericon.GetWidth()+DV.border_padding,0)) tmpinnervbox=wx.BoxSizer(wx.VERTICAL) tmpinnerhbox.Add(tmpinnervbox,1) | tmpinnerhbox.Add((foldericon.GetWidth() + DV.border_padding, 0)) tmpinnervbox = wx.BoxSizer(wx.VERTICAL) tmpinnerhbox.Add(tmpinnervbox, 1) | def __init__(self, content, aborted=False, main=None): Damnlog('Done dialog opening with parameters content =',content,'; aborted?',aborted) dirs=[] files={} icons={} for i in content: if i[1] not in dirs: dirs.append(i[1]) files[i[1]]=[] files[i[1]].append(i[0]) icons[i[1]+i[0]]=i[2] dirs.sort() for i in dirs: files[i].sort() Damnlog('Done dialog parsed content; dirs =',dirs,'; files =',files) self.parent=main title='Processing done.' if aborted: title='Processing aborted.' wx.Dialog.__init__(self, None, -1, DV.l(title)) absbox1 = wx.BoxSizer(wx.VERTICAL) absbox2 = wx.BoxSizer(wx.HORIZONTAL) self.SetSizer(absbox1) absbox1.Add((0, DV.border_padding)) absbox1.Add(absbox2) absbox1.Add((0, DV.border_padding)) topvbox = wx.BoxSizer(wx.VERTICAL) absbox2.Add((DV.border_padding, 0)) absbox2.Add(topvbox) absbox2.Add((DV.border_padding, 0)) panel = wx.Panel(self, -1) topvbox.Add(panel, 1, wx.EXPAND) mainvbox=wx.BoxSizer(wx.VERTICAL) panel.SetSizer(mainvbox) self.underlined=wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT) self.underlined.SetUnderlined(True) # Build UI Damnlog('Building center UI of done dialog.') if aborted: title = wx.StaticText(panel, -1, DV.l('Video conversion aborted.')) title.SetFont(wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) else: title = wx.StaticText(panel, -1, DV.l('Video conversion successful.')) title.SetFont(wx.Font(14, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD)) mainvbox.Add(title) mainvbox.Add((0,DV.border_padding*2)) if len(content): Damnlog('There is content, so we\'re gonna build tree.') mainvbox.Add(wx.StaticText(panel,-1,DV.l('The following videos have been processed:'))) foldericon=wx.Bitmap(DV.images_path + 'foldermovie.png') for d in dirs: Damnlog('Building videos list for directory',d) tmpvbox=wx.BoxSizer(wx.VERTICAL) mainvbox.Add(tmpvbox) tmphbox=wx.BoxSizer(wx.HORIZONTAL) tmpvbox.Add(tmphbox) tmphbox.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, foldericon), launchdir=d), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox.Add((DV.border_padding/2,0)) tmphbox.Add(self.makeLabel(panel, d, launchdir=d)) tmpinnerhbox=wx.BoxSizer(wx.HORIZONTAL) tmpvbox.Add(tmpinnerhbox) tmpinnerhbox.Add((foldericon.GetWidth()+DV.border_padding,0)) tmpinnervbox=wx.BoxSizer(wx.VERTICAL) tmpinnerhbox.Add(tmpinnervbox,1) for f in files[d]: tmphbox2=wx.BoxSizer(wx.HORIZONTAL) tmpinnervbox.Add(tmphbox2) tmphbox2.Add(self.bindAndCursor(wx.StaticBitmap(panel, -1, DV.listicons.getRawBitmap(icons[d+f])), launchfile=d+f), 0, wx.ALIGN_CENTER_VERTICAL) tmphbox2.Add((DV.border_padding/2,0)) tmphbox2.Add(self.makeLabel(panel, f, launchfile=d+f)) mainvbox.Add((0,DV.border_padding)) else: Damnlog('There\'s no content, so we\'re not gonna build much.') mainvbox.Add(wx.StaticText(panel,-1,DV.l('No videos were processed.'))) mainvbox.Add((0,DV.border_padding)) mainvbox.Add((0,DV.border_padding)) # Again! okhbox=wx.BoxSizer(wx.HORIZONTAL) mainvbox.Add(okhbox,0,wx.ALIGN_RIGHT) okButton = wx.Button(panel,-1,DV.l('OK')) okhbox.Add(okButton) self.Bind(wx.EVT_BUTTON, self.onOK, okButton) Damnlog('Finished building done dialog UI, displaying it.') # Finished building UI self.SetClientSize(self.GetBestSize()) self.Center() Damnlog('Done dialog displayed and centered.') | 2e4d33b2a8b84c7e2a1d15176545dae986a39d07 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/2e4d33b2a8b84c7e2a1d15176545dae986a39d07/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
913,
16,
18166,
33,
8381,
16,
2774,
33,
7036,
4672,
463,
301,
82,
1330,
2668,
7387,
6176,
10890,
598,
1472,
913,
273,
2187,
1745,
11189,
31,
18166,
35,
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,
1001,
2738,
972,
12,
2890,
16,
913,
16,
18166,
33,
8381,
16,
2774,
33,
7036,
4672,
463,
301,
82,
1330,
2668,
7387,
6176,
10890,
598,
1472,
913,
273,
2187,
1745,
11189,
31,
18166,
35,
2... |
return b.geturl(), ret, web_response | return ret, web_response | def ohloh_url2data(url, selector, params = {}, many = False, API_KEY = None, person=None): '''Input: A URL to get, a bunch of parameters to toss onto the end url-encoded, many (a boolean) indicating if we should return a list of just one datum, API_KEY suggesting a key to use with Ohloh, and a Person object to, if the request is slow, log messages to. Output: A list/dictionary of Ohloh data plus a saved WebResponse instance that logs information about the request.''' if API_KEY is None: API_KEY = settings.OHLOH_API_KEY my_params = {'api_key': API_KEY} my_params.update(params) params = my_params ; del my_params # FIXME: We return more than just "ret" these days! Rename this variable. ret = [] encoded = urllib.urlencode(params) url += encoded try: b = mechanize_get(url, person) web_response = mysite.customs.models.WebResponse.create_from_browser(b) web_response.save() # Always save the WebResponse, even if we don't know # that any other object will store a pointer here. except urllib2.HTTPError, e: # FIXME: Also return a web_response for error cases if str(e.code) == '404': if many: return url, [], None return url, {}, None else: raise try: s = web_response.text tree = ET.parse(StringIO.StringIO(s)) except xml.parsers.expat.ExpatError: # well, I'll be. it doesn't parse. return web_response.url, None # Did Ohloh return an error? root = tree.getroot() if root.find('error') is not None: raise ValueError, "Ohloh gave us back an error. Wonder why." interestings = root.findall(selector) for interesting in interestings: this = {} for child in interesting.getchildren(): if child.text: this[unicode(child.tag)] = uni_text(child.text) ret.append(this) if many: return b.geturl(), ret, web_response if ret: return b.geturl(), ret[0], web_response return b.geturl(), None, web_response | b59d458cd897dbc72d6d2574b975f73b40c0009a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/b59d458cd897dbc72d6d2574b975f73b40c0009a/ohloh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29797,
383,
76,
67,
718,
22,
892,
12,
718,
16,
3451,
16,
859,
273,
10615,
4906,
273,
1083,
16,
1491,
67,
3297,
273,
599,
16,
6175,
33,
7036,
4672,
9163,
1210,
30,
432,
1976,
358,
336... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29797,
383,
76,
67,
718,
22,
892,
12,
718,
16,
3451,
16,
859,
273,
10615,
4906,
273,
1083,
16,
1491,
67,
3297,
273,
599,
16,
6175,
33,
7036,
4672,
9163,
1210,
30,
432,
1976,
358,
336... |
if not compile_dir(dir, maxlevels, ddir, force, rx): | if not compile_dir(dir, maxlevels, ddir, force, rx, quiet): | def main(): """Script main program.""" import getopt try: opts, args = getopt.getopt(sys.argv[1:], 'lfd:x:') except getopt.error, msg: print msg print "usage: python compileall.py [-l] [-f] [-d destdir] " \ "[-s regexp] [directory ...]" print "-l: don't recurse down" print "-f: force rebuild even if timestamps are up-to-date" print "-d destdir: purported directory name for error messages" print " if no directory arguments, -l sys.path is assumed" print "-x regexp: skip files matching the regular expression regexp" print " the regexp is search for in the full path of the file" sys.exit(2) maxlevels = 10 ddir = None force = 0 rx = None for o, a in opts: if o == '-l': maxlevels = 0 if o == '-d': ddir = a if o == '-f': force = 1 if o == '-x': import re rx = re.compile(a) if ddir: if len(args) != 1: print "-d destdir require exactly one directory argument" sys.exit(2) success = 1 try: if args: for dir in args: if not compile_dir(dir, maxlevels, ddir, force, rx): success = 0 else: success = compile_path() except KeyboardInterrupt: print "\n[interrupt]" success = 0 return success | 5c137c225113764faae183034e7a85175a699ae2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5c137c225113764faae183034e7a85175a699ae2/compileall.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
3651,
2774,
5402,
12123,
1930,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
80,
8313,
30,
92,
2497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
3651,
2774,
5402,
12123,
1930,
336,
3838,
775,
30,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
80,
8313,
30,
92,
2497,
... |
Kind[1].ext.fget(self) | return Kind[1].ext.fget(self) | def _getext(self): if model.previewMode and EXTENSION in self.preview: return self.preview[EXTENSION] else: Kind[1].ext.fget(self) | dc2bdcaeae8e6d4ec3df229eef9fb9cfb3cf680d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3907/dc2bdcaeae8e6d4ec3df229eef9fb9cfb3cf680d/tagmodel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
408,
12,
2890,
4672,
309,
938,
18,
12102,
2309,
471,
25518,
316,
365,
18,
12102,
30,
327,
365,
18,
12102,
63,
12796,
65,
469,
30,
5851,
63,
21,
8009,
408,
18,
74,
588,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
408,
12,
2890,
4672,
309,
938,
18,
12102,
2309,
471,
25518,
316,
365,
18,
12102,
30,
327,
365,
18,
12102,
63,
12796,
65,
469,
30,
5851,
63,
21,
8009,
408,
18,
74,
588,
12,
... |
self._users() | self.users() | def del_user(self, users): """Deletes some users from the users list. | d74222b72fe1313ab2e423aaff287111a7717df6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/d74222b72fe1313ab2e423aaff287111a7717df6/window_channel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
67,
1355,
12,
2890,
16,
3677,
4672,
3536,
7551,
2690,
3677,
628,
326,
3677,
666,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
67,
1355,
12,
2890,
16,
3677,
4672,
3536,
7551,
2690,
3677,
628,
326,
3677,
666,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
values = [str(v) for v in value] | values = [unicode(v) for v in value] | def starttag(self, node, tagname, suffix='\n', infix='', **attributes): """ Construct and return a start tag given a node (id & class attributes are extracted), tag name, and optional attributes. """ tagname = tagname.lower() atts = {} for (name, value) in attributes.items(): atts[name.lower()] = value for att in ('class',): # append to node attribute if node.has_key(att) or atts.has_key(att): atts[att] = \ (node.get(att, '') + ' ' + atts.get(att, '')).strip() for att in ('id',): # node attribute overrides if node.has_key(att): atts[att] = node[att] if atts.has_key('id') and self.named_tags.has_key(tagname): atts['name'] = atts['id'] # for compatibility with old browsers attlist = atts.items() attlist.sort() parts = [tagname] for name, value in attlist: if value is None: # boolean attribute # According to the HTML spec, ``<element boolean>`` is good, # ``<element boolean="boolean">`` is bad. # (But the XHTML (XML) spec says the opposite. <sigh>) parts.append(name.lower()) elif isinstance(value, ListType): values = [str(v) for v in value] parts.append('%s="%s"' % (name.lower(), self.attval(' '.join(values)))) else: parts.append('%s="%s"' % (name.lower(), self.attval(str(value)))) return '<%s%s>%s' % (' '.join(parts), infix, suffix) | 358131b681ddb1bfebd1f41a37f6b39e18e411c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/358131b681ddb1bfebd1f41a37f6b39e18e411c5/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
2692,
12,
2890,
16,
756,
16,
25586,
16,
3758,
2218,
64,
82,
2187,
316,
904,
2218,
2187,
2826,
4350,
4672,
3536,
14291,
471,
327,
279,
787,
1047,
864,
279,
756,
261,
350,
473,
667,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
2692,
12,
2890,
16,
756,
16,
25586,
16,
3758,
2218,
64,
82,
2187,
316,
904,
2218,
2187,
2826,
4350,
4672,
3536,
14291,
471,
327,
279,
787,
1047,
864,
279,
756,
261,
350,
473,
667,... |
file.Write(" parse_error::ParseError result =\n") file.Write(" Validate%s(this, immediate_data_size%s);\n" % (func.name, func.MakeOriginalArgString("", True))) file.Write(" if (result != parse_error::kParseNoError) {\n") file.Write(" return result;\n") file.Write(" }\n") | func.WriteHandlerValidation(file) | def WriteHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" uint32 client_id = c.client_id;\n") file.Write(" parse_error::ParseError result =\n") file.Write(" Validate%s(this, immediate_data_size%s);\n" % (func.name, func.MakeOriginalArgString("", True))) file.Write(" if (result != parse_error::kParseNoError) {\n") file.Write(" return result;\n") file.Write(" }\n") file.Write(" %sHelper(%s);\n" % (func.name, func.MakeCmdArgString(""))) | eee4cf7e01957632963833a437e10a3a6073fa95 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/eee4cf7e01957632963833a437e10a3a6073fa95/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
1503,
13621,
261,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
585,
18,
3067,
2932,
225,
2254,
1578,
1004,
67,
350,
273,
276,
18,
2625,
67,
350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
1503,
13621,
261,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
585,
18,
3067,
2932,
225,
2254,
1578,
1004,
67,
350,
273,
276,
18,
2625,
67,
350,
... |
if ownName in breaks: | if ownName and ownName in breaks: | def collect(node, ownName): """ Computes and returns the dependencies of the given node """ # All declared variables (is copied at every function scope) declared = set() # All external variables/classes accessed dependencies = set() # Register breaks (depencies with lower priority) breaks = set() # User defined tags for pre-processor (us) tags = { "require" : set(), "optional" : set(), "break" : set() } # Start inspection __inspect(node, declared, dependencies, tags) # Filter own name if ownName in dependencies: dependencies.remove(ownName) if ownName in breaks: breaks.remove(ownName) # Process tags for className in tags["optional"]: try: dependencies.remove(className) except KeyError: logging.warn("Useless #optional pre-processor hint %s in %s" % (className, ownName)) for className in tags["require"]: if className in dependencies: logging.warn("Auto detected #require pre-processor hint %s in %s" % (className, ownName)) dependencies.add(className) for className in tags["break"]: if not className in dependencies: logging.warn("Could not break non existing dependency to %s in %s" % (className, ownName)) breaks.add(className) return dependencies, breaks | bd7d58eb968fb3c3f2525a4519fd654b8930bfda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/bd7d58eb968fb3c3f2525a4519fd654b8930bfda/Dependencies.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
12,
2159,
16,
4953,
461,
4672,
3536,
14169,
281,
471,
1135,
326,
5030,
434,
326,
864,
756,
3536,
468,
4826,
7886,
3152,
261,
291,
9268,
622,
3614,
445,
2146,
13,
7886,
273,
444,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3274,
12,
2159,
16,
4953,
461,
4672,
3536,
14169,
281,
471,
1135,
326,
5030,
434,
326,
864,
756,
3536,
468,
4826,
7886,
3152,
261,
291,
9268,
622,
3614,
445,
2146,
13,
7886,
273,
444,
... |
EXAMPLES: | EXAMPLES:: | def __repr__(self): r""" Print a TestReduceGetinitargs. | 3bed29c45c1270055cd235e22fd02f632971b39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3bed29c45c1270055cd235e22fd02f632971b39e/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
436,
8395,
3038,
279,
7766,
12944,
967,
2738,
1968,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
436,
8395,
3038,
279,
7766,
12944,
967,
2738,
1968,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if not self.locale.Init2(): | if not self.locale.Init2() and wx.Platform != '__WXMSW__': | def InitWx(self): """ Initialize some basic wxWidgets stuff, including localization. """ import locale as system_locale wx.InitAllImageHandlers() self.locale = wx.Locale() if not self.locale.Init2(): print "Error: failed to initialize wx.Locale!" print "If you are under Linux, check the LC_MESSAGES or LANG environment variable is properly set." sys.exit(1) try: translation_dir = self.params.translation_dir except AttributeError: print "No translation dir specified" pass else: self.locale.AddCatalogLookupPathPrefix(translation_dir) self.locale.AddCatalog("solipsis") # Workaround for buggy Python behaviour with floats system_locale.setlocale(system_locale.LC_NUMERIC, "C") | a6a5cb05fb1529827f0c2e81a1169298f25785c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2522/a6a5cb05fb1529827f0c2e81a1169298f25785c6/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4378,
59,
92,
12,
2890,
4672,
3536,
9190,
2690,
5337,
7075,
16166,
10769,
16,
6508,
17981,
18,
3536,
1930,
2573,
487,
2619,
67,
6339,
7075,
18,
2570,
1595,
2040,
6919,
1435,
365,
18,
633... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4378,
59,
92,
12,
2890,
4672,
3536,
9190,
2690,
5337,
7075,
16166,
10769,
16,
6508,
17981,
18,
3536,
1930,
2573,
487,
2619,
67,
6339,
7075,
18,
2570,
1595,
2040,
6919,
1435,
365,
18,
633... |
snl = edge.leftFaceLabel() enl = edge.rightFaceLabel() edgeTuples.append((snl, enl, [nodePositions[snl], nodePositions[enl]])) result = hourglass.GeoMap(nodePositions, edgeTuples, map.imageSize()) | snl = nodes[edge.leftFaceLabel()] enl = nodes[edge.rightFaceLabel()] if snl and enl: result.addEdge(snl, enl, [snl.position(), enl.position()]) | def mst2map(mst, map): """Visualize a minimumSpanningTree() result as a GeoMap. Note that the nodes are located at the centroids of the faces, which is only a heuristic.""" nodePositions = [None] * map.maxFaceLabel() for face in map.faceIter(skipInfinite = True): nodePositions[face.label()] = centroid(contourPoly(face.contour())) edgeTuples = [None] for edgeLabel in mst: edge = map.edge(edgeLabel) snl = edge.leftFaceLabel() enl = edge.rightFaceLabel() edgeTuples.append((snl, enl, [nodePositions[snl], nodePositions[enl]])) result = hourglass.GeoMap(nodePositions, edgeTuples, map.imageSize()) removeIsolatedNodes(result) result.initializeMap(False) return result | 64a2fd8dcc3d90475afbd54b47193c26e82737ea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/64a2fd8dcc3d90475afbd54b47193c26e82737ea/maputils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
334,
22,
1458,
12,
27523,
16,
852,
4672,
3536,
25780,
554,
279,
5224,
3389,
10903,
2471,
1435,
563,
487,
279,
9385,
863,
18,
3609,
716,
326,
2199,
854,
13801,
622,
326,
25040,
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,
312,
334,
22,
1458,
12,
27523,
16,
852,
4672,
3536,
25780,
554,
279,
5224,
3389,
10903,
2471,
1435,
563,
487,
279,
9385,
863,
18,
3609,
716,
326,
2199,
854,
13801,
622,
326,
25040,
434,
... |
self.RunAndVerify('*oo*::*1', [ | self.RunAndVerify('*oo*::*One', [ | def testThreePatterns(self): """Tests filters that consist of three patterns.""" | 3d7042176307f0d7700a3640f3b3bcc8790b8fcd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4198/3d7042176307f0d7700a3640f3b3bcc8790b8fcd/gtest_filter_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
28019,
11268,
12,
2890,
4672,
3536,
14650,
3415,
716,
7111,
434,
8925,
6884,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
28019,
11268,
12,
2890,
4672,
3536,
14650,
3415,
716,
7111,
434,
8925,
6884,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
img = self(letter) | img = self.image(letter) | def is_identity(self): r""" Returns ``True`` if ``self`` is the identity morphism. EXAMPLES:: | a051baff3ff3349040e2463711e0ebf4c62b96f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/a051baff3ff3349040e2463711e0ebf4c62b96f9/morphism.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
10781,
12,
2890,
4672,
436,
8395,
2860,
12176,
5510,
10335,
309,
12176,
2890,
10335,
353,
326,
4215,
14354,
6228,
18,
225,
5675,
8900,
11386,
2866,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
353,
67,
10781,
12,
2890,
4672,
436,
8395,
2860,
12176,
5510,
10335,
309,
12176,
2890,
10335,
353,
326,
4215,
14354,
6228,
18,
225,
5675,
8900,
11386,
2866,
2,
-100,
-100,
-100,
-100,
-100... |
for description, id in self.connection.cursor().execute("SELECT description, coinc_def_id FROM coinc_definer"): print >>sys.stderr, "\t%s: %d" % (description, cursor.execute("SELECT COUNT(*) FROM coinc_event WHERE coinc_def_id = ?", (id,)).fetchone()[0]) | for description, n in self.connection.cursor().execute("SELECT description, COUNT(*) FROM coinc_definer NATURAL JOIN coinc_event GROUP BY coinc_def_id"): print >>sys.stderr, "\t%s: %d" % (description, n) | def __init__(self, live_time_program, verbose = False): """ Compute and record some summary information about the database. Call this after all the data has been inserted, and before you want any of this information. """ | d91a25c77854f6b019c6271bea25c100e6b4609f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/d91a25c77854f6b019c6271bea25c100e6b4609f/SnglBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
326,
501,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
326,
501,
7... |
tokens = self.parseAction( instring, tokensStart, retTokens ) | for fn in self.parseAction: tokens = fn( instring, tokensStart, retTokens ) if tokens is not None: if isinstance(tokens,tuple): tokens = tokens[1] warnings.warn("Returning loc from parse actions is deprecated, return only modified tokens", DeprecationWarning,stacklevel=2) retTokens = ParseResults( tokens, self.resultsName, asList=self.saveAsList and isinstance(tokens,(ParseResults,list)), modal=self.modalResults ) except ParseException, err: if (self.debugActions[2] ): self.debugActions[2]( instring, tokensStart, self, err ) raise else: for fn in self.parseAction: tokens = fn( instring, tokensStart, retTokens ) | def parse( self, instring, loc, doActions=True, callPreParse=True ): debugging = ( self.debug ) #and doActions ) | 0d5c070900efe583f55b5d4d6525eb2686936701 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/0d5c070900efe583f55b5d4d6525eb2686936701/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
365,
16,
316,
1080,
16,
1515,
16,
741,
6100,
33,
5510,
16,
745,
1386,
3201,
33,
5510,
262,
30,
10450,
273,
261,
365,
18,
4148,
262,
468,
464,
741,
6100,
262,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
365,
16,
316,
1080,
16,
1515,
16,
741,
6100,
33,
5510,
16,
745,
1386,
3201,
33,
5510,
262,
30,
10450,
273,
261,
365,
18,
4148,
262,
468,
464,
741,
6100,
262,
2,
-100,
-100,... |
_get_id = tools.cache(skiparg=3)(_get_id) | _get_id = tools.cache(skiparg=2)(_get_id) | def _get_id(self,cr, uid, module, xml_id): ids = self.search(cr, uid, [('module','=',module),('name','=', xml_id)]) assert len(ids)==1, '%d reference(s) to %s.%s. You should have one and only one !' % (len(ids), module, xml_id) return ids[0] | 862dcf8dcdfcd174d409ba9a8d620d2ed3d1c72a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/862dcf8dcdfcd174d409ba9a8d620d2ed3d1c72a/ir_model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
350,
12,
2890,
16,
3353,
16,
4555,
16,
1605,
16,
2025,
67,
350,
4672,
3258,
273,
365,
18,
3072,
12,
3353,
16,
4555,
16,
306,
2668,
2978,
17023,
33,
2187,
2978,
3631,
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,
389,
588,
67,
350,
12,
2890,
16,
3353,
16,
4555,
16,
1605,
16,
2025,
67,
350,
4672,
3258,
273,
365,
18,
3072,
12,
3353,
16,
4555,
16,
306,
2668,
2978,
17023,
33,
2187,
2978,
3631,
26... |
self.assertEqual (result,[{'postCommandSuccess': {'command': '', 'name': ''}, 'files': [{'path': '/test', 'name': 'install.bat', 'id': 'baf68c123b04d61856f71fe07b7bd84b'}, {'path': '/test', 'name': 'MD5SUMS', 'id': '43f38f712223725ac3e220b96889484b'}], 'installInit': {'command': '', 'name': ''}, 'description': 'Ceci est le package de test', 'preCommand': {'command': '', 'name': ''}, 'basepath': direct, 'reboot': '1', 'label': 'TestPackage', 'version': '2.0.0.9', 'command': {'command': './install.bat', 'name': 'commande'}, 'postCommandFailure': {'command': '', 'name': ''}, 'id': 'test', 'size': 72}]) | self.assertEqual (result,[{'postCommandSuccess': {'command': '', 'name': ''}, 'files': [{'path': '/test', 'name': 'install.bat', 'id': '7885517b39317add6a1d362968b01774'}, {'path': '/test', 'name': 'MD5SUMS', 'id': '5d3ff03e396aa072f5cae2b2ddcd88b9'}], 'installInit': {'command': '', 'name': ''}, 'description': 'Ceci est le package de test', 'preCommand': {'command': '', 'name': ''}, 'basepath': direct, 'reboot': '1', 'label': 'TestPackage', 'version': '2.0.0.9', 'command': {'command': './install.bat', 'name': 'commande'}, 'postCommandFailure': {'command': '', 'name': ''}, 'id': 'test', 'size': PKGSIZE}]) | def test302getAllPackages (self): result=serverP.getAllPackages({'mountpoint': '/mirror1', 'server': ipserver, 'protocol': protocol, 'uuid': 'UUID/mirror1', 'port': '9990'}) SupEsp(result) self.assertEqual (result,[{'postCommandSuccess': {'command': '', 'name': ''}, 'files': [{'path': '/test', 'name': 'install.bat', 'id': 'baf68c123b04d61856f71fe07b7bd84b'}, {'path': '/test', 'name': 'MD5SUMS', 'id': '43f38f712223725ac3e220b96889484b'}], 'installInit': {'command': '', 'name': ''}, 'description': 'Ceci est le package de test', 'preCommand': {'command': '', 'name': ''}, 'basepath': direct, 'reboot': '1', 'label': 'TestPackage', 'version': '2.0.0.9', 'command': {'command': './install.bat', 'name': 'commande'}, 'postCommandFailure': {'command': '', 'name': ''}, 'id': 'test', 'size': 72}]) | a4a8401bdab0114d35c2ded373b137f813e47b7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/a4a8401bdab0114d35c2ded373b137f813e47b7a/pserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
23,
3103,
588,
1595,
11425,
261,
2890,
4672,
563,
33,
3567,
52,
18,
588,
1595,
11425,
12590,
11,
4778,
1153,
4278,
1173,
27197,
21,
2187,
296,
3567,
4278,
2359,
3567,
16,
296,
8373... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23,
3103,
588,
1595,
11425,
261,
2890,
4672,
563,
33,
3567,
52,
18,
588,
1595,
11425,
12590,
11,
4778,
1153,
4278,
1173,
27197,
21,
2187,
296,
3567,
4278,
2359,
3567,
16,
296,
8373... |
"license": nuclient.LICENCE, | "license": nuclient.LICENSE, | def main(): nuclient = load_source("version", path.join("nuclient", "version.py")) install_options = { "name": "nuclient", "version": nuclient.VERSION, "url": nuclient.WEBSITE, "download_url": nuclient.WEBSITE, "author": "Victor Stinner", "description": "Python binding of libnuclient library, object oriented", "long_description": open('README').read(), "classifiers": CLASSIFIERS, "license": nuclient.LICENCE, "packages": ["nuclient"], "package_dir": {"nuclient": "nuclient"}, } setup(**install_options) | d95c9cfe3fc3d1a1de1d3e76635df221c2b9d5a7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10929/d95c9cfe3fc3d1a1de1d3e76635df221c2b9d5a7/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
9244,
2625,
273,
1262,
67,
3168,
2932,
1589,
3113,
589,
18,
5701,
2932,
13053,
2625,
3113,
315,
1589,
18,
2074,
6,
3719,
3799,
67,
2116,
273,
288,
315,
529,
6877,
315,
13053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
9244,
2625,
273,
1262,
67,
3168,
2932,
1589,
3113,
589,
18,
5701,
2932,
13053,
2625,
3113,
315,
1589,
18,
2074,
6,
3719,
3799,
67,
2116,
273,
288,
315,
529,
6877,
315,
13053... |
if not self.use_latex_toc and self.topic_class == 'contents': self.body.append( '\\begin{list}{}{}\n' ) | if self.topic_class == 'contents': if not self.use_latex_toc: self.body.append( '\\begin{list}{}{}\n' ) | def visit_bullet_list(self, node): if not self.use_latex_toc and self.topic_class == 'contents': self.body.append( '\\begin{list}{}{}\n' ) else: self.body.append( '\\begin{itemize}\n' ) | 3449eb547b826ebeae4cc2d414ffd515229b5a2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/3449eb547b826ebeae4cc2d414ffd515229b5a2e/latex2e.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
70,
19994,
67,
1098,
12,
2890,
16,
756,
4672,
309,
365,
18,
10476,
67,
1106,
422,
296,
3980,
4278,
309,
486,
365,
18,
1202,
67,
26264,
67,
1391,
30,
365,
18,
3432,
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,
3757,
67,
70,
19994,
67,
1098,
12,
2890,
16,
756,
4672,
309,
365,
18,
10476,
67,
1106,
422,
296,
3980,
4278,
309,
486,
365,
18,
1202,
67,
26264,
67,
1391,
30,
365,
18,
3432,
18,
6923... |
def __init__(self): | def __init__(self, max_entry=None): | def __init__(self): """ TESTS:: sage: SST = SemistandardTableaux() sage: SST == loads(dumps(SST)) True """ | 2449cd5519bef0332aa3a713d5bed46b08be54fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2449cd5519bef0332aa3a713d5bed46b08be54fa/tableau.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
943,
67,
4099,
33,
7036,
4672,
3536,
22130,
55,
2866,
225,
272,
410,
30,
348,
882,
273,
15661,
376,
2958,
1388,
18196,
1435,
272,
410,
30,
348,
882,
422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
943,
67,
4099,
33,
7036,
4672,
3536,
22130,
55,
2866,
225,
272,
410,
30,
348,
882,
273,
15661,
376,
2958,
1388,
18196,
1435,
272,
410,
30,
348,
882,
422,... |
'new_value_text': self.get_value_text(cr,uid,field,new_values[field],model_object), | 'new_value_text': self.get_value_text(cr, uid, field, new_values[field], model_object), | def log_fct(self, db, uid, passwd, object, method, fct_src, *args): logged_uids = [] pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() obj=pool.get(object) object_name=obj._name obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)]) model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0] if method in ('create'): res_id = fct_src( db, uid, passwd, object, method, *args) cr.commit() new_value=pool.get(model_object.model).read(cr,uid,[res_id],args[0].keys())[0] if 'id' in new_value: del new_value['id'] if not len(logged_uids) or uid in logged_uids: resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id]) resource_name = resource_name and resource_name[0][1] or '' id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name}) lines=[] for field in new_value: if new_value[field]: line={ 'name':field, 'new_value':new_value[field], 'new_value_text': self.get_value_text(cr,uid,field,new_value[field],model_object) } lines.append(line) self.create_log_line(cr,uid,id,model_object,lines) cr.commit() cr.close() return res_id | d8781cd0f2eee29372e5a54862aa63c732ae3150 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d8781cd0f2eee29372e5a54862aa63c732ae3150/audittrail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
67,
74,
299,
12,
2890,
16,
1319,
16,
4555,
16,
19093,
16,
733,
16,
707,
16,
28478,
67,
4816,
16,
380,
1968,
4672,
7545,
67,
21428,
273,
5378,
2845,
273,
2845,
264,
18,
588,
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,
613,
67,
74,
299,
12,
2890,
16,
1319,
16,
4555,
16,
19093,
16,
733,
16,
707,
16,
28478,
67,
4816,
16,
380,
1968,
4672,
7545,
67,
21428,
273,
5378,
2845,
273,
2845,
264,
18,
588,
67,
... |
if not oldPlayService(ref): if alternatives.has_key(str(ServiceReference(ref))): for x in alternatives[str(ServiceReference(ref))]: if oldPlayService(ServiceReference(x).ref): return 1 return 0 return 1 | servicechanged.lastPlayAction = str(ServiceReference(ref)) servicechanged.nextPlayTry = 0 result = oldPlayService(ref) return result | def playService(self, ref): if not oldPlayService(ref): if alternatives.has_key(str(ServiceReference(ref))): for x in alternatives[str(ServiceReference(ref))]: if oldPlayService(ServiceReference(x).ref): return 1 return 0 return 1 | c59bcd0084df4c2803f2eae50988b5a54bc8ab00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/c59bcd0084df4c2803f2eae50988b5a54bc8ab00/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
1179,
12,
2890,
16,
1278,
4672,
225,
1156,
6703,
18,
2722,
11765,
1803,
273,
609,
12,
1179,
2404,
12,
1734,
3719,
1156,
6703,
18,
4285,
11765,
7833,
273,
374,
563,
273,
1592,
11765... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6599,
1179,
12,
2890,
16,
1278,
4672,
225,
1156,
6703,
18,
2722,
11765,
1803,
273,
609,
12,
1179,
2404,
12,
1734,
3719,
1156,
6703,
18,
4285,
11765,
7833,
273,
374,
563,
273,
1592,
11765... |
raise ReadError, str(e) | raise ReadError("empty, unreadable or compressed " "file: %s" % e) | def next(self): """Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. """ self._check("ra") if self.firstmember is not None: m = self.firstmember self.firstmember = None return m | 9d576e732e0c14bd37ecb65d8001d6f596cc8566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9d576e732e0c14bd37ecb65d8001d6f596cc8566/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
3536,
990,
326,
1024,
3140,
434,
326,
5052,
487,
279,
20334,
966,
733,
16,
1347,
20334,
812,
353,
10191,
364,
6453,
18,
2000,
599,
309,
1915,
353,
1158,
1898,
2319,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
4672,
3536,
990,
326,
1024,
3140,
434,
326,
5052,
487,
279,
20334,
966,
733,
16,
1347,
20334,
812,
353,
10191,
364,
6453,
18,
2000,
599,
309,
1915,
353,
1158,
1898,
2319,... |
self.pcontainer.spacer.canv_size=10 | self.pcontainer.spacer.canv_size = 10 | def collapse_panel(self, *arg): PluginPanel.collapse_panel(self) if self.collapsed: self.pcontainer.spacer.canv_size=10 | 7e3114727c62cccd5ab7238e2006599aa54cc436 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/7e3114727c62cccd5ab7238e2006599aa54cc436/pbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13627,
67,
13916,
12,
2890,
16,
380,
3175,
4672,
6258,
5537,
18,
21405,
67,
13916,
12,
2890,
13,
309,
365,
18,
1293,
13886,
30,
365,
18,
84,
3782,
18,
1752,
10598,
18,
4169,
90,
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,
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,
13627,
67,
13916,
12,
2890,
16,
380,
3175,
4672,
6258,
5537,
18,
21405,
67,
13916,
12,
2890,
13,
309,
365,
18,
1293,
13886,
30,
365,
18,
84,
3782,
18,
1752,
10598,
18,
4169,
90,
67,
... |
self.setSessionInfo([MESSAGE_SAVEDCHANGES % self.utGetTodayDate()]) | self.setSessionInfoTrans(MESSAGE_SAVEDCHANGES, date=self.utGetTodayDate()) | def admin_addratelist(self, id='', title='', description='', REQUEST=None): """ """ self.manage_addRateList(id, title, description) if REQUEST: self.setSessionInfo([MESSAGE_SAVEDCHANGES % self.utGetTodayDate()]) REQUEST.RESPONSE.redirect('%s/admin_ratelists_html' % self.absolute_url()) | 9ebbed155972a1637136ab18d27c45686fe46b10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/9ebbed155972a1637136ab18d27c45686fe46b10/NyConsultation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3981,
67,
4793,
270,
5449,
12,
2890,
16,
612,
2218,
2187,
2077,
2218,
2187,
2477,
2218,
2187,
12492,
33,
7036,
4672,
3536,
3536,
365,
18,
12633,
67,
1289,
4727,
682,
12,
350,
16,
2077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4793,
270,
5449,
12,
2890,
16,
612,
2218,
2187,
2077,
2218,
2187,
2477,
2218,
2187,
12492,
33,
7036,
4672,
3536,
3536,
365,
18,
12633,
67,
1289,
4727,
682,
12,
350,
16,
2077,
... |
master._fake = True | master.itsItem._fake = True | def get_occurrence(master): if getattr(master, 'rruleset', None) is None: # add a dummy RecurrenceRuleSet so event methods treat # the event as a master master.rruleset = RecurrenceRuleSet(None, itsView=self.rv) # Some event methods won't work if a master doesn't have # a rruleset, but import_event's modification fixing needs # to know if the real master's event has been processed master._fake = True occurrence = master.getRecurrenceID(recurrenceID) if occurrence is None: if create: occurrence = master._createOccurrence(recurrenceID) else: return None return occurrence.itsItem.itsUUID.str16() | beeb57ef3a68e6824959de525539739f34b14b38 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/beeb57ef3a68e6824959de525539739f34b14b38/translator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
31177,
12,
7525,
4672,
309,
3869,
12,
7525,
16,
296,
523,
1513,
278,
2187,
599,
13,
353,
599,
30,
468,
527,
279,
9609,
868,
17131,
21474,
1427,
871,
2590,
10116,
468,
326,
871... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31177,
12,
7525,
4672,
309,
3869,
12,
7525,
16,
296,
523,
1513,
278,
2187,
599,
13,
353,
599,
30,
468,
527,
279,
9609,
868,
17131,
21474,
1427,
871,
2590,
10116,
468,
326,
871... |
return xdg.IconTheme.getIconPath(self.NAME) | return xdg.IconTheme.getIconPath(klass.NAME) | def ICON(self): try: import xdg.IconTheme except ImportError: self.logger.debug(u'Python xdg module was not found. Please install it to read icon files.') else: return xdg.IconTheme.getIconPath(self.NAME) | 7200618a93bd7816296a4174c8eccdcb4fe03651 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/7200618a93bd7816296a4174c8eccdcb4fe03651/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
467,
2248,
12,
2890,
4672,
775,
30,
1930,
20009,
75,
18,
5554,
8335,
1335,
11308,
30,
365,
18,
4901,
18,
4148,
12,
89,
11,
15774,
20009,
75,
1605,
1703,
486,
1392,
18,
7801,
3799,
518,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
467,
2248,
12,
2890,
4672,
775,
30,
1930,
20009,
75,
18,
5554,
8335,
1335,
11308,
30,
365,
18,
4901,
18,
4148,
12,
89,
11,
15774,
20009,
75,
1605,
1703,
486,
1392,
18,
7801,
3799,
518,... |
_devideApp.setProgress(100, 'Destroyed %s.' % (coreModuleName,)) | print 'Destroyed %s.' % (module_name,) | def testCreateDestroy(self): """See if we can create and destroy all core modules. """ | 7bb5c8a6afce162b43c885d89ab767e02883e076 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/7bb5c8a6afce162b43c885d89ab767e02883e076/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1684,
10740,
12,
2890,
4672,
3536,
9704,
309,
732,
848,
752,
471,
5546,
777,
2922,
4381,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1684,
10740,
12,
2890,
4672,
3536,
9704,
309,
732,
848,
752,
471,
5546,
777,
2922,
4381,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.