lines
listlengths
1
383
raw_lines
listlengths
1
383
label
listlengths
1
383
type
listlengths
1
383
[ "def FUNC_3(VAR_0, VAR_1: FlaskClient):...\n", "VAR_5 = VAR_1.post('/bookmarks/new', data={'submit': True})\n", "assert VAR_5.status_code == 200\n", "assert b'This field is required' in VAR_5.data\n" ]
[ "def test_post_new_bookmark_missing_fields(test_app, client: FlaskClient):...\n", "response = client.post('/bookmarks/new', data={'submit': True})\n", "assert response.status_code == 200\n", "assert b'This field is required' in response.data\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assert'", "Assert'" ]
[ "def __getattr__(self, VAR_46):...\n", "VAR_205 = self.get(VAR_46)\n", "if not VAR_205 and VAR_46.startswith('__'):\n", "return VAR_205\n" ]
[ "def __getattr__(self, key):...\n", "ret = self.get(key)\n", "if not ret and key.startswith('__'):\n", "return ret\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'" ]
[ "def __enter__(self):...\n", "FUNC_4(self.site)\n", "return VAR_1\n" ]
[ "def __enter__(self):...\n", "init(self.site)\n", "return local\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_3 = self.client.get('/admin/logout/')\n", "self.assertEqual(VAR_3.status_code, 200)\n", "self.assertTrue(SESSION_KEY not in self.client.session)\n" ]
[ "def logout(self):...\n", "response = self.client.get('/admin/logout/')\n", "self.assertEqual(response.status_code, 200)\n", "self.assertTrue(SESSION_KEY not in self.client.session)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_20(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_27 = Template(\n '{% load rest_framework %}{% autoescape off %}{{ content|urlize_quoted_links }}{% endautoescape %}'\n )\n", "VAR_28 = VAR_27.render(Context({'content': '\"http://example.com\"'}))\n", "assert VAR_28 == '\"<a href=\"http://exam...
[ "def test_template_render_with_noautoescape(self):...\n", "\"\"\"docstring\"\"\"\n", "template = Template(\n '{% load rest_framework %}{% autoescape off %}{{ content|urlize_quoted_links }}{% endautoescape %}'\n )\n", "rendered = template.render(Context({'content': '\"http://example.com\"'}))\n", "asse...
[ 0, 0, 0, 2, 2 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assert'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_15(VAR_3, **VAR_4):...\n", "VAR_5 = JsonResource(self.homeserver)\n", "VAR_5.register_paths('GET', [re.compile('^/_matrix/foo$')], FUNC_15,\n 'test_servlet')\n", "VAR_7, VAR_6 = make_request(self.reactor, FakeSite(VAR_5), b'GET',\n b'/_m...
[ "def test_callback_synapseerror(self):...\n", "\"\"\"docstring\"\"\"\n", "def _callback(request, **kwargs):...\n", "res = JsonResource(self.homeserver)\n", "res.register_paths('GET', [re.compile('^/_matrix/foo$')], _callback,\n 'test_servlet')\n", "_, channel = make_request(self.reactor, FakeSite(res),...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_11(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_9, VAR_15 = self.make_request('PUT', '/profile/%s/displayname' % (self.\n owner,), content=json.dumps({'displayname': 'test' * 100}), VAR_7=self.\n owner_tok)\n", "self.assertEqual(VAR_15.code, 400, VAR_15.result)\n", "VAR_16 = self.get_displa...
[ "def test_set_displayname_too_long(self):...\n", "\"\"\"docstring\"\"\"\n", "request, channel = self.make_request('PUT', '/profile/%s/displayname' % (\n self.owner,), content=json.dumps({'displayname': 'test' * 100}),\n access_token=self.owner_tok)\n", "self.assertEqual(channel.code, 400, channel.result...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_58(VAR_44):...\n", "return [VAR_221 for VAR_221 in VAR_44 if not (VAR_221[:1] in '#' or VAR_221\n .endswith('~') or VAR_221.endswith('.bak'))]\n" ]
[ "def ignore(fs):...\n", "return [f for f in fs if not (f[:1] in '#' or f.endswith('~') or f.endswith\n ('.bak'))]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@VAR_2.route('/robots.txt')...\n", "return send_from_directory(constants.STATIC_DIR, 'robots.txt')\n" ]
[ "@web.route('/robots.txt')...\n", "return send_from_directory(constants.STATIC_DIR, 'robots.txt')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_72(self, VAR_43=None):...\n", "if not VAR_43:\n", "return self.get('__onload', frappe._dict())\n", "return self.get('__onload')[VAR_43]\n" ]
[ "def get_onload(self, key=None):...\n", "if not key:\n", "return self.get('__onload', frappe._dict())\n", "return self.get('__onload')[key]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_10(VAR_2, VAR_10, VAR_5=None, VAR_7=None, **VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2.session.modified = True\n", "VAR_54 = VAR_6.get('template', None)\n", "if VAR_54 is None:\n", "if VAR_10 == 'userdata':\n", "VAR_59 = VAR_6.get('show', Show(VAR_5, VAR_2, VAR_10))\n", "VAR_54 = 'webc...
[ "def _load_template(request, menu, conn=None, url=None, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "request.session.modified = True\n", "template = kwargs.get('template', None)\n", "if template is None:\n", "if menu == 'userdata':\n", "show = kwargs.get('show', Show(conn, request, menu))\n", "templa...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Return'", "Expr'", "Assign'", "Assign'", "Condition", "Condition"...
[ "def FUNC_38(self):...\n", "self.register_user('user', 'pass')\n", "VAR_52 = self.login('user', 'pass')\n", "VAR_22, VAR_23 = self.make_request('GET', self.url, VAR_16=tok)\n", "self.assertEqual(VAR_23.code, 200, VAR_23.result)\n" ]
[ "def test_restricted_auth(self):...\n", "self.register_user('user', 'pass')\n", "tok = self.login('user', 'pass')\n", "request, channel = self.make_request('GET', self.url, access_token=tok)\n", "self.assertEqual(channel.code, 200, channel.result)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_2(self):...\n", "self.mock_federation.make_query.return_value = make_awaitable({'room_id':\n '!8765qwer:test', 'servers': ['test', 'remote']})\n", "VAR_10 = self.get_success(self.handler.get_association(self.remote_room))\n", "self.assertEquals({'room_id': '!8765qwer:test', 'servers': ['test',\n ...
[ "def test_get_remote_association(self):...\n", "self.mock_federation.make_query.return_value = make_awaitable({'room_id':\n '!8765qwer:test', 'servers': ['test', 'remote']})\n", "result = self.get_success(self.handler.get_association(self.remote_room))\n", "self.assertEquals({'room_id': '!8765qwer:test', '...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@VAR_2.before_app_request...\n", "if VAR_62.is_authenticated:\n", "confirm_login()\n", "if not ub.check_user_session(VAR_62.id, flask_session.get('_id')\n", "logout_user()\n", "g.constants = constants\n", "g.user = VAR_62\n", "g.allow_registration = config.config_public_reg\n", "g.allow_anonymous =...
[ "@admi.before_app_request...\n", "if current_user.is_authenticated:\n", "confirm_login()\n", "if not ub.check_user_session(current_user.id, flask_session.get('_id')\n", "logout_user()\n", "g.constants = constants\n", "g.user = current_user\n", "g.allow_registration = config.config_public_reg\n", "g....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "For", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Return'" ]
[ "def __init__(self, *VAR_3, **VAR_4):...\n", "super().__init__(**kwargs)\n", "self.hello = VAR_4.get('test_kwarg')\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super().__init__(**kwargs)\n", "self.hello = kwargs.get('test_kwarg')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'" ]
[ "@expose('/logout/')...\n", "logout_user()\n", "return redirect(self.appbuilder.get_url_for_index)\n" ]
[ "@expose('/logout/')...\n", "logout_user()\n", "return redirect(self.appbuilder.get_url_for_index)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Expr'", "Return'" ]
[ "def FUNC_14(VAR_25):...\n", "\"\"\"docstring\"\"\"\n", "return '\"%s\"' % VAR_25.replace('\\\\', '\\\\\\\\').replace('\"', '\\\\\"')\n" ]
[ "def quote_etag(etag):...\n", "\"\"\"docstring\"\"\"\n", "return '\"%s\"' % etag.replace('\\\\', '\\\\\\\\').replace('\"', '\\\\\"')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@VAR_0.filter...\n", "if isinstance(VAR_2, QuerySet):\n", "VAR_7 = serialize('json', VAR_2, VAR_3=indent)\n", "VAR_7 = json.dumps(VAR_2, VAR_3=indent, cls=DjbletsJSONEncoder)\n", "return mark_safe(VAR_7)\n" ]
[ "@register.filter...\n", "if isinstance(value, QuerySet):\n", "result = serialize('json', value, indent=indent)\n", "result = json.dumps(value, indent=indent, cls=DjbletsJSONEncoder)\n", "return mark_safe(result)\n" ]
[ 0, 0, 0, 0, 2 ]
[ "Condition", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_9(*VAR_15):...\n", "return defer.succeed(None)\n" ]
[ "def get_received_txn_response(*args):...\n", "return defer.succeed(None)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@parameterized.named_parameters(('non_tfrt', False))...\n", "self.parser = saved_model_cli.create_parser()\n", "VAR_10 = test.test_src_dir_path(VAR_0)\n", "VAR_11 = self.parser.parse_args(['run', '--dir', VAR_10, '--tag_set',\n 'serve', '--signature_def', 'regress_x2_to_y3', '--input_exprs',\n 'x2=np.o...
[ "@parameterized.named_parameters(('non_tfrt', False))...\n", "self.parser = saved_model_cli.create_parser()\n", "base_path = test.test_src_dir_path(SAVED_MODEL_PATH)\n", "args = self.parser.parse_args(['run', '--dir', base_path, '--tag_set',\n 'serve', '--signature_def', 'regress_x2_to_y3', '--input_exprs'...
[ 0, 0, 0, 5, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_0(self):...\n", "VAR_6 = Mock()\n", "VAR_3 = '@foo:bar'\n", "VAR_7 = 5000000\n", "VAR_8 = UserPresenceState.default(VAR_3)\n", "VAR_9 = VAR_8.copy_and_replace(VAR_10=PresenceState.ONLINE, last_active_ts=now)\n", "VAR_10, VAR_11, VAR_12 = handle_update(VAR_8, VAR_9, is_mine=True, VAR_6=\n wh...
[ "def test_offline_to_online(self):...\n", "wheel_timer = Mock()\n", "user_id = '@foo:bar'\n", "now = 5000000\n", "prev_state = UserPresenceState.default(user_id)\n", "new_state = prev_state.copy_and_replace(state=PresenceState.ONLINE,\n last_active_ts=now)\n", "state, persist_and_notify, federation_p...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_40(self, VAR_128, VAR_129=['email'], VAR_33=True, VAR_130=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_254 = self.table_user()\n", "VAR_255 = self.settings.cas_create_user\n", "VAR_141 = None\n", "VAR_256 = []\n", "VAR_257 = ['registration_id', 'username', 'email']\n", "if self.settings.log...
[ "def get_or_create_user(self, keys, update_fields=['email'], login=True, get...\n", "\"\"\"docstring\"\"\"\n", "table_user = self.table_user()\n", "create_user = self.settings.cas_create_user\n", "user = None\n", "checks = []\n", "guess_fields = ['registration_id', 'username', 'email']\n", "if self.se...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Assign'", "Condition", "Expr'", "For", "Condition", "Condition", "Expr'", "Return'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Condition", "C...
[ "def FUNC_2(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = '@john:test_remote'\n", "VAR_13 = 'test_remote'\n", "self.resync_attempts = 0\n", "def FUNC_5(VAR_5, VAR_0):...\n", "if VAR_0 == VAR_12:\n", "self.resync_attempts += 1\n", "VAR_14 = self.homeserver.get_federation_client()\n", "VAR_14.q...
[ "def test_retry_device_list_resync(self):...\n", "\"\"\"docstring\"\"\"\n", "remote_user_id = '@john:test_remote'\n", "remote_origin = 'test_remote'\n", "self.resync_attempts = 0\n", "def query_user_devices(destination, user_id):...\n", "if user_id == remote_user_id:\n", "self.resync_attempts += 1\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Condition", "AugAssign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_16(self):...\n", "return VAR_5(str('WagtailForm'), (CLASS_0,), self.formfields)\n" ]
[ "def get_form_class(self):...\n", "return type(str('WagtailForm'), (BaseForm,), self.formfields)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(VAR_2, VAR_3, VAR_5, VAR_6=0):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = saved_model_utils.get_meta_graph_def(VAR_2, VAR_3)\n", "VAR_27 = FUNC_2(VAR_4, VAR_5)\n", "VAR_28 = FUNC_3(VAR_4, VAR_5)\n", "VAR_29 = ' ' * VAR_6\n", "def FUNC_33(VAR_30):...\n", "print(VAR_29 + VAR_30)\n", "FUNC...
[ "def _show_inputs_outputs(saved_model_dir, tag_set, signature_def_key, indent=0...\n", "\"\"\"docstring\"\"\"\n", "meta_graph_def = saved_model_utils.get_meta_graph_def(saved_model_dir, tag_set)\n", "inputs_tensor_info = _get_inputs_tensor_info_from_meta_graph_def(meta_graph_def\n , signature_def_key)\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Expr'", "Expr'", "For", "Expr'", "Expr'", "Expr'", "For", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_65():...\n", "\"\"\"docstring\"\"\"\n", "if not hasattr(VAR_1, 'doc_events_hooks'):\n", "VAR_184 = FUNC_66('doc_events', {})\n", "return VAR_1.doc_events_hooks\n", "VAR_179 = {}\n", "for VAR_46, VAR_105 in iteritems(VAR_184):\n", "if isinstance(VAR_46, tuple):\n", "VAR_1.doc_events_hooks =...
[ "def get_doc_hooks():...\n", "\"\"\"docstring\"\"\"\n", "if not hasattr(local, 'doc_events_hooks'):\n", "hooks = get_hooks('doc_events', {})\n", "return local.doc_events_hooks\n", "out = {}\n", "for key, value in iteritems(hooks):\n", "if isinstance(key, tuple):\n", "local.doc_events_hooks = out\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Return'", "Assign'", "For", "Condition", "Assign'", "For", "Expr'", "Expr'" ]
[ "def FUNC_2(self):...\n", "super().setUp()\n", "useChameleonEngine()\n", "zope.component.provideAdapter(DefaultTraversable, (None,))\n", "provideUtility(DefaultUnicodeEncodingConflictResolver,\n IUnicodeEncodingConflictResolver)\n", "self.folder = VAR_14 = CLASS_1()\n", "VAR_14.laf = CLASS_0()\n", ...
[ "def setUp(self):...\n", "super().setUp()\n", "useChameleonEngine()\n", "zope.component.provideAdapter(DefaultTraversable, (None,))\n", "provideUtility(DefaultUnicodeEncodingConflictResolver,\n IUnicodeEncodingConflictResolver)\n", "self.folder = f = Folder()\n", "f.laf = AqPageTemplate()\n", "f.t ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_6(self, VAR_6, VAR_7):...\n", "VAR_51 = self.userdb.auth(VAR_6, VAR_7)\n", "VAR_52 = cherry.config['server.permit_remote_admin_login']\n", "VAR_50 = VAR_53.request.remote.ip in ('127.0.0.1', '::1')\n", "if not VAR_50 and VAR_51.isadmin and not VAR_52:\n", "log.i(_('Rejected remote admin login fr...
[ "def session_auth(self, username, password):...\n", "user = self.userdb.auth(username, password)\n", "allow_remote = cherry.config['server.permit_remote_admin_login']\n", "is_loopback = cherrypy.request.remote.ip in ('127.0.0.1', '::1')\n", "if not is_loopback and user.isadmin and not allow_remote:\n", "l...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_35(self):...\n", "self.parser = saved_model_cli.create_parser()\n", "VAR_10 = test.test_src_dir_path(VAR_0)\n", "VAR_11 = self.parser.parse_args(['scan', '--dir', VAR_10])\n", "saved_model_cli.scan(VAR_11)\n", "VAR_12 = out.getvalue().strip()\n", "self.assertTrue('does not contain denylisted o...
[ "def testScanCommand(self):...\n", "self.parser = saved_model_cli.create_parser()\n", "base_path = test.test_src_dir_path(SAVED_MODEL_PATH)\n", "args = self.parser.parse_args(['scan', '--dir', base_path])\n", "saved_model_cli.scan(args)\n", "output = out.getvalue().strip()\n", "self.assertTrue('does not...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_8(VAR_13, VAR_14=2):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_13 in VAR_15:\n", "return VAR_15[VAR_13]\n", "VAR_27 = frozenset('abcdefghijklmnopqrstuvwxyz0123456789')\n", "VAR_28 = ''\n", "for char in VAR_13.lower():\n", "if len(VAR_28) == VAR_14:\n", "VAR_15[VAR_13] = VAR_28\n", "if ch...
[ "def groupFromKey(key, length=2):...\n", "\"\"\"docstring\"\"\"\n", "if key in _groupFromKeyCache:\n", "return _groupFromKeyCache[key]\n", "safeChars = frozenset('abcdefghijklmnopqrstuvwxyz0123456789')\n", "group = ''\n", "for char in key.lower():\n", "if len(group) == length:\n", "_groupFromKeyCach...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "For", "Condition", "Assign'", "Condition", "Return'", "AugAssign'" ]
[ "@property...\n", "return super().start()\n" ]
[ "@property...\n", "return super().start()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_25(VAR_0, VAR_2, VAR_1):...\n", "VAR_8 = VAR_1.post('/dataobj/move/1', follow_redirects=True)\n", "assert b'No path specified.' in VAR_8.data\n", "VAR_8 = VAR_1.post('/dataobj/move/2', data={'path': 'aaa', 'submit': 'true'\n }, follow_redirects=True)\n", "assert b'Data not found' in VAR_8.data\...
[ "def test_invalid_inputs_fail_move_data(test_app, note_fixture, client):...\n", "resp = client.post('/dataobj/move/1', follow_redirects=True)\n", "assert b'No path specified.' in resp.data\n", "resp = client.post('/dataobj/move/2', data={'path': 'aaa', 'submit': 'true'\n }, follow_redirects=True)\n", "as...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assert'", "Assign'", "Assert'", "Assign'", "Assert'", "Assign'", "For", "Assign'", "Assert'" ]
[ "def FUNC_30(VAR_27, VAR_32='\\n'):...\n", "print(VAR_26 + VAR_27, VAR_32=end)\n" ]
[ "def in_print(s, end='\\n'):...\n", "print(indent_str + s, end=end)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_27(self):...\n", "VAR_9 = self._makeEngine()\n", "VAR_5 = self._makeContext()\n", "VAR_11 = VAR_9.compile('string:$eightbit')\n", "self.assertRaises(UnicodeDecodeError, VAR_5.evaluate, VAR_11)\n", "from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver\n", "from Product...
[ "def test_mixed(self):...\n", "eng = self._makeEngine()\n", "ec = self._makeContext()\n", "expr = eng.compile('string:$eightbit')\n", "self.assertRaises(UnicodeDecodeError, ec.evaluate, expr)\n", "from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver\n", "from Products.PageTempl...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Expr'" ]
[ "def FUNC_30(self):...\n", "VAR_22 = models.Band.objects.create(name='Linkin Park')\n", "VAR_28 = VAR_22.album_set.create(name='Hybrid Theory', cover_art=\n 'albums\\\\hybrid_theory.jpg')\n", "VAR_27 = widgets.AdminFileWidget()\n", "self.assertHTMLEqual(conditional_escape(VAR_27.render('test', VAR_28.\n ...
[ "def test_render(self):...\n", "band = models.Band.objects.create(name='Linkin Park')\n", "album = band.album_set.create(name='Hybrid Theory', cover_art=\n 'albums\\\\hybrid_theory.jpg')\n", "w = widgets.AdminFileWidget()\n", "self.assertHTMLEqual(conditional_escape(w.render('test', album.cover_art)),\n ...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_121(*VAR_79, **VAR_42):...\n", "if VAR_13.read_from_replica:\n", "FUNC_6()\n", "VAR_225 = VAR_129(*VAR_79, **get_newargs(fn, kwargs))\n", "if VAR_1 and hasattr(VAR_1, 'primary_db'):\n", "return VAR_225\n", "VAR_1.db.close()\n", "VAR_1.db = VAR_1.primary_db\n" ]
[ "def wrapper_fn(*args, **kwargs):...\n", "if conf.read_from_replica:\n", "connect_replica()\n", "retval = fn(*args, **get_newargs(fn, kwargs))\n", "if local and hasattr(local, 'primary_db'):\n", "return retval\n", "local.db.close()\n", "local.db = local.primary_db\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Condition", "Return'", "Expr'", "Assign'" ]
[ "def FUNC_14(self, VAR_15, VAR_16):...\n", "if not VAR_16:\n", "self._pull_to_push_producer = CLASS_5(self.reactor, VAR_15, self)\n", "super().registerProducer(VAR_15, True)\n", "VAR_15 = self._pull_to_push_producer\n" ]
[ "def registerProducer(self, producer, streaming):...\n", "if not streaming:\n", "self._pull_to_push_producer = _PullToPushProducer(self.reactor, producer, self)\n", "super().registerProducer(producer, True)\n", "producer = self._pull_to_push_producer\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Expr'", "Assign'" ]
[ "def __init__(self, VAR_8, *VAR_6, **VAR_7):...\n", "if 'instance' in VAR_7:\n", "VAR_7.pop('instance')\n", "super().__init__(VAR_8, *VAR_6, **kwargs)\n", "self.fields['source_language'].initial = Language.objects.default_language\n", "self.request = VAR_8\n", "self.helper = FormHelper()\n", "self.hel...
[ "def __init__(self, request, *args, **kwargs):...\n", "if 'instance' in kwargs:\n", "kwargs.pop('instance')\n", "super().__init__(request, *args, **kwargs)\n", "self.fields['source_language'].initial = Language.objects.default_language\n", "self.request = request\n", "self.helper = FormHelper()\n", "s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_17(VAR_22, VAR_17):...\n", "VAR_58 = [VAR_22.strip()]\n", "VAR_58 = [x for x in VAR_58 if x != '']\n", "return FUNC_7(VAR_58, VAR_17.series, db.Series, calibre_db.session, 'series')\n" ]
[ "def edit_book_series(series, book):...\n", "input_series = [series.strip()]\n", "input_series = [x for x in input_series if x != '']\n", "return modify_database_object(input_series, book.series, db.Series,\n calibre_db.session, 'series')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_171(VAR_14):...\n", "VAR_415 = 'padding:0 0.2em;line-height:%.2fem;font-size:%.2fem'\n", "VAR_416 = 1.5 * (VAR_14 - VAR_13) / max(VAR_9 - VAR_13, 1) + 1.3\n", "return VAR_415 % (1.3, VAR_416)\n" ]
[ "def style(c):...\n", "STYLE = 'padding:0 0.2em;line-height:%.2fem;font-size:%.2fem'\n", "size = 1.5 * (c - b) / max(a - b, 1) + 1.3\n", "return STYLE % (1.3, size)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_20(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "frappe.db.sql('delete from `tabSingles` where doctype=%s', self.doctype)\n", "for field, VAR_26 in iteritems(VAR_21):\n", "if field != 'doctype':\n", "if self.doctype in frappe.db.value_cache:\n", "frappe.db.sql(\n \"\"\"insert into `tabS...
[ "def update_single(self, d):...\n", "\"\"\"docstring\"\"\"\n", "frappe.db.sql('delete from `tabSingles` where doctype=%s', self.doctype)\n", "for field, value in iteritems(d):\n", "if field != 'doctype':\n", "if self.doctype in frappe.db.value_cache:\n", "frappe.db.sql(\n \"\"\"insert into `tabSingle...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "For", "Condition", "Condition", "Expr'" ]
[ "def __init__(self, VAR_7: str, VAR_8: HomeServerConfig, VAR_9=None, VAR_10=...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_9:\n", "from twisted.internet import reactor as _reactor\n", "self._reactor = VAR_9\n", "VAR_9 = _reactor\n", "self.hostname = VAR_7\n", "self.signing_key = VAR_8.key.signing_key[...
[ "def __init__(self, hostname: str, config: HomeServerConfig, reactor=None,...\n", "\"\"\"docstring\"\"\"\n", "if not reactor:\n", "from twisted.internet import reactor as _reactor\n", "self._reactor = reactor\n", "reactor = _reactor\n", "self.hostname = hostname\n", "self.signing_key = config.key.sign...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_2(VAR_4: Dict[str, Any]) ->Union[datetime, date]:...\n", "VAR_5: Union[datetime, date]\n", "VAR_5 = datetime.fromisoformat(VAR_0['aCamelDateTime'])\n", "VAR_5 = date.fromisoformat(VAR_0['aCamelDateTime'])\n", "return VAR_5\n", "return VAR_5\n" ]
[ "def _parse_a_camel_date_time(data: Dict[str, Any]) ->Union[datetime, date]:...\n", "a_camel_date_time: Union[datetime, date]\n", "a_camel_date_time = datetime.fromisoformat(d['aCamelDateTime'])\n", "a_camel_date_time = date.fromisoformat(d['aCamelDateTime'])\n", "return a_camel_date_time\n", "return a_ca...
[ 0, 5, 5, 5, 0, 0 ]
[ "FunctionDef'", "AnnAssign'", "Assign'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_8(self, VAR_0, VAR_13):...\n", "VAR_26 = VAR_0 / 'foo'\n", "VAR_27 = VAR_0 / 'bar'\n", "VAR_26.ensure()\n", "VAR_27.ensure()\n", "VAR_25 = VAR_13(str(VAR_0))\n", "assert VAR_25.parent\n", "assert not VAR_25.folders\n", "VAR_28 = self.Item(FUNC_1(VAR_26), VAR_26.relto(VAR_0))\n", "VAR_29 ...
[ "def test_files(self, tmpdir, parser):...\n", "foo_file = tmpdir / 'foo'\n", "bar_file = tmpdir / 'bar'\n", "foo_file.ensure()\n", "bar_file.ensure()\n", "parsed = parser(str(tmpdir))\n", "assert parsed.parent\n", "assert not parsed.folders\n", "foo_item = self.Item(_file_url(foo_file), foo_file.rel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assert'", "Assert'", "Assign'", "Assign'", "Assert'" ]
[ "def FUNC_21():...\n", "from octoprint.util.jinja import get_all_template_paths\n", "return get_all_template_paths(app.jinja_loader)\n" ]
[ "def _get_all_templates():...\n", "from octoprint.util.jinja import get_all_template_paths\n", "return get_all_template_paths(app.jinja_loader)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "Return'" ]
[ "def __init__(self, VAR_100=None, VAR_186=False):...\n", "self.check_args = VAR_186\n", "self.run_procedures = {}\n", "self.csv_procedures = {}\n", "self.xml_procedures = {}\n", "self.rss_procedures = {}\n", "self.json_procedures = {}\n", "self.jsonrpc_procedures = {}\n", "self.jsonrpc2_procedures =...
[ "def __init__(self, environment=None, check_args=False):...\n", "self.check_args = check_args\n", "self.run_procedures = {}\n", "self.csv_procedures = {}\n", "self.xml_procedures = {}\n", "self.rss_procedures = {}\n", "self.json_procedures = {}\n", "self.jsonrpc_procedures = {}\n", "self.jsonrpc2_pr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_105(VAR_62, VAR_9, VAR_166=None, VAR_167=False, VAR_168=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_202 = FUNC_48(VAR_62)\n", "if VAR_202.track_changes:\n", "VAR_216 = VAR_12.get_all('Version', VAR_106={'ref_doctype': doctype,\n 'docname': name, 'order_by': 'creation' if head else None, 'limi...
[ "def get_version(doctype, name, limit=None, head=False, raise_err=True):...\n", "\"\"\"docstring\"\"\"\n", "meta = get_meta(doctype)\n", "if meta.track_changes:\n", "names = db.get_all('Version', filters={'ref_doctype': doctype, 'docname':\n name, 'order_by': 'creation' if head else None, 'limit': limit}...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Condition", "ImportFrom'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = list(VAR_12)\n", "VAR_12.reverse()\n", "while VAR_12:\n", "VAR_30 = VAR_12.pop()\n", "return VAR_10\n", "if VAR_30 == '_':\n", "warnings.warn(\n 'Traversing to the name `_` is deprecated and will be removed in Zope 6.',\n DeprecationWar...
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "path_items = list(path_items)\n", "path_items.reverse()\n", "while path_items:\n", "name = path_items.pop()\n", "return base\n", "if name == '_':\n", "warnings.warn(\n 'Traversing to the name `_` is deprecated and will be removed in Zope 6.',\n ...
[ 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1 ]
[ "Condition", "Docstring", "Assign'", "Expr'", "Condition", "Assign'", "Return'", "Condition", "Expr'", "Condition", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_8(self, VAR_5):...\n", "for VAR_20 in self._subexprs[:-1]:\n", "if self._name == 'nocall':\n", "VAR_6 = VAR_20(VAR_5)\n", "return VAR_6\n", "return FUNC_2(VAR_6, VAR_5.vars)\n" ]
[ "def _eval(self, econtext):...\n", "for expr in self._subexprs[:-1]:\n", "if self._name == 'nocall':\n", "ob = expr(econtext)\n", "return ob\n", "return render(ob, econtext.vars)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Assign'", "Return'", "Return'" ]
[ "def FUNC_1():...\n", "return tornado.web.Application([('/', CLASS_5)])\n" ]
[ "def make_redirect_app():...\n", "return tornado.web.Application([('/', redirect_handler)])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@login_required...\n", "VAR_11 = get_object_or_404(TopicPrivate.objects.select_related('topic'),\n VAR_3=topic_id, VAR_7=request.user)\n", "VAR_12 = VAR_11.topic\n", "if VAR_12.slug != VAR_4:\n", "return HttpResponsePermanentRedirect(VAR_12.get_absolute_url())\n", "topic_viewed(VAR_1=request, VAR_12=t...
[ "@login_required...\n", "topic_private = get_object_or_404(TopicPrivate.objects.select_related(\n 'topic'), topic_id=topic_id, user=request.user)\n", "topic = topic_private.topic\n", "if topic.slug != slug:\n", "return HttpResponsePermanentRedirect(topic.get_absolute_url())\n", "topic_viewed(request=re...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Return'", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_38(self):...\n", "from zope.interface.verify import verifyObject\n", "from zope.tal.interfaces import ITALExpressionEngine\n", "verifyObject(ITALExpressionEngine, self._makeOne())\n" ]
[ "def test_instance_conforms_to_ITALExpressionEngine(self):...\n", "from zope.interface.verify import verifyObject\n", "from zope.tal.interfaces import ITALExpressionEngine\n", "verifyObject(ITALExpressionEngine, self._makeOne())\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "ImportFrom'", "Expr'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n", "if not self.module:\n", "self.module = frappe.db.get_value('DocType', self.ref_doctype, 'module')\n", "if not self.is_standard:\n", "self.is_standard = 'No'\n", "if self.is_standard == 'No':\n", "if frappe.session.user == 'Administrator' and getatt...
[ "def validate(self):...\n", "\"\"\"docstring\"\"\"\n", "if not self.module:\n", "self.module = frappe.db.get_value('DocType', self.ref_doctype, 'module')\n", "if not self.is_standard:\n", "self.is_standard = 'No'\n", "if self.is_standard == 'No':\n", "if frappe.session.user == 'Administrator' and geta...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Condition", "Condition", "Assign'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "async def FUNC_18(VAR_24):...\n", "VAR_65 = await self.store.get_current_state_ids(VAR_24)\n", "VAR_40[VAR_24] = VAR_65\n" ]
[ "async def _fetch_room_state(room_id):...\n", "room_state = await self.store.get_current_state_ids(room_id)\n", "state_by_room[room_id] = room_state\n" ]
[ 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_56(self, VAR_18, VAR_26=None, VAR_27=True, VAR_28=False, VAR_29=False...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(VAR_18, dict):\n", "self.update(VAR_18)\n", "self.set(VAR_18, VAR_26)\n", "if VAR_27 and (self.doctype, self.name) not in frappe.flags.currently_saving:\n", "self.set('modifie...
[ "def db_set(self, fieldname, value=None, update_modified=True, notify=False,...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(fieldname, dict):\n", "self.update(fieldname)\n", "self.set(fieldname, value)\n", "if update_modified and (self.doctype, self.name\n", "self.set('modified', now())\n", "self.lo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "@pytest.fixture...\n", "\"\"\"docstring\"\"\"\n", "VAR_3.setattr('s3file.forms.S3FileInputMixin.upload_folder', os.path.join(\n storage.aws_location, 'tmp'))\n" ]
[ "@pytest.fixture...\n", "\"\"\"docstring\"\"\"\n", "monkeypatch.setattr('s3file.forms.S3FileInputMixin.upload_folder', os.path.\n join(storage.aws_location, 'tmp'))\n" ]
[ 1, 0, 1 ]
[ "Condition", "Docstring", "Expr'" ]
[ "def FUNC_79(self):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.desk.doctype.tag.tag import DocTags\n", "return DocTags(self.doctype).get_tags(self.name).split(',')[1:]\n" ]
[ "def get_tags(self):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.desk.doctype.tag.tag import DocTags\n", "return DocTags(self.doctype).get_tags(self.name).split(',')[1:]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "ImportFrom'", "Return'" ]
[ "def FUNC_26(VAR_48=[], VAR_49='', VAR_50='No Subject', VAR_51='No Message',...\n", "\"\"\"docstring\"\"\"\n", "VAR_181 = None\n", "if VAR_78:\n", "VAR_51, VAR_181 = get_email_from_template(VAR_78, VAR_79)\n", "VAR_51 = VAR_61 or VAR_51\n", "if VAR_52:\n", "from frappe.utils import md_to_html\n", "i...
[ "def sendmail(recipients=[], sender='', subject='No Subject', message=...\n", "\"\"\"docstring\"\"\"\n", "text_content = None\n", "if template:\n", "message, text_content = get_email_from_template(template, args)\n", "message = content or message\n", "if as_markdown:\n", "from frappe.utils import md_t...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "ImportFrom'", "Condition", "Assign'", "Assign'", "ImportFrom'", "Expr'" ]
[ "def FUNC_1(self):...\n", "VAR_3 = super().default_config()\n", "VAR_3['worker_app'] = 'synapse.app.frontend_proxy'\n", "VAR_3['worker_listeners'] = [{'type': 'http', 'port': 8080,\n 'bind_addresses': ['0.0.0.0'], 'resources': [{'names': ['client']}]}]\n", "return VAR_3\n" ]
[ "def default_config(self):...\n", "c = super().default_config()\n", "c['worker_app'] = 'synapse.app.frontend_proxy'\n", "c['worker_listeners'] = [{'type': 'http', 'port': 8080, 'bind_addresses': [\n '0.0.0.0'], 'resources': [{'names': ['client']}]}]\n", "return c\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_32(VAR_87):...\n", "VAR_86.update(VAR_87.encode('utf-8'))\n" ]
[ "def hash_update(value):...\n", "hash.update(value.encode('utf-8'))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "async def FUNC_6(self):...\n", "return self.get_repo_url()\n" ]
[ "async def get_resolved_spec(self):...\n", "return self.get_repo_url()\n" ]
[ 0, 0 ]
[ "AsyncFunctionDef'", "Return'" ]
[ "def FUNC_12(self):...\n", "VAR_11, VAR_12, VAR_13, VAR_14 = self._makeTree()\n", "VAR_16 = CLASS_1()\n", "VAR_20 = 'http://localhost/VirtualHostBase/http/test/VirtualHostRoot/xxx'\n", "VAR_21 = 'http://test/xxx'\n", "VAR_17 = FauxRequest(RESPONSE=response, URL=vhm, ACTUAL_URL=actualURL)\n", "VAR_12.REQ...
[ "def test_challenge_with_vhm(self):...\n", "rc, root, folder, object = self._makeTree()\n", "response = FauxCookieResponse()\n", "vhm = 'http://localhost/VirtualHostBase/http/test/VirtualHostRoot/xxx'\n", "actualURL = 'http://test/xxx'\n", "request = FauxRequest(RESPONSE=response, URL=vhm, ACTUAL_URL=actu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_147(self, VAR_104='default', VAR_105='index'):...\n", "VAR_101 = self.auth.db\n", "VAR_56 = VAR_263.request\n", "VAR_341 = VAR_101.wiki_page(VAR_156='wiki-menu')\n", "VAR_342 = []\n", "if VAR_341:\n", "VAR_411 = {'': VAR_342}\n", "if self.can_see_menu():\n", "VAR_412 = re.compile(\n '[\...
[ "def menu(self, controller='default', function='index'):...\n", "db = self.auth.db\n", "request = current.request\n", "menu_page = db.wiki_page(slug='wiki-menu')\n", "menu = []\n", "if menu_page:\n", "tree = {'': menu}\n", "if self.can_see_menu():\n", "regex = re.compile(\n '[\\r\\n\\t]*(?P<base>...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "For", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'...
[ "def FUNC_102(self, VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "self.amfrpc_procedures[VAR_10.__name__] = VAR_10\n", "return VAR_10\n" ]
[ "def amfrpc(self, f):...\n", "\"\"\"docstring\"\"\"\n", "self.amfrpc_procedures[f.__name__] = f\n", "return f\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "import os\n", "import shutil\n", "import subprocess\n", "import sys\n", "import tempfile\n", "import traceback\n", "from pathlib import Path\n", "from typing import List\n", "from flask import Response, request\n", "from werkzeug.utils import secure_filename\n", "from archivy import click_web\n...
[ "import os\n", "import shutil\n", "import subprocess\n", "import sys\n", "import tempfile\n", "import traceback\n", "from pathlib import Path\n", "from typing import List\n", "from flask import Response, request\n", "from werkzeug.utils import secure_filename\n", "from archivy import click_web\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, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "...
[ "def FUNC_40(self):...\n", "if self.flags.ignore_links or self._action == 'cancel':\n", "return\n", "VAR_63, VAR_64 = self.get_invalid_links()\n", "for VAR_21 in self.get_all_children():\n", "VAR_86 = VAR_21.get_invalid_links(is_submittable=self.meta.is_submittable)\n", "if VAR_63:\n", "VAR_63.extend(...
[ "def _validate_links(self):...\n", "if self.flags.ignore_links or self._action == 'cancel':\n", "return\n", "invalid_links, cancelled_links = self.get_invalid_links()\n", "for d in self.get_all_children():\n", "result = d.get_invalid_links(is_submittable=self.meta.is_submittable)\n", "if invalid_links:\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "For", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_7(self):...\n", "return self.spec\n" ]
[ "def get_repo_url(self):...\n", "return self.spec\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "async def FUNC_10(VAR_16, VAR_17):...\n", "if VAR_17 not in [u.to_string() for u in self.room_members]:\n", "return None\n" ]
[ "async def check_user_in_room(room_id, user_id):...\n", "if user_id not in [u.to_string() for u in self.room_members]:\n", "return None\n" ]
[ 0, 0, 0 ]
[ "AsyncFunctionDef'", "For", "Return'" ]
[ "@FUNC_0...\n", "return Clock(self._reactor)\n" ]
[ "@cache_in_self...\n", "return Clock(self._reactor)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_30():...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = '/'.join(request.args)\n", "VAR_15 = apath(VAR_5, VAR_122=request)\n", "VAR_7 = FUNC_3(VAR_15).split('\\n')\n", "VAR_8 = FUNC_3(VAR_15 + '.1').split('\\n')\n", "session.flash = 'Other file, no longer there'\n", "VAR_68 = difflib.ndiff(VAR_7, V...
[ "def resolve():...\n", "\"\"\"docstring\"\"\"\n", "filename = '/'.join(request.args)\n", "path = apath(filename, r=request)\n", "a = safe_read(path).split('\\n')\n", "b = safe_read(path + '.1').split('\\n')\n", "session.flash = 'Other file, no longer there'\n", "d = difflib.ndiff(a, b)\n", "redirect...
[ 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'", "FunctionDef'", "Docstring", "Assign'", "For", "Condition", "Return'", "AugAssign'", "Condition", "AugAssign'", "Condition" ]
[ "def FUNC_18(self, VAR_17, VAR_18):...\n", "if not VAR_53.session['admin']:\n", "VAR_66 = albumArtFilePath(VAR_17)\n", "VAR_64 = albumartfetcher.AlbumArtFetcher()\n", "VAR_20, VAR_67 = VAR_64.retrieveData(VAR_18)\n", "self.albumartcache_save(VAR_66, VAR_20)\n" ]
[ "def api_albumart_set(self, directory, imageurl):...\n", "if not cherrypy.session['admin']:\n", "b64imgpath = albumArtFilePath(directory)\n", "fetcher = albumartfetcher.AlbumArtFetcher()\n", "data, header = fetcher.retrieveData(imageurl)\n", "self.albumartcache_save(b64imgpath, data)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_14(VAR_17):...\n", "if not VAR_17:\n", "return ''\n", "VAR_24 = list(urlsplit(VAR_17))\n", "VAR_24[0] = ''\n", "VAR_24[1] = ''\n", "VAR_25 = urlunsplit(VAR_24)\n", "if not VAR_25:\n", "VAR_25 = './'\n", "return VAR_25\n" ]
[ "def get_next_path(unsafe_next_path):...\n", "if not unsafe_next_path:\n", "return ''\n", "parts = list(urlsplit(unsafe_next_path))\n", "parts[0] = ''\n", "parts[1] = ''\n", "safe_next_path = urlunsplit(parts)\n", "if not safe_next_path:\n", "safe_next_path = './'\n", "return safe_next_path\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "VAR_118 = VAR_9['wid']\n", "VAR_119 = VAR_8.getObject('Well', VAR_118)\n", "if VAR_119 is None:\n", "return HttpJavascriptResponseServerError('\"\"')\n", "VAR_120 = VAR_9.get('thumbprefix', 'webgateway_render_thumbnail')\n", "def FUNC_65(VAR_6):......
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "wid = kwargs['wid']\n", "well = conn.getObject('Well', wid)\n", "if well is None:\n", "return HttpJavascriptResponseServerError('\"\"')\n", "prefix = kwargs.get('thumbprefix', 'webgateway_render_thumbnail')\n", "def urlprefix(iid):...\n", "return...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "FunctionDef'", "Return'" ]
[ "def FUNC_5(VAR_14, VAR_19=True, **VAR_20):...\n", "\"\"\"docstring\"\"\"\n", "return CLASS_5(VAR_19=escape, **kwargs)(VAR_14)\n" ]
[ "def markdown(text, escape=True, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "return Markdown(escape=escape, **kwargs)(text)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_31():...\n", "\"\"\"docstring\"\"\"\n", "VAR_63 = argparse.ArgumentParser(description=\n 'saved_model_cli: Command-line interface for SavedModel')\n", "VAR_63.add_argument('-v', '--version', action='version', version='0.1.0')\n", "VAR_23 = VAR_63.add_subparsers(title='commands', description=\n ...
[ "def create_parser():...\n", "\"\"\"docstring\"\"\"\n", "parser = argparse.ArgumentParser(description=\n 'saved_model_cli: Command-line interface for SavedModel')\n", "parser.add_argument('-v', '--version', action='version', version='0.1.0')\n", "subparsers = parser.add_subparsers(title='commands', descr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_49(self, VAR_38, VAR_39):...\n", "VAR_87 = 'attachment; filename=\"' + VAR_39 + '\"'\n", "VAR_53.response.headers['Content-Type'] = 'application/x-download'\n", "VAR_53.response.headers['Content-Disposition'] = VAR_87\n", "return codecs.encode(VAR_38, 'UTF-8')\n" ]
[ "def serve_string_as_file(self, string, filename):...\n", "content_disposition = 'attachment; filename=\"' + filename + '\"'\n", "cherrypy.response.headers['Content-Type'] = 'application/x-download'\n", "cherrypy.response.headers['Content-Disposition'] = content_disposition\n", "return codecs.encode(string,...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@property...\n", "return super().item()\n" ]
[ "@property...\n", "return super().item()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_3(self, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "assert NotImplementedError(\n 'This method is to be implemented by Attachment classes')\n" ]
[ "def attachment_path(self, filename):...\n", "\"\"\"docstring\"\"\"\n", "assert NotImplementedError(\n 'This method is to be implemented by Attachment classes')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'" ]
[ "def FUNC_51(VAR_2, VAR_39, VAR_40, VAR_8=None, **VAR_9):...\n", "warnings.warn('Deprecated. Use _bulk_file_annotations()', DeprecationWarning)\n", "return FUNC_52(VAR_2, VAR_39, VAR_40, VAR_8, **kwargs)\n" ]
[ "def _annotations(request, objtype, objid, conn=None, **kwargs):...\n", "warnings.warn('Deprecated. Use _bulk_file_annotations()', DeprecationWarning)\n", "return _bulk_file_annotations(request, objtype, objid, conn, **kwargs)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Return'" ]
[ "def FUNC_40(self, VAR_44):...\n", "VAR_14 = self.output(VAR_44.group(1))\n", "return self.renderer.strikethrough(VAR_14)\n" ]
[ "def output_strikethrough(self, m):...\n", "text = self.output(m.group(1))\n", "return self.renderer.strikethrough(text)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_7(VAR_11):...\n", "if VAR_11 == self.room_id:\n", "return defer.succeed([self.user])\n", "return defer.succeed([])\n" ]
[ "def get_room_members(room_id):...\n", "if room_id == self.room_id:\n", "return defer.succeed([self.user])\n", "return defer.succeed([])\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_7(self, VAR_0, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_9 = SynapseSite('test', 'site_tag', parse_listener_def({'type': 'http',\n 'port': 0}), self.resource, '1.0')\n", "VAR_7, VAR_6 = make_request(self.reactor, VAR_9, VAR_0, VAR_1, shorthand=False)\n", "return VAR_6\n" ]
[ "def _make_request(self, method, path):...\n", "\"\"\"docstring\"\"\"\n", "site = SynapseSite('test', 'site_tag', parse_listener_def({'type': 'http',\n 'port': 0}), self.resource, '1.0')\n", "_, channel = make_request(self.reactor, site, method, path, shorthand=False)\n", "return channel\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_15(self):...\n", "VAR_5 = self._makeContext()\n", "self.assertEqual(VAR_5.evaluate('x | python:int'), int)\n" ]
[ "def test_hybrid_with_python_expression_type_value_not_called(self):...\n", "ec = self._makeContext()\n", "self.assertEqual(ec.evaluate('x | python:int'), int)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def __setattr__(self, VAR_46, VAR_105):...\n", "self[VAR_46] = VAR_105\n" ]
[ "def __setattr__(self, key, value):...\n", "self[key] = value\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_83(self, VAR_71):...\n", "if isinstance(VAR_71, dict):\n", "if not self.get('_return_value'):\n", "self._return_value = VAR_71 or self.get('_return_value')\n", "self._return_value = {}\n", "self._return_value.update(VAR_71)\n" ]
[ "def add_to_return_value(self, new_return_value):...\n", "if isinstance(new_return_value, dict):\n", "if not self.get('_return_value'):\n", "self._return_value = new_return_value or self.get('_return_value')\n", "self._return_value = {}\n", "self._return_value.update(new_return_value)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_8, *VAR_6, **VAR_7):...\n", "super().__init__(VAR_8, *VAR_6, **kwargs)\n", "for VAR_39, VAR_13 in self.fields.items():\n", "if VAR_39 == 'discovery':\n", "self.fields['vcs'].choices = VCS_REGISTRY.get_choices()\n", "VAR_13.widget = forms.HiddenInput()\n", "self.discovered = self....
[ "def __init__(self, request, *args, **kwargs):...\n", "super().__init__(request, *args, **kwargs)\n", "for field, value in self.fields.items():\n", "if field == 'discovery':\n", "self.fields['vcs'].choices = VCS_REGISTRY.get_choices()\n", "value.widget = forms.HiddenInput()\n", "self.discovered = self.p...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "For", "Condition", "Assign'", "Assign'", "Assign'", "For", "Expr'" ]
[ "def FUNC_11(self) ->None:...\n", "VAR_24 = self.package_dir / 'client.py'\n", "VAR_25 = self.env.get_template('client.pyi')\n", "VAR_24.write_text(VAR_25.render())\n", "VAR_26 = self.package_dir / 'api'\n", "VAR_26.mkdir()\n", "VAR_27 = VAR_26 / '__init__.py'\n", "VAR_27.write_text('\"\"\" Contains s...
[ "def _build_api(self) ->None:...\n", "client_path = self.package_dir / 'client.py'\n", "client_template = self.env.get_template('client.pyi')\n", "client_path.write_text(client_template.render())\n", "api_dir = self.package_dir / 'api'\n", "api_dir.mkdir()\n", "api_init = api_dir / '__init__.py'\n", "...
[ 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'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "@log_function...\n", "\"\"\"docstring\"\"\"\n", "if VAR_34:\n", "VAR_2 = FUNC_1('/groups/%s/summary/roles/%s/users/%s', VAR_30, VAR_34, VAR_16)\n", "VAR_2 = FUNC_1('/groups/%s/summary/users/%s', VAR_30, VAR_16)\n", "return self.client.post_json(VAR_5=destination, VAR_2=path, VAR_3={\n 'requester_user_...
[ "@log_function...\n", "\"\"\"docstring\"\"\"\n", "if role_id:\n", "path = _create_v1_path('/groups/%s/summary/roles/%s/users/%s', group_id,\n role_id, user_id)\n", "path = _create_v1_path('/groups/%s/summary/users/%s', group_id, user_id)\n", "return self.client.post_json(destination=destination, path=p...
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_15(self, VAR_22):...\n", "VAR_65 = type(VAR_22)\n", "if isinstance(VAR_22, VAR_72):\n", "VAR_55 = fromstring(VAR_22)\n", "VAR_55 = copy.deepcopy(VAR_22)\n", "self(VAR_55)\n", "return _transform_result(VAR_65, VAR_55)\n" ]
[ "def clean_html(self, html):...\n", "result_type = type(html)\n", "if isinstance(html, basestring):\n", "doc = fromstring(html)\n", "doc = copy.deepcopy(html)\n", "self(doc)\n", "return _transform_result(result_type, doc)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_86():...\n", "from frappe.utils import cint\n", "return VAR_19.mute_emails or cint(VAR_13.get('mute_emails') or 0) or False\n" ]
[ "def are_emails_muted():...\n", "from frappe.utils import cint\n", "return flags.mute_emails or cint(conf.get('mute_emails') or 0) or False\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "Return'" ]
[ "def FUNC_35(VAR_50):...\n", "" ]
[ "def resp_read(chunk_size):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@VAR_0.filter()...\n", "return [VAR_11 for VAR_11 in VAR_4 if VAR_11.location == VAR_5]\n" ]
[ "@register.filter()...\n", "return [field for field in fields if field.location == location]\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_71(self):...\n", "\"\"\"docstring\"\"\"\n", "self._set_canonical_alias({'alias': self.alias, 'alt_aliases': [self.alias]})\n", "VAR_61 = self._get_canonical_alias()\n", "self.assertEqual(VAR_61, {'alias': self.alias, 'alt_aliases': [self.alias]})\n", "self._set_canonical_alias({})\n", "VAR_61 ...
[ "def test_alias_alt_aliases(self):...\n", "\"\"\"docstring\"\"\"\n", "self._set_canonical_alias({'alias': self.alias, 'alt_aliases': [self.alias]})\n", "res = self._get_canonical_alias()\n", "self.assertEqual(res, {'alias': self.alias, 'alt_aliases': [self.alias]})\n", "self._set_canonical_alias({})\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "@parameterized.named_parameters(('non_tfrt', False))...\n", "self.parser = saved_model_cli.create_parser()\n", "VAR_10 = test.test_src_dir_path(VAR_0)\n", "VAR_42 = os.path.join(test.get_temp_dir(), 'new_dir')\n", "VAR_11 = self.parser.parse_args(['run', '--dir', VAR_10, '--tag_set',\n 'serve', '--signa...
[ "@parameterized.named_parameters(('non_tfrt', False))...\n", "self.parser = saved_model_cli.create_parser()\n", "base_path = test.test_src_dir_path(SAVED_MODEL_PATH)\n", "output_dir = os.path.join(test.get_temp_dir(), 'new_dir')\n", "args = self.parser.parse_args(['run', '--dir', base_path, '--tag_set',\n ...
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_2(VAR_4, VAR_5, VAR_6):...\n", "VAR_8 = []\n", "for c_elements in VAR_4:\n", "VAR_82 = False\n", "return VAR_8\n", "if VAR_5 == 'languages':\n", "VAR_101 = c_elements.lang_code\n", "if VAR_5 == 'custom':\n", "for inp_element in VAR_6:\n", "VAR_101 = c_elements.value\n", "VAR_101 = c_el...
[ "def search_objects_remove(db_book_object, db_type, input_elements):...\n", "del_elements = []\n", "for c_elements in db_book_object:\n", "found = False\n", "return del_elements\n", "if db_type == 'languages':\n", "type_elements = c_elements.lang_code\n", "if db_type == 'custom':\n", "for inp_elemen...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'", "Condition", "Assign'", "Condition", "For", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Expr'" ]
[ "def FUNC_35(self, VAR_38):...\n", "VAR_91 = 'https' if self.certfile else 'http'\n", "return '%s://%s:%i%s' % (VAR_91, VAR_38, self.port, self.base_url)\n" ]
[ "def _url(self, ip):...\n", "proto = 'https' if self.certfile else 'http'\n", "return '%s://%s:%i%s' % (proto, ip, self.port, self.base_url)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "@app.route('/login', methods=['GET', 'POST'])...\n", "VAR_9 = forms.UserForm()\n", "if VAR_9.validate_on_submit():\n", "VAR_31 = get_db()\n", "return render_template('users/login.html', VAR_9=form, title='Login')\n", "VAR_32 = VAR_31.search((Query().username == VAR_9.username.data) & (Query()\n .type ...
[ "@app.route('/login', methods=['GET', 'POST'])...\n", "form = forms.UserForm()\n", "if form.validate_on_submit():\n", "db = get_db()\n", "return render_template('users/login.html', form=form, title='Login')\n", "user = db.search((Query().username == form.username.data) & (Query().type ==\n 'user'))\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'", "Return'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_8():...\n", "return FUNC_4('tickets_per_page')\n" ]
[ "def tickets_per_page_default():...\n", "return get_default_setting('tickets_per_page')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@log_function...\n", "VAR_2 = FUNC_1('/send_join/%s/%s', VAR_6, VAR_7)\n", "VAR_37 = await self.client.put_json(VAR_5=destination, VAR_2=path, VAR_39=\n content)\n", "return VAR_37\n" ]
[ "@log_function...\n", "path = _create_v1_path('/send_join/%s/%s', room_id, event_id)\n", "response = await self.client.put_json(destination=destination, path=path,\n data=content)\n", "return response\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_11(self, VAR_11=None, VAR_17=None):...\n", "\"\"\"docstring\"\"\"\n", "if self.flags.in_print:\n", "return\n", "self.flags.notifications_executed = []\n", "if VAR_11 != None:\n", "self.flags.ignore_permissions = VAR_11\n", "self.flags.ignore_version = frappe.flags.in_test if VAR_17 is None e...
[ "def _save(self, ignore_permissions=None, ignore_version=None):...\n", "\"\"\"docstring\"\"\"\n", "if self.flags.in_print:\n", "return\n", "self.flags.notifications_executed = []\n", "if ignore_permissions != None:\n", "self.flags.ignore_permissions = ignore_permissions\n", "self.flags.ignore_version ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Return'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", ...