lines
listlengths
1
383
raw_lines
listlengths
1
383
label
listlengths
1
383
type
listlengths
1
383
[ "def FUNC_4(VAR_0):...\n", "VAR_0.DEBUG = True\n", "VAR_6 = Token(TokenType.TEXT,\n \"unicorn 'tests.templatetags.test_unicorn_render.FakeComponentKwargs' parent=view id='flob'\"\n )\n", "VAR_7 = unicorn(None, VAR_6)\n", "VAR_10 = CLASS_0(component_name='test', component_id='asdf')\n", "VAR_8 = {'vi...
[ "def test_unicorn_render_parent_with_id(settings):...\n", "settings.DEBUG = True\n", "token = Token(TokenType.TEXT,\n \"unicorn 'tests.templatetags.test_unicorn_render.FakeComponentKwargs' parent=view id='flob'\"\n )\n", "unicorn_node = unicorn(None, token)\n", "view = FakeComponentParent(component_na...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assert'" ]
[ "def FUNC_16(self, VAR_15, VAR_13, VAR_14):...\n", "if VAR_53.session['admin']:\n", "VAR_62 = self.useroptions.forUser(VAR_15)\n", "return 'error: not permitted. Only admins can change other users options'\n", "VAR_62.setOption(VAR_13, VAR_14)\n", "return 'success'\n" ]
[ "def api_setuseroptionfor(self, userid, optionkey, optionval):...\n", "if cherrypy.session['admin']:\n", "uo = self.useroptions.forUser(userid)\n", "return 'error: not permitted. Only admins can change other users options'\n", "uo.setOption(optionkey, optionval)\n", "return 'success'\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Expr'", "Return'" ]
[ "@csrf.ensure_csrf_cookie...\n", "return render_template('index.html', VAR_0)\n" ]
[ "@csrf.ensure_csrf_cookie...\n", "return render_template('index.html', request)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_3():...\n", "return VAR_6\n" ]
[ "def getEngine():...\n", "return _engine\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@pytest.mark.parametrize('openapi_type,python_type', [('number',...\n", "VAR_5 = VAR_1.MagicMock()\n", "VAR_26 = VAR_1.MagicMock()\n", "VAR_23 = oai.Schema.construct(type=openapi_type)\n", "VAR_30 = VAR_1.patch(f'{VAR_0}.{VAR_3}')\n", "from openapi_python_client.parser.properties import property_from_dat...
[ "@pytest.mark.parametrize('openapi_type,python_type', [('number',...\n", "name = mocker.MagicMock()\n", "required = mocker.MagicMock()\n", "data = oai.Schema.construct(type=openapi_type)\n", "clazz = mocker.patch(f'{MODULE_NAME}.{python_type}')\n", "from openapi_python_client.parser.properties import prop...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "ImportFrom'", "Assign'", "Expr'", "Assert'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_14(self):...\n", "VAR_26 = np.array([[1], [2]])\n", "VAR_27 = np.array(range(6)).reshape(2, 3)\n", "VAR_28 = os.path.join(test.get_temp_dir(), 'input0.npy')\n", "VAR_29 = os.path.join(test.get_temp_dir(), 'input1.npy')\n", "np.save(VAR_28, VAR_26)\n", "np.save(VAR_29, VAR_27)\n", "VAR_20 = '...
[ "def testInputParserNPY(self):...\n", "x0 = np.array([[1], [2]])\n", "x1 = np.array(range(6)).reshape(2, 3)\n", "input0_path = os.path.join(test.get_temp_dir(), 'input0.npy')\n", "input1_path = os.path.join(test.get_temp_dir(), 'input1.npy')\n", "np.save(input0_path, x0)\n", "np.save(input1_path, x1)\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_46():...\n", "\"\"\"docstring\"\"\"\n", "if len(request.args) != 2:\n", "session.flash = T('invalid ticket')\n", "VAR_3 = FUNC_5()\n", "redirect(URL('site'))\n", "VAR_27 = request.env.web2py_version\n", "VAR_113 = request.args[1]\n", "VAR_114 = RestrictedError()\n", "VAR_114.load(request...
[ "def ticket():...\n", "\"\"\"docstring\"\"\"\n", "if len(request.args) != 2:\n", "session.flash = T('invalid ticket')\n", "app = get_app()\n", "redirect(URL('site'))\n", "myversion = request.env.web2py_version\n", "ticket = request.args[1]\n", "e = RestrictedError()\n", "e.load(request, app, ticke...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def __str__(self) ->str:...\n", "return '-'\n" ]
[ "def __str__(self) ->str:...\n", "return '-'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@VAR_0.route('/')...\n", "\"\"\"docstring\"\"\"\n", "if flask_login.current_user.is_authenticated:\n", "VAR_1.error('User may not be logged in. Clearing cookie auth.')\n", "return clear_cookie_auth()\n", "if flask_login.current_user.landing_page == 'live':\n", "return redirect(url_for('routes_page.page...
[ "@blueprint.route('/')...\n", "\"\"\"docstring\"\"\"\n", "if flask_login.current_user.is_authenticated:\n", "logger.error('User may not be logged in. Clearing cookie auth.')\n", "return clear_cookie_auth()\n", "if flask_login.current_user.landing_page == 'live':\n", "return redirect(url_for('routes_page...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Expr'", "Return'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_20(self):...\n", "\"\"\"docstring\"\"\"\n", "self._start_loop()\n" ]
[ "def resumeProducing(self):...\n", "\"\"\"docstring\"\"\"\n", "self._start_loop()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_3(self, VAR_8):...\n", "return format_html('<p class=\"datetime\">{0} {1}<br />{2} {3}</p>', _(\n 'Date:'), VAR_8[0], _('Time:'), VAR_8[1])\n" ]
[ "def format_output(self, rendered_widgets):...\n", "return format_html('<p class=\"datetime\">{0} {1}<br />{2} {3}</p>', _(\n 'Date:'), rendered_widgets[0], _('Time:'), rendered_widgets[1])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_13, VAR_14, VAR_3=None, VAR_15=None):...\n", "self.rel = VAR_13\n", "self.admin_site = VAR_14\n", "self.db = VAR_15\n", "super(CLASS_7, self).__init__(VAR_3)\n" ]
[ "def __init__(self, rel, admin_site, attrs=None, using=None):...\n", "self.rel = rel\n", "self.admin_site = admin_site\n", "self.db = using\n", "super(ForeignKeyRawIdWidget, self).__init__(attrs)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "from mock import Mock\n", "from twisted.internet.defer import succeed\n", "from synapse.api.errors import FederationError\n", "from synapse.events import make_event_from_dict\n", "from synapse.logging.context import LoggingContext\n", "from synapse.types import UserID, create_requester\n", "from synaps...
[ "from mock import Mock\n", "from twisted.internet.defer import succeed\n", "from synapse.api.errors import FederationError\n", "from synapse.events import make_event_from_dict\n", "from synapse.logging.context import LoggingContext\n", "from synapse.types import UserID, create_requester\n", "from synaps...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign...
[ "def FUNC_2(self) ->CLASS_0:...\n", "return CLASS_0(sys.stdin.readlines(), None)\n" ]
[ "def read(self) ->InputContent:...\n", "return InputContent(sys.stdin.readlines(), None)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_22(VAR_14, VAR_16, VAR_28, VAR_19, VAR_29, VAR_30):...\n", "VAR_50 = False\n", "if VAR_19[VAR_30] == 'None':\n", "VAR_19[VAR_30] = None\n", "if VAR_28.datatype == 'bool':\n", "if VAR_19[VAR_30] != VAR_29:\n", "VAR_19[VAR_30] = 1 if VAR_19[VAR_30] == 'True' else 0\n", "if VAR_28.datatype == '...
[ "def edit_cc_data_value(book_id, book, c, to_save, cc_db_value, cc_string):...\n", "changed = False\n", "if to_save[cc_string] == 'None':\n", "to_save[cc_string] = None\n", "if c.datatype == 'bool':\n", "if to_save[cc_string] != cc_db_value:\n", "to_save[cc_string] = 1 if to_save[cc_string] == 'True' el...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", ...
[ "def FUNC_1(VAR_2, VAR_3):...\n", "VAR_21 = iter(VAR_2)\n", "yield next(VAR_21)\n", "for x in VAR_21:\n", "yield VAR_3\n", "yield x\n" ]
[ "def intersperse(iterable, delimiter):...\n", "it = iter(iterable)\n", "yield next(it)\n", "for x in it:\n", "yield delimiter\n", "yield x\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "For", "Expr'", "Expr'" ]
[ "def FUNC_64(self):...\n", "\"\"\"docstring\"\"\"\n", "return ''\n" ]
[ "def newline(self):...\n", "\"\"\"docstring\"\"\"\n", "return ''\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@login_required()...\n", "return FUNC_10(VAR_2=request, VAR_10=menu, VAR_5=conn, VAR_7=url, **kwargs)\n" ]
[ "@login_required()...\n", "return _load_template(request=request, menu=menu, conn=conn, url=url, **kwargs)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "VAR_202 = VAR_5.getScriptService()\n", "VAR_203 = VAR_202.getScripts()\n", "VAR_204 = {}\n", "VAR_205 = VAR_2.session.get('server_settings', {}).get('scripts_to_ignore', ''\n ).split(',')\n", "for s in VAR_203:\n", "VAR_42 = s.id.val\n", "def ...
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "scriptService = conn.getScriptService()\n", "scripts = scriptService.getScripts()\n", "scriptMenu = {}\n", "scripts_to_ignore = request.session.get('server_settings', {}).get(\n 'scripts_to_ignore', '').split(',')\n", "for s in scripts:\n", "scr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Return'", "Expr'", "Assign'", "Assign'", "For", "Condition"...
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "if VAR_18._instance is None:\n", "if VAR_18._instance is None:\n", "return VAR_18._instance\n", "VAR_18._instance = CLASS_3()\n" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "if cls._instance is None:\n", "if cls._instance is None:\n", "return cls._instance\n", "cls._instance = ComponentRegistry()\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Condition", "Return'", "Assign'" ]
[ "from __future__ import division, print_function, unicode_literals\n", "import os\n", "import sys\n", "import datetime\n", "import itertools\n", "import uuid\n", "from flask import session as flask_session\n", "from binascii import hexlify\n", "from flask_login import AnonymousUserMixin, current_use...
[ "from __future__ import division, print_function, unicode_literals\n", "import os\n", "import sys\n", "import datetime\n", "import itertools\n", "import uuid\n", "from flask import session as flask_session\n", "from binascii import hexlify\n", "from flask_login import AnonymousUserMixin, current_use...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "ImportFrom'", "Assign'", "ImportFrom'", "ImportFrom'", "ImportF...
[ "def FUNC_58(self):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.model.delete_doc import check_if_doc_is_linked, check_if_doc_is_dynamically_linked\n", "if not self.flags.ignore_links:\n", "check_if_doc_is_linked(self, VAR_25='Cancel')\n", "check_if_doc_is_dynamically_linked(self, VAR_25='Cancel')\n" ]
[ "def check_no_back_links_exist(self):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.model.delete_doc import check_if_doc_is_linked, check_if_doc_is_dynamically_linked\n", "if not self.flags.ignore_links:\n", "check_if_doc_is_linked(self, method='Cancel')\n", "check_if_doc_is_dynamically_linked(self, meth...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "ImportFrom'", "Condition", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_21: IAgent, VAR_8: Optional[IPSet]=None, VAR_9:...\n", "\"\"\"docstring\"\"\"\n", "self._agent = VAR_21\n", "self._ip_whitelist = VAR_8\n", "self._ip_blacklist = VAR_9\n" ]
[ "def __init__(self, agent: IAgent, ip_whitelist: Optional[IPSet]=None,...\n", "\"\"\"docstring\"\"\"\n", "self._agent = agent\n", "self._ip_whitelist = ip_whitelist\n", "self._ip_blacklist = ip_blacklist\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_29(self):...\n", "" ]
[ "def about_us(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_13():...\n", "" ]
[ "def test_launching_with_python2():...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@defer.inlineCallbacks...\n", "self.hs.config.enable_set_displayname = False\n", "yield defer.ensureDeferred(self.store.set_profile_displayname(self.frank.\n localpart, 'Frank'))\n", "self.assertEquals((yield defer.ensureDeferred(self.store.\n get_profile_displayname(self.frank.localpart))), 'Frank')\n...
[ "@defer.inlineCallbacks...\n", "self.hs.config.enable_set_displayname = False\n", "yield defer.ensureDeferred(self.store.set_profile_displayname(self.frank.\n localpart, 'Frank'))\n", "self.assertEquals((yield defer.ensureDeferred(self.store.\n get_profile_displayname(self.frank.localpart))), 'Frank')\n...
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_14(self, VAR_36, *VAR_37):...\n", "" ]
[ "def log_message(self, format, *args):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_3(self):...\n", "\"\"\"docstring\"\"\"\n", "self.load_from_db()\n" ]
[ "def reload(self):...\n", "\"\"\"docstring\"\"\"\n", "self.load_from_db()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_43(self):...\n", "self.helper.join(self.room_id, user=self.second_user_id, VAR_52=self.second_tok\n )\n", "VAR_12 = 'hello'\n", "VAR_22, VAR_23 = self.make_request('POST',\n '/_matrix/client/r0/rooms/{}/ban'.format(self.room_id), VAR_19={\n 'reason': reason, 'user_id': self.second_user_id},...
[ "def test_ban_reason(self):...\n", "self.helper.join(self.room_id, user=self.second_user_id, tok=self.second_tok)\n", "reason = 'hello'\n", "request, channel = self.make_request('POST',\n '/_matrix/client/r0/rooms/{}/ban'.format(self.room_id), content={\n 'reason': reason, 'user_id': self.second_user_id...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "VAR_167 = FUNC_52(VAR_2, VAR_39, VAR_40, VAR_8, **kwargs)\n", "if 'error' in VAR_167:\n", "return VAR_167\n", "if len(VAR_167['data']) < 1:\n", "return dict(VAR_176='Could not retrieve bulk annotations table')\n", "VAR_168 = 0\n", "VAR_169 = None...
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "a = _bulk_file_annotations(request, objtype, objid, conn, **kwargs)\n", "if 'error' in a:\n", "return a\n", "if len(a['data']) < 1:\n", "return dict(error='Could not retrieve bulk annotations table')\n", "fileId = 0\n", "ann = None\n", "annList...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Return'", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'"...
[ "@VAR_2.route('/admin/viewconfig', methods=['POST'])...\n", "VAR_16 = request.form.to_dict()\n", "FUNC_41(VAR_16, 'config_calibre_web_title')\n", "FUNC_41(VAR_16, 'config_columns_to_ignore')\n", "if FUNC_41(VAR_16, 'config_title_regex'):\n", "calibre_db.update_title_sort(config)\n", "if not FUNC_18(VAR_...
[ "@admi.route('/admin/viewconfig', methods=['POST'])...\n", "to_save = request.form.to_dict()\n", "_config_string(to_save, 'config_calibre_web_title')\n", "_config_string(to_save, 'config_columns_to_ignore')\n", "if _config_string(to_save, 'config_title_regex'):\n", "calibre_db.update_title_sort(config)\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Condition", "Return'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "AugAssign'", "Assign'", "Condition...
[ "def FUNC_3(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = '@john:test_remote'\n", "VAR_18 = '85T7JXPFBAySB/jwby4S3lBPTqY3+Zg53nYuGmu1ggY'\n", "VAR_19 = 'QeIiFEjluPBtI7WQdG365QKZcFs9kqmHir6RBD0//nQ'\n", "VAR_14 = self.homeserver.get_federation_client()\n", "VAR_14.query_user_devices = Mock(return_va...
[ "def test_cross_signing_keys_retry(self):...\n", "\"\"\"docstring\"\"\"\n", "remote_user_id = '@john:test_remote'\n", "remote_master_key = '85T7JXPFBAySB/jwby4S3lBPTqY3+Zg53nYuGmu1ggY'\n", "remote_self_signing_key = 'QeIiFEjluPBtI7WQdG365QKZcFs9kqmHir6RBD0//nQ'\n", "federation_client = self.homeserver.get...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_51(VAR_19=None, VAR_21=None):...\n", "VAR_87 = not is_gdrive_ready()\n", "VAR_88 = []\n", "if not VAR_21 and config.config_use_google_drive:\n", "VAR_21 = gdriveutils.get_error_text()\n", "if VAR_21 and gdrive_support:\n", "VAR_0.error(VAR_21)\n", "if not VAR_87 and gdrive_support:\n", "VA...
[ "def _db_configuration_result(error_flash=None, gdrive_error=None):...\n", "gdrive_authenticate = not is_gdrive_ready()\n", "gdrivefolders = []\n", "if not gdrive_error and config.config_use_google_drive:\n", "gdrive_error = gdriveutils.get_error_text()\n", "if gdrive_error and gdrive_support:\n", "log....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Return'", "Expr'" ]
[ "def FUNC_86(VAR_71):...\n", "for VAR_433 in ['Dataset', 'Image', 'Plate']:\n", "VAR_187 = VAR_71.POST.get(VAR_433, None)\n", "if VAR_187 is not None:\n", "for o in list(VAR_5.getObjects(VAR_433, VAR_187.split(','))):\n", "return o.getDetails().owner.id.val\n" ]
[ "def getObjectOwnerId(r):...\n", "for t in ['Dataset', 'Image', 'Plate']:\n", "ids = r.POST.get(t, None)\n", "if ids is not None:\n", "for o in list(conn.getObjects(t, ids.split(','))):\n", "return o.getDetails().owner.id.val\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Assign'", "Condition", "For", "Return'" ]
[ "def FUNC_25(self):...\n", "\"\"\"docstring\"\"\"\n", "if frappe.flags.in_install == 'frappe':\n", "return\n", "VAR_51 = self.meta.get_workflow()\n", "if VAR_51:\n", "FUNC_25(self)\n", "if not self._action == 'save':\n", "set_workflow_state_on_action(self, VAR_51, self._action)\n" ]
[ "def validate_workflow(self):...\n", "\"\"\"docstring\"\"\"\n", "if frappe.flags.in_install == 'frappe':\n", "return\n", "workflow = self.meta.get_workflow()\n", "if workflow:\n", "validate_workflow(self)\n", "if not self._action == 'save':\n", "set_workflow_state_on_action(self, workflow, self._act...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_9(self, VAR_0):...\n", "VAR_13 = VAR_0.patch('httpx.get')\n", "VAR_14 = VAR_0.patch('openapi_python_client.Path')\n", "VAR_15 = VAR_0.patch('yaml.safe_load')\n", "from openapi_python_client import _get_document\n", "VAR_11 = VAR_2(VAR_6=None, VAR_7=None)\n", "assert VAR_11 == GeneratorError(he...
[ "def test__get_document_no_url_or_path(self, mocker):...\n", "get = mocker.patch('httpx.get')\n", "Path = mocker.patch('openapi_python_client.Path')\n", "loads = mocker.patch('yaml.safe_load')\n", "from openapi_python_client import _get_document\n", "result = _get_document(url=None, path=None)\n", "asse...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "ImportFrom'", "Assign'", "Assert'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_163(VAR_10):...\n", "self.soap_procedures[VAR_148 or VAR_10.__name__\n ] = VAR_10, VAR_188, VAR_11, VAR_189, VAR_190\n", "return VAR_10\n" ]
[ "def _soap(f):...\n", "self.soap_procedures[name or f.__name__\n ] = f, returns, args, doc, response_element_name\n", "return f\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_28(VAR_8, VAR_60, VAR_15=None, VAR_61=None, VAR_62=None, VAR_63=...\n", "if VAR_62 is None:\n", "VAR_62 = []\n", "def FUNC_36():...\n", "return FUNC_2(VAR_8, VAR_15=additional_key_data)\n" ]
[ "def get_cached_view(key, view, additional_key_data=None, additional_files=...\n", "if additional_etag is None:\n", "additional_etag = []\n", "def cache_key():...\n", "return _cache_key(key, additional_key_data=additional_key_data)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "FunctionDef'", "Return'" ]
[ "def FUNC_38(self, VAR_2='password'):...\n", "VAR_26 = reverse('logout')\n", "for bad_url in ('http://example.com', 'https://example.com',\n", "VAR_30 = '%(url)s?%(next)s=%(bad_url)s' % {'url': VAR_26, 'next':\n REDIRECT_FIELD_NAME, 'bad_url': urlquote(bad_url)}\n", "for good_url in ('/view/?param=http:/...
[ "def test_security_check(self, password='password'):...\n", "logout_url = reverse('logout')\n", "for bad_url in ('http://example.com', 'https://example.com',\n", "nasty_url = '%(url)s?%(next)s=%(bad_url)s' % {'url': logout_url, 'next':\n REDIRECT_FIELD_NAME, 'bad_url': urlquote(bad_url)}\n", "for good_ur...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "For", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_1(VAR_5: int, VAR_6: str):...\n", "return time.strftime(VAR_6, time.localtime(VAR_5 / 1000))\n" ]
[ "def _format_ts_filter(value: int, format: str):...\n", "return time.strftime(format, time.localtime(value / 1000))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_13(self, VAR_14):...\n", "VAR_34 = VAR_14.patch(\n 'qutebrowser.browser.webkit.network.filescheme.os.listdir')\n", "VAR_34.side_effect = OSError('Error message')\n", "VAR_19 = filescheme.dirbrowser_html('').decode('utf-8')\n", "VAR_20 = bs4.BeautifulSoup(VAR_19, 'html.parser')\n", "print(VAR_...
[ "def test_oserror(self, mocker):...\n", "m = mocker.patch('qutebrowser.browser.webkit.network.filescheme.os.listdir')\n", "m.side_effect = OSError('Error message')\n", "html = filescheme.dirbrowser_html('').decode('utf-8')\n", "soup = bs4.BeautifulSoup(html, 'html.parser')\n", "print(soup.prettify())\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assert'" ]
[ "def FUNC_38():...\n", "\"\"\"docstring\"\"\"\n", "VAR_187 = FUNC_37()\n", "FUNC_10().set_value('metadata_version', VAR_187)\n", "return VAR_187\n" ]
[ "def reset_metadata_version():...\n", "\"\"\"docstring\"\"\"\n", "v = generate_hash()\n", "cache().set_value('metadata_version', v)\n", "return v\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "def __next__(self):...\n", "if self._nextIndex > 0:\n", "self._last_item = self.item\n", "return super().__next__()\n" ]
[ "def __next__(self):...\n", "if self._nextIndex > 0:\n", "self._last_item = self.item\n", "return super().__next__()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_63(VAR_79):...\n", "" ]
[ "def getConfigValue(key):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_85(VAR_215, VAR_187):...\n", "VAR_323 = [int(VAR_40) for VAR_40 in VAR_187.split(',')]\n", "VAR_324 = {}\n", "for VAR_38 in VAR_5.getObjects(VAR_215, VAR_323):\n", "VAR_324[VAR_38.id] = VAR_38\n", "VAR_325 = [VAR_41 for VAR_41 in VAR_323 if VAR_41 in VAR_324.keys()]\n", "if len(VAR_325) == 0:\...
[ "def validateIds(dtype, ids):...\n", "ints = [int(oid) for oid in ids.split(',')]\n", "validObjs = {}\n", "for obj in conn.getObjects(dtype, ints):\n", "validObjs[obj.id] = obj\n", "filteredIds = [iid for iid in ints if iid in validObjs.keys()]\n", "if len(filteredIds) == 0:\n", "gid = list(validObjs....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'" ]
[ "@VAR_2.route('/downloadlist')...\n", "if VAR_87.get_view_property('download', 'dir') == 'desc':\n", "VAR_10 = ub.User.name.desc()\n", "VAR_10 = ub.User.name.asc()\n", "VAR_109 = 0\n", "VAR_109 = 1\n", "if VAR_87.check_visibility(constants.SIDEBAR_DOWNLOAD) and VAR_87.role_admin():\n", "VAR_63 = ub.se...
[ "@web.route('/downloadlist')...\n", "if current_user.get_view_property('download', 'dir') == 'desc':\n", "order = ub.User.name.desc()\n", "order = ub.User.name.asc()\n", "order_no = 0\n", "order_no = 1\n", "if current_user.check_visibility(constants.SIDEBAR_DOWNLOAD\n", "entries = ub.session.query(ub....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_8(self, VAR_12: DomainSpecificString) ->bool:...\n", "return VAR_12.domain == self.hostname\n" ]
[ "def is_mine(self, domain_specific_string: DomainSpecificString) ->bool:...\n", "return domain_specific_string.domain == self.hostname\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@require_POST...\n", "VAR_6 = get_object_or_404(Topic, VAR_2=topic_id)\n", "VAR_7 = CommentMoveForm(VAR_6=topic, data=request.POST)\n", "if VAR_7.is_valid():\n", "VAR_12 = VAR_7.save()\n", "messages.error(VAR_0, render_form_errors(VAR_7))\n", "for VAR_8 in VAR_12:\n", "return redirect(VAR_0.POST.get(...
[ "@require_POST...\n", "topic = get_object_or_404(Topic, pk=topic_id)\n", "form = CommentMoveForm(topic=topic, data=request.POST)\n", "if form.is_valid():\n", "comments = form.save()\n", "messages.error(request, render_form_errors(form))\n", "for comment in comments:\n", "return redirect(request.POST.g...
[ 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "For", "Return'", "Expr'", "Expr'", "Expr'" ]
[ "@VAR_0.filter...\n", "return [('' if item is None else '%s' % item) for item in VAR_17]\n" ]
[ "@register.filter...\n", "return [('' if item is None else '%s' % item) for item in value]\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_0(self, VAR_0, VAR_1, VAR_2, VAR_3=True):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_3:\n", "for r in VAR_0.get_children():\n", "VAR_16 = VAR_0.name, VAR_1, VAR_2\n", "VAR_16 = r.name, VAR_1, VAR_2\n", "if VAR_16 not in self._allowed:\n", "if VAR_16 not in self._allowed:\n", "self._allowed....
[ "def allow(self, role, method, resource, with_children=True):...\n", "\"\"\"docstring\"\"\"\n", "if with_children:\n", "for r in role.get_children():\n", "permission = role.name, method, resource\n", "permission = r.name, method, resource\n", "if permission not in self._allowed:\n", "if permission not...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "For", "Assign'", "Assign'", "Condition", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_30(VAR_27):...\n", "print(VAR_26 + VAR_27)\n" ]
[ "def in_print(s):...\n", "print(indent_str + s)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_11(self, VAR_0, VAR_13):...\n", "VAR_26 = VAR_0 / 'foo'\n", "VAR_32 = VAR_0 / 'bar'\n", "VAR_26.ensure()\n", "VAR_32.ensure(dir=True)\n", "VAR_25 = VAR_13(str(VAR_0))\n", "VAR_28 = self.Item(FUNC_1(VAR_26), VAR_26.relto(VAR_0))\n", "VAR_29 = self.Item(FUNC_1(VAR_32), VAR_32.relto(VAR_0))\n",...
[ "def test_mixed(self, tmpdir, parser):...\n", "foo_file = tmpdir / 'foo'\n", "bar_dir = tmpdir / 'bar'\n", "foo_file.ensure()\n", "bar_dir.ensure(dir=True)\n", "parsed = parser(str(tmpdir))\n", "foo_item = self.Item(_file_url(foo_file), foo_file.relto(tmpdir))\n", "bar_item = self.Item(_file_url(bar_d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assert'", "Assert'", "Assert'" ]
[ "def FUNC_3(self, VAR_13):...\n", "if VAR_13 == 'untranslated':\n", "return 'todo'\n", "return super().to_python(VAR_13)\n" ]
[ "def to_python(self, value):...\n", "if value == 'untranslated':\n", "return 'todo'\n", "return super().to_python(value)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_8(VAR_0, VAR_1):...\n", "return FUNC_0(VAR_0=request, VAR_1=pk, VAR_2='is_globally_pinned', VAR_3=\n False, VAR_4=Comment.UNPINNED, VAR_5=_(\n 'The topic has been globally unpinned'))\n" ]
[ "def global_unpin(request, pk):...\n", "return _moderate(request=request, pk=pk, field_name='is_globally_pinned',\n to_value=False, action=Comment.UNPINNED, message=_(\n 'The topic has been globally unpinned'))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "from __future__ import absolute_import, unicode_literals\n", "from django import forms\n", "from django.apps import apps\n", "from django.template.loader import render_to_string\n", "from django.utils.safestring import mark_safe\n", "from .permissions import permission_tag_view\n", "VAR_3 = 'tags/forms...
[ "from __future__ import absolute_import, unicode_literals\n", "from django import forms\n", "from django.apps import apps\n", "from django.template.loader import render_to_string\n", "from django.utils.safestring import mark_safe\n", "from .permissions import permission_tag_view\n", "option_template_nam...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Assign'", "Return'" ]
[ "@log_function...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = FUNC_1('/groups/%s/settings/m.join_policy', VAR_30)\n", "return self.client.put_json(VAR_5=destination, VAR_2=path, VAR_3={\n 'requester_user_id': requester_user_id}, VAR_39=content, VAR_15=True)\n" ]
[ "@log_function...\n", "\"\"\"docstring\"\"\"\n", "path = _create_v1_path('/groups/%s/settings/m.join_policy', group_id)\n", "return self.client.put_json(destination=destination, path=path, args={\n 'requester_user_id': requester_user_id}, data=content, ignore_backoff=True)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_15(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_13 = 1\n", "VAR_3 = '@test:server'\n", "self.get_success(self.presence_handler.update_external_syncs_row(VAR_13,\n VAR_3, True, self.clock.time_msec()))\n", "self.reactor.advance(EXTERNAL_PROCESS_EXPIRY / 2)\n", "VAR_10 = self.get_success(sel...
[ "def test_external_process_timeout(self):...\n", "\"\"\"docstring\"\"\"\n", "process_id = 1\n", "user_id = '@test:server'\n", "self.get_success(self.presence_handler.update_external_syncs_row(process_id,\n user_id, True, self.clock.time_msec()))\n", "self.reactor.advance(EXTERNAL_PROCESS_EXPIRY / 2)\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_23(self):...\n", "self._validate_mandatory()\n", "self._validate_data_fields()\n", "self._validate_selects()\n", "self._validate_non_negative()\n", "self._validate_length()\n", "self._extract_images_from_text_editor()\n", "self._sanitize_content()\n", "self._save_passwords()\n", "self.va...
[ "def _validate(self):...\n", "self._validate_mandatory()\n", "self._validate_data_fields()\n", "self._validate_selects()\n", "self._validate_non_negative()\n", "self._validate_length()\n", "self._extract_images_from_text_editor()\n", "self._sanitize_content()\n", "self._save_passwords()\n", "self....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "For", "Expr'", "Condition", "Expr'", "For", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_86(self, VAR_25, *VAR_0, **VAR_1):...\n", "FUNC_83(self, VAR_72(self, *VAR_0, **kwargs))\n", "for VAR_6 in VAR_73:\n", "FUNC_83(self, VAR_6(self, VAR_25, *VAR_0, **kwargs))\n", "return self._return_value\n" ]
[ "def runner(self, method, *args, **kwargs):...\n", "add_to_return_value(self, fn(self, *args, **kwargs))\n", "for f in hooks:\n", "add_to_return_value(self, f(self, method, *args, **kwargs))\n", "return self._return_value\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "For", "Expr'", "Return'" ]
[ "def FUNC_5(self):...\n", "return self.base_url_parameters()\n" ]
[ "def url_parameters(self):...\n", "return self.base_url_parameters()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __getattr__(self, VAR_12):...\n", "if VAR_12 == '__name__':\n", "return self.__class__.__name__\n", "return super(CLASS_3, self).getattr(VAR_12)\n" ]
[ "def __getattr__(self, name):...\n", "if name == '__name__':\n", "return self.__class__.__name__\n", "return super(render_response, self).getattr(name)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_70(self, VAR_143=VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_56 = VAR_263.request\n", "VAR_139 = VAR_263.session\n", "VAR_63 = VAR_139.auth\n", "VAR_254 = self.table_user()\n", "if not self.is_logged_in():\n", "VAR_280 = VAR_63.user.id\n", "VAR_281 = VAR_143\n", "VAR_141 = None\n", ...
[ "def impersonate(self, user_id=DEFAULT):...\n", "\"\"\"docstring\"\"\"\n", "request = current.request\n", "session = current.session\n", "auth = session.auth\n", "table_user = self.table_user()\n", "if not self.is_logged_in():\n", "current_id = auth.user.id\n", "requested_id = user_id\n", "user = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Condition", "Assign'", "Condition", "Condition", "Condition", "Expr'", "Return'", "Return'", "Conditio...
[ "def FUNC_92(self, VAR_177):...\n", "VAR_290 = VAR_177._db[VAR_177.type[10:]]\n", "VAR_291 = VAR_290.get('_format', None)\n", "if VAR_291 and isinstance(VAR_291, str):\n", "return VAR_291[2:-2]\n", "return VAR_177.name\n" ]
[ "def get_format(self, field):...\n", "rtable = field._db[field.type[10:]]\n", "format = rtable.get('_format', None)\n", "if format and isinstance(format, str):\n", "return format[2:-2]\n", "return field.name\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "async def FUNC_3(self, VAR_8: str, VAR_10: dict) ->bool:...\n", "\"\"\"docstring\"\"\"\n", "if VAR_10.get('id_server'):\n", "VAR_57 = [VAR_10['id_server']]\n", "VAR_57 = await self.store.get_id_servers_user_bound(user_id=mxid, VAR_19=\n threepid['medium'], VAR_20=threepid['address'])\n", "if not VAR_5...
[ "async def try_unbind_threepid(self, mxid: str, threepid: dict) ->bool:...\n", "\"\"\"docstring\"\"\"\n", "if threepid.get('id_server'):\n", "id_servers = [threepid['id_server']]\n", "id_servers = await self.store.get_id_servers_user_bound(user_id=mxid,\n medium=threepid['medium'], address=threepid['addr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "For", "AugAssign'", "Return'" ]
[ "def FUNC_43(VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_71 = VAR_2.GET or VAR_2.POST\n", "VAR_114 = {'images': VAR_71.getlist('image'), 'datasets': VAR_71.getlist(\n 'dataset'), 'projects': VAR_71.getlist('project'), 'screens': VAR_71.\n getlist('screen'), 'plates': VAR_71.getlist('plate'), 'acquisi...
[ "def getIds(request):...\n", "\"\"\"docstring\"\"\"\n", "r = request.GET or request.POST\n", "selected = {'images': r.getlist('image'), 'datasets': r.getlist('dataset'),\n 'projects': r.getlist('project'), 'screens': r.getlist('screen'),\n 'plates': r.getlist('plate'), 'acquisitions': r.getlist('acquisi...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "@VAR_4.route('/generate_auth_token/<int:user_id>')...\n", "VAR_11 = request.host.rsplit(':')\n", "if len(VAR_11) == 1:\n", "VAR_13 = ':'.join(VAR_11)\n", "VAR_13 = ':'.join(VAR_11[0:-1])\n", "if VAR_13.startswith('127.') or VAR_13.lower(\n", "VAR_14 = _(\n 'PLease access calibre-web from non localho...
[ "@kobo_auth.route('/generate_auth_token/<int:user_id>')...\n", "host_list = request.host.rsplit(':')\n", "if len(host_list) == 1:\n", "host = ':'.join(host_list)\n", "host = ':'.join(host_list[0:-1])\n", "if host.startswith('127.') or host.lower() == 'localhost' or host.startswith(\n", "warning = _(\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Return'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_59(self, VAR_14):...\n", "\"\"\"docstring\"\"\"\n", "if self.options.get('parse_block_html'):\n", "return VAR_14\n", "return VAR_19(VAR_14)\n" ]
[ "def text(self, text):...\n", "\"\"\"docstring\"\"\"\n", "if self.options.get('parse_block_html'):\n", "return text\n", "return escape(text)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Return'" ]
[ "@FUNC_0...\n", "return UserDirectoryHandler(self)\n" ]
[ "@cache_in_self...\n", "return UserDirectoryHandler(self)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@qutescheme.add_handler('pdfjs', backend=usertypes.Backend.QtWebKit)...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = pdfjs.get_pdfjs_res(VAR_1.path())\n", "log.misc.warning('pdfjs resource requested but not found: {}'.format(e.path))\n", "VAR_2, VAR_4 = mimetypes.guess_type(VAR_1.fileName())\n", "assert VAR_2...
[ "@qutescheme.add_handler('pdfjs', backend=usertypes.Backend.QtWebKit)...\n", "\"\"\"docstring\"\"\"\n", "data = pdfjs.get_pdfjs_res(url.path())\n", "log.misc.warning('pdfjs resource requested but not found: {}'.format(e.path))\n", "mimetype, _encoding = mimetypes.guess_type(url.fileName())\n", "assert mim...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Expr'", "Assign'", "Assert'", "Return'" ]
[ "@VAR_8.route('/api/interpret/', methods=['POST'])...\n", "FUNC_13('interpret')\n", "VAR_45 = request.json['data']\n", "VAR_65, VAR_66 = VAR_8.interface.interpret(VAR_45)\n", "return jsonify({'interpretation_scores': VAR_65, 'alternative_outputs': VAR_66}\n )\n" ]
[ "@app.route('/api/interpret/', methods=['POST'])...\n", "log_feature_analytics('interpret')\n", "raw_input = request.json['data']\n", "interpretation_scores, alternative_outputs = app.interface.interpret(raw_input)\n", "return jsonify({'interpretation_scores': interpretation_scores,\n 'alternative_output...
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "@app.route('/tags/<tag_name>')...\n", "if not app.config['SEARCH_CONF']['enabled'] and not which('rg'):\n", "flash(\n 'Search (for example ripgrep) must be installed to view pages about embedded tags.'\n , 'error')\n", "VAR_11 = search(f'#{VAR_0}#', strict=True)\n", "return redirect('/')\n", "VAR_1...
[ "@app.route('/tags/<tag_name>')...\n", "if not app.config['SEARCH_CONF']['enabled'] and not which('rg'):\n", "flash(\n 'Search (for example ripgrep) must be installed to view pages about embedded tags.'\n , 'error')\n", "results = search(f'#{tag_name}#', strict=True)\n", "return redirect('/')\n", "r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "For", "Condition", "Return'", "Expr'" ]
[ "async def FUNC_42(self, VAR_11: str, VAR_48: Sequence[Tuple[EventBase,...\n", "\"\"\"docstring\"\"\"\n", "VAR_151 = self.config.worker.events_shard_config.get_instance(VAR_11)\n", "if VAR_151 != self._instance_name:\n", "VAR_184 = await self._send_events(instance_name=instance, store=self.store,\n VAR_1...
[ "async def persist_events_and_notify(self, room_id: str, event_and_contexts:...\n", "\"\"\"docstring\"\"\"\n", "instance = self.config.worker.events_shard_config.get_instance(room_id)\n", "if instance != self._instance_name:\n", "result = await self._send_events(instance_name=instance, store=self.store,\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Assign'", "Assert'", "Return'", "Assign'", "Condition", "For", "Condition", "Expr'", "For", "Return'", "Expr'" ]
[ "def FUNC_25(VAR_32, VAR_17, VAR_15):...\n", "if 'btn-upload-format' in VAR_32.files:\n", "VAR_40 = VAR_32.files['btn-upload-format']\n", "if VAR_40.filename != '':\n", "if not current_user.role_upload():\n", "abort(403)\n", "if '.' in VAR_40.filename:\n", "VAR_96 = VAR_40.filename.rsplit('.', 1)[-1]....
[ "def upload_single_file(request, book, book_id):...\n", "if 'btn-upload-format' in request.files:\n", "requested_file = request.files['btn-upload-format']\n", "if requested_file.filename != '':\n", "if not current_user.role_upload():\n", "abort(403)\n", "if '.' in requested_file.filename:\n", "file_ex...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Assign'", "Condition", "Condition", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Return'", "Expr'", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Return'", "Return'", "Assign...
[ "def FUNC_6(self):...\n", "return {}\n" ]
[ "def get_kwargs(self):...\n", "return {}\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@FUNC_0...\n", "return StatsHandler(self)\n" ]
[ "@cache_in_self...\n", "return StatsHandler(self)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_18(VAR_20):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_20.all:\n", "FUNC_8(VAR_20.dir)\n", "if VAR_20.tag_set is None:\n", "FUNC_0(VAR_20.dir)\n", "if VAR_20.signature_def is None:\n", "FUNC_1(VAR_20.dir, VAR_20.tag_set)\n", "FUNC_4(VAR_20.dir, VAR_20.tag_set, VAR_20.signature_def)\n" ]
[ "def show(args):...\n", "\"\"\"docstring\"\"\"\n", "if args.all:\n", "_show_all(args.dir)\n", "if args.tag_set is None:\n", "_show_tag_sets(args.dir)\n", "if args.signature_def is None:\n", "_show_signature_def_map_keys(args.dir, args.tag_set)\n", "_show_inputs_outputs(args.dir, args.tag_set, args.s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_94(VAR_153, VAR_46, VAR_154, VAR_155=False):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_153 not in VAR_1.cache:\n", "VAR_1.cache[VAR_153] = {}\n", "if VAR_46 not in VAR_1.cache[VAR_153]:\n", "VAR_1.cache[VAR_153][VAR_46] = VAR_154()\n", "if VAR_1.cache[VAR_153][VAR_46] == None and VAR_155:\n", ...
[ "def local_cache(namespace, key, generator, regenerate_if_none=False):...\n", "\"\"\"docstring\"\"\"\n", "if namespace not in local.cache:\n", "local.cache[namespace] = {}\n", "if key not in local.cache[namespace]:\n", "local.cache[namespace][key] = generator()\n", "if local.cache[namespace][key] == Non...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Return'", "Assign'" ]
[ "def FUNC_115(VAR_129):...\n", "VAR_83.append(VAR_129)\n", "VAR_86[VAR_129] = VAR_89\n", "if VAR_87:\n", "VAR_84.append(VAR_129)\n", "return VAR_129\n", "if VAR_88:\n", "VAR_85.append(VAR_129)\n" ]
[ "def innerfn(fn):...\n", "whitelisted.append(fn)\n", "allowed_http_methods_for_whitelisted_func[fn] = methods\n", "if allow_guest:\n", "guest_methods.append(fn)\n", "return fn\n", "if xss_safe:\n", "xss_safe_methods.append(fn)\n" ]
[ 0, 2, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Condition", "Expr'", "Return'", "Condition", "Expr'" ]
[ "def FUNC_8(self) ->None:...\n", "self.package_dir.mkdir()\n", "VAR_7 = self.package_dir / '__init__.py'\n", "VAR_8 = self.env.get_template('package_init.pyi')\n", "VAR_7.write_text(VAR_8.render(description=self.package_description))\n", "VAR_9 = self.package_dir / 'py.typed'\n", "VAR_9.write_text('# Ma...
[ "def _create_package(self) ->None:...\n", "self.package_dir.mkdir()\n", "package_init = self.package_dir / '__init__.py'\n", "package_init_template = self.env.get_template('package_init.pyi')\n", "package_init.write_text(package_init_template.render(description=self.\n package_description))\n", "pytype...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "@VAR_2.route('/ajax/fullsync')...\n", "VAR_55 = ub.session.query(ub.KoboSyncedBooks).filter(VAR_62.id == ub.\n KoboSyncedBooks.user_id).delete()\n", "VAR_71 = _('{} sync entries deleted').format(VAR_55)\n", "ub.session_commit(VAR_71)\n", "return Response(json.dumps([{'type': 'success', 'message': VAR_71...
[ "@admi.route('/ajax/fullsync')...\n", "count = ub.session.query(ub.KoboSyncedBooks).filter(current_user.id == ub.\n KoboSyncedBooks.user_id).delete()\n", "message = _('{} sync entries deleted').format(count)\n", "ub.session_commit(message)\n", "return Response(json.dumps([{'type': 'success', 'message': m...
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "async def FUNC_9(self, VAR_24: str, VAR_19: str, VAR_25: Iterable[Dict[str,...\n", "VAR_50 = False\n", "for n in VAR_25:\n", "VAR_68 = VAR_26[n['event_id']]\n", "VAR_51 = await calculate_room_name(self.store, VAR_27, VAR_19)\n", "if VAR_68.type == EventTypes.Member and VAR_68.state_key == VAR_19:\n", "...
[ "async def get_room_vars(self, room_id: str, user_id: str, notifs: Iterable[...\n", "is_invite = False\n", "for n in notifs:\n", "ev = notif_events[n['event_id']]\n", "room_name = await calculate_room_name(self.store, room_state_ids, user_id)\n", "if ev.type == EventTypes.Member and ev.state_key == user_i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "For", "Return'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "For", "Expr'", "Assign'", "Condition", "Condition", "Condition", "Assign'", ...
[ "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "return any(VAR_9 in os.environ for VAR_9 in VAR_2)\n" ]
[ "def looks_like_ci():...\n", "\"\"\"docstring\"\"\"\n", "return any(name in os.environ for name in CI_ENVIRONMENT_VARIABLES)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_57(VAR_99):...\n", "\"\"\"docstring\"\"\"\n", "return VAR_99.replace('_', ' ').replace('-', ' ').title()\n" ]
[ "def unscrub(txt):...\n", "\"\"\"docstring\"\"\"\n", "return txt.replace('_', ' ').replace('-', ' ').title()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def __init__(self, VAR_58, *VAR_6, **VAR_7):...\n", "self.project = VAR_58\n", "VAR_7['initial'] = {'project': VAR_58}\n", "super().__init__(*VAR_6, **kwargs)\n" ]
[ "def __init__(self, project, *args, **kwargs):...\n", "self.project = project\n", "kwargs['initial'] = {'project': project}\n", "super().__init__(*args, **kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_40(VAR_62, VAR_104, VAR_97, VAR_105=None):...\n", "\"\"\"docstring\"\"\"\n", "import frappe.client\n", "return frappe.client.set_value(VAR_62, VAR_104, VAR_97, VAR_105)\n" ]
[ "def set_value(doctype, docname, fieldname, value=None):...\n", "\"\"\"docstring\"\"\"\n", "import frappe.client\n", "return frappe.client.set_value(doctype, docname, fieldname, value)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Import'", "Return'" ]
[ "def FUNC_46(self):...\n", "self.helper.invite(self.room_id, src=self.creator, targ=self.second_user_id,\n VAR_52=self.creator_tok)\n", "VAR_12 = 'hello'\n", "VAR_22, VAR_23 = self.make_request('POST',\n '/_matrix/client/r0/rooms/{}/leave'.format(self.room_id), VAR_19={\n 'reason': reason}, VAR_16=se...
[ "def test_reject_invite_reason(self):...\n", "self.helper.invite(self.room_id, src=self.creator, targ=self.second_user_id,\n tok=self.creator_tok)\n", "reason = 'hello'\n", "request, channel = self.make_request('POST',\n '/_matrix/client/r0/rooms/{}/leave'.format(self.room_id), content={\n 'reason': ...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_2(self):...\n", "self.write(\n \"Looks like you're trying to access rtxcomplete at the wrong host name.\")\n", "self.write(\n \"<br>Please make sure the address is correct: 'rtxcomplete.ixlab.org'\")\n" ]
[ "def get(self):...\n", "self.write(\n \"Looks like you're trying to access rtxcomplete at the wrong host name.\")\n", "self.write(\n \"<br>Please make sure the address is correct: 'rtxcomplete.ixlab.org'\")\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_11(self, VAR_2):...\n", "VAR_37 = self.url_regex.match(VAR_2)\n", "if not VAR_37:\n", "VAR_42 = VAR_37.groups()[0]\n", "return VAR_42\n" ]
[ "def _parse_resource_id(self, spec):...\n", "match = self.url_regex.match(spec)\n", "if not match:\n", "resource_id = match.groups()[0]\n", "return resource_id\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = FUNC_0(VAR_2, 'experimenter', None)\n", "return HttpResponseBadRequest('Invalid parameter value')\n", "if VAR_260 is not None or VAR_261 is not None:\n", "VAR_245 = FUNC_0(VAR_2, 'project', None)\n", "VAR_265 = paths_to_tag(VAR_5, VAR_11, VA...
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "experimenter_id = get_long_or_default(request, 'experimenter', None)\n", "return HttpResponseBadRequest('Invalid parameter value')\n", "if tag_id is not None or tagset_id is not None:\n", "project_id = get_long_or_default(request, 'project', None)\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "@require_POST...\n", "\"\"\"docstring\"\"\"\n", "VAR_202 = VAR_5.getScriptService()\n", "VAR_49 = VAR_202.getScriptID('/omero/export_scripts/Batch_Image_Export.py')\n", "VAR_142 = VAR_5.getObject('Image', VAR_26)\n", "if VAR_142 is not None:\n", "VAR_335 = VAR_142.getDetails().group.id.val\n", "VAR_2...
[ "@require_POST...\n", "\"\"\"docstring\"\"\"\n", "scriptService = conn.getScriptService()\n", "sId = scriptService.getScriptID('/omero/export_scripts/Batch_Image_Export.py')\n", "image = conn.getObject('Image', imageId)\n", "if image is not None:\n", "gid = image.getDetails().group.id.val\n", "imageId...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_48(self):...\n", "self.admin_login(username='super', password='secret', login_url='/')\n", "self.selenium.get('%s%s' % (self.live_server_url, '/admin_widgets/event/add/'))\n", "VAR_51 = self.selenium.current_window_handle\n", "self.assertEqual(self.selenium.find_element_by_id('id_main_band').\n ...
[ "def test_foreignkey(self):...\n", "self.admin_login(username='super', password='secret', login_url='/')\n", "self.selenium.get('%s%s' % (self.live_server_url, '/admin_widgets/event/add/'))\n", "main_window = self.selenium.current_window_handle\n", "self.assertEqual(self.selenium.find_element_by_id('id_main...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_0(self, VAR_2='password'):...\n", "VAR_3 = self.client.post('/login/', {'username': 'testclient', 'password':\n VAR_2})\n", "self.assertTrue(SESSION_KEY in self.client.session)\n", "return VAR_3\n" ]
[ "def login(self, password='password'):...\n", "response = self.client.post('/login/', {'username': 'testclient',\n 'password': password})\n", "self.assertTrue(SESSION_KEY in self.client.session)\n", "return response\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_86(self, VAR_25, *VAR_0, **VAR_1):...\n", "FUNC_83(self, VAR_72(self, *VAR_0, **kwargs))\n", "for VAR_6 in VAR_73:\n", "FUNC_83(self, VAR_6(self, VAR_25, *VAR_0, **kwargs))\n", "return self._return_value\n" ]
[ "def runner(self, method, *args, **kwargs):...\n", "add_to_return_value(self, fn(self, *args, **kwargs))\n", "for f in hooks:\n", "add_to_return_value(self, f(self, method, *args, **kwargs))\n", "return self._return_value\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "For", "Expr'", "Return'" ]
[ "def FUNC_99(self) ->bool:...\n", "\"\"\"docstring\"\"\"\n", "return self.config.send_federation and (not self.config.worker_app or self.\n config.worker_app == 'synapse.app.federation_sender')\n" ]
[ "def should_send_federation(self) ->bool:...\n", "\"\"\"docstring\"\"\"\n", "return self.config.send_federation and (not self.config.worker_app or self.\n config.worker_app == 'synapse.app.federation_sender')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_99(self, VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "self.jsonrpc_procedures[VAR_10.__name__] = VAR_10\n", "return VAR_10\n" ]
[ "def jsonrpc(self, f):...\n", "\"\"\"docstring\"\"\"\n", "self.jsonrpc_procedures[f.__name__] = f\n", "return f\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "@VAR_7.route('/obj/<path:obj_path>')...\n", "VAR_36 = FUNC_10(VAR_20)\n", "VAR_29 = Headers()\n", "VAR_39 = send_file(VAR_36, cache_timeout=datetime.timedelta(days=365).\n total_seconds(), add_etags=True, conditional=True)\n", "VAR_39.headers.extend(VAR_29)\n", "return VAR_39\n" ]
[ "@scope_blueprint.route('/obj/<path:obj_path>')...\n", "path = _get_obj_absolute_path(obj_path)\n", "headers = Headers()\n", "response = send_file(path, cache_timeout=datetime.timedelta(days=365).\n total_seconds(), add_etags=True, conditional=True)\n", "response.headers.extend(headers)\n", "return res...
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_18(self):...\n", "self.assert_expected(self.folder.t, 'CheckPathAlt.html')\n" ]
[ "def testPathAlt(self):...\n", "self.assert_expected(self.folder.t, 'CheckPathAlt.html')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "async def FUNC_4(self, VAR_13: IProtocolFactory) ->None:...\n", "VAR_17 = None\n", "VAR_18 = await self._resolve_server()\n", "for server in VAR_18:\n", "VAR_1 = server.host\n", "if VAR_17:\n", "VAR_19 = server.port\n", "VAR_0.debug('Connecting to %s:%i', VAR_1.decode('ascii'), VAR_19)\n", "VAR_0.i...
[ "async def _do_connect(self, protocol_factory: IProtocolFactory) ->None:...\n", "first_exception = None\n", "server_list = await self._resolve_server()\n", "for server in server_list:\n", "host = server.host\n", "if first_exception:\n", "port = server.port\n", "logger.debug('Connecting to %s:%i', host...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "For", "Assign'", "Condition", "Assign'", "Expr'", "Expr'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_41(VAR_16, VAR_17):...\n", "return config.set_from_dictionary(VAR_16, VAR_17, lambda y: y.strip() if y else\n y)\n" ]
[ "def _config_string(to_save, x):...\n", "return config.set_from_dictionary(to_save, x, lambda y: y.strip() if y else y)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_38(self):...\n", "return self.renderer.block_code(self.token['text'], self.token['lang'])\n" ]
[ "def output_code(self):...\n", "return self.renderer.block_code(self.token['text'], self.token['lang'])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]