rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
return formattedModule + formattedFiles | return formattedModule | def format_moduleAndFiles(self, message): """Format the module name and files, joined together if they are both present.""" if message.xml.body.commit.files: formattedFiles = self.format_files(message.xml.body.commit.files) else: formattedFiles = "" | 1fee7a3fc90cd1f8463ba3d9092d1d2b104d9087 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/1fee7a3fc90cd1f8463ba3d9092d1d2b104d9087/Formatters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
2978,
1876,
2697,
12,
2890,
16,
883,
4672,
3536,
1630,
326,
1605,
508,
471,
1390,
16,
12114,
9475,
309,
2898,
854,
3937,
3430,
12123,
309,
883,
18,
2902,
18,
3432,
18,
7371,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
2978,
1876,
2697,
12,
2890,
16,
883,
4672,
3536,
1630,
326,
1605,
508,
471,
1390,
16,
12114,
9475,
309,
2898,
854,
3937,
3430,
12123,
309,
883,
18,
2902,
18,
3432,
18,
7371,
1... |
geolabel.set_alignment(0,0.5) self.adv_show_list.append(geolabel) otable.attach(geolabel,0,1,1,2) otable.attach(self.geocoding_menu,1,2,1,2) | otable.attach(self.geocoding_menu, 1, 2, 1, 2) | def init_dialog(self): self.dialog = gtk.Window() self.dialog.set_title('GDAL Export Tool') self.dialog.set_border_width(10) self.tips=gtk.Tooltips() #self.dialog.set_default_size(500,400) self.dialog.set_resizable(True) | 18bebfddf000a5af98d1ab83e4246e700756e2a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11090/18bebfddf000a5af98d1ab83e4246e700756e2a4/Tool_Export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
12730,
12,
2890,
4672,
365,
18,
12730,
273,
22718,
18,
3829,
1435,
365,
18,
12730,
18,
542,
67,
2649,
2668,
27338,
1013,
11054,
13288,
6134,
365,
18,
12730,
18,
542,
67,
8815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12730,
12,
2890,
4672,
365,
18,
12730,
273,
22718,
18,
3829,
1435,
365,
18,
12730,
18,
542,
67,
2649,
2668,
27338,
1013,
11054,
13288,
6134,
365,
18,
12730,
18,
542,
67,
8815,
... |
index = IndexProjects(context, | dbindex = IndexProjects(context, | def findRSync(): '''Check if rsync is present and install it through the package manager if it is not. rsync is a little special since it is used directly by this script and the script is not always installed through a project.''' rsync = os.path.join(context.value('binBuildDir'),'rsync') if not os.path.exists(rsync): index = IndexProjects(context, '''<?xml version="1.0" ?> | 42b316a208ce4becdc41c507d5fedde21a6c5acb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/42b316a208ce4becdc41c507d5fedde21a6c5acb/dws.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
54,
4047,
13332,
9163,
1564,
309,
3597,
1209,
353,
3430,
471,
3799,
518,
3059,
326,
2181,
3301,
309,
518,
353,
486,
18,
3597,
1209,
353,
279,
12720,
4582,
3241,
518,
353,
1399,
512... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
54,
4047,
13332,
9163,
1564,
309,
3597,
1209,
353,
3430,
471,
3799,
518,
3059,
326,
2181,
3301,
309,
518,
353,
486,
18,
3597,
1209,
353,
279,
12720,
4582,
3241,
518,
353,
1399,
512... |
elif (type(obj) == types.UnboundMethodType and | elif (isinstance(obj, types.UnboundMethodType) and | def loadTestsFromName(self, name, module=None): """Return a suite of all tests cases given a string specifier. | dae1a6a4889a67d29c7e1638472625cc4ca3cdf3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/dae1a6a4889a67d29c7e1638472625cc4ca3cdf3/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
14650,
29732,
12,
2890,
16,
508,
16,
1605,
33,
7036,
4672,
3536,
990,
279,
11371,
434,
777,
7434,
6088,
864,
279,
533,
24562,
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,
1262,
14650,
29732,
12,
2890,
16,
508,
16,
1605,
33,
7036,
4672,
3536,
990,
279,
11371,
434,
777,
7434,
6088,
864,
279,
533,
24562,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
print len(wins) | def action_compiz_scale_windows(self, widget, event): wins = self.get_unminimized_windows() if not wins: return print len(wins) if len(wins) == 1: self.windows[wins[0]].action_select_window(widget, event) return if self.globals.settings['show_only_current_desktop']: path = 'scale/allscreens/initiate_key' else: path = 'scale/allscreens/initiate_all_key' try: compiz_call(path, 'activate','root', self.root_xid,'match', \ 'iclass=%s'%wins[0].get_class_group.get_res_class()) except: return # A new button enter signal is sent when compiz is called, # a delay is therefor needed. gobject.timeout_add(self.globals.settings['popup_delay'] + 200, self.hide_list) | 8e00a7e5b5b3c89cce94ef2f6ad5d6e30282f889 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/8e00a7e5b5b3c89cce94ef2f6ad5d6e30282f889/groupbutton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
2919,
452,
67,
5864,
67,
13226,
12,
2890,
16,
3604,
16,
871,
4672,
31307,
273,
365,
18,
588,
67,
318,
1154,
381,
1235,
67,
13226,
1435,
309,
486,
31307,
30,
327,
309,
562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
2919,
452,
67,
5864,
67,
13226,
12,
2890,
16,
3604,
16,
871,
4672,
31307,
273,
365,
18,
588,
67,
318,
1154,
381,
1235,
67,
13226,
1435,
309,
486,
31307,
30,
327,
309,
562,
... | |
superclass.__init__(cls, name, bases, dictionary) | superclass.__init__(name, bases, dictionary) | def __init__(cls, name, bases, dictionary): """Here we perform the majority of our work on the class. We add enum getters, an __init__ method, implementations of all Message methods, and properties for all fields in the protocol type. | eb241fadf22bd9cafa3c2b2e91a914a12df07993 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6417/eb241fadf22bd9cafa3c2b2e91a914a12df07993/reflection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
6429,
16,
508,
16,
8337,
16,
3880,
4672,
3536,
26715,
732,
3073,
326,
7888,
560,
434,
3134,
1440,
603,
326,
667,
18,
1660,
527,
2792,
23849,
16,
392,
1001,
2738,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
6429,
16,
508,
16,
8337,
16,
3880,
4672,
3536,
26715,
732,
3073,
326,
7888,
560,
434,
3134,
1440,
603,
326,
667,
18,
1660,
527,
2792,
23849,
16,
392,
1001,
2738,
9... |
def parse(cls, document): try: xml = etree.XML(document, cls._parser) | def parse(cls, document, *args, **kwargs): try: xml = etree.XML(document, cls._xml_parser) | def parse(cls, document): try: xml = etree.XML(document, cls._parser) except etree.XMLSyntaxError, e: raise ParserError(str(e)) else: return cls.from_element(xml) | 86a3cb09569495d76ac3ea45504458f43e29e618 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/86a3cb09569495d76ac3ea45504458f43e29e618/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
6429,
16,
1668,
16,
380,
1968,
16,
2826,
4333,
4672,
775,
30,
2025,
273,
12031,
18,
4201,
12,
5457,
16,
2028,
6315,
2902,
67,
4288,
13,
1335,
12031,
18,
4201,
22510,
16,
425,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6429,
16,
1668,
16,
380,
1968,
16,
2826,
4333,
4672,
775,
30,
2025,
273,
12031,
18,
4201,
12,
5457,
16,
2028,
6315,
2902,
67,
4288,
13,
1335,
12031,
18,
4201,
22510,
16,
425,... |
def _check(docmap, modules, options): | def _check(docmap, options): | def _check(docmap, modules, options): """ Run completeness checks on the objects in the given documentation map. By default, C{_check} checks for docstrings in all public modules, classes, functions, and properties. Additional checks can be added with the C{'tests'} option: - C{private}: Also checks private objects. - C{vars}: Also checks variables, parameters, and return values. @param docmap: A documentation map containing the documentation for the objects whose API documentation should be created. @param options: Options from the command-line arguments. @type options: C{dict} """ from epydoc.checker import DocChecker # Run completeness checks. if options['verbosity'] > 0: print >>sys.stderr, 'Performing completeness checks...' checker = DocChecker(docmap, modules) if options['tests'].get('all'): for test in TESTS: options['tests'][test] = 1 # Run the checks checks = 0 if (options['tests'].get('basic') or options['tests'].get('vars') or options['tests'].get('private')): checks |= (DocChecker.MODULE | DocChecker.CLASS | DocChecker.FUNC | DocChecker.PROPERTY | DocChecker.DESCR_LAZY | DocChecker.PUBLIC) if options['tests'].get('private'): checks |= DocChecker.PRIVATE if options['tests'].get('vars'): checks |= DocChecker.ALL_T if options['tests'].get('types'): checks |= DocChecker.ALL_T DocChecker.TYPE passed_checks = checker.check(checks) if options['tests'].get('authors'): checks = DocChecker.MODULE | DocChecker.PUBLIC | DocChecker.AUTHOR if options['tests'].get('private'): checks |= DocChecker.PRIVATE passed_checks = checker.check(checks) and passed_checks if options['tests'].get('versions'): checks = DocChecker.MODULE | DocChecker.PUBLIC | DocChecker.VERSION if options['tests'].get('private'): checks |= DocChecker.PRIVATE passed_checks = checker.check(checks) and passed_checks if passed_checks and options['verbosity'] > 0: print >>sys.stderr, ' All checks passed!' | 225f93cb30a65a12804988d86bf49bf44e9a01d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/225f93cb30a65a12804988d86bf49bf44e9a01d8/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2434,
1458,
16,
702,
4672,
3536,
1939,
2302,
15681,
4271,
603,
326,
2184,
316,
326,
864,
7323,
852,
18,
225,
2525,
805,
16,
385,
95,
67,
1893,
97,
4271,
364,
997,
10219,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1893,
12,
2434,
1458,
16,
702,
4672,
3536,
1939,
2302,
15681,
4271,
603,
326,
2184,
316,
326,
864,
7323,
852,
18,
225,
2525,
805,
16,
385,
95,
67,
1893,
97,
4271,
364,
997,
10219,... |
Check if the user is owner of the record, i.e. he is the submitter | Check if the user is owner of the record, i.e. he is the submitter | def is_user_owner_of_record(user_info, recid): """ Check if the user is owner of the record, i.e. he is the submitter and/or belongs to a owner-like group authorized to 'see' the record. @param user_info: the user_info dictionary that describe the user. @type user_info: user_info dictionary @param recid: the record identifier. @type recid: positive integer @return: True if the user is 'owner' of the record; False otherwise @rtype: bool """ authorized_emails_or_group = [] for tag in CFG_ACC_GRANT_AUTHOR_RIGHTS_TO_EMAILS_IN_TAGS: authorized_emails_or_group.extend(get_fieldvalues(recid, tag)) for email_or_group in authorized_emails_or_group: if email_or_group in user_info['group']: return True email = email_or_group.strip().lower() if user_info['email'].strip().lower() == email: return True return False | eeb3d92326050ac8e18b5f83470f29a4a5833ff2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/eeb3d92326050ac8e18b5f83470f29a4a5833ff2/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
1355,
67,
8443,
67,
792,
67,
3366,
12,
1355,
67,
1376,
16,
1950,
350,
4672,
3536,
2073,
309,
326,
729,
353,
3410,
434,
326,
1409,
16,
277,
18,
73,
18,
3904,
353,
326,
4879,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1355,
67,
8443,
67,
792,
67,
3366,
12,
1355,
67,
1376,
16,
1950,
350,
4672,
3536,
2073,
309,
326,
729,
353,
3410,
434,
326,
1409,
16,
277,
18,
73,
18,
3904,
353,
326,
4879,
... |
self._top_page = self._find_top_page(kwargs.get('top_page', None)) | self._top_page = kwargs.get('top_page', None) | def __init__(self, docindex, **kwargs): """ Construct a new HTML writer, using the given documentation index. @param docmap: The documentation index. @type prj_name: C{string} @keyword prj_name: The name of the project. Defaults to none. @type prj_url: C{string} @keyword prj_url: The target for the project hopeage link on the navigation bar. If C{prj_url} is not specified, then no hyperlink is created. @type prj_link: C{string} @keyword prj_link: The label for the project link on the navigation bar. This link can contain arbitrary HTML code (e.g. images). By default, a label is constructed from C{prj_name}. @type top_page: C{string} @keyword top_page: The top page for the documentation. This is the default page shown main frame, when frames are enabled. C{top} can be a URL, the name of a module, the name of a class, or one of the special strings C{"trees.html"}, C{"indices.html"}, or C{"help.html"}. By default, the top-level package or module is used, if there is one; otherwise, C{"trees"} is used. @type css: C{string} @keyword css: The CSS stylesheet file. If C{css} is a file name, then the specified file's conents will be used. Otherwise, if C{css} is the name of a CSS stylesheet in L{epydoc.docwriter.html_css}, then that stylesheet will be used. Otherwise, an error is reported. If no stylesheet is specified, then the default stylesheet is used. @type help_file: C{string} @keyword help_file: The name of the help file. If no help file is specified, then the default help file will be used. @type show_private: C{boolean} @keyword show_private: Whether to create documentation for private objects. By default, private objects are documented. @type show_frames: C{boolean}) @keyword show_frames: Whether to create a frames-based table of contents. By default, it is produced. @type show_imports: C{boolean} @keyword show_imports: Whether or not to display lists of imported functions and classes. By default, they are not shown. @type variable_maxlines: C{int} @keyword variable_maxlines: The maximum number of lines that should be displayed for the value of a variable in the variable details section. By default, 8 lines are displayed. @type variable_linelength: C{int} @keyword variable_linelength: The maximum line length used for displaying the values of variables in the variable details sections. If a line is longer than this length, then it will be wrapped to the next line. The default line length is 70 characters. @type variable_summary_linelength: C{int} @keyword variable_summary_linelength: The maximum line length used for displaying the values of variables in the summary section. If a line is longer than this length, then it will be truncated. The default is 40 characters. @type variable_tooltip_linelength: C{int} @keyword variable_tooltip_linelength: The maximum line length used for tooltips for the values of variables. If a line is longer than this length, then it will be truncated. The default is 600 characters. @type property_function_linelength: C{int} @keyword property_function_linelength: The maximum line length used to dispaly property functions (C{fget}, C{fset}, and C{fdel}) that contain something other than a function object. The default length is 40 characters. @type inheritance: C{string} @keyword inheritance: How inherited objects should be displayed. If C{inheritance='grouped'}, then inherited objects are gathered into groups; if C{inheritance='listed'}, then inherited objects are listed in a short list at the end of their group; if C{inheritance='included'}, then inherited objects are mixed in with non-inherited objects. The default is 'grouped'. @type include_sourcecode: C{boolean} @param include_sourcecode: If true, then generate colorized source code files for each python module. """ self.docindex = docindex # Process keyword arguments. self._show_private = kwargs.get('show_private', 1) """Should private docs be included?""" | 28d88ae14617650a4a829fae94668100dc4e2b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/28d88ae14617650a4a829fae94668100dc4e2b05/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
1615,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
2633,
16,
1450,
326,
864,
7323,
770,
18,
225,
632,
891,
997,
1458,
30,
1021,
7323,
770,
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,
1001,
2738,
972,
12,
2890,
16,
997,
1615,
16,
2826,
4333,
4672,
3536,
14291,
279,
394,
3982,
2633,
16,
1450,
326,
864,
7323,
770,
18,
225,
632,
891,
997,
1458,
30,
1021,
7323,
770,
18,... |
if self.options['show-lines']: | elif self.options['show-lines']: | def detect(self): lines = detect_lines(self.image_proc) if len(lines) < 2: return axes = detect_boxes(lines, self.boxes_dim) if axes is not None: self.corner_matrixes = cell_corners(axes[1][1], axes[0][1], self.image_raw.width, self.image_raw.height, self.boxes_dim) self.id_hlines = id_horizontal_lines(axes[1][1], axes[0][1], self.boxes_dim) if self.options['show-lines']: for line in axes[0][1]: draw_tangent(self.image_drawn, line[0], line[1], (255, 0, 0)) for line in axes[1][1]: draw_tangent(self.image_drawn, line[0], line[1], (255, 0, 255)) for corners in self.corner_matrixes: for h in corners: for c in h: draw_corner(self.image_drawn, c[0], c[1]) if len(self.corner_matrixes) > 0 and self.options['read-id']: for line in self.id_hlines: draw_tangent(self.image_drawn, line[0], line[1], (255, 255, 0)) if len(self.corner_matrixes) > 0 and \ (not self.options['read-id'] or self.id_hlines != []): self.decisions = decide_cells(self.image_proc, self.corner_matrixes) if self.options['infobits']: self.bits = read_infobits(self.image_proc, self.corner_matrixes) self.success = (self.bits is not None) else: self.success = True if self.success and self.options['read-id']: self.id_corners = \ id_boxes_geometry(self.image_proc, self.id_hlines, self.image_raw.width, self.options['id-num-digits']) if self.id_corners == None: self.success = False if self.options['show-lines']: for c in self.id_corners[0]: draw_corner(self.image_drawn, c[0], c[1]) for c in self.id_corners[1]: draw_corner(self.image_drawn, c[0], c[1]) if self.success: self.compute_cells_geometry() draw_success_indicator(self.image_drawn, self.success) | 861a96cd1a91667a006e7df9cbcff5900d5beea8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12267/861a96cd1a91667a006e7df9cbcff5900d5beea8/imageproc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
12,
2890,
4672,
2362,
273,
5966,
67,
3548,
12,
2890,
18,
2730,
67,
9381,
13,
309,
562,
12,
3548,
13,
411,
576,
30,
327,
6515,
273,
5966,
67,
15918,
12,
3548,
16,
365,
18,
15918... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
12,
2890,
4672,
2362,
273,
5966,
67,
3548,
12,
2890,
18,
2730,
67,
9381,
13,
309,
562,
12,
3548,
13,
411,
576,
30,
327,
6515,
273,
5966,
67,
15918,
12,
3548,
16,
365,
18,
15918... |
if mainobject is object: return main except AttributeError: pass | if mainobject is object: return main | def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasattr(module, '__file__'): modulesbyfile[getabsfile(module)] = module.__name__ if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] main = sys.modules['__main__'] try: mainobject = getattr(main, object.__name__) if mainobject is object: return main except AttributeError: pass builtin = sys.modules['__builtin__'] try: builtinobject = getattr(builtin, object.__name__) if builtinobject is object: return builtin except AttributeError: pass | 4eb0c003f8cd892800aa425fbde02ca9ecc76f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4eb0c003f8cd892800aa425fbde02ca9ecc76f34/inspect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2978,
12,
1612,
4672,
3536,
7833,
358,
7274,
1492,
1605,
392,
733,
1703,
2553,
316,
12123,
309,
28209,
12,
1612,
4672,
327,
2589,
18,
6400,
18,
588,
12,
1612,
16186,
2978,
972,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2978,
12,
1612,
4672,
3536,
7833,
358,
7274,
1492,
1605,
392,
733,
1703,
2553,
316,
12123,
309,
28209,
12,
1612,
4672,
327,
2589,
18,
6400,
18,
588,
12,
1612,
16186,
2978,
972,
13,
... |
temph, dummyr, dummyc = nlp.hess(array(x), array(lagrange), obj_factor) return temph.tolist() """ | temph, dummyr, dummyc = nlp.hess(x, lagrange, obj_factor) return temph def applynew(x): return nlp.applynew(x); | def eval_h(x, lagrange, obj_factor, flag): if flag: return (hrow.tolist(), hcol.tolist()) else: temph, dummyr, dummyc = nlp.hess(array(x), array(lagrange), obj_factor) return temph.tolist() | 12f641fcbdec6646af5eec5334d5d41fb69be57a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12033/12f641fcbdec6646af5eec5334d5d41fb69be57a/amplipopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
67,
76,
12,
92,
16,
17241,
3676,
16,
1081,
67,
6812,
16,
2982,
4672,
309,
2982,
30,
327,
261,
76,
492,
18,
3490,
376,
9334,
366,
1293,
18,
3490,
376,
10756,
469,
30,
1022,
844,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
67,
76,
12,
92,
16,
17241,
3676,
16,
1081,
67,
6812,
16,
2982,
4672,
309,
2982,
30,
327,
261,
76,
492,
18,
3490,
376,
9334,
366,
1293,
18,
3490,
376,
10756,
469,
30,
1022,
844,... |
'remoteBasePath'/yyyy/mm/yyyy-mm-dd-hh-milestone. Otherwise, builds will be uploaded from the slave. Generally, this should be True for nightlies. Default: True | 'remoteBasePath'/nightly/yyyy/mm/yyyy-mm-dd-hh-milestone. Otherwise, builds will be uploaded from the slave. Generally, this should be True for nightlies. Default: True | def __init__(self, objdir, username, milestone, platform, remoteHost, remoteBasePath, group=None, chmodMode=755, sshKey=None, releaseToDated=True, releaseToLatest=True, releaseToTinderboxBuilds=True, tinderboxBuildsDir=None, dependToDated=True, **kwargs): """ @type objdir: string @param objdir: The obj directory used for the build. This is needed to find the packages in the source tree. | bdb7278eb47c3850873b071816c1e976bd78182b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/bdb7278eb47c3850873b071816c1e976bd78182b/transfer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1081,
1214,
16,
2718,
16,
28664,
16,
4072,
16,
2632,
2594,
16,
2632,
15912,
16,
1041,
33,
7036,
16,
13413,
2309,
33,
21761,
16,
7056,
653,
33,
7036,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1081,
1214,
16,
2718,
16,
28664,
16,
4072,
16,
2632,
2594,
16,
2632,
15912,
16,
1041,
33,
7036,
16,
13413,
2309,
33,
21761,
16,
7056,
653,
33,
7036,
16,
... |
""" Clear the variable named var. """ if self._expect is None: return try: self._expect.sendline('kill(%s);'%var) self._expect.expect(self._prompt) except: pass | """ Clear the variable named var. """ if self._expect is None: return try: self._expect.sendline('kill(%s);\n'%var) except: pass | def clear(self, var): """ Clear the variable named var. """ if self._expect is None: return try: self._expect.sendline('kill(%s);'%var) self._expect.expect(self._prompt) except: # program around weirdness in pexpect pass | 7a785e82129ba948a133cce321c736aa3b04c0b4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7a785e82129ba948a133cce321c736aa3b04c0b4/maxima.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
12,
2890,
16,
569,
4672,
3536,
10121,
326,
2190,
4141,
569,
18,
3536,
309,
365,
6315,
12339,
353,
599,
30,
327,
775,
30,
365,
6315,
12339,
18,
4661,
1369,
2668,
16418,
9275,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
12,
2890,
16,
569,
4672,
3536,
10121,
326,
2190,
4141,
569,
18,
3536,
309,
365,
6315,
12339,
353,
599,
30,
327,
775,
30,
365,
6315,
12339,
18,
4661,
1369,
2668,
16418,
9275,
87,
... |
path = os.path.join(self._root_dir, self.relpath) if not os.path.isdir(path): raise gclient_utils.Error('Directory %s is not present.' % path) command = ['svn', 'diff', '-x', '--ignore-eol-style'] command.extend(args) filterer = DiffFilterer(self.relpath, options.stdout) gclient_utils.CheckCallAndFilter(command, cwd=path, always=False, print_stdout=False, filter_fn=filterer.Filter, | if not os.path.isdir(self.checkout_path): raise gclient_utils.Error('Directory %s is not present.' % self.checkout_path) gclient_utils.CheckCallAndFilter( ['svn', 'diff', '-x', '--ignore-eol-style'] + args, cwd=self.checkout_path, print_stdout=False, filter_fn=DiffFilterer(self.relpath, options.stdout).Filter, | def pack(self, options, args, file_list): """Generates a patch file which can be applied to the root of the repository.""" path = os.path.join(self._root_dir, self.relpath) if not os.path.isdir(path): raise gclient_utils.Error('Directory %s is not present.' % path) command = ['svn', 'diff', '-x', '--ignore-eol-style'] command.extend(args) | 338ead09dbd34566cb60d324c2eb7366229ad94e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/338ead09dbd34566cb60d324c2eb7366229ad94e/gclient_scm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
12,
2890,
16,
702,
16,
833,
16,
585,
67,
1098,
4672,
3536,
6653,
279,
4729,
585,
1492,
848,
506,
6754,
358,
326,
1365,
434,
326,
3352,
12123,
589,
273,
1140,
18,
803,
18,
5701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
12,
2890,
16,
702,
16,
833,
16,
585,
67,
1098,
4672,
3536,
6653,
279,
4729,
585,
1492,
848,
506,
6754,
358,
326,
1365,
434,
326,
3352,
12123,
589,
273,
1140,
18,
803,
18,
5701,
... |
if self.freeprob_linesegment(self.position, self.angle, self.goal, view, 0) >= self.SAFETY_THRESHOLD: | if self.freeprob_turn_line(self.position, self.angle, self.goal, view, 0) >= self.SAFETY_THRESHOLD: | def getpath(self, view, max_size): start = Arty.Node(self.position, self.angle, parent = None, time = 0, freeprob = 1) if self.freeprob_linesegment(self.position, self.angle, self.goal, view, 0) >= self.SAFETY_THRESHOLD: return [self.position, self.goal] #direct path | fdd2ced64168da470e82e0cf3e055e27706a564a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9407/fdd2ced64168da470e82e0cf3e055e27706a564a/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
803,
12,
2890,
16,
1476,
16,
943,
67,
1467,
4672,
787,
273,
1201,
4098,
18,
907,
12,
2890,
18,
3276,
16,
365,
18,
4341,
16,
982,
273,
599,
16,
813,
273,
374,
16,
4843,
7748,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
803,
12,
2890,
16,
1476,
16,
943,
67,
1467,
4672,
787,
273,
1201,
4098,
18,
907,
12,
2890,
18,
3276,
16,
365,
18,
4341,
16,
982,
273,
599,
16,
813,
273,
374,
16,
4843,
7748,
2... |
def shared_library_filename (libname): | def shared_library_filename (self, libname): | def shared_library_filename (libname): """Return the shared library filename corresponding to the specified library name.""" pass | 26e48ea7df9681c7a138388241ae6cb000d215b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/26e48ea7df9681c7a138388241ae6cb000d215b0/ccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5116,
67,
12083,
67,
3459,
261,
2890,
16,
2561,
529,
4672,
3536,
990,
326,
5116,
5313,
1544,
4656,
358,
326,
1269,
5313,
508,
12123,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5116,
67,
12083,
67,
3459,
261,
2890,
16,
2561,
529,
4672,
3536,
990,
326,
5116,
5313,
1544,
4656,
358,
326,
1269,
5313,
508,
12123,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
\begin{enumerate} \item Brent-Kung composition should also get $O(n^2)$ I think (?) \item Apparently the same paper where Brent/Kung give their | (1) Brent-Kung composition should also get O(n^2) I think (?) (2) Apparently the same paper where Brent/Kung give their | def exp(self, prec = infinity): r""" Returns exp of this power series to the indicated precision. | 0c96eb02e071f5846596c353978e1e2460db622c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/0c96eb02e071f5846596c353978e1e2460db622c/power_series_ring_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1329,
12,
2890,
16,
13382,
273,
27272,
4672,
436,
8395,
2860,
1329,
434,
333,
7212,
4166,
358,
326,
17710,
6039,
18,
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,
1329,
12,
2890,
16,
13382,
273,
27272,
4672,
436,
8395,
2860,
1329,
434,
333,
7212,
4166,
358,
326,
17710,
6039,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cmd = "INSERT INTO `%s` ( %s ) " % ", ".join( sqlFields ) | cmd = "INSERT INTO `%s` ( %s ) " % ( typeName, ", ".join( sqlFields ) ) | def __insertBucket( self, typeName, startTime, bucketLength, keyValues, bucketValues, proportion, connObj = False ): """ Insert a bucket when coming from the raw insert """ sqlFields = [ '`startTime`', '`bucketLength`', '`entriesInBucket`' ] sqlValues = [ startTime, bucketLength, "(%s*%s)" % ( bucketValues[-1], proportion )] for keyPos in range( len( self.dbCatalog[ typeName ][ 'keys' ] ) ): sqlFields.append( "`%s`" % self.dbCatalog[ typeName ][ 'keys' ][ keyPos ] ) sqlValues.append( keyValues[ keyPos ] ) for valPos in range( len( self.dbCatalog[ typeName ][ 'values' ] ) ): sqlFields.append( "`%s`" % self.dbCatalog[ typeName ][ 'values' ][ valPos ] ) sqlValues.append( "(%s*%s)" % ( bucketValues[ valPos ], proportion ) ) cmd = "INSERT INTO `%s` ( %s ) " % ", ".join( sqlFields ) cmd += "VALUES ( %s )" % ", ".join( [ str( val ) for val in sqlValues ] ) return self._update( cmd, conn = connObj ) | d93c92ec82fcb0172aacba03c8856af9cfc313da /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/d93c92ec82fcb0172aacba03c8856af9cfc313da/AccountingDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
6387,
4103,
12,
365,
16,
8173,
16,
8657,
16,
2783,
1782,
16,
498,
1972,
16,
2783,
1972,
16,
23279,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
8040,
279,
2783,
1347,
19283,
628,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6387,
4103,
12,
365,
16,
8173,
16,
8657,
16,
2783,
1782,
16,
498,
1972,
16,
2783,
1972,
16,
23279,
16,
1487,
2675,
273,
1083,
262,
30,
3536,
8040,
279,
2783,
1347,
19283,
628,
32... |
EXAMPLES: | EXAMPLES:: | def __reduce__(self): r""" Implement __reduce__ for TestAppendNonlist. Note that the loads(dumps(...)) test only fetches the append method once. | de4cee906ed150c2753937bd5bc2aa883eeb3987 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/de4cee906ed150c2753937bd5bc2aa883eeb3987/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12498,
972,
12,
2890,
4672,
436,
8395,
10886,
1001,
12498,
972,
364,
7766,
5736,
3989,
1098,
18,
225,
3609,
716,
326,
6277,
12,
13302,
1121,
5825,
3719,
1842,
1338,
17675,
326,
714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12498,
972,
12,
2890,
4672,
436,
8395,
10886,
1001,
12498,
972,
364,
7766,
5736,
3989,
1098,
18,
225,
3609,
716,
326,
6277,
12,
13302,
1121,
5825,
3719,
1842,
1338,
17675,
326,
714,
... |
for a in atom[2:]: response += self._processAtom(a, sessionID) | for e in elem[2:]: response += self._processElement(e, sessionID) | def _processAtom(self,atom, sessionID): # The first element of the 'atom' list is a # string describing the type of the atom (== the name of # the XML tag). The second element is a dictionary # containing attributes passed to the XML tag. Any # remaining elements are atom-specific, and should be # treated as additional atoms. try: handlerFunc = self._atomProcessors[atom[0]] except: # Oops -- there's no handler function for this atom # type! if self._verboseMode: print "No handler found for atom", atom[0] # Process the unknown atom's contents and return them unaltered. response = "" for a in atom[2:]: response += self._processAtom(a, sessionID) return response return handlerFunc(atom, sessionID) | cdb5ca51cf362e7f41cc166060e200bc84fcb1e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6428/cdb5ca51cf362e7f41cc166060e200bc84fcb1e8/Kernel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2567,
3641,
12,
2890,
16,
7466,
16,
13737,
4672,
468,
1021,
1122,
930,
434,
326,
296,
7466,
11,
666,
353,
279,
468,
533,
16868,
326,
618,
434,
326,
3179,
261,
631,
326,
508,
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,
389,
2567,
3641,
12,
2890,
16,
7466,
16,
13737,
4672,
468,
1021,
1122,
930,
434,
326,
296,
7466,
11,
666,
353,
279,
468,
533,
16868,
326,
618,
434,
326,
3179,
261,
631,
326,
508,
434,
... |
"/usr/local/bin/gnucap"): | "/usr/local/bin/gnucap", wingnucap): | def start(self): | 712088d0003c9f34241e32e9fc653c82b72742d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/712088d0003c9f34241e32e9fc653c82b72742d6/electric.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
trace(3, depth, "feasible PENDING_REMOVE remove alternative (csw=%f)", (csweight), cs) | self.trace(3, "feasible PENDING_REMOVE remove alternative (csw=%f)", (csweight), cs) | def _pending(self, pending): trans = self._trans changeset = self._changeset locked = self._locked depth = self._depth if traceVerbosity<4: trace(1, depth, "_pending(pw=%f, yw=%f)", (self._pruneweight, self._yieldweight)) else: trace(4, depth, "_pending(%s, pw=%f, yw=%f)", (pending, self._pruneweight, self._yieldweight)) | b26ec53d5174d18eebf24ded272ad218fb19d0b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/b26ec53d5174d18eebf24ded272ad218fb19d0b4/transaction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9561,
12,
2890,
16,
4634,
4672,
906,
273,
365,
6315,
2338,
22463,
273,
365,
6315,
6329,
278,
8586,
273,
365,
6315,
15091,
3598,
273,
365,
6315,
5979,
309,
2606,
30594,
32,
24,
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,
9561,
12,
2890,
16,
4634,
4672,
906,
273,
365,
6315,
2338,
22463,
273,
365,
6315,
6329,
278,
8586,
273,
365,
6315,
15091,
3598,
273,
365,
6315,
5979,
309,
2606,
30594,
32,
24,
30,
... |
VectorArg(dtype, "dest%d" % i) | VectorArg(dtype, "dest%d" % i) | def get_take_put_kernel(dtype, idx_dtype, with_offsets, vec_count=1): ctx = { "idx_tp": dtype_to_ctype(idx_dtype), "tp": dtype_to_ctype(dtype), "tex_tp": dtype_to_ctype(dtype, with_fp_tex_hack=True), } args = [ VectorArg(idx_dtype, "gmem_dest_idx"), VectorArg(idx_dtype, "gmem_src_idx"), ] + [ VectorArg(dtype, "dest%d" % i) for i in range(vec_count) ] + [ ScalarArg(idx_dtype, "offset%d" % i) for i in range(vec_count) if with_offsets ] + [ScalarArg(numpy.intp, "n")] preamble = "#include <pycuda-helpers.hpp>\n\n" + "\n".join( "texture <%s, 1, cudaReadModeElementType> tex_src%d;" % (ctx["tex_tp"], i) for i in range(vec_count)) if with_offsets: def get_copy_insn(i): return ("dest%d[dest_idx] = " "fp_tex1Dfetch(tex_src%d, src_idx+offset%d);" % (i, i, i)) else: def get_copy_insn(i): return ("dest%d[dest_idx] = " "fp_tex1Dfetch(tex_src%d, src_idx);" % (i, i)) body = (("%(idx_tp)s src_idx = gmem_src_idx[i];\n" "%(idx_tp)s dest_idx = gmem_dest_idx[i];\n" % ctx) + "\n".join(get_copy_insn(i) for i in range(vec_count))) mod = get_elwise_module(args, body, "take_put", preamble=preamble) func = mod.get_function("take_put") tex_src = [mod.get_texref("tex_src%d" % i) for i in range(vec_count)] func.prepare( "PP"+(vec_count*"P") +(bool(with_offsets)*vec_count*idx_dtype.char) +numpy.dtype(numpy.uintp).char, (1,1,1), texrefs=tex_src) return func, tex_src | 2034b081c720026cdb97d74afd308e6c459a1bcf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12870/2034b081c720026cdb97d74afd308e6c459a1bcf/elementwise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
22188,
67,
458,
67,
8111,
12,
8972,
16,
2067,
67,
8972,
16,
598,
67,
16542,
16,
7062,
67,
1883,
33,
21,
4672,
1103,
273,
288,
315,
3465,
67,
6834,
6877,
3182,
67,
869,
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,
336,
67,
22188,
67,
458,
67,
8111,
12,
8972,
16,
2067,
67,
8972,
16,
598,
67,
16542,
16,
7062,
67,
1883,
33,
21,
4672,
1103,
273,
288,
315,
3465,
67,
6834,
6877,
3182,
67,
869,
67,
... |
icon = pardir_button.render_icon(gtk.STOCK_DIRECTORY, gtk.ICON_SIZE_MENU) | icon = self.xml.get_widget('home_button').render_icon(gtk.STOCK_DIRECTORY, gtk.ICON_SIZE_MENU) | def refresh_file_list(self): pardir_button = self.xml.get_widget('pardir_button') pardir_button.set_sensitive( self.cur_dir != '/' ) self.file_list.clear() previous_focus_dir = None previous_backup = None show_hidden_files = client.get_bool("/apps/flyback/show_hidden_files") sort_dirs_first = client.get_bool("/apps/flyback/sort_dirs_first") if self.selected_backup: focus_dir = self.backup.parent_backup_dir +'/'+ self.selected_backup.strftime(BACKUP_DIR_DATE_FORMAT) + self.cur_dir i = self.available_backups.index(self.selected_backup) if i<len(self.available_backups)-1: previous_backup = self.available_backups[i+1] previous_focus_dir = self.backup.parent_backup_dir +'/'+ previous_backup.strftime(BACKUP_DIR_DATE_FORMAT) + self.cur_dir else: if self.available_backups: previous_backup = self.available_backups[0] previous_focus_dir = self.backup.parent_backup_dir +'/'+ previous_backup.strftime(BACKUP_DIR_DATE_FORMAT) + self.cur_dir focus_dir = self.cur_dir | 408ec534cfcf906c0fb5810733f5cccfa33cea0c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/317/408ec534cfcf906c0fb5810733f5cccfa33cea0c/flyback.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
67,
768,
67,
1098,
12,
2890,
4672,
779,
1214,
67,
5391,
273,
365,
18,
2902,
18,
588,
67,
6587,
2668,
84,
1060,
481,
67,
5391,
6134,
779,
1214,
67,
5391,
18,
542,
67,
23481,
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,
4460,
67,
768,
67,
1098,
12,
2890,
4672,
779,
1214,
67,
5391,
273,
365,
18,
2902,
18,
588,
67,
6587,
2668,
84,
1060,
481,
67,
5391,
6134,
779,
1214,
67,
5391,
18,
542,
67,
23481,
12,... |
except ValueError: | except ValueError: | def generate_keywords(textfile, dictfile): """ A method that generates a sorted list of keywords of a document (textfile) based on a simple thesaurus (dictfile). """ keylist = [] keyws = [] wordlista = os.popen("more " + dictfile) thesaurus = [x[:-1] for x in wordlista.readlines()] for keyword in thesaurus: try: string.atoi(keyword) except ValueError: dummy = 1 else: continue if len(keyword)<=1: #whitespace or one char - get rid of continue else: dictOUT = os.popen('grep -iwc "' +keyword.strip()+'" '+textfile).read() try: occur = int(dictOUT) if occur != 0: keylist.append([occur, keyword]) except ValueError: continue keylist.sort() keylist.reverse() for item in keylist: keyws.append(item[1]) return keyws | 51b00741e6c5b261ab31933afe7f55c507e00f94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2594/51b00741e6c5b261ab31933afe7f55c507e00f94/bibclassifylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
11771,
12,
955,
768,
16,
2065,
768,
4672,
3536,
432,
707,
716,
6026,
279,
3115,
666,
434,
7093,
434,
279,
1668,
261,
955,
768,
13,
2511,
603,
279,
4143,
286,
281,
28659,
407,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
11771,
12,
955,
768,
16,
2065,
768,
4672,
3536,
432,
707,
716,
6026,
279,
3115,
666,
434,
7093,
434,
279,
1668,
261,
955,
768,
13,
2511,
603,
279,
4143,
286,
281,
28659,
407,... |
if not contact_id: | if not contact: | def onchange_contact_id(self, cr, uid, ids, contact_id): data ={} if not contact_id: return data obj_addr=self.pool.get('res.partner.address').browse(cr, uid, contact_id) data['email_from'] = obj_addr.email | 0950bacc7dc49c68a2af5495c90616869db012de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/0950bacc7dc49c68a2af5495c90616869db012de/event.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3427,
67,
8994,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5388,
67,
350,
4672,
501,
273,
2916,
309,
486,
5388,
30,
327,
501,
1081,
67,
4793,
33,
2890,
18,
6011,
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,
603,
3427,
67,
8994,
67,
350,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
5388,
67,
350,
4672,
501,
273,
2916,
309,
486,
5388,
30,
327,
501,
1081,
67,
4793,
33,
2890,
18,
6011,
18,
... |
"\"%s\"" % self.datafile_dir + self.package)) | repr(os.path.join(self.datafile_dir, self.package)))) | def update_pathconfig(self): # Write the new location to the pathconfig.py file. pathconfig = os.path.join(self.build_lib, self.package, 'pathconfig.py') if self.datafile_dir is None: # Make sure that we have installed the data files self.run_command('install_data') # Get the location of the installed data try: data_file = open(os.path.join(self.build_base, self.package + '_data_base'), 'r') self.datafile_dir = data_file.read() finally: data_file.close() try: path_file = open(pathconfig, 'r') pathconfig_str = path_file.read() finally: path_file.close() try: path_file = open(pathconfig, 'w') path_file.write(pathconfig_str.replace('os.path.dirname(__file__)', "\"%s\"" % self.datafile_dir + self.package)) finally: path_file.close() | 34b1a3adba2e190303f2c0ae1082a16006d881db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/34b1a3adba2e190303f2c0ae1082a16006d881db/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
803,
1425,
12,
2890,
4672,
468,
2598,
326,
394,
2117,
358,
326,
589,
1425,
18,
2074,
585,
18,
589,
1425,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3510,
67,
2941,
16,
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,
1089,
67,
803,
1425,
12,
2890,
4672,
468,
2598,
326,
394,
2117,
358,
326,
589,
1425,
18,
2074,
585,
18,
589,
1425,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3510,
67,
2941,
16,
365... |
} | }, | # def CheckSomething(pkg_data, error_mgr, logger, messenger): | 368cb637a4344adea821c3bdf936482945119cf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3137/368cb637a4344adea821c3bdf936482945119cf6/package_checks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
1652,
2073,
24332,
12,
10657,
67,
892,
16,
555,
67,
13552,
16,
1194,
16,
31086,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
468,
1652,
2073,
24332,
12,
10657,
67,
892,
16,
555,
67,
13552,
16,
1194,
16,
31086,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
import copy_reg, _abcoll, io | import copy_reg, _abcoll, _pyio | def dash_R(the_module, test, indirect_test, huntrleaks): """Run a test multiple times, looking for reference leaks. Returns: False if the test didn't leak references; True if we detected refleaks. """ # This code is hackish and inelegant, but it seems to do the job. import copy_reg, _abcoll, io if not hasattr(sys, 'gettotalrefcount'): raise Exception("Tracking reference leaks requires a debug build " "of Python") # Save current values for dash_R_cleanup() to restore. fs = warnings.filters[:] ps = copy_reg.dispatch_table.copy() pic = sys.path_importer_cache.copy() abcs = {} modules = _abcoll, io for abc in [getattr(mod, a) for mod in modules for a in mod.__all__]: # XXX isinstance(abc, ABCMeta) leads to infinite recursion if not hasattr(abc, '_abc_registry'): continue for obj in abc.__subclasses__() + [abc]: abcs[obj] = obj._abc_registry.copy() if indirect_test: def run_the_test(): indirect_test() else: def run_the_test(): reload(the_module) deltas = [] nwarmup, ntracked, fname = huntrleaks repcount = nwarmup + ntracked print >> sys.stderr, "beginning", repcount, "repetitions" print >> sys.stderr, ("1234567890"*(repcount//10 + 1))[:repcount] dash_R_cleanup(fs, ps, pic, abcs) for i in range(repcount): rc = sys.gettotalrefcount() run_the_test() sys.stderr.write('.') dash_R_cleanup(fs, ps, pic, abcs) if i >= nwarmup: deltas.append(sys.gettotalrefcount() - rc - 2) print >> sys.stderr if any(deltas): msg = '%s leaked %s references, sum=%s' % (test, deltas, sum(deltas)) print >> sys.stderr, msg with open(fname, "a") as refrep: print >> refrep, msg refrep.flush() return True return False | f77f9bc40145ef17df381c83955c0203662582e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/f77f9bc40145ef17df381c83955c0203662582e6/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12558,
67,
54,
12,
5787,
67,
2978,
16,
1842,
16,
16807,
67,
3813,
16,
366,
318,
313,
298,
581,
87,
4672,
3536,
1997,
279,
1842,
3229,
4124,
16,
7849,
364,
2114,
20891,
87,
18,
225,
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,
12558,
67,
54,
12,
5787,
67,
2978,
16,
1842,
16,
16807,
67,
3813,
16,
366,
318,
313,
298,
581,
87,
4672,
3536,
1997,
279,
1842,
3229,
4124,
16,
7849,
364,
2114,
20891,
87,
18,
225,
2... |
res = self.putFile(directoryFiles) | res = self.putFile( directoryFiles ) | def __putDir(self,src_directory,dest_directory): """ Black magic contained within... """ filesPut = 0 sizePut = 0 # Check the local directory exists if not os.path.isdir(src_directory): errStr = "SRM2Storage.__putDir: The supplied directory does not exist." gLogger.error(errStr,src_directory) return S_ERROR(errStr) | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
458,
1621,
12,
2890,
16,
4816,
67,
5149,
16,
10488,
67,
5149,
4672,
3536,
22467,
8146,
7542,
3470,
2777,
3536,
1390,
6426,
273,
374,
963,
6426,
273,
374,
468,
2073,
326,
1191,
1867... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
458,
1621,
12,
2890,
16,
4816,
67,
5149,
16,
10488,
67,
5149,
4672,
3536,
22467,
8146,
7542,
3470,
2777,
3536,
1390,
6426,
273,
374,
963,
6426,
273,
374,
468,
2073,
326,
1191,
1867... |
device_dicts = [dict(device_sxp[1][1:]) for device_sxp in device_sxps] | device_dicts = [dict(device_sxp[1][0:]) for device_sxp in device_sxps] | def VBD_get_runtime_properties(self, _, vbd_ref): xendom = XendDomain.instance() dominfo = xendom.get_vm_with_dev_uuid('vbd', vbd_ref) device = dominfo.get_dev_config_by_uuid('vbd', vbd_ref) | 8cdd6ebc9a313c6c47373c3c926c81666fb94ef6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/8cdd6ebc9a313c6c47373c3c926c81666fb94ef6/XendAPI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
776,
18096,
67,
588,
67,
9448,
67,
4738,
12,
2890,
16,
389,
16,
331,
16410,
67,
1734,
4672,
619,
409,
362,
273,
1139,
409,
3748,
18,
1336,
1435,
4092,
1376,
273,
619,
409,
362,
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,
776,
18096,
67,
588,
67,
9448,
67,
4738,
12,
2890,
16,
389,
16,
331,
16410,
67,
1734,
4672,
619,
409,
362,
273,
1139,
409,
3748,
18,
1336,
1435,
4092,
1376,
273,
619,
409,
362,
18,
5... |
previous_block = [] for i in xrange(len(stack)): if stack[i] in block: stack, previous_block = stack[:i], stack[i:] | for i in xrange(len(stack) - 1, -1, -1): if stack[i] in block: break stack, previous_block = stack[:i], stack[i:] | def balance(html): #import pdb #pdb.set_trace() tokens = tag_re.split(html) out = [] stack = [] for token in tokens: if not token.startswith('<'): out.append(token) continue if not token.endswith('>'): continue # invalid element = token[1:-1].split()[0].lower() if not element: continue # invalid if element.startswith('/'): element = element[1:] if element in stack: top = None while stack and top != element: top = stack.pop() out.append('</%s>' % top) continue else: continue if element in block: # close previous block if any previous_block = [] for i in xrange(len(stack)): if stack[i] in block: stack, previous_block = stack[:i], stack[i:] previous_block.reverse() for tag in previous_block: out.append('</%s>' % tag) if element in closing and not token.endswith('/>'): stack.append(element) out.append(token) # flush the stack out.extend(['</%s>' % element for element in reversed(stack)]) return ''.join(out) | 2b0ad62fe4689248b0c00a99534f9655d0d38581 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10695/2b0ad62fe4689248b0c00a99534f9655d0d38581/normalize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11013,
12,
2620,
4672,
468,
5666,
10892,
468,
17414,
18,
542,
67,
5129,
1435,
2430,
273,
1047,
67,
266,
18,
4939,
12,
2620,
13,
596,
273,
5378,
2110,
273,
5378,
364,
1147,
316,
2430,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11013,
12,
2620,
4672,
468,
5666,
10892,
468,
17414,
18,
542,
67,
5129,
1435,
2430,
273,
1047,
67,
266,
18,
4939,
12,
2620,
13,
596,
273,
5378,
2110,
273,
5378,
364,
1147,
316,
2430,
3... |
for file_id in self.list_fs_skinfiles(portal_meta, skin_id, False): | for file_id in self.list_fs_skinfiles(portal, skin_id, False): | def updateLayoutForms(self, portal, locator, skin_id, f_action, file_id): """ reload Naaya portal layout files""" report = {} portal_path = portal.absolute_url(1) portal_meta = portal.meta_type file_custom = [] for fid in file_id.split(','): file_custom.append(fid.strip()) | 0116da894b0fd06e2befe1c4b6331ce460957cbc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/0116da894b0fd06e2befe1c4b6331ce460957cbc/NaayaUpdater.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
3744,
18529,
12,
2890,
16,
11899,
16,
8871,
16,
18705,
67,
350,
16,
284,
67,
1128,
16,
585,
67,
350,
4672,
3536,
7749,
16350,
528,
69,
11899,
3511,
1390,
8395,
2605,
273,
2618,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
3744,
18529,
12,
2890,
16,
11899,
16,
8871,
16,
18705,
67,
350,
16,
284,
67,
1128,
16,
585,
67,
350,
4672,
3536,
7749,
16350,
528,
69,
11899,
3511,
1390,
8395,
2605,
273,
2618,
1... |
font_family_list = [ff.get_name() for ff in gtk.gdk.pango_context_get().list_families()] | font_family_list = [ff.get_name() for ff in gtk.gdk.pango_context_get().list_families()] | def push_prefs(): # account settings remember_password = 'true' if config.remember_password else 'false' consumer_key = config.consumer_key consumer_secret = config.consumer_secret # system settings shortcut_summon_hotot = config.shortcut_summon_hotot # display settings font_family_list = [ff.get_name() for ff in gtk.gdk.pango_context_get().list_families()] font_family_list.sort() font_family_used = config.font_family_used font_size = config.font_size use_native_input = 'true' if config.use_native_input else 'false' use_native_notify = 'true' if config.use_native_notify else 'false' # networks settings api_base = config.api_base; webv.execute_script(''' var prefs_obj = { "remember_password": %s , "consumer_key": "%s" , "consumer_secret": "%s" , "shortcut_summon_hotot": "%s" , "font_family_list": %s , "font_family_used": "%s" , "font_size": "%s" , "use_native_input": %s , "use_native_notify": %s , "api_base": "%s" }; ui.PrefsDlg.request_prefs_cb(eval(prefs_obj)); ''' % (remember_password , consumer_key, consumer_secret , shortcut_summon_hotot , font_family_list, font_family_used, font_size , use_native_input, use_native_notify , api_base)); pass | 5809ece3927e3465e8dd31b73155df07b0e0e5c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12179/5809ece3927e3465e8dd31b73155df07b0e0e5c2/agent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
67,
1484,
2556,
13332,
468,
2236,
1947,
11586,
67,
3664,
273,
296,
3767,
11,
309,
642,
18,
28155,
67,
3664,
469,
296,
5743,
11,
4765,
67,
856,
273,
642,
18,
13230,
67,
856,
4765,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1817,
67,
1484,
2556,
13332,
468,
2236,
1947,
11586,
67,
3664,
273,
296,
3767,
11,
309,
642,
18,
28155,
67,
3664,
469,
296,
5743,
11,
4765,
67,
856,
273,
642,
18,
13230,
67,
856,
4765,... |
self.gpg_import_func = _wrap_ayum_getKeyForRepo(ayum) | self.gpg_import_func = self._wrap_ayum_getKeyForRepo | def __init__(self, ayum): self.repos = {} # list of repos by repoid pointing a repo object # of repo options/misc data self.callback = None # progress callback used for populateSack() for importing the xml files self.cache = 0 self.pkgSack = MetaSack() self.logger = logging.getLogger("yum.RepoStorage") | 2c6a8434342496c21ba1b43685f102342bab0cc8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/2c6a8434342496c21ba1b43685f102342bab0cc8/repos.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
26179,
379,
4672,
365,
18,
15564,
273,
2618,
468,
666,
434,
13686,
635,
2071,
839,
17022,
279,
3538,
733,
468,
434,
3538,
702,
19,
23667,
501,
365,
18,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
26179,
379,
4672,
365,
18,
15564,
273,
2618,
468,
666,
434,
13686,
635,
2071,
839,
17022,
279,
3538,
733,
468,
434,
3538,
702,
19,
23667,
501,
365,
18,
3... |
for u in self.getPureUserNames(): | for u in map(lambda x: x.getId(), self.getPureUsers()): | def listUsersAndRoles(self,): """ listUsersAndRoles(self,) => list of tuples | 349a95cc3d754ca8884f37d7aef37803b7793cb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/349a95cc3d754ca8884f37d7aef37803b7793cb3/GroupUserFolder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
6588,
1876,
6898,
12,
2890,
16,
4672,
3536,
666,
6588,
1876,
6898,
12,
2890,
16,
13,
516,
666,
434,
10384,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
6588,
1876,
6898,
12,
2890,
16,
4672,
3536,
666,
6588,
1876,
6898,
12,
2890,
16,
13,
516,
666,
434,
10384,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Method: GetToolSeparation | def GetToolSeparation(self): """ Method: GetToolSeparation Created: 27.04.2006, KP Description: Return the width between tools """ return self.toolSeparation | e254d019e70ae28ba06fea2b44855a033523da03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2877/e254d019e70ae28ba06fea2b44855a033523da03/Toolbar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6364,
5097,
4302,
12,
2890,
4672,
3536,
12953,
30,
12732,
18,
3028,
18,
6976,
26,
16,
1475,
52,
6507,
30,
2000,
326,
1835,
3086,
8513,
3536,
327,
365,
18,
6738,
5097,
4302,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
6364,
5097,
4302,
12,
2890,
4672,
3536,
12953,
30,
12732,
18,
3028,
18,
6976,
26,
16,
1475,
52,
6507,
30,
2000,
326,
1835,
3086,
8513,
3536,
327,
365,
18,
6738,
5097,
4302,
2,
-10... | |
if component == 'complexType': | if component == 'attribute': tp = AttributeDeclaration(self) tp.fromDom(node) self.types[tp.getAttribute('name')] = tp elif component == 'attributeGroup': tp = AttributeGroupDefinition(self) tp.fromDom(node) self.types[tp.getAttribute('name')] = tp elif component == 'complexType': | def load(self, node): self.setAttributes(node) self.targetNamespace = self.getTargetNamespace() contents = self.getContents(node) | 66c6baf2288f065b45db940b63cfc5dba1aa9fb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/66c6baf2288f065b45db940b63cfc5dba1aa9fb0/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
12,
2890,
16,
756,
4672,
365,
18,
542,
2498,
12,
2159,
13,
365,
18,
3299,
3402,
273,
365,
18,
588,
2326,
3402,
1435,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
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,
1262,
12,
2890,
16,
756,
4672,
365,
18,
542,
2498,
12,
2159,
13,
365,
18,
3299,
3402,
273,
365,
18,
588,
2326,
3402,
1435,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
2,
-100,
-100,... |
], 1), (-0.500000000000000? - 0.866025403784439?*I, [(1, -0.500000000000000? - 0.866025403784439?*I, -0.500000000000000? + 0.866025403784439?*I)], 1), (-0.500000000000000? + 0.866025403784439?*I, [(1, -0.500000000000000? + 0.866025403784439?*I, -0.500000000000000? - 0.866025403784439?*I)], 1)] | ], 1), (-0.5000000000... - 0.8660254037...*I, [(1, -0.5000000000... - 0.8660254037...*I, -0.5000000000... + 0.8660254037...*I)], 1), (-0.5000000000... + 0.8660254037...*I, [(1, -0.5000000000... + 0.8660254037...*I, -0.5000000000... - 0.8660254037...*I)], 1)] | def eigenvectors(self, laplacian=False): r""" Returns the *right* eigenvectors of the adjacency matrix of the graph. | 6211a70b25dc2fec52614fee0045cc106cf2a12f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6211a70b25dc2fec52614fee0045cc106cf2a12f/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11043,
29098,
12,
2890,
16,
7125,
30538,
2779,
33,
8381,
4672,
436,
8395,
2860,
326,
380,
4083,
14,
11043,
29098,
434,
326,
25220,
3148,
434,
326,
2667,
18,
2,
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,
11043,
29098,
12,
2890,
16,
7125,
30538,
2779,
33,
8381,
4672,
436,
8395,
2860,
326,
380,
4083,
14,
11043,
29098,
434,
326,
25220,
3148,
434,
326,
2667,
18,
2,
-100,
-100,
-100,
-100,
-1... |
res = nindx | if not Ellipsis in nindx: if nested(nindx): res = [Ellipsis] + nindx else: res = [Ellipsis] + [nindx] else: res = nindx | def mapindices(self, indx): """Transform from Fortran-style one-based to C-style zero based indices. | ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/ce23e8f09f38a59b3eda64bcd0f7dcdf9fa7b8d8/farray.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
6836,
12,
2890,
16,
24732,
4672,
3536,
4059,
628,
2457,
13171,
17,
4060,
1245,
17,
12261,
358,
385,
17,
4060,
3634,
2511,
4295,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
6836,
12,
2890,
16,
24732,
4672,
3536,
4059,
628,
2457,
13171,
17,
4060,
1245,
17,
12261,
358,
385,
17,
4060,
3634,
2511,
4295,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
event.endTime = value | event.duration = value - event.startTime | def SetAttributeValue(self, item, attributeName, valueString): newValueString = valueString.replace('?','').strip() if len(newValueString) == 0: # Attempting to remove the start date field will set its value to the # "previous value" when the value is committed (removing focus or # "enter"). Attempting to remove the end-date field will set its # value to the "previous value" when the value is committed. In # brief, if the user attempts to delete the value for a start date # or end date, it automatically resets to what value was displayed # before the user tried to delete it. self.SetControlValue(self.control, self.GetAttributeValue(item, attributeName)) else: oldValue = getattr(item, attributeName, None) # Here, the ICUError covers ICU being unable to handle # the input value. ValueErrors can occur when I've seen ICU # claims to parse bogus values like "06/05/0506/05/05" #successfully, which causes fromtimestamp() to throw.) try: # use parsedatetime to calculate the date cal = parsedatetime.Calendar(ptc.Constants(str(getLocale()))) (dateVar, invalidFlag) = cal.parse(newValueString) #invalidFlag = 0 implies no date/time #invalidFlag = 2 implies only time, no date if invalidFlag != 0 and invalidFlag != 2: dateTimeValue = datetime(*dateVar[:3]) else: self._changeTextQuietly(self.control, "%s ?" % newValueString) return except (ICUError, ValueError): self._changeTextQuietly(self.control, "%s ?" % newValueString) return | 95efd79a7e378a3960223a8232a9d052cb178399 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/95efd79a7e378a3960223a8232a9d052cb178399/detail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
14942,
12,
2890,
16,
761,
16,
9734,
16,
24998,
4672,
6129,
780,
273,
24998,
18,
2079,
2668,
35,
2187,
6309,
2934,
6406,
1435,
309,
562,
12,
2704,
620,
780,
13,
422,
374,
30,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
14942,
12,
2890,
16,
761,
16,
9734,
16,
24998,
4672,
6129,
780,
273,
24998,
18,
2079,
2668,
35,
2187,
6309,
2934,
6406,
1435,
309,
562,
12,
2704,
620,
780,
13,
422,
374,
30,
468,... |
if missing and afile == bfile: | abasedir = afile[:afile.rfind('/') + 1] bbasedir = bfile[:bfile.rfind('/') + 1] if missing and abasedir == bbasedir and afile.startswith(bfile): | 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].lstrip(), path[i:].rstrip() | 81d6705f4349576eea6e211155e67beeb0be36a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/81d6705f4349576eea6e211155e67beeb0be36a4/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,
10226,
589,
18,
86,
6406,
1435,
1323,
1056,
405,
374,
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,
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,
10226,
589,
18,
86,
6406,
1435,
1323,
1056,
405,
374,
30,
... |
for p in self._edit_grp.parts: | for p in editable.parts: | def export_get_parts(self): if not self._edit_grp.group: return None | 3f644b5b69cc4224d8cdda4bb754bf492f566745 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12343/3f644b5b69cc4224d8cdda4bb754bf492f566745/rpc_handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
588,
67,
6019,
12,
2890,
4672,
309,
486,
365,
6315,
4619,
67,
17532,
18,
1655,
30,
327,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
588,
67,
6019,
12,
2890,
4672,
309,
486,
365,
6315,
4619,
67,
17532,
18,
1655,
30,
327,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for slice_attribute in map(lambda id: all_slice_attributes[id], slice['slice_attribute_ids']): if not attributes.has_key(slice_attribute['name']) or \ slice_attribute['node_id'] is not None: attributes[slice_attribute['name']] = { 'name': slice_attribute['name'], 'value': slice_attribute['value'] } | try: for slice_attribute in map(lambda id: all_slice_attributes[id], slice['slice_attribute_ids']): if not attributes.has_key(slice_attribute['name']) or \ slice_attribute['node_id'] is not None: attributes[slice_attribute['name']] = { 'name': slice_attribute['name'], 'value': slice_attribute['value'] } except: attributes={'ignored':{'name':'attributes caching','value':'not implemented yet'}} | def call(self, auth, node_filter = None): timestamp = int(time.time()) | 4f53eb0b609dbf9c654d00211bcf90f8d7914845 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/4f53eb0b609dbf9c654d00211bcf90f8d7914845/GetSlivers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
12,
2890,
16,
1357,
16,
756,
67,
2188,
273,
599,
4672,
2858,
273,
509,
12,
957,
18,
957,
10756,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
12,
2890,
16,
1357,
16,
756,
67,
2188,
273,
599,
4672,
2858,
273,
509,
12,
957,
18,
957,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if len(node[tokens[0]].keys())!=1: delete_node = None delete_key = '' elif not delete_node: delete_node = node | if len(node.keys())!=1: delete_node = node | def trim(self, word, type='', iso=''): '''Trims an entry from the tree. If type and iso are specified, only removes those isos for the given type. If only type is specified, removes every entry for the given type. If neither type nor iso are specified, removes all instances of "word" from the tree. Returns the deleted item. Returns None if no item is deleted (if iso, type, or word does not exist in tree.)''' tokens = wordpunct_tokenize(word) orig_tokens = tokens delete_node = None delete_key = '' node = self.tree # traverse the tree until we get to the end while tokens: if tokens[0] in node: if len(node[tokens[0]].keys())!=1: delete_node = None delete_key = '' elif not delete_node: delete_node = node delete_key = tokens[0] node = node[tokens[0]] tokens.pop(0) else: return None # node is at the end of the tree now if '<<END>>' not in node or (type and type not in node['<<END>>']) or (type and iso and iso not in node['<<END>>'][type]): return None else: if (type and len(node['<<END>>'].keys())>1) or (type and iso and len(node['<<END>>'][type])>1): if not iso: return node['<<END>>'].pop(type) else: node['<<END>>'][type].remove(iso) return iso else: return delete_node.pop(delete_key) | b29ad1cc2755206a07121ec4ed4190fe3c8626a4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8937/b29ad1cc2755206a07121ec4ed4190fe3c8626a4/iso639_trainer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2209,
12,
2890,
16,
2076,
16,
618,
2218,
2187,
8702,
2218,
11,
4672,
9163,
1070,
12097,
392,
1241,
628,
326,
2151,
18,
225,
971,
618,
471,
8702,
854,
1269,
16,
1338,
7157,
5348,
353,
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,
2209,
12,
2890,
16,
2076,
16,
618,
2218,
2187,
8702,
2218,
11,
4672,
9163,
1070,
12097,
392,
1241,
628,
326,
2151,
18,
225,
971,
618,
471,
8702,
854,
1269,
16,
1338,
7157,
5348,
353,
5... |
'datasetname' : SimpleItem(defvalue='', doc='Name of the DQ2 output dataset automatically filled by the job'), | 'datasetname' : SimpleItem(defvalue='', filter="checkNameConsistency", doc='Name of the DQ2 output dataset automatically filled by the job'), | def list_locations_siteindex(self,dataset=None, timeout=15, days=2, replicaList=False): | 53e61bdeb43ec0bed2475358570e9dedf01d67ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/53e61bdeb43ec0bed2475358570e9dedf01d67ae/DQ2Dataset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
12352,
67,
4256,
1615,
12,
2890,
16,
8682,
33,
7036,
16,
2021,
33,
3600,
16,
4681,
33,
22,
16,
12335,
682,
33,
8381,
4672,
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,
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,
666,
67,
12352,
67,
4256,
1615,
12,
2890,
16,
8682,
33,
7036,
16,
2021,
33,
3600,
16,
4681,
33,
22,
16,
12335,
682,
33,
8381,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
new.append("%c %s (%s -> %s)" % (kind, x.getName(), oldTVersion.asString(), newTVersion.asString())) old = [ (x[0], x.getOldVersion().trailingVersion()) | new.append(("%s (%s -> %s)" % (x.getName(), oldTVersion.asString(), newTVersion.asString()), 'N')) new.sort() new = [ "%s %s" % (x[1], x[0]) for x in new ] old = [ "%s (%s)" % (x[0], x[1].trailingRevision().asString()) | def doUpdate(cfg, pkgList, replaceFiles = False, tagScript = None, keepExisting = False, depCheck = True, depsRecurse = True, test = False, justDatabase = False, recurse = True, info = False, updateByDefault = True, callback = None): if not callback: callback = callbacks.UpdateCallback() client = conaryclient.ConaryClient(cfg) applyList = [] if type(pkgList) is str: pkgList = ( pkgList, ) for pkgStr in pkgList: if os.path.exists(pkgStr) and os.path.isfile(pkgStr): try: cs = changeset.ChangeSetFromFile(pkgStr) except BadContainer, msg: log.error("'%s' is not a valid conary changset: %s" % (pkgStr, msg)) sys.exit(1) applyList.append(cs) else: if updateByDefault or pkgStr[0] == '+': applyList.append(parseTroveSpec(pkgStr, cfg.flavor)) else: applyList.append(parseTroveSpec(pkgStr, None)) # dedup applyList = {}.fromkeys(applyList).keys() try: (cs, depFailures, suggMap, brokenByErase) = \ client.updateChangeSet(applyList, depsRecurse = depsRecurse, resolveDeps = depCheck, keepExisting = keepExisting, test = test, recurse = recurse, updateByDefault = updateByDefault, callback = callback) if brokenByErase: print "Troves being removed create unresolved dependencies:" for (troveName, depSet) in brokenByErase: print " %s:\n\t%s" % \ (troveName, "\n\t".join(str(depSet).split("\n"))) return if depFailures: print "The following dependencies could not be resolved:" for (troveName, depSet) in depFailures: print " %s:\n\t%s" % \ (troveName, "\n\t".join(str(depSet).split("\n"))) return elif (not cfg.autoResolve or brokenByErase) and suggMap: print "Additional troves are needed:" for (req, suggList) in suggMap.iteritems(): print " %s -> %s" % \ (req, " ".join(["%s(%s)" % (x[0], x[1].trailingRevision().asString()) for x in suggList])) return elif suggMap: print "Including extra troves to resolve dependencies:" print " ", items = {} for suggList in suggMap.itervalues(): # remove duplicates items.update(dict.fromkeys([(x[0], x[1]) for x in suggList])) items = items.keys() items.sort() print "%s" % (" ".join(["%s(%s)" % (x[0], x[1].trailingRevision().asString()) for x in items])) if info: return if info: new = [] for x in cs.iterNewPackageList(): oldVersion = x.getOldVersion() newVersion = x.getNewVersion() if oldVersion: oldTVersion = oldVersion.trailingRevision() else: # if there is no oldVersion, this is a new trove new.append("N %s (%s)" % (x.getName(), newVersion.trailingRevision().asString())) continue newTVersion = newVersion.trailingRevision() if oldVersion.branch() != newVersion.branch(): kind = 'B' elif oldTVersion.getVersion() != newTVersion.getVersion(): kind = 'V' elif oldTVersion.getSourceCount() != \ newTVersion.getSourceCount(): kind = 'S' else: kind = 'B' new.append("%c %s (%s -> %s)" % (kind, x.getName(), oldTVersion.asString(), newTVersion.asString())) old = [ (x[0], x.getOldVersion().trailingVersion()) for x in cs.getOldPackageList() ] if not new and not old: print "No troves are affected by this update." if new: print "Versions of the following troves will be updated:" print "\t", "\n\t".join(sorted(new)) if new and old: print "\n", if old: print "Versions of the following troves will be removed:" print "\t", "\n\t".join(sorted(old)) return client.applyUpdate(cs, replaceFiles, tagScript, keepExisting, test = test, justDatabase = justDatabase, localRollbacks = cfg.localRollbacks, callback = callback) except conaryclient.UpdateError, e: log.error(e) except repository.CommitError, e: log.error(e) | 873c506fc030a1971dc17d1ed1e96d49b4ab7339 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/873c506fc030a1971dc17d1ed1e96d49b4ab7339/updatecmd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1891,
12,
7066,
16,
3475,
682,
16,
1453,
2697,
273,
1083,
16,
1047,
3651,
273,
599,
16,
3455,
9895,
273,
1083,
16,
5993,
1564,
273,
1053,
16,
8740,
426,
17682,
273,
1053,
16,
1842... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1891,
12,
7066,
16,
3475,
682,
16,
1453,
2697,
273,
1083,
16,
1047,
3651,
273,
599,
16,
3455,
9895,
273,
1083,
16,
5993,
1564,
273,
1053,
16,
8740,
426,
17682,
273,
1053,
16,
1842... |
string='Stop membership date', type='date',store={'membership.membership_line':(_get_partner_id,['state'], 10), | string='Stop membership date', type='date',store={'account.invoice':(_get_invoice_partner,['state'], 10), 'membership.membership_line':(_get_partner_id,['state'], 10), | # def _membership_cancel_search(self, cr, uid, obj, name, args): | 07d43fcd2c9d2ea115f75623e1eae184b12f2a6d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/07d43fcd2c9d2ea115f75623e1eae184b12f2a6d/membership.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
565,
1652,
389,
19679,
67,
10996,
67,
3072,
12,
2890,
16,
4422,
16,
4555,
16,
1081,
16,
508,
16,
833,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
468,
565,
1652,
389,
19679,
67,
10996,
67,
3072,
12,
2890,
16,
4422,
16,
4555,
16,
1081,
16,
508,
16,
833,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self._ready = 1 | self._ready = 1 | def Load(self, check_version=1): if not Utils.list_exists(self.internal_name()): raise Errors.MMUnknownListError # We first try to load config.db, which contains the up-to-date # version of the database. If that fails, perhaps because it is # corrupted or missing, then we load config.db.last as a fallback. dbfile = os.path.join(self._full_path, 'config.db') lastfile = dbfile + '.last' dict, e = self.__load(dbfile) if dict is None: # Had problems with config.db. Either it's missing or it's # corrupted. Try config.db.last as a fallback. syslog('error', '%s db file was corrupt, using fallback: %s' % (self.internal_name(), lastfile)) dict, e = self.__load(lastfile) if dict is None: # config.db.last is busted too. Nothing much we can do now. syslog('error', '%s fallback was corrupt, giving up' % self.internal_name()) raise Errors.MMCorruptListDatabaseError, e # We had to read config.db.last, so copy it back to config.db. # This allows the logic in Save() to remain unchanged. Ignore # any OSError resulting from possibly illegal (but unnecessary) # chmod. try: shutil.copy(lastfile, dbfile) except OSError, e: if e.errno <> errno.EPERM: raise # Copy the unmarshaled dictionary into the attributes of the mailing # list object. self.__dict__.update(dict) | d4117e2559487604b13fa55121d903681fad00c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d4117e2559487604b13fa55121d903681fad00c3/MailList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
12,
2890,
16,
866,
67,
1589,
33,
21,
4672,
309,
486,
6091,
18,
1098,
67,
1808,
12,
2890,
18,
7236,
67,
529,
1435,
4672,
1002,
9372,
18,
8206,
4874,
682,
668,
468,
1660,
1122,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4444,
12,
2890,
16,
866,
67,
1589,
33,
21,
4672,
309,
486,
6091,
18,
1098,
67,
1808,
12,
2890,
18,
7236,
67,
529,
1435,
4672,
1002,
9372,
18,
8206,
4874,
682,
668,
468,
1660,
1122,
7... |
self.assertRaises(ValueError, bytearray, [-1]) self.assertRaises(ValueError, bytearray, [-sys.maxsize]) self.assertRaises(ValueError, bytearray, [-sys.maxsize-1]) self.assertRaises(ValueError, bytearray, [-sys.maxsize-2]) self.assertRaises(ValueError, bytearray, [-10**100]) self.assertRaises(ValueError, bytearray, [256]) self.assertRaises(ValueError, bytearray, [257]) self.assertRaises(ValueError, bytearray, [sys.maxsize]) self.assertRaises(ValueError, bytearray, [sys.maxsize+1]) self.assertRaises(ValueError, bytearray, [10**100]) def test_repr_str(self): warnings.simplefilter('ignore', BytesWarning) for f in str, repr: self.assertEqual(f(bytearray()), "bytearray(b'')") self.assertEqual(f(bytearray([0])), "bytearray(b'\\x00')") self.assertEqual(f(bytearray([0, 1, 254, 255])), "bytearray(b'\\x00\\x01\\xfe\\xff')") self.assertEqual(f(b"abc"), "b'abc'") self.assertEqual(f(b"'"), '''b"'"''') self.assertEqual(f(b"'\""), r"""b'\'"'""") | self.assertRaises(ValueError, self.type2test, [-1]) self.assertRaises(ValueError, self.type2test, [-sys.maxsize]) self.assertRaises(ValueError, self.type2test, [-sys.maxsize-1]) self.assertRaises(ValueError, self.type2test, [-sys.maxsize-2]) self.assertRaises(ValueError, self.type2test, [-10**100]) self.assertRaises(ValueError, self.type2test, [256]) self.assertRaises(ValueError, self.type2test, [257]) self.assertRaises(ValueError, self.type2test, [sys.maxsize]) self.assertRaises(ValueError, self.type2test, [sys.maxsize+1]) self.assertRaises(ValueError, self.type2test, [10**100]) | def test_constructor_value_errors(self): self.assertRaises(ValueError, bytearray, [-1]) self.assertRaises(ValueError, bytearray, [-sys.maxsize]) self.assertRaises(ValueError, bytearray, [-sys.maxsize-1]) self.assertRaises(ValueError, bytearray, [-sys.maxsize-2]) self.assertRaises(ValueError, bytearray, [-10**100]) self.assertRaises(ValueError, bytearray, [256]) self.assertRaises(ValueError, bytearray, [257]) self.assertRaises(ValueError, bytearray, [sys.maxsize]) self.assertRaises(ValueError, bytearray, [sys.maxsize+1]) self.assertRaises(ValueError, bytearray, [10**100]) | ee68bbafb3455a5d2d59063851393925977e8adc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/ee68bbafb3455a5d2d59063851393925977e8adc/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12316,
67,
1132,
67,
4324,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
23610,
16,
14552,
16,
23059,
21,
5717,
365,
18,
11231,
12649,
6141,
12,
23610,
16,
14552,
16,
23059,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12316,
67,
1132,
67,
4324,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
23610,
16,
14552,
16,
23059,
21,
5717,
365,
18,
11231,
12649,
6141,
12,
23610,
16,
14552,
16,
23059,... |
filename_textbox = layout.textbox(self.FILE_NAME_TEXT + self.data.video_path) | filename_textbox = layout.textbox(self.FILE_NAME_TEXT + utils.filenameToUnicode(self.data.video_path)) | def pack_main(self, layout): vbox = cellpack.VBox() layout.set_font(1.1, family=widgetset.ITEM_TITLE_FONT, bold=True) layout.set_text_color(self.ITEM_TITLE_COLOR) title = layout.textbox(self.data.name) # FIXME - title should wrap to the next line instead of being # truncated; ben said this might be hard/impossible if not self.show_details: vbox.pack(cellpack.ClippedTextBox(title)) else: main_width = self._calculate_main_width(layout) title.set_width(main_width) vbox.pack(title) | 312ee5fb8364de7c06ddfad1d2068b4395a5cd05 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/312ee5fb8364de7c06ddfad1d2068b4395a5cd05/style.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
67,
5254,
12,
2890,
16,
3511,
4672,
331,
2147,
273,
2484,
2920,
18,
58,
3514,
1435,
3511,
18,
542,
67,
5776,
12,
21,
18,
21,
16,
6755,
33,
6587,
542,
18,
12674,
67,
14123,
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,
2298,
67,
5254,
12,
2890,
16,
3511,
4672,
331,
2147,
273,
2484,
2920,
18,
58,
3514,
1435,
3511,
18,
542,
67,
5776,
12,
21,
18,
21,
16,
6755,
33,
6587,
542,
18,
12674,
67,
14123,
67,
... |
@test_support.cpython_only | @support.cpython_only | def test_argumentcheck(self): self.assertRaises(TypeError, self.enum) # no arguments self.assertRaises(TypeError, self.enum, 1) # wrong type (not iterable) self.assertRaises(TypeError, self.enum, 'abc', 'a') # wrong type self.assertRaises(TypeError, self.enum, 'abc', 2, 3) # too many arguments | e9d6b1b28ce5516e627f209e5d251647c1340f55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/e9d6b1b28ce5516e627f209e5d251647c1340f55/test_enumerate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
3446,
1893,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
365,
18,
7924,
13,
468,
1158,
1775,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
365,
18,
7924,
16,
404... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3446,
1893,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
365,
18,
7924,
13,
468,
1158,
1775,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
365,
18,
7924,
16,
404... |
uc_texts[uidx] = utxt uc_unformatted = uc_texts.copy() | uc_unformatted[uidx] = utxt | def loadLanguage(request, lang): """ Load text dictionary for a specific language. Note that while ISO language coded use a dash, like 'en-us', our languages files use '_' like 'en_us' because they are saved as Python source files. Raises an exception if this method is called from within itself (by the formatter). In that case, the translation file is buggy. Possible causes are having a text that is interpreted to again need a text in the same language. That means you cannot use the GetText macro in translated strings, nor any wiki markup that requires translated strings (eg. "attachment:"). """ from MoinMoin import caching cache = caching.CacheEntry(request, arena='i18n', key=lang) langfilename = os.path.join(os.path.dirname(__file__), filename(lang) + '.py') needsupdate = cache.needsUpdate(langfilename) if not needsupdate: try: (uc_texts, uc_unformatted) = pickle.loads(cache.content()) except (IOError,ValueError,pickle.UnpicklingError): # bad pickle data, no pickle needsupdate = 1 if needsupdate: from MoinMoin.util import pysupport lang_module = "MoinMoin.i18n." + filename(lang) try: # Language module without text dict will raise AttributeError texts = pysupport.importName(lang_module, "text") except ImportError: return (None, None) meta = pysupport.importName(lang_module, "meta") encoding = meta['encoding'] # convert to unicode uc_texts = {} for idx in texts: uidx = idx.decode(encoding) utxt = texts[idx].decode(encoding) uc_texts[uidx] = utxt uc_unformatted = uc_texts.copy() # is this already on wiki markup? if meta.get('wikimarkup', False): # use the wiki parser now to replace some wiki markup with html text = "" global _done_markups if not _done_markups.has_key(lang): _done_markups[lang] = 1 for key in uc_texts: text = uc_texts[key] uc_texts[key] = formatMarkup(request, text) _done_markups[lang] = 2 else: if _done_markups[lang] == 1: raise Exception("Cyclic usage detected; you cannot have translated texts include translated texts again! " "This error might also occur because of things that are interpreted wiki-like inside translated strings. " "This time the error occurred while formatting %s." % text) cache.update(pickle.dumps((uc_texts, uc_unformatted), PICKLE_PROTOCOL)) return (uc_texts, uc_unformatted) | 00a70b50a1622646cd1c53c5c934524e07f43794 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/00a70b50a1622646cd1c53c5c934524e07f43794/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
3779,
12,
2293,
16,
3303,
4672,
3536,
4444,
977,
3880,
364,
279,
2923,
2653,
18,
225,
3609,
716,
1323,
9351,
2653,
29512,
999,
279,
12558,
16,
3007,
296,
275,
17,
407,
2187,
3134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
3779,
12,
2293,
16,
3303,
4672,
3536,
4444,
977,
3880,
364,
279,
2923,
2653,
18,
225,
3609,
716,
1323,
9351,
2653,
29512,
999,
279,
12558,
16,
3007,
296,
275,
17,
407,
2187,
3134,
... |
self.fail("expected TypeError") | def test_difference_update(self): try: self.set -= self.other self.fail("expected TypeError") except TypeError: pass | 6cca754c2085e4eb203855b7d67df4a11ff0f534 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6cca754c2085e4eb203855b7d67df4a11ff0f534/test_sets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
23444,
67,
2725,
12,
2890,
4672,
775,
30,
365,
18,
542,
3947,
365,
18,
3011,
1335,
3580,
30,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
23444,
67,
2725,
12,
2890,
4672,
775,
30,
365,
18,
542,
3947,
365,
18,
3011,
1335,
3580,
30,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.updateToken(self.access_token['oauth_token'], self.access_token['oauth_token_secret']) return True except urllib2.HTTPError, e: self._handleHttpError(e) return False | self.oauth_token = self.access_token['oauth_token'] self.oauth_token_secret = self.access_token['oauth_token_secret'] return True except urllib2.HTTPError, e: raise return False def isTokenNeedRefresh(self): return time.time() > (self.last_token_update + int(self.access_token['oauth_expires_in'])) def refreshAccessToken(self): """OAuth token must be refreshed after Oauth is expired http://developer.yahoo.com/messenger/guide/ch05s05.html """ print ">refreshing OAuth" self.fetchAccessToken(refreshing=True) | def updateTokenAccess(self): """Sign all keys to get a new token and token secret, must redo after oauth_expires_in second """ headers = self.getHeaderNoCheck() req = urllib2.Request(self.oauth_server, None, headers) try: o = urllib2.urlopen(req) resp = o.read() self.access_token = dict([el.split("=") for el in resp.split("&")]) print "Access token", self.access_token self.last_token_update = time.time() self.updateToken(self.access_token['oauth_token'], self.access_token['oauth_token_secret']) return True except urllib2.HTTPError, e: self._handleHttpError(e) return False | 057b1c58037210d914f183cca7c24775558fe983 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2802/057b1c58037210d914f183cca7c24775558fe983/gtym.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1345,
1862,
12,
2890,
4672,
3536,
2766,
777,
1311,
358,
336,
279,
394,
1147,
471,
1147,
4001,
16,
1297,
24524,
1839,
6924,
67,
12431,
67,
267,
2205,
3536,
1607,
273,
365,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
1345,
1862,
12,
2890,
4672,
3536,
2766,
777,
1311,
358,
336,
279,
394,
1147,
471,
1147,
4001,
16,
1297,
24524,
1839,
6924,
67,
12431,
67,
267,
2205,
3536,
1607,
273,
365,
18,
588,
... |
[2, 3] | [2] | def supersingular_primes(self, B): """ Return a list of all supersingular primes for this elliptic curve up to and possibly including B. | 8e4a3a7366ade917d841da55a6738c08c4f76299 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8e4a3a7366ade917d841da55a6738c08c4f76299/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1169,
414,
17830,
67,
683,
4485,
12,
2890,
16,
605,
4672,
3536,
2000,
279,
666,
434,
777,
1169,
414,
17830,
846,
4485,
364,
333,
415,
549,
21507,
8882,
731,
358,
471,
10016,
6508,
605,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1169,
414,
17830,
67,
683,
4485,
12,
2890,
16,
605,
4672,
3536,
2000,
279,
666,
434,
777,
1169,
414,
17830,
846,
4485,
364,
333,
415,
549,
21507,
8882,
731,
358,
471,
10016,
6508,
605,
... |
return t + data[9] - time.timezone | return t - data[9] - time.timezone | def mktime_tz(data): """Turn a 10-tuple as returned by parsedate_tz() into a UTC timestamp. Minor glitch: this first interprets the first 8 elements as a local time and then compensates for the timezone difference; this may yield a slight error around daylight savings time switch dates. Not enough to worry about for common use. """ t = time.mktime(data[:8] + (0,)) return t + data[9] - time.timezone | 00455b77a66f78679f41e2b33955a439cb66316b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/00455b77a66f78679f41e2b33955a439cb66316b/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21977,
67,
12994,
12,
892,
4672,
3536,
15858,
279,
1728,
17,
8052,
487,
2106,
635,
1109,
712,
67,
12994,
1435,
1368,
279,
9951,
2858,
18,
225,
29007,
5118,
1437,
30,
333,
1122,
10634,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21977,
67,
12994,
12,
892,
4672,
3536,
15858,
279,
1728,
17,
8052,
487,
2106,
635,
1109,
712,
67,
12994,
1435,
1368,
279,
9951,
2858,
18,
225,
29007,
5118,
1437,
30,
333,
1122,
10634,
87... |
winUser.sendMessage(self.windowHandle,mouseHandler.WM_LBUTTONDOWN,0,0) winUser.sendMessage(self.windowHandle,mouseHandler.WM_LBUTTONUP,0,0) | sendKey(((),"SPACE")) | def doDefaultAction(self): winUser.sendMessage(self.windowHandle,mouseHandler.WM_LBUTTONDOWN,0,0) winUser.sendMessage(self.windowHandle,mouseHandler.WM_LBUTTONUP,0,0) | 2133742b7701e6fce221536e981fce1270a27fe8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/2133742b7701e6fce221536e981fce1270a27fe8/miranda32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1868,
1803,
12,
2890,
4672,
5657,
1299,
18,
4661,
1079,
12,
2890,
18,
5668,
3259,
16,
11697,
1503,
18,
25173,
67,
48,
20068,
12711,
16,
20,
16,
20,
13,
5657,
1299,
18,
4661,
1079,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1868,
1803,
12,
2890,
4672,
5657,
1299,
18,
4661,
1079,
12,
2890,
18,
5668,
3259,
16,
11697,
1503,
18,
25173,
67,
48,
20068,
12711,
16,
20,
16,
20,
13,
5657,
1299,
18,
4661,
1079,... |
print "traverse didn't find anything..." | def traverse(self, parent, itemId): print "in traverse for itemId=%s..." %repr(itemId) | ca32727cc5bb3298e217074ff838c7a9f8ab45a0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8543/ca32727cc5bb3298e217074ff838c7a9f8ab45a0/SceneGraphUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10080,
12,
2890,
16,
982,
16,
18424,
4672,
1172,
315,
267,
10080,
364,
18424,
5095,
87,
7070,
738,
12715,
12,
1726,
548,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
10080,
12,
2890,
16,
982,
16,
18424,
4672,
1172,
315,
267,
10080,
364,
18424,
5095,
87,
7070,
738,
12715,
12,
1726,
548,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
if True: gc.collect() | if False: gc.collect() | def f(): debug("starting a DebugMode call") for x in no_recycling: x[0] = None | 4c7dc69d5cd2905179c59174e90640d6857760fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/4c7dc69d5cd2905179c59174e90640d6857760fd/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
13332,
1198,
2932,
18526,
279,
4015,
2309,
745,
7923,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
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,
284,
13332,
1198,
2932,
18526,
279,
4015,
2309,
745,
7923,
364,
619,
316,
1158,
67,
266,
2431,
830,
310,
30,
619,
63,
20,
65,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.popup_msg("Unable to Delete Applet") | self.popup_msg(_("Unable to Delete Applet")) | def delete_applet(self,widget): self.active_found = False select = self.treeview_available.get_selection() if not select: return model, iterator = select.get_selected () path = model.get_value (iterator, 2) item = DesktopEntry (path) | 1dd4cdd2df8bc5b53c4886eb8af47cf699e05db1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8416/1dd4cdd2df8bc5b53c4886eb8af47cf699e05db1/awnClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
438,
1469,
12,
2890,
16,
6587,
4672,
365,
18,
3535,
67,
7015,
273,
1083,
2027,
273,
365,
18,
3413,
1945,
67,
5699,
18,
588,
67,
10705,
1435,
309,
486,
2027,
30,
327,
938,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
438,
1469,
12,
2890,
16,
6587,
4672,
365,
18,
3535,
67,
7015,
273,
1083,
2027,
273,
365,
18,
3413,
1945,
67,
5699,
18,
588,
67,
10705,
1435,
309,
486,
2027,
30,
327,
938,
1... |
Roche SFF indices use base 255 not 256, meaning we see bytes in range the range 0 to 254 only. This appears to be so that byte 0xFF (character 255) can be used as a marker character to separate entries (required if the read name lengths vary). Note that since only four bytes are used for the read offset, this is limited to 255^4 bytes (nearly 4GB). If you try to use the Roche sfffile tool to combined SFF files beyound this limit, they issue a warning and ommit the index (and manifest). | Roche SFF indices use base 255 not 256, meaning we see bytes in range the range 0 to 254 only. This appears to be so that byte 0xFF (character 255) can be used as a marker character to separate entries (required if the read name lengths vary). Note that since only four bytes are used for the read offset, this is limited to 255^4 bytes (nearly 4GB). If you try to use the Roche sfffile tool to combine SFF files beyound this limit, they issue a warning and omit the index (and manifest). | def _sff_read_roche_index(handle): """Reads any existing Roche style read index provided in the SFF file (PRIVATE). Will use the handle seek/tell functions. This works on ".srt1.00" and ".mft1.00" style Roche SFF index blocks. Roche SFF indices use base 255 not 256, meaning we see bytes in range the range 0 to 254 only. This appears to be so that byte 0xFF (character 255) can be used as a marker character to separate entries (required if the read name lengths vary). Note that since only four bytes are used for the read offset, this is limited to 255^4 bytes (nearly 4GB). If you try to use the Roche sfffile tool to combined SFF files beyound this limit, they issue a warning and ommit the index (and manifest). """ number_of_reads, header_length, index_offset, index_length, xml_offset, \ xml_size, read_index_offset, read_index_size = _sff_find_roche_index(handle) #Now parse the read index... handle.seek(read_index_offset) fmt = ">5B" for read in range(number_of_reads): #TODO - Be more aware of when the index should end? data = handle.read(6) while True: more = handle.read(1) if not more: raise ValueError("Premature end of file!") data += more if more == _flag: break assert data[-1:] == _flag, data[-1:] name = _bytes_to_string(data[:-6]) off4, off3, off2, off1, off0 = struct.unpack(fmt, data[-6:-1]) offset = off0 + 255*off1 + 65025*off2 + 16581375*off3 if off4: #Could in theory be used as a fifth piece of offset information, #i.e. offset =+ 4228250625L*off4, but testing the Roche tools this #is not the case. They simple don't support such large indexes. raise ValueError("Expected a null terminator to the read name.") yield name, offset if handle.tell() != read_index_offset + read_index_size: raise ValueError("Problem with index length? %i vs %i" \ % (handle.tell(), read_index_offset + read_index_size)) | 4040dad7f324a63db999db2c69ffb595e0887f8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/4040dad7f324a63db999db2c69ffb595e0887f8e/SffIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
1403,
67,
896,
67,
303,
18706,
67,
1615,
12,
4110,
4672,
3536,
7483,
1281,
2062,
534,
9842,
73,
2154,
855,
770,
2112,
316,
326,
348,
2246,
585,
261,
20055,
2934,
225,
9980,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
87,
1403,
67,
896,
67,
303,
18706,
67,
1615,
12,
4110,
4672,
3536,
7483,
1281,
2062,
534,
9842,
73,
2154,
855,
770,
2112,
316,
326,
348,
2246,
585,
261,
20055,
2934,
225,
9980,
99... |
def executeRequest(self): | def executeRequest( self ): | def executeRequest(self): ################################################ # Get a request from request DB res = self.RequestDBClient.getRequest('register') if not res['OK']: gLogger.info("RegistrationAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("RegistrationAgent.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("RegistrationAgent.execute: Obtained request %s" % requestName) | 991ec8b0394b656ec2c67f7fb0b500c383f8babd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/991ec8b0394b656ec2c67f7fb0b500c383f8babd/RegistrationAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
691,
12,
365,
262,
30,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
400,
273,
365,
18,
691,
2290,
1227,
18,
588,
691,
2668,
4861,
6134,
309,
486,
400,
3292,
3141,
354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
365,
262,
30,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
400,
273,
365,
18,
691,
2290,
1227,
18,
588,
691,
2668,
4861,
6134,
309,
486,
400,
3292,
3141,
354... |
return ring.is_FiniteField(x.parent()) | return isinstance(x, element.Element) and ring.is_FiniteField(x.parent()) | def is_FiniteFieldElement(x): return ring.is_FiniteField(x.parent()) | 3182f6dbb48d369f7071adfa983e37daaf48fcc7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/3182f6dbb48d369f7071adfa983e37daaf48fcc7/finite_field_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
26491,
974,
1046,
12,
92,
4672,
327,
1549,
12,
92,
16,
930,
18,
1046,
13,
471,
9221,
18,
291,
67,
26491,
974,
12,
92,
18,
2938,
10756,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
26491,
974,
1046,
12,
92,
4672,
327,
1549,
12,
92,
16,
930,
18,
1046,
13,
471,
9221,
18,
291,
67,
26491,
974,
12,
92,
18,
2938,
10756,
225,
2,
-100,
-100,
-100,
-100,
-100,
... |
def changeDirectory(self,directory): | def changeDirectory( self, directory ): | def changeDirectory(self,directory): """ Change the directory to the supplied directory """ if directory[0] == '/': directory = directory.lstrip('/') self.cwd = '%s/%s' % (self.cwd,directory) | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
2853,
12,
365,
16,
1867,
262,
30,
3536,
7576,
326,
1867,
358,
326,
4580,
1867,
3536,
309,
1867,
63,
20,
65,
422,
2023,
30,
1867,
273,
1867,
18,
80,
6406,
2668,
2473,
13,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
2853,
12,
365,
16,
1867,
262,
30,
3536,
7576,
326,
1867,
358,
326,
4580,
1867,
3536,
309,
1867,
63,
20,
65,
422,
2023,
30,
1867,
273,
1867,
18,
80,
6406,
2668,
2473,
13,
365,
1... |
s = dumps(buffer, 1) | s = dumps(buffer, protocol=2) | def receive(source, buffer=None, vanilla=False, tag=default_tag, return_status=False, bypass=False): """receive - blocking MPI receive Receive data from source. Optional parameters: buffer: Use specified buffer for received data (faster). Default None. vanilla: Specify to enforce vanilla protocol for any type. Default False tag: Only received messages tagged as specified. Default default_tag return_status: Return Status object along with result. Default False. If no buffer is specified, receive will try to receive a preceding message containing protocol, type, size and shape and then create a suitable buffer. If buffer is specified the corresponding send must specify use_buffer = True. The variable buffer can be any (picklable) type, but numpy variables and text strings will most efficient. Appropriate protocol will be automatically determined and corresponding receive function called. If bypass is True, all admin and error checks get bypassed to reduce the latency. Should only be used for receiving numpy arrays and should be matched with a bypass in the corresponding send command. Also buffer must be specified. """ if bypass: #errmsg = 'bypass mode must be used with specified buffer' #assert buffer is not None, msg stat = receive_array(buffer, source, tag) else: import types #Input check errmsg = 'Source id (%s) must be an integer.' %source assert type(source) == types.IntType, errmsg errmsg = 'Tag %d is reserved by pypar - please use another.' %control_tag assert tag != control_tag, errmsg #Either receive or create metadata about object to receive if buffer is None: protocol, typecode, size, shape = receive_control_info(source) else: protocol, typecode, size, shape = create_control_info(buffer, vanilla) #Receive payload data if protocol == 'array': if buffer is None: buffer = zeros(size,typecode) buffer = reshape(buffer, shape) stat = receive_array(buffer, source, tag) elif protocol == 'string': if buffer is None: buffer = ' '*size stat = receive_string(buffer, source, tag) elif protocol == 'vanilla': from cPickle import dumps, loads if buffer is None: s = ' '*size else: s = dumps(buffer, 1) s = s + ' '*int(0.1*len(s)) #safety stat = receive_string(s, source, tag) buffer = loads(s) #Replace buffer with received result else: raise 'Unknown protocol: %s' %protocol # Return received data and possibly the status object if return_status: return buffer, Status(stat) else: return buffer | c8e75bf14a9b913a4eac81be2568ec6b3933c4f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9158/c8e75bf14a9b913a4eac81be2568ec6b3933c4f0/pypar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6798,
12,
3168,
16,
1613,
33,
7036,
16,
331,
26476,
33,
8381,
16,
1047,
33,
1886,
67,
2692,
16,
327,
67,
2327,
33,
8381,
16,
17587,
33,
8381,
4672,
3536,
18149,
300,
9445,
490,
1102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6798,
12,
3168,
16,
1613,
33,
7036,
16,
331,
26476,
33,
8381,
16,
1047,
33,
1886,
67,
2692,
16,
327,
67,
2327,
33,
8381,
16,
17587,
33,
8381,
4672,
3536,
18149,
300,
9445,
490,
1102,
... |
ctg_line_obj.create(cr, uid,{ 'ctg_type_id':ctg_type_ids[0], 'rewarded_user_id':uid, 'date_ctg': new_date, 'points':invoice.amount_untaxed}) | if invoice.user_id: ctg_line_obj.create(cr, uid,{ 'ctg_type_id':ctg_type_ids[0], 'rewarded_user_id':invoice.user_id.id, 'date_ctg': new_date, 'points':invoice.amount_untaxed}) | def action_move_create(self, cr, uid, ids, *args): result = super(account_invoice,self).action_move_create(cr, uid, ids, args) ctg_line_obj = self.pool.get('ctg.line') ctg_type_obj = self.pool.get('ctg.type') ctg_type_ids = ctg_type_obj.search(cr,uid,[('code','=','sales')]) new_date = datetime.date.today() + datetime.timedelta(days=2) for invoice in self.browse(cr,uid,ids): if len(ctg_type_ids): ctg_line_obj.create(cr, uid,{ 'ctg_type_id':ctg_type_ids[0], 'rewarded_user_id':uid, 'date_ctg': new_date, 'points':invoice.amount_untaxed}) return result | 5040646dabb1bc4fc95b781fa3c37936482409f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/5040646dabb1bc4fc95b781fa3c37936482409f8/user_ctg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
563,
273,
2240,
12,
4631,
67,
16119,
16,
2890,
2934,
1128,
67,
8501,
67,
2640,
12,
3353,
16,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
8501,
67,
2640,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
380,
1968,
4672,
563,
273,
2240,
12,
4631,
67,
16119,
16,
2890,
2934,
1128,
67,
8501,
67,
2640,
12,
3353,
16,
45... |
titleWithSection = titleWithSection.replace('_', ' ') | def get(self, force = False, get_redirect=False, throttle = True, sysop = False): """The wiki-text of the page. This will retrieve the page if it has not been retrieved yet. This can raise the following exceptions that should be caught by the calling code: | 5bad4ba25a594144bf359054541156ff335a499e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/5bad4ba25a594144bf359054541156ff335a499e/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
2944,
273,
1083,
16,
336,
67,
7590,
33,
8381,
16,
18304,
273,
1053,
16,
2589,
556,
273,
1083,
4672,
3536,
1986,
9050,
17,
955,
434,
326,
1363,
18,
1220,
903,
4614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16,
2944,
273,
1083,
16,
336,
67,
7590,
33,
8381,
16,
18304,
273,
1053,
16,
2589,
556,
273,
1083,
4672,
3536,
1986,
9050,
17,
955,
434,
326,
1363,
18,
1220,
903,
4614,
... | |
Log.FatalError("Could not begin backup due to\n%s" % exc) | Log.FatalError("Could not begin restore due to\n%s" % exc) | def Restore(src_rp, dest_rp, restore_as_of = None): """Main restoring function Here src_rp should be the source file (either an increment or mirror file), dest_rp should be the target rp to be written. """ if not restore_root_set and not restore_set_root(src_rp): Log.FatalError("Could not find rdiff-backup repository at " + src_rp.path) restore_check_paths(src_rp, dest_rp, restore_as_of) try: dest_rp.conn.fs_abilities.restore_set_globals(dest_rp) except (OSError, IOError), exc: print "\n" Log.FatalError("Could not begin backup due to\n%s" % exc) init_user_group_mapping(dest_rp.conn) src_rp = restore_init_quoting(src_rp) restore_check_backup_dir(restore_root, src_rp, restore_as_of) inc_rpath = Globals.rbdir.append_path('increments', restore_index) if restore_as_of: try: time = Time.genstrtotime(restore_timestr, rp = inc_rpath) except Time.TimeException, exc: Log.FatalError(str(exc)) else: time = src_rp.getinctime() restore_set_select(restore_root, dest_rp) restore_start_log(src_rp, dest_rp, time) restore.Restore(restore_root.new_index(restore_index), inc_rpath, dest_rp, time) Log("Restore finished", 4) | a275c8d62e731337965eebb0cd5d4e6e032ddb87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6202/a275c8d62e731337965eebb0cd5d4e6e032ddb87/Main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11197,
12,
4816,
67,
13832,
16,
1570,
67,
13832,
16,
5217,
67,
345,
67,
792,
273,
599,
4672,
3536,
6376,
3127,
6053,
445,
225,
13743,
1705,
67,
13832,
1410,
506,
326,
1084,
585,
261,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11197,
12,
4816,
67,
13832,
16,
1570,
67,
13832,
16,
5217,
67,
345,
67,
792,
273,
599,
4672,
3536,
6376,
3127,
6053,
445,
225,
13743,
1705,
67,
13832,
1410,
506,
326,
1084,
585,
261,
7... |
def CollectTranslatedStrings(): | def CollectTranslatedStrings(branding): | def CollectTranslatedStrings(): """Collects all the translations for all the strings specified by kStringIds. Returns a list of tuples of (string_id, language, translated string). The list is sorted by language codes.""" kGeneratedResourcesPath = os.path.join(path_utils.ScriptDir(), '..', '..', '..', 'app/google_chrome_strings.grd') kTranslationDirectory = os.path.join(path_utils.ScriptDir(), '..', '..', '..', 'app', 'resources') kTranslationFiles = glob.glob(os.path.join(kTranslationDirectory, 'google_chrome_strings*.xtb')) # Get the strings out of generated_resources.grd. dom = minidom.parse(kGeneratedResourcesPath) # message_nodes is a list of message dom nodes corresponding to the string # ids we care about. We want to make sure that this list is in the same # order as kStringIds so we can associate them together. message_nodes = [] all_message_nodes = dom.getElementsByTagName('message') for string_id in kStringIds: message_nodes.append([x for x in all_message_nodes if x.getAttribute('name') == string_id][0]) message_texts = [node.firstChild.nodeValue.strip() for node in message_nodes] # The fingerprint of the string is the message ID in the translation files # (xtb files). translation_ids = [str(FP.FingerPrint(text)) for text in message_texts] # Manually put _EN_US in the list of translated strings because it doesn't # have a .xtb file. translated_strings = [] for string_id, message_text in zip(kStringIds, message_texts): translated_strings.append(TranslationStruct(string_id + '_EN_US', 'EN_US', message_text)) # Gather the translated strings from the .xtb files. If an .xtb file doesn't # have the string we want, use the en-US string. for xtb_filename in kTranslationFiles: dom = minidom.parse(xtb_filename) language = dom.documentElement.getAttribute('lang') language = language.replace('-', '_').upper() translation_nodes = {} for translation_node in dom.getElementsByTagName('translation'): translation_id = translation_node.getAttribute('id') if translation_id in translation_ids: translation_nodes[translation_id] = (translation_node.firstChild .nodeValue .strip()) for i, string_id in enumerate(kStringIds): translated_string = translation_nodes.get(translation_ids[i], message_texts[i]) translated_strings.append(TranslationStruct(string_id + '_' + language, language, translated_string)) translated_strings.sort() return translated_strings | d55a76d023d7e2813170f7d04b554611861749ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/d55a76d023d7e2813170f7d04b554611861749ab/create_string_rc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9302,
20421,
7957,
12,
20523,
310,
4672,
3536,
28791,
777,
326,
7863,
364,
777,
326,
2064,
1269,
635,
417,
780,
2673,
18,
2860,
279,
666,
434,
10384,
434,
261,
1080,
67,
350,
16,
2653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9302,
20421,
7957,
12,
20523,
310,
4672,
3536,
28791,
777,
326,
7863,
364,
777,
326,
2064,
1269,
635,
417,
780,
2673,
18,
2860,
279,
666,
434,
10384,
434,
261,
1080,
67,
350,
16,
2653,
... |
wanted = (None, 'plone-developers@lists.sourceforge.net') | wanted = (None, 'aclark@aclark.net') | def test_pypi_certified_owner(self): # testing the real server # XXX this is not optimal try: contacts = _pypi_certified_owner('Products.PloneSoftwareCenter') except gaierror: pass else: wanted = (None, 'plone-developers@lists.sourceforge.net') self.assertEquals(contacts, wanted) | 140559aed598887545fc17b831296c34493623d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12516/140559aed598887545fc17b831296c34493623d4/test_migration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22680,
77,
67,
7593,
939,
67,
8443,
12,
2890,
4672,
468,
7769,
326,
2863,
1438,
468,
11329,
333,
353,
486,
16413,
775,
30,
14841,
273,
389,
22680,
77,
67,
7593,
939,
67,
8443... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22680,
77,
67,
7593,
939,
67,
8443,
12,
2890,
4672,
468,
7769,
326,
2863,
1438,
468,
11329,
333,
353,
486,
16413,
775,
30,
14841,
273,
389,
22680,
77,
67,
7593,
939,
67,
8443... |
print lines | def do_export(self, subcmd, opts, *args): """${cmd_name}: export the mirror list as text file | 64b09dbdd94d9517541c9e525fe2c8e19a6ad235 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3890/64b09dbdd94d9517541c9e525fe2c8e19a6ad235/mirrordoctor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
6530,
12,
2890,
16,
720,
4172,
16,
1500,
16,
380,
1968,
4672,
3536,
18498,
4172,
67,
529,
6713,
3359,
326,
15593,
666,
487,
977,
585,
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,
0,
0,
0,
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,
6530,
12,
2890,
16,
720,
4172,
16,
1500,
16,
380,
1968,
4672,
3536,
18498,
4172,
67,
529,
6713,
3359,
326,
15593,
666,
487,
977,
585,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
logging.error('%s could not be fetched from %s', pkg_name, | logging.debug('%s could not be fetched from %s', pkg_name, | def fetch_pkg(self, pkg_name, dest_path, repo_url=None, use_checksum=False): ''' Fetch the package into dest_dir from repo_url. By default repo_url is None and the package is looked in all the repostories specified. Otherwise it fetches it from the specific repo_url. pkg_name : name of the package (ex: test-sleeptest.tar.bz2, dep-gcc.tar.bz2, kernel.1-1.rpm) repo_url : the URL of the repository where the package is located. dest_path : complete path of where the package will be fetched to. use_checksum : This is set to False to fetch the packages.checksum file so that the checksum comparison is bypassed for the checksum file itself. This is used internally by the packaging system. It should be ignored by externals callers of this method who use it fetch custom packages. ''' | 71ca8169db872122ca890b9145542fa38fae224c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/71ca8169db872122ca890b9145542fa38fae224c/base_packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
10657,
12,
2890,
16,
3475,
67,
529,
16,
1570,
67,
803,
16,
3538,
67,
718,
33,
7036,
16,
999,
67,
15149,
33,
8381,
4672,
9163,
8065,
326,
2181,
1368,
1570,
67,
1214,
628,
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,
2158,
67,
10657,
12,
2890,
16,
3475,
67,
529,
16,
1570,
67,
803,
16,
3538,
67,
718,
33,
7036,
16,
999,
67,
15149,
33,
8381,
4672,
9163,
8065,
326,
2181,
1368,
1570,
67,
1214,
628,
35... |
expectedchecksum = 'b45b79f3203ee1a896d9b5655484adaff5d4964b' | expectedchecksum = '4e389f97e9f88b8b7ab743121fd643089116f9f2' | def tearDown(self): del self.db | d004fc810af3e1985686e616763e14a1b0aa60c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d004fc810af3e1985686e616763e14a1b0aa60c1/test_unicodedata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
1464,
365,
18,
1966,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
1464,
365,
18,
1966,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
assert False | if self.parser.elementInScope(name, True): self.endTagTr() self.parser.processEndTag(name) else: self.parser.parseError() | def endTagTableRowGroup(self, name): # XXX assert False | c4afc3f815c4f847b4cf9f0cdfe5a72631a4360c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/c4afc3f815c4f847b4cf9f0cdfe5a72631a4360c/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
30650,
1114,
12,
2890,
16,
508,
4672,
468,
11329,
1815,
1083,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
30650,
1114,
12,
2890,
16,
508,
4672,
468,
11329,
1815,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
succ = tokens[m+1] | succ = m.succ | def check_oneliners(tokens, lines, warnings): "Check for if, else, statements on the same line." for i, t in enumerate(tokens): if t.typ != Token.ident: continue if t.string == 'else': succ = tokens[i+1] if succ.typ == Token.punct and succ.string == '{': succ = tokens[i+2] if succ.line > t.line: continue if succ.typ == Token.ident and succ.string == 'if': continue w = 'Statement for `%s\' on the same line (col %d): %s' warnings.append((succ.line, w % (t.string, succ.col, lines[succ.line]))) continue if t.string in ('for', 'while', 'if'): # catch do-while if t.string == 'while': prec = tokens[i-1] if prec.typ == Token.punct and prec.string == '}': prec = tokens[prec.matching-1] if prec.typ == Token.ident and prec.string == 'do': continue succ = tokens[i+1] assert succ.typ == Token.punct and succ.string == '(' m = succ.matching succ = tokens[m+1] if succ.typ == Token.punct and succ.string == '{': succ = tokens[m+2] if succ.line > tokens[m].line: continue w = 'Statement for `%s\' on the same line (col %d): %s' warnings.append((succ.line, w % (t.string, succ.col, lines[succ.line]))) continue | ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6171/ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f/check-coding-style.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
265,
292,
267,
414,
12,
7860,
16,
2362,
16,
5599,
4672,
315,
1564,
364,
309,
16,
469,
16,
6317,
603,
326,
1967,
980,
1199,
364,
277,
16,
268,
316,
4241,
12,
7860,
4672,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
265,
292,
267,
414,
12,
7860,
16,
2362,
16,
5599,
4672,
315,
1564,
364,
309,
16,
469,
16,
6317,
603,
326,
1967,
980,
1199,
364,
277,
16,
268,
316,
4241,
12,
7860,
4672,
309,... |
"""String representation of the file.""" | """ String representation of the file. """ | def __str__(self): """String representation of the file.""" ret = [] entries = [self.metadata_as_entry()] + \ [e for e in self if not e.obsolete] for entry in entries: ret.append(entry.__str__(self.wrapwidth)) for entry in self.obsolete_entries(): ret.append(entry.__str__(self.wrapwidth)) return '\n'.join(ret) | 9d732105697624731ed08ef764908b70660f97db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9d732105697624731ed08ef764908b70660f97db/polib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
3536,
514,
4335,
434,
326,
585,
18,
3536,
325,
273,
5378,
3222,
273,
306,
2890,
18,
4165,
67,
345,
67,
4099,
1435,
65,
397,
521,
306,
73,
364,
425,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
701,
972,
12,
2890,
4672,
3536,
514,
4335,
434,
326,
585,
18,
3536,
325,
273,
5378,
3222,
273,
306,
2890,
18,
4165,
67,
345,
67,
4099,
1435,
65,
397,
521,
306,
73,
364,
425,
31... |
elif R._cartan_type.is_reducible(): | elif R._cartan_type.is_compound(): | def rule(x): return [x[0]-x[3],x[1]-x[2]] | d966043ff3afe5f44a733aa354323210394501b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d966043ff3afe5f44a733aa354323210394501b7/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1720,
12,
92,
4672,
327,
306,
92,
63,
20,
65,
17,
92,
63,
23,
6487,
92,
63,
21,
65,
17,
92,
63,
22,
13563,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1720,
12,
92,
4672,
327,
306,
92,
63,
20,
65,
17,
92,
63,
23,
6487,
92,
63,
21,
65,
17,
92,
63,
22,
13563,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
source_files, module_dirs,temp_dir) | source_files, module_dirs, temp_dir) | def f77_compile(self,source_files,module_dirs=None, temp_dir=''): switches = string.join((self.f77_switches, self.f77_opt)) return self.f_compile(self.f77_compiler,switches, source_files, module_dirs,temp_dir) | 23a6b0f2ab7d745b5416615c56d4c0f240886c44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/23a6b0f2ab7d745b5416615c56d4c0f240886c44/build_flib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
4700,
67,
11100,
12,
2890,
16,
3168,
67,
2354,
16,
2978,
67,
8291,
33,
7036,
16,
1906,
67,
1214,
2218,
11,
4672,
28216,
273,
533,
18,
5701,
12443,
2890,
18,
74,
4700,
67,
9610,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
4700,
67,
11100,
12,
2890,
16,
3168,
67,
2354,
16,
2978,
67,
8291,
33,
7036,
16,
1906,
67,
1214,
2218,
11,
4672,
28216,
273,
533,
18,
5701,
12443,
2890,
18,
74,
4700,
67,
9610,
... |
self._inv.disconnect(code, timeout=0.5) | self._inv.disconnect(code) | def _do_end(self, code): self._change_state("TERMINATING") self.notification_center.post_notification("SIPSessionWillEnd", self, TimestampedNotificationData()) if self._inv.state != "DISCONNECTING": try: self._inv.disconnect(code, timeout=0.5) except SIPCoreError: self._change_state("TERMINATED") self.notification_center.post_notification("SIPSessionDidEnd", self, TimestampedNotificationData(originator="local")) | b5d03bce27305dbc64072ed0efb2f53f48ec7bac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/b5d03bce27305dbc64072ed0efb2f53f48ec7bac/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
409,
12,
2890,
16,
981,
4672,
365,
6315,
3427,
67,
2019,
2932,
29516,
28054,
7923,
365,
18,
9927,
67,
5693,
18,
2767,
67,
9927,
2932,
17739,
2157,
13670,
1638,
3113,
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,
389,
2896,
67,
409,
12,
2890,
16,
981,
4672,
365,
6315,
3427,
67,
2019,
2932,
29516,
28054,
7923,
365,
18,
9927,
67,
5693,
18,
2767,
67,
9927,
2932,
17739,
2157,
13670,
1638,
3113,
365,
... |
"Use a search view instead if you simply want to make the field searchable." % (self._table, k, f._type) logger.notifyChannel('schema', netsvc.LOG_WARNING, msg) | "Use a search view instead if you simply want to make the field searchable." self.__schema.warn(msg, self._table, k, f._type) | f_pg_def = res[0] | 2601e23d09b38f3de363ad11deafc4840b5020b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/2601e23d09b38f3de363ad11deafc4840b5020b5/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
284,
67,
8365,
67,
536,
273,
400,
63,
20,
65,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
284,
67,
8365,
67,
536,
273,
400,
63,
20,
65,
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,... |
statesSet=obj.states | stateSet=obj.states oldStateSet=obj._oldStates positiveStateSet=stateSet oldPositiveStateSet=oldStateSet negativeStateSet=set() oldNegativeStateSet=set() if not role: roleNum=obj.role | def speakObjectProperties(obj,groupName=False,name=False,role=False,states=False,value=False,description=False,keyboardShortcut=False,positionString=False,level=False,contains=False,reason=REASON_QUERY): global beenCanceled if speechMode==speechMode_off: return elif speechMode==speechMode_beeps: tones.beep(config.conf["speech"]["beepSpeechModePitch"],speechMode_beeps_ms) return beenCanceled=False textList=[] if groupName: groupNameText=obj.groupName if isinstance(groupNameText,basestring) and len(groupNameText)>0 and not groupNameText.isspace(): textList.append(groupNameText) if name: nameText=obj.name if isinstance(nameText,basestring) and len(nameText)>0 and not nameText.isspace(): textList.append(nameText) if role: roleNum=obj.role if isinstance(roleNum,int) and (reason!=REASON_FOCUS or roleNum not in silentRolesOnFocus): textList.append(controlTypes.speechRoleLabels[roleNum]) if states: statesSet=obj.states if reason==REASON_CHANGE: statesSet=statesSet-obj._oldStates roleNum=obj.role if isinstance(statesSet,frozenset): textList.extend([controlTypes.speechStateLabels[state] for state in statesSet if reason!=REASON_FOCUS or state not in silentPositiveStatesOnFocus.get(roleNum,frozenset())]) if spokenNegativeStates.has_key(roleNum): textList.extend([_("not %s")%controlTypes.speechStateLabels[state] for state in (spokenNegativeStates[roleNum]-statesSet)]) if value: valueText=obj.value if isinstance(valueText,basestring) and len(valueText)>0 and not valueText.isspace(): textList.append(valueText) if description: descriptionText=obj.description if not name: nameText=obj.name if descriptionText!=nameText and isinstance(descriptionText,basestring) and len(descriptionText)>0 and not descriptionText.isspace(): textList.append(descriptionText) if keyboardShortcut: keyboardShortcutText=obj.keyboardShortcut if isinstance(keyboardShortcutText,basestring) and len(keyboardShortcutText)>0 and not keyboardShortcutText.isspace(): textList.append(keyboardShortcutText) if positionString: positionStringText=obj.positionString if isinstance(positionStringText,basestring) and len(positionStringText)>0 and not positionStringText.isspace(): textList.append(positionStringText) if level: levelNum=obj.level if isinstance(levelNum,int): textList.append(_("level %d")%levelNum) if contains: containsText=obj.contains if isinstance(containsText,basestring) and len(containsText)>0 and not containsText.isspace(): textList.append(_("contains %s")%containsText) text=" ".join(textList) if not text.isspace(): text=processText(text) getSynth().speakText(text) | fd63ba00c9342c4ae8260019fcb6f41c394a9afb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/fd63ba00c9342c4ae8260019fcb6f41c394a9afb/speech.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
10244,
921,
2297,
12,
2603,
16,
1655,
461,
33,
8381,
16,
529,
33,
8381,
16,
4615,
33,
8381,
16,
7992,
33,
8381,
16,
1132,
33,
8381,
16,
3384,
33,
8381,
16,
31486,
15576,
33,
838... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
10244,
921,
2297,
12,
2603,
16,
1655,
461,
33,
8381,
16,
529,
33,
8381,
16,
4615,
33,
8381,
16,
7992,
33,
8381,
16,
1132,
33,
8381,
16,
3384,
33,
8381,
16,
31486,
15576,
33,
838... |
XML-RPC requests are dispatched to the _dispatch method, which may be overriden by subclasses. The default implementation attempts to dispatch XML-RPC calls to the functions or instance installed in the server. | def export_add(self, x, y): return x + y | d69663d3009b6718ed3fa27dec800d15c7d4babb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d69663d3009b6718ed3fa27dec800d15c7d4babb/SimpleXMLRPCServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
1289,
12,
2890,
16,
619,
16,
677,
4672,
327,
619,
397,
677,
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,
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,
3359,
67,
1289,
12,
2890,
16,
619,
16,
677,
4672,
327,
619,
397,
677,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
R = PolynomialRing(self.base_ring(), 2, 'x,y') | R, (y,x) = PolynomialRing(self.base_ring(), 2, 'y,x', order='revlex').objgens() if use_divpoly and m % 2 == 1: return R(self.division_polynomial(m)) | def full_division_polynomial(self, m): """ Return the m-th bivariate division polynomial in x and y. | 927f9ed0bbbe55a368188fa3a82765b3f37320bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/927f9ed0bbbe55a368188fa3a82765b3f37320bb/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1983,
67,
2892,
1951,
67,
3915,
13602,
12,
2890,
16,
312,
4672,
3536,
2000,
326,
312,
17,
451,
324,
27693,
16536,
16991,
316,
619,
471,
677,
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,
0,
0,
0,
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,
1983,
67,
2892,
1951,
67,
3915,
13602,
12,
2890,
16,
312,
4672,
3536,
2000,
326,
312,
17,
451,
324,
27693,
16536,
16991,
316,
619,
471,
677,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
'summary':pobj.summary(1000), | 'summary':self.toencoded(pobj.summary(1000)), | def pages_rss(self, num=10, REQUEST=None): """ Provide an RSS feed showing this wiki's recently created pages. """ pages = self.pages(sort_on='creation_time', sort_order='reverse', sort_limit=num, isBoring=0) if len(pages) > 0: last_mod = pages[0].getObject().creationTime() else: last_mod = DateTime() if self.handle_modified_headers(last_mod=last_mod, REQUEST=REQUEST): return '' feedtitle = self.folder().title_or_id() + ' new pages' feeddescription = feedtitle feedlanguage = 'en' feeddate = self.folder().bobobase_modification_time().rfc822() wikiurl = self.wikiUrl() REQUEST.RESPONSE.setHeader('Content-Type','text/xml; charset=utf-8') t = """\ | 9518d8429c527129cd9670689ed51cd6798d16eb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5225/9518d8429c527129cd9670689ed51cd6798d16eb/RSS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4689,
67,
25151,
12,
2890,
16,
818,
33,
2163,
16,
12492,
33,
7036,
4672,
3536,
26569,
392,
31481,
4746,
17253,
333,
9050,
1807,
19907,
2522,
4689,
18,
3536,
4689,
273,
365,
18,
7267,
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,
4689,
67,
25151,
12,
2890,
16,
818,
33,
2163,
16,
12492,
33,
7036,
4672,
3536,
26569,
392,
31481,
4746,
17253,
333,
9050,
1807,
19907,
2522,
4689,
18,
3536,
4689,
273,
365,
18,
7267,
12,... |
jobs.append(('comic2lrf', args, desc, 'LRF', db.id(row), [pt, of])) | jobs.append(('comic2lrf', args, desc, 'LRF', row_id, [pt, of])) | def convert_bulk_lrf(parent, db, comics, others): if others: d = LRFBulkDialog(parent) if d.exec_() != QDialog.Accepted: others = [] if comics: comic_opts = ComicConf.get_bulk_conversion_options(parent) if not comic_opts: comics = [] bad_rows = [] jobs = [] total = sum(map(len, (others, comics))) if total == 0: return parent.status_bar.showMessage(_('Starting Bulk conversion of %d books')%total, 2000) for i, row in enumerate(others+comics): if row in others: cmdline = list(d.cmdline) mi = db.get_metadata(row) if mi.title: cmdline.extend(['--title', mi.title]) if mi.authors: cmdline.extend(['--author', ','.join(mi.authors)]) if mi.publisher: cmdline.extend(['--publisher', mi.publisher]) if mi.comments: cmdline.extend(['--comment', mi.comments]) data = None for fmt in LRF_PREFERRED_SOURCE_FORMATS: try: data = db.format(row, fmt.upper()) if data is not None: break except: continue if data is None: bad_rows.append(row) continue pt = PersistentTemporaryFile('.'+fmt.lower()) pt.write(data) pt.close() of = PersistentTemporaryFile('.lrf') of.close() cover = db.cover(row) cf = None if cover: cf = PersistentTemporaryFile('.jpeg') cf.write(cover) cf.close() cmdline.extend(['--cover', cf.name]) cmdline.extend(['-o', of.name]) cmdline.append(pt.name) desc = _('Convert book %d of %d (%s)')%(i+1, total, repr(mi.title)) temp_files = [cf] if cf is not None else [] temp_files.extend([pt, of]) jobs.append(('any2lrf', [cmdline], desc, 'LRF', db.id(row), temp_files)) else: options = comic_opts.copy() mi = db.get_metadata(row) if mi.title: options.title = mi.title if mi.authors: options.author = ','.join(mi.authors) data = None for fmt in ['cbz', 'cbr']: try: data = db.format(row, fmt.upper()) if data is not None: break except: continue pt = PersistentTemporaryFile('.'+fmt.lower()) pt.write(data) pt.close() of = PersistentTemporaryFile('.lrf') of.close() setattr(options, 'output', of.name) options.verbose = 1 args = [pt.name, options] desc = _('Convert book %d of %d (%s)')%(i+1, total, repr(mi.title)) jobs.append(('comic2lrf', args, desc, 'LRF', db.id(row), [pt, of])) if bad_rows: res = [] for row in bad_rows: title = db.title(row) res.append('<li>%s</li>'%title) msg = _('<p>Could not convert %d of %d books, because no suitable source format was found.<ul>%s</ul>')%(len(res), total, '\n'.join(res)) warning_dialog(parent, _('Could not convert some books'), msg).exec_() return jobs, False | 4b6f8abf707d1b069ccf561cdf54f705fedca33c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/4b6f8abf707d1b069ccf561cdf54f705fedca33c/tools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
14597,
67,
80,
5809,
12,
2938,
16,
1319,
16,
532,
2102,
16,
10654,
4672,
309,
10654,
30,
302,
273,
511,
12918,
13112,
6353,
12,
2938,
13,
309,
302,
18,
4177,
67,
1435,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
14597,
67,
80,
5809,
12,
2938,
16,
1319,
16,
532,
2102,
16,
10654,
4672,
309,
10654,
30,
302,
273,
511,
12918,
13112,
6353,
12,
2938,
13,
309,
302,
18,
4177,
67,
1435,
480,
... |
else: | else: | def findTargetIndex(self, accuracy, funct): top = 0; bottom = len(self.results) | b9e52e096e6043bf925f92bc9842c2a83b088af5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/b9e52e096e6043bf925f92bc9842c2a83b088af5/orngVizRank.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
2326,
1016,
12,
2890,
16,
15343,
16,
12882,
4672,
1760,
273,
374,
31,
5469,
273,
562,
12,
2890,
18,
4717,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
2326,
1016,
12,
2890,
16,
15343,
16,
12882,
4672,
1760,
273,
374,
31,
5469,
273,
562,
12,
2890,
18,
4717,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.slided = 1 | def SetMinValue(self, value): try: value = value.data except AttributeError: pass self.GradientPanel.SetMinValue(value) self.slided = 1 self.SpinMin.SetValue(int(value)) self.slided = 0 self.GradientPanel.Refresh() | 31332c87dbf00a78a907531efd800cfeac6327c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/31332c87dbf00a78a907531efd800cfeac6327c6/gradient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
2930,
620,
12,
2890,
16,
460,
4672,
775,
30,
460,
273,
460,
18,
892,
1335,
6394,
30,
1342,
365,
18,
15651,
5537,
18,
694,
2930,
620,
12,
1132,
13,
365,
18,
3389,
267,
2930,
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,
1000,
2930,
620,
12,
2890,
16,
460,
4672,
775,
30,
460,
273,
460,
18,
892,
1335,
6394,
30,
1342,
365,
18,
15651,
5537,
18,
694,
2930,
620,
12,
1132,
13,
365,
18,
3389,
267,
2930,
18,... | |
filtered_tags = self.filterDbTags(self.db.all_tags()) | self.genre_tags_dict = self.filterDbTags(self.db.all_tags()) | def generateHTMLByTags(self): # Generate individual HTML files for each tag, e.g. Fiction, Nonfiction ... # Note that special tags - ~+*[] - have already been filtered from books[] | e067ad567aaad3c1ee62338310fadaee7dd82612 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/e067ad567aaad3c1ee62338310fadaee7dd82612/catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
4870,
858,
3453,
12,
2890,
4672,
468,
6654,
7327,
3982,
1390,
364,
1517,
1047,
16,
425,
18,
75,
18,
478,
2228,
16,
3858,
74,
2228,
1372,
468,
3609,
716,
4582,
2342,
300,
4871,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
4870,
858,
3453,
12,
2890,
4672,
468,
6654,
7327,
3982,
1390,
364,
1517,
1047,
16,
425,
18,
75,
18,
478,
2228,
16,
3858,
74,
2228,
1372,
468,
3609,
716,
4582,
2342,
300,
4871,
15... |
r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) | r = excuse_unsat_deps(p, None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if not r: add_nuninst(p[0], arch) | f99591531307e117e7d3c77bbf14fdac98e05933 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f99591531307e117e7d3c77bbf14fdac98e05933/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
82,
318,
8591,
12,
10657,
16,
6637,
4672,
309,
3475,
486,
316,
290,
318,
8591,
63,
991,
14542,
290,
318,
8591,
63,
991,
8009,
6923,
12,
10657,
13,
364,
293,
316,
4158,
5646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
82,
318,
8591,
12,
10657,
16,
6637,
4672,
309,
3475,
486,
316,
290,
318,
8591,
63,
991,
14542,
290,
318,
8591,
63,
991,
8009,
6923,
12,
10657,
13,
364,
293,
316,
4158,
5646,
... |
cache.set(CACHE_REVISION_KEY, random(), timeout=86400) | cache.set(cls.CACHE_REVISION_KEY, random(), timeout=86400) | def reset_cache_revision(cls): cache.set(CACHE_REVISION_KEY, random(), timeout=86400) | 779cc9f5a4539b69ff3c5c6e815088c43eb3cf1e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/779cc9f5a4539b69ff3c5c6e815088c43eb3cf1e/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
67,
2493,
67,
13057,
12,
6429,
4672,
1247,
18,
542,
12,
8495,
67,
862,
25216,
67,
3297,
16,
2744,
9334,
2021,
33,
28,
1105,
713,
13,
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,
2715,
67,
2493,
67,
13057,
12,
6429,
4672,
1247,
18,
542,
12,
8495,
67,
862,
25216,
67,
3297,
16,
2744,
9334,
2021,
33,
28,
1105,
713,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "block device" return "<unknown>" statemap = {rpm.RPMFILE_STATE_REPLACED : 'replaced', rpm.RPMFILE_STATE_NOTINSTALLED : 'not installed', rpm.RPMFILE_STATE_WRONGCOLOR : 'wrong color', rpm.RPMFILE_STATE_NETSHARED : 'netshared'} | def _ftype(mode): """ Given a "mode" return the name of the type of file. """ if stat.S_ISREG(mode): return "file" if stat.S_ISDIR(mode): return "directory" if stat.S_ISLNK(mode): return "symlink" if stat.S_ISFIFO(mode): return "fifo" if stat.S_ISCHR(mode): return "character device" if stat.S_ISBLK(mode): return "block device" return "<unknown>" | 1f1a9c8f653cd8cc3aa77f966051de6095bdd390 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/1f1a9c8f653cd8cc3aa77f966051de6095bdd390/packages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
74,
723,
12,
3188,
4672,
3536,
16803,
279,
315,
3188,
6,
327,
326,
508,
434,
326,
618,
434,
585,
18,
3536,
309,
610,
18,
55,
67,
5127,
5937,
12,
3188,
4672,
225,
327,
315,
768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
74,
723,
12,
3188,
4672,
3536,
16803,
279,
315,
3188,
6,
327,
326,
508,
434,
326,
618,
434,
585,
18,
3536,
309,
610,
18,
55,
67,
5127,
5937,
12,
3188,
4672,
225,
327,
315,
768,
... | |
def bp(id=None, grp=None, cfg=None, iff=True, frameCount=1): | def bp(id=None, grp=None, cfg=None, iff=True, test=None, frameCount=1): | def bp(id=None, grp=None, cfg=None, iff=True, frameCount=1): if not bpdb.enabled or not bpdb.verifyEnabled(): return bpi = bp(id=id, grp=grp, cfg=cfg, iff=iff,frameCount=frameCount+1) bpi.maybeBreak(frameCount=frameCount+1) | 3541d8d2ba2ad7bc9c6e220d903f141fed6f302d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/3541d8d2ba2ad7bc9c6e220d903f141fed6f302d/PythonUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9107,
12,
350,
33,
7036,
16,
14295,
33,
7036,
16,
2776,
33,
7036,
16,
21437,
33,
5510,
16,
1842,
33,
7036,
16,
2623,
1380,
33,
21,
4672,
309,
486,
9107,
1966,
18,
5745,
578,
486,
910... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9107,
12,
350,
33,
7036,
16,
14295,
33,
7036,
16,
2776,
33,
7036,
16,
21437,
33,
5510,
16,
1842,
33,
7036,
16,
2623,
1380,
33,
21,
4672,
309,
486,
9107,
1966,
18,
5745,
578,
486,
910... |
troveList = [x for x in self.repServer.repos.iterAllTroveNames('') if x.endswith(':source')] | troveList = [x for x in self.repServer.repos.troveStore.iterTroveNames() if x.endswith(':source')] | def metadataCmd(self, authToken, fields, troveName=None): troveList = [x for x in self.repServer.repos.iterAllTroveNames('') if x.endswith(':source')] troveList.sort() | c1a340aeca31c49c1bc4002d6ad76b509d5117c4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/c1a340aeca31c49c1bc4002d6ad76b509d5117c4/http.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1982,
5931,
12,
2890,
16,
24050,
16,
1466,
16,
23432,
537,
461,
33,
7036,
4672,
23432,
537,
682,
273,
306,
92,
364,
619,
316,
365,
18,
14462,
2081,
18,
15564,
18,
88,
303,
537,
2257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1982,
5931,
12,
2890,
16,
24050,
16,
1466,
16,
23432,
537,
461,
33,
7036,
4672,
23432,
537,
682,
273,
306,
92,
364,
619,
316,
365,
18,
14462,
2081,
18,
15564,
18,
88,
303,
537,
2257,
... |
return (target[:1], source[:1]) | return (n_target, source) | def create_distinct_builders(target, source, env): """ changes the target and source list to only include file and recursively attaching the builder to all other targets and sources still in the list. """ bld = env['BUILDERS']['CopyTo'] | faff0834984101a38b4a4d63c58811f961ac5754 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12817/faff0834984101a38b4a4d63c58811f961ac5754/filesystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
24592,
67,
3510,
414,
12,
3299,
16,
1084,
16,
1550,
4672,
3536,
3478,
326,
1018,
471,
1084,
666,
358,
1338,
2341,
585,
471,
8536,
3306,
310,
326,
2089,
358,
777,
1308,
5774,
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,
752,
67,
24592,
67,
3510,
414,
12,
3299,
16,
1084,
16,
1550,
4672,
3536,
3478,
326,
1018,
471,
1084,
666,
358,
1338,
2341,
585,
471,
8536,
3306,
310,
326,
2089,
358,
777,
1308,
5774,
4... |
all_letters = string.replace(all_letters, char, '') | all_letters = all_letters.replace(char, '') | def information_content(self, start = 0, end = None, e_freq_table = None, log_base = 2, chars_to_ignore = []): """Calculate the information content for each residue along an alignment. | db0e57e83d4c61f00fb4a96f8686aadf8ab59e3f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/db0e57e83d4c61f00fb4a96f8686aadf8ab59e3f/AlignInfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1779,
67,
1745,
12,
2890,
16,
787,
273,
374,
16,
679,
273,
599,
16,
425,
67,
10212,
67,
2121,
273,
599,
16,
613,
67,
1969,
273,
576,
16,
5230,
67,
869,
67,
6185,
273,
5378,
4672,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1779,
67,
1745,
12,
2890,
16,
787,
273,
374,
16,
679,
273,
599,
16,
425,
67,
10212,
67,
2121,
273,
599,
16,
613,
67,
1969,
273,
576,
16,
5230,
67,
869,
67,
6185,
273,
5378,
4672,
3... |
if dataLen < 3: return (None, data) | def _UnpackOneTerm(data): dataLen = len(data) if len(data) == 0: return (None, data) data0 = ord(data[0]) if data0 == MAGIC_SMALL_INTEGER: if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) return (ErlNumber(n), data[2:]) elif data0 == MAGIC_INTEGER: if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) return (ErlNumber(n), data[5:]) elif data0 == MAGIC_FLOAT: if dataLen < 32: return (None, data) floatData = data[1:32] try: nullIndex = string.index(floatData, chr(0)) floatStr = floatData[0:nullIndex] except ValueError: floatStr = floatData f = string.atof(floatStr) return (ErlNumber(f), data[32:]) elif data0 == MAGIC_ATOM: if dataLen < 3: return (None, data) atomLen = _ReadInt2(data[1:3]) if dataLen < 3 + atomLen: return (None, data) atomText = data[3:3 + atomLen] return (ErlAtom(atomText), data[3 + atomLen:]) elif data0 == MAGIC_REFERENCE: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlRef(node, id, creation), remainingData[5:]) elif data0 == MAGIC_PORT: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlPort(node, id, creation), remainingData[5:]) elif data0 == MAGIC_PID: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 9: return (None, data) id = _ReadId(remainingData[0:4], 15) serial = _ReadInt4(remainingData[4:8]) creation = _ReadCreation(remainingData[8]) return (ErlPid(node, id, serial, creation), remainingData[9:]) elif data0 == MAGIC_SMALL_TUPLE: if dataLen < 2: return (None, data) arity = _ReadInt1(data[1]) (elements, remainingData) = _UnpackTermSeq(arity, data[2:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == MAGIC_LARGE_TUPLE: if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == MAGIC_NIL: return (ErlList([]), data[1:]) elif data0 == MAGIC_STRING: if dataLen < 3: return (None, data) strlen = _ReadInt2(data[1:3]) if dataLen < 3 + strlen: return (None, data) s = data[3:3 + strlen] return (ErlString(s), data[3 + strlen:]) elif data0 == MAGIC_LIST: if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlList(elements), remainingData[1:]) # skip MAGIC_NIL elif data0 == MAGIC_BINARY: if dataLen < 5: return (None, data) binlen = _ReadInt4(data[1:5]) if dataLen < 5 + binlen: return (None, data) s = data[5:5 + binlen] return (ErlBinary(s), data[5 + binlen:]) elif data0 == MAGIC_SMALL_BIG: if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) if dataLen < 2 + 1 + n: return (None, data) sign = _ReadInt1(data[2]) bignum = 0L for i in range(n): d = _ReadInt1(data[3 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[3 + n:]) elif data0 == MAGIC_LARGE_BIG: if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) if dataLen < 5 + 1 + n: return (None, data) sign = _ReadInt1(data[5]) bignum = 0L for i in range(n): d = _ReadInt1(data[6 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[6 + n:]) elif data0 == MAGIC_NEW_CACHE: if dataLen < 4: return (None, data) index = _ReadInt1(data[1]) atomLen = _ReadInt2(data[2:4]) if dataLen < 4 + atomLen: return (None, data) atomText = data[4:4 + atomLen] return (ErlAtom(atomText, cache=index), data[4 + atomLen:]) elif data0 == MAGIC_CACHED_ATOM: if dataLen < 2: return (None, data) index = _ReadInt1(data[1]) return (ErlAtom(None, cache=index), data[2:]) elif data0 == MAGIC_NEW_REFERENCE: if dataLen < 3: return (None, data) idLen = _ReadInt2(data[1:3]) (node, remainingData) = _UnpackOneTerm(data[3:]) if node == None: return (None, data) nprim = 4 * idLen if len(remainingData) < 1 + nprim: return (None, data) creation = _ReadCreation(remainingData[0]) remainingData = remainingData[1:] id0 = _ReadId(remainingData[0:4]) ids = [id0] remainingData = remainingData[4:] for i in range(idLen-1): id = _ReadInt4(remainingData[0:4]) remainingData = remainingData[4:] ids.append(id) return (ErlRef(node, ids, creation), remainingData) elif data0 == MAGIC_FUN: if dataLen < 5: return (None, data) freevarsLen = _ReadInt4(data[1:5]) (pid, remainingData1) = _UnpackOneTerm(data[5:]) if pid == None: return (None, data) (module, remainingData2) = _UnpackOneTerm(remainingData1) if module == None: return (None, data) (index, remainingData3) = _UnpackOneTerm(remainingData2) if index == None: return (None, data) (uniq, remainingData4) = _UnpackOneTerm(remainingData3) if uniq == None: return (None, data) (freeVars, remainingData5) = _UnpackTermSeq(freevarsLen,remainingData4) if freeVars == None: return (None, data) print "MAGIC_FUN" print pid print module print index print uniq print freeVars return (ErlFun(pid, module, index, uniq, freeVars), remainingData5) else: print "Bad tag %s" % `data0` return (None, data) | cadc8319939cd691f548c4b841a357df13bff542 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/cadc8319939cd691f548c4b841a357df13bff542/erl_term.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23649,
3335,
4065,
12,
892,
4672,
501,
2891,
273,
562,
12,
892,
13,
225,
309,
562,
12,
892,
13,
422,
374,
30,
327,
261,
7036,
16,
501,
13,
225,
501,
20,
273,
4642,
12,
892,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
23649,
3335,
4065,
12,
892,
4672,
501,
2891,
273,
562,
12,
892,
13,
225,
309,
562,
12,
892,
13,
422,
374,
30,
327,
261,
7036,
16,
501,
13,
225,
501,
20,
273,
4642,
12,
892,
63... | |
def CheckChangeOnCommit(input_api, output_api): return CheckChangeOnUpload(input_api, output_api) def CheckNoCrOrTabs(input_api, output_api): """Reports an error if source files use CR (or CRLF) or TAB. """ cr_files = [] tab_files = [] results = [] for f in input_api.AffectedTextFiles(include_deletes=False): path = f.LocalPath() root, ext = os.path.splitext(path) if ext in SOURCE_FILE_EXTENSIONS: contents = _ReadFile(path) if '\r' in contents: cr_files.append(path) if '\t' in contents: tab_files.append(path) if cr_files: results.append(output_api.PresubmitError( 'Found CR (or CRLF) line ending in these files, please use only LF:', items=cr_files)) if tab_files: results.append(output_api.PresubmitError( 'Found tabs in the following files, please use spaces', items=tab_files)) return results | if __name__ == '__main__': unittest.main() | def CheckChangeOnCommit(input_api, output_api): # No extra checks on commit for now return CheckChangeOnUpload(input_api, output_api) | 678fb69daf02e450d549d100e62683d66bded4a6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/678fb69daf02e450d549d100e62683d66bded4a6/PRESUBMIT_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
3043,
1398,
5580,
12,
2630,
67,
2425,
16,
876,
67,
2425,
4672,
468,
2631,
2870,
4271,
603,
3294,
364,
2037,
327,
2073,
3043,
1398,
4777,
12,
2630,
67,
2425,
16,
876,
67,
2425,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2073,
3043,
1398,
5580,
12,
2630,
67,
2425,
16,
876,
67,
2425,
4672,
468,
2631,
2870,
4271,
603,
3294,
364,
2037,
327,
2073,
3043,
1398,
4777,
12,
2630,
67,
2425,
16,
876,
67,
2425,
13... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.