lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_31(VAR_39, VAR_47):...\n", "self.assertEqual(None, VAR_47)\n", "VAR_39.returncode = 0\n", "return '', None\n" ]
[ "def communicate(self2, i):...\n", "self.assertEqual(None, i)\n", "self2.returncode = 0\n", "return '', None\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "self.update()\n", "return self.data.keys()\n" ]
[ "def get_module_names(self):...\n", "\"\"\"docstring\"\"\"\n", "self.update()\n", "return self.data.keys()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Return'" ]
[ "def FUNC_6(self, VAR_33):...\n", "VAR_33 = CLASS_17.run(self, VAR_33)\n", "if VAR_33 == None:\n", "return ''\n", "return VAR_33\n" ]
[ "def run(self, val):...\n", "val = VLength.run(self, val)\n", "if val == None:\n", "return ''\n", "return val\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "async def FUNC_3(self, VAR_3: neko.Context, VAR_5: neko.NekoCommand...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = self.bot.command_prefix\n", "VAR_16 = VAR_5.qualified_name\n", "VAR_17 = f\"\"\"**{VAR_16}**\n{VAR_5.brief if VAR_5.brief else ''}\"\"\"\n", "VAR_12 = neko.remove_single_lines(VAR_5.help)\n", ...
[ "async def gen_spec_page(self, ctx: neko.Context, cmd: neko.NekoCommand...\n", "\"\"\"docstring\"\"\"\n", "pfx = self.bot.command_prefix\n", "fqn = cmd.qualified_name\n", "brief = f\"\"\"**{fqn}**\n{cmd.brief if cmd.brief else ''}\"\"\"\n", "doc_str = neko.remove_single_lines(cmd.help)\n", "usages = cmd...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Return'", ...
[ "def FUNC_16(self, *VAR_11, **VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_11:\n", "VAR_11 = list(VAR_11)\n", "return\n", "VAR_26 = VAR_11[0]\n", "if VAR_26 is None:\n", "return\n", "VAR_25 = self.protocol_flags\n", "VAR_26 = utils.to_str(VAR_26, force_string=True)\n", "VAR_27 = VAR_12.pop...
[ "def send_text(self, *args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "if args:\n", "args = list(args)\n", "return\n", "text = args[0]\n", "if text is None:\n", "return\n", "flags = self.protocol_flags\n", "text = utils.to_str(text, force_string=True)\n", "options = kwargs.pop('options', {})\...
[ 0, 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", "Assign'", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "A...
[ "def FUNC_24(self):...\n", "return self._user_id\n" ]
[ "def user_id(self):...\n", "return self._user_id\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(self, VAR_42, VAR_43):...\n", "if not VAR_101.user_is_loggedin or VAR_101.user.needs_captcha():\n", "if not captcha.valid_solution(VAR_42, VAR_43):\n", "VAR_101.errors.add(errors.BAD_CAPTCHA)\n" ]
[ "def run(self, iden, solution):...\n", "if not c.user_is_loggedin or c.user.needs_captcha():\n", "if not captcha.valid_solution(iden, solution):\n", "c.errors.add(errors.BAD_CAPTCHA)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Expr'" ]
[ "def FUNC_7(self):...\n", "self.__use_lb_name = 'katotest-lb-' + self.test_id\n", "self.__use_lb_hc_name = '%s-hc' % self.__use_lb_name\n", "self.__use_lb_tp_name = '%s-tp' % self.__use_lb_name\n", "self.__use_lb_target = '{0}/targetPools/{1}'.format(self.bindings[\n 'TEST_GCE_REGION'], self.__use_lb_tp_...
[ "def upsert_load_balancer(self):...\n", "self.__use_lb_name = 'katotest-lb-' + self.test_id\n", "self.__use_lb_hc_name = '%s-hc' % self.__use_lb_name\n", "self.__use_lb_tp_name = '%s-tp' % self.__use_lb_name\n", "self.__use_lb_target = '{0}/targetPools/{1}'.format(self.bindings[\n 'TEST_GCE_REGION'], sel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_0(VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = dict(VAR_4 or {})\n", "VAR_4['Content-Length'] = len(VAR_2)\n", "def __init__(self):...\n", "self.content = VAR_2\n", "def FUNC_6(self, VAR_7):...\n", "VAR_8 = self.content\n", "while VAR_8:\n", "yield VAR_8[:VAR_7]\...
[ "def make_fake_response(content, url, headers=None):...\n", "\"\"\"docstring\"\"\"\n", "headers = dict(headers or {})\n", "headers['Content-Length'] = len(content)\n", "def __init__(self):...\n", "self.content = content\n", "def iter_content(self, chunk_size):...\n", "c = self.content\n", "while c:\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "FunctionDef'", "Assign'", "FunctionDef'", "Assign'", "Condition", "Expr'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_0, VAR_4):...\n", "VAR_42 = True\n", "if isinstance(VAR_4, list):\n", "for VAR_73 in VAR_4:\n", "return VAR_42\n", "if VAR_0 not in VAR_73:\n", "VAR_42 = False\n", "if 'Between' in VAR_73:\n", "VAR_73[3] = FUNC_3(VAR_73[3])\n" ]
[ "def is_parent_only_filter(doctype, filters):...\n", "only_parent_doctype = True\n", "if isinstance(filters, list):\n", "for flt in filters:\n", "return only_parent_doctype\n", "if doctype not in flt:\n", "only_parent_doctype = False\n", "if 'Between' in flt:\n", "flt[3] = get_between_date_filter(fl...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "For", "Return'", "Condition", "Assign'", "Condition", "Assign'" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed('string')\n" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed(\n 'To install mods for Smash, [Smash Selector](https://gbatemp.net/threads/release-smash-selector.431245/) is recommended. Instructions for use can be found on the page.'\n )\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "VAR_19 = self.common.get_volume_stats(VAR_5)\n", "VAR_19['storage_protocol'] = 'iSCSI'\n", "VAR_20 = self.configuration.safe_get('volume_backend_name')\n", "VAR_19['volume_backend_name'] = VAR_20 or self.__class__.__name__...
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "stats = self.common.get_volume_stats(refresh)\n", "stats['storage_protocol'] = 'iSCSI'\n", "backend_name = self.configuration.safe_get('volume_backend_name')\n", "stats['volume_backend_name'] = backend_name or self.__class...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def __nonzero__(self):...\n", "return self.etag is None and self.mtime is 0\n" ]
[ "def __nonzero__(self):...\n", "return self.etag is None and self.mtime is 0\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_9(self):...\n", "self.authn('/chpass', VAR_6=True)\n" ]
[ "def test_chpass_authn(self):...\n", "self.authn('/chpass', force_authn=True)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@permission_required('tournament.change_gameplayer')...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = get_modifiable_tournament_or_404(VAR_3, VAR_2.user)\n", "VAR_8 = FUNC_0(VAR_7, VAR_1)\n", "VAR_25 = formset_factory(GameScoreForm, extra=0)\n", "VAR_11 = []\n", "VAR_26 = VAR_8.game_set.all()\n", "for VAR_...
[ "@permission_required('tournament.change_gameplayer')...\n", "\"\"\"docstring\"\"\"\n", "t = get_modifiable_tournament_or_404(tournament_id, request.user)\n", "r = get_round_or_404(t, round_num)\n", "GameScoreFormset = formset_factory(GameScoreForm, extra=0)\n", "data = []\n", "the_list = r.game_set.all...
[ 0, 0, 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'", "Assign'", "For", "Assign'", "Assign'", "For", "Condition", "Assign'", "Expr'", "For", "Return'", "Assign'", "Return'", "For", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'"...
[ "@FUNC_7...\n", "\"\"\"docstring\"\"\"\n", "VAR_16.pop(VAR_17(VAR_1.name) + '_autoregister', None)\n", "VAR_5 = FUNC_1(VAR_1, VAR_2)\n", "VAR_19 = signup_handlers[VAR_1.name]\n", "if not current_user.is_authenticated():\n", "VAR_27 = VAR_19['info'](VAR_2)\n", "if not VAR_5.remote_account.extra_data an...
[ "@oauth_error_handler...\n", "\"\"\"docstring\"\"\"\n", "session.pop(token_session_key(remote.name) + '_autoregister', None)\n", "token = response_token_setter(remote, resp)\n", "handlers = signup_handlers[remote.name]\n", "if not current_user.is_authenticated():\n", "account_info = handlers['info'](res...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Condition", "Condition", "Return'", "Return'", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_14(VAR_6):...\n", "if 'Server' not in VAR_6.headers:\n", "return True\n", "VAR_27 = str.lower(VAR_6.headers['Server'])\n", "if 'nginx' in VAR_27 or 'apache' in VAR_27:\n", "return False\n", "return True\n" ]
[ "def validate_server_software(page):...\n", "if 'Server' not in page.headers:\n", "return True\n", "server_header = str.lower(page.headers['Server'])\n", "if 'nginx' in server_header or 'apache' in server_header:\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Return'" ]
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe import _\n", "from frappe.website.website_generator import WebsiteGenerator\n", "from frappe.website.render import clear_cache\n", "from frappe.utils import today, cint, global_date_format, get_fullname, strip_html_tags, markdown...
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe import _\n", "from frappe.website.website_generator import WebsiteGenerator\n", "from frappe.website.render import clear_cache\n", "from frappe.utils import today, cint, global_date_format, get_fullname, strip_html_tags, markdown...
[ 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Condition", "Return'", "FunctionDef'", "Return'" ]
[ "def FUNC_9(self):...\n", "\"\"\"docstring\"\"\"\n", "self.assertTrue(self.client.login(username='autotest2', password='password'))\n", "VAR_4 = 'autotest'\n", "VAR_2 = '/api/apps'\n", "VAR_5 = {'id': VAR_4}\n", "VAR_3 = self.client.post(VAR_2, json.dumps(VAR_5), content_type=\n 'application/json')\n...
[ "def test_admin_can_see_other_apps(self):...\n", "\"\"\"docstring\"\"\"\n", "self.assertTrue(self.client.login(username='autotest2', password='password'))\n", "app_id = 'autotest'\n", "url = '/api/apps'\n", "body = {'id': app_id}\n", "response = self.client.post(url, json.dumps(body), content_type=\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def __exit__(self, VAR_2, VAR_3, VAR_4):...\n", "if self.conn:\n", "self.conn.close()\n" ]
[ "def __exit__(self, exc_type, exc_val, exc_tb):...\n", "if self.conn:\n", "self.conn.close()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'" ]
[ "def FUNC_2(VAR_3: 'DirectoryEntryQuerySet') ->None:...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = VAR_3.with_domain_annotation()\n", "VAR_14 = VAR_3.values_list('domain', flat=True)\n", "VAR_15 = inspect_domains(VAR_14, {'timeout': 10})\n", "VAR_16 = []\n", "for result_data in VAR_15:\n", "VAR_0 = VAR_3...
[ "def bulk_scan(securedrops: 'DirectoryEntryQuerySet') ->None:...\n", "\"\"\"docstring\"\"\"\n", "securedrops = securedrops.with_domain_annotation()\n", "domains = securedrops.values_list('domain', flat=True)\n", "results = inspect_domains(domains, {'timeout': 10})\n", "results_to_be_written = []\n", "fo...
[ 0, 0, 0, 6, 6, 0, 6, 6, 0, 6, 6, 6, 6, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_10(self, VAR_13):...\n", "return VAR_13.name in self._localrules or VAR_13.norun\n" ]
[ "def is_local(self, rule):...\n", "return rule.name in self._localrules or rule.norun\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_12(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_22 = self.open_photo(self.message)\n", "VAR_23 = self.image_handler(self.user, VAR_22)\n", "return VAR_23.get_image_info()\n" ]
[ "def get_info(self):...\n", "\"\"\"docstring\"\"\"\n", "user_photo = self.open_photo(self.message)\n", "image = self.image_handler(self.user, user_photo)\n", "return image.get_image_info()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "@jwt_required...\n", "VAR_3 = request.get_json(force=True)\n", "VAR_4 = Table.save(VAR_2, data=post_data)\n", "if VAR_4:\n", "VAR_5 = {'status': 'success', 'message': 'Your comment was successful'}\n", "VAR_5 = {'status': 'fail', 'message': 'Some error occurred. Please try again.'}\n", "return make_res...
[ "@jwt_required...\n", "post_data = request.get_json(force=True)\n", "response = Table.save(answer_id, data=post_data)\n", "if response:\n", "response_object = {'status': 'success', 'message':\n 'Your comment was successful'}\n", "response_object = {'status': 'fail', 'message':\n 'Some error occurred...
[ 0, 4, 4, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_13(self):...\n", "return {'name': self.name, 'children': [child.toJSON() for child in self.\n children], 'options': self.options}\n" ]
[ "def toJSON(self):...\n", "return {'name': self.name, 'children': [child.toJSON() for child in self.\n children], 'options': self.options}\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_23(*VAR_17, **VAR_18):...\n", "return VAR_59\n" ]
[ "def _mock_adapter(*args, **kwargs):...\n", "return mock_adapter\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def _do_start_app(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def FUNC_15(self, VAR_13):...\n", "if self.token and self.token.ttype == VAR_13:\n", "self.next()\n", "return None\n", "return self.last\n" ]
[ "def accept(self, ttype):...\n", "if self.token and self.token.ttype == ttype:\n", "self.next()\n", "return None\n", "return self.last\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Return'", "Return'" ]
[ "def __init__(self, VAR_7, VAR_54=None, VAR_55=None, VAR_14=errors....\n", "self.min = VAR_54\n", "self.max = VAR_55\n", "self.error = VAR_14\n", "CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n" ]
[ "def __init__(self, param, min=None, max=None, error=errors.BAD_NUMBER, *a, **kw...\n", "self.min = min\n", "self.max = max\n", "self.error = error\n", "Validator.__init__(self, param, *a, **kw)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_33(self, VAR_14):...\n", "VAR_30 = getattr(self.list_columns[VAR_14], 'default', None)\n", "if VAR_30 is not None:\n", "VAR_18 = getattr(VAR_30, 'arg', None)\n", "if VAR_18 is not None:\n", "if getattr(VAR_30, 'is_callable', False):\n", "return lambda : VAR_30.arg(None)\n", "if not getattr(V...
[ "def get_col_default(self, col_name):...\n", "default = getattr(self.list_columns[col_name], 'default', None)\n", "if default is not None:\n", "value = getattr(default, 'arg', None)\n", "if value is not None:\n", "if getattr(default, 'is_callable', False):\n", "return lambda : default.arg(None)\n", "i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def __init__(self, VAR_3, VAR_4):...\n", "self._user_id = VAR_3\n", "self._leap_home = VAR_4\n", "self._uuid = str(VAR_1.uuid4())\n", "self._mail_address = '%s@pixelated.org' % VAR_3\n", "self._soledad = None\n", "self._services = None\n" ]
[ "def __init__(self, user_id, leap_home):...\n", "self._user_id = user_id\n", "self._leap_home = leap_home\n", "self._uuid = str(uuid.uuid4())\n", "self._mail_address = '%s@pixelated.org' % user_id\n", "self._soledad = None\n", "self._services = None\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_16(self, VAR_14):...\n", "" ]
[ "def is_datetime(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@memoized_method...\n", "return self._create_locator()\n" ]
[ "@memoized_method...\n", "return self._create_locator()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_1(self):...\n", "return 'load page for task %s (%s)' % (self.task_id, self.url)\n" ]
[ "def describe(self):...\n", "return 'load page for task %s (%s)' % (self.task_id, self.url)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_83, VAR_10, VAR_1, VAR_65):...\n", "self.workflow = VAR_83\n", "self.name = VAR_10\n", "self._snakefile = VAR_1\n", "self._workdir = VAR_65\n" ]
[ "def __init__(self, workflow, name, snakefile, workdir):...\n", "self.workflow = workflow\n", "self.name = name\n", "self._snakefile = snakefile\n", "self._workdir = workdir\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_8(VAR_25, VAR_24):...\n", "for VAR_27 in VAR_24:\n", "if VAR_27['submittable'] and VAR_27['confirm_the_level'] and VAR_27['passed']:\n", "if 'unconfirmed' in VAR_25:\n", "FUNC_8(VAR_27, VAR_27.get('children', []))\n", "for child in VAR_25.get('children', []):\n", "if 'unconfirmed' in child:\n"...
[ "def r_check(parent, children):...\n", "for entry in children:\n", "if entry['submittable'] and entry['confirm_the_level'] and entry['passed']:\n", "if 'unconfirmed' in parent:\n", "r_check(entry, entry.get('children', []))\n", "for child in parent.get('children', []):\n", "if 'unconfirmed' in child:\n"...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Condition", "Expr'", "For", "Condition" ]
[ "import copy\n", "import logging\n", "from decimal import Decimal\n", "import dateutil.parser\n", "import pytz\n", "import vat_moss.errors\n", "import vat_moss.id\n", "from django import forms\n", "from django.contrib import messages\n", "from django.core.exceptions import ValidationError\n", "f...
[ "import copy\n", "import logging\n", "from decimal import Decimal\n", "import dateutil.parser\n", "import pytz\n", "import vat_moss.errors\n", "import vat_moss.id\n", "from django import forms\n", "from django.contrib import messages\n", "from django.core.exceptions import ValidationError\n", "f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", ...
[ "def FUNC_9(VAR_15, VAR_16):...\n", "VAR_19 = len(VAR_16)\n", "return all(len(h.args) == VAR_19 or h.varargs for h in VAR_15)\n" ]
[ "def accepts_vpath(handlers, vpath):...\n", "args_no = len(vpath)\n", "return all(len(h.args) == args_no or h.varargs for h in handlers)\n" ]
[ 0, 0, 1 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_13):...\n", "if VAR_13:\n", "VAR_13 = VAR_100(VAR_13.split('[')[1].strip(']'))\n", "return 'en'\n", "if VAR_13 in g.all_languages:\n", "return VAR_13\n" ]
[ "def run(self, lang):...\n", "if lang:\n", "lang = str(lang.split('[')[1].strip(']'))\n", "return 'en'\n", "if lang in g.all_languages:\n", "return lang\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Condition", "Return'" ]
[ "from application import app, db\n", "from wtforms import ValidationError\n", "from sqlalchemy.sql import text\n", "def FUNC_0(VAR_0, VAR_1=None, VAR_2=None, VAR_3='name', VAR_4=None):...\n", "if not VAR_4:\n", "VAR_4 = 'Entry with that name already exists.'\n", "def FUNC_2(VAR_6, VAR_7):...\n", "VAR_...
[ "from application import app, db\n", "from wtforms import ValidationError\n", "from sqlalchemy.sql import text\n", "def unique(table, subtable=None, subname=None, name='name', message=None):...\n", "if not message:\n", "message = 'Entry with that name already exists.'\n", "def _unique(form, field):...\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 4, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Condition", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Condition", "AugAssign'", "AugAssign'", "Condition", "AugAssign'", "AugAssign'", "Assign'", "Assign'", "For", "Condition", "Return'" ]
[ "def FUNC_2(VAR_5, VAR_2, VAR_3, VAR_0, VAR_1, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_25 = False\n", "VAR_18 = sql.connect('./resources/users.db')\n", "VAR_21 = VAR_18.cursor()\n", "print(''.join(traceback.format_exception(etype=type(e), value=e, tb=e.\n __traceback__)))\n", "VAR_18.close()\n...
[ "def update_profile(user_id, firstname, lastname, username, password, bio):...\n", "\"\"\"docstring\"\"\"\n", "updated = False\n", "con = sql.connect('./resources/users.db')\n", "cur = con.cursor()\n", "print(''.join(traceback.format_exception(etype=type(e), value=e, tb=e.\n __traceback__)))\n", "con...
[ 0, 0, 4, 0, 0, 0, 0, 4, 0, 0, 0, 0, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'", "Condition", "Assign'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Assign'" ]
[ "def FUNC_0():...\n", "VAR_1 = redis.Redis(host='127.0.0.1', port=6379, db=0)\n", "return VAR_1\n" ]
[ "def initRedis_db():...\n", "r = redis.Redis(host='127.0.0.1', port=6379, db=0)\n", "return r\n" ]
[ 0, 4, 4 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "\"\"\"Installation logic for TLJH\"\"\"\n", "import argparse\n", "import itertools\n", "import logging\n", "import os\n", "import secrets\n", "import subprocess\n", "import sys\n", "import time\n", "from urllib.error import HTTPError\n", "from urllib.request import urlopen, URLError\n", "impo...
[ "\"\"\"Installation logic for TLJH\"\"\"\n", "import argparse\n", "import itertools\n", "import logging\n", "import os\n", "import secrets\n", "import subprocess\n", "import sys\n", "import time\n", "from urllib.error import HTTPError\n", "from urllib.request import urlopen, URLError\n", "impo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0...
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Expr'", ...
[ "def FUNC_19(VAR_8, **VAR_11):...\n", "\"\"\"docstring\"\"\"\n", "return VAR_8.format(**{wildcard: '{{{},{}}}'.format(wildcard, '|'.join(\n values)) for wildcard, values in wildcards.items()})\n" ]
[ "def limit(pattern, **wildcards):...\n", "\"\"\"docstring\"\"\"\n", "return pattern.format(**{wildcard: '{{{},{}}}'.format(wildcard, '|'.join(\n values)) for wildcard, values in wildcards.items()})\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "from flask import Flask\n", "from .migrations.db import db\n", "def FUNC_0(VAR_0):...\n", "VAR_1 = Flask(__name__)\n", "VAR_1.config.from_object(VAR_0)\n", "\"\"\" Basic Routes \"\"\"\n", "FUNC_1(VAR_1)\n", "FUNC_2()\n", "return VAR_1\n" ]
[ "from flask import Flask\n", "from .migrations.db import db\n", "def create_app(config_filename):...\n", "app = Flask(__name__)\n", "app.config.from_object(config_filename)\n", "\"\"\" Basic Routes \"\"\"\n", "configure_blueprints(app)\n", "configure_extensions()\n", "return app\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_6(self, VAR_23):...\n", "if VAR_23:\n", "return self.error()\n", "return Account._by_name(VAR_23)\n" ]
[ "def run(self, name):...\n", "if name:\n", "return self.error()\n", "return Account._by_name(name)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_17(self):...\n", "VAR_12 = Client()\n", "self.response = VAR_12.get(reverse('aasa'))\n", "return self\n" ]
[ "def when_call_aasa(self):...\n", "client = Client()\n", "self.response = client.get(reverse('aasa'))\n", "return self\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(self):...\n", "VAR_12 = self.cleaned_data.get('email').lower()\n", "VAR_16 = self.cleaned_data.get('password')\n", "VAR_23 = authenticate(username=email, VAR_16=password)\n", "if VAR_23 is None:\n", "VAR_26 = forms.ValidationError(ErrorMessages.invalid_un_or_pw)\n", "if VAR_23.email_confirme...
[ "def clean(self):...\n", "email = self.cleaned_data.get('email').lower()\n", "password = self.cleaned_data.get('password')\n", "user = authenticate(username=email, password=password)\n", "if user is None:\n", "message = forms.ValidationError(ErrorMessages.invalid_un_or_pw)\n", "if user.email_confirmed i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "Expr'" ]
[ "def FUNC_5(self, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "return self.cursor.execute('string' % (VAR_4[0], VAR_4[1]))\n" ]
[ "def find_item_id(self, idid):...\n", "\"\"\"docstring\"\"\"\n", "return self.cursor.execute(\n 'select item.id, item.shoppinglistid, item.name, itemtranslation.id, itemtranslation.itemid, itemtranslation.itemlanguageid, itemtranslation.translation from item, itemtranslati...
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_7(self):...\n", "VAR_21 = pyodbc.dataSources()\n", "self.assertTrue(isinstance(VAR_21, dict))\n" ]
[ "def test_datasources(self):...\n", "p = pyodbc.dataSources()\n", "self.assertTrue(isinstance(p, dict))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "import re\n", "from flask import request\n", "\"\"\"\n Stack data structure will not insert\n equal sequential data\n \"\"\"\n", "def __init__(self, VAR_1=None, VAR_2=5):...\n", "self.size = VAR_2\n", "self.data = VAR_1 or []\n", "def FUNC_5(self, VAR_3):...\n", "if self.data:\n", ...
[ "import re\n", "from flask import request\n", "\"\"\"\n Stack data structure will not insert\n equal sequential data\n \"\"\"\n", "def __init__(self, list=None, size=5):...\n", "self.size = size\n", "self.data = list or []\n", "def push(self, item):...\n", "if self.data:\n", "if ite...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Condition", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_2():...\n", "if INTERNAL_URLS:\n", "FUNC_0('internal-links', INTERNAL_URLS)\n", "if SCAN_ERRORS:\n", "FUNC_0('errored', SCAN_ERRORS)\n", "if FILES_EXEC:\n", "FUNC_0('files-found', FILES_EXEC)\n", "if REQUEST_TOKENS:\n", "FUNC_0('anti-csrf-tokens', REQUEST_TOKENS)\n", "if FORMS_TESTED:\n"...
[ "def GetLogger():...\n", "if INTERNAL_URLS:\n", "logger('internal-links', INTERNAL_URLS)\n", "if SCAN_ERRORS:\n", "logger('errored', SCAN_ERRORS)\n", "if FILES_EXEC:\n", "logger('files-found', FILES_EXEC)\n", "if REQUEST_TOKENS:\n", "logger('anti-csrf-tokens', REQUEST_TOKENS)\n", "if FORMS_TESTED:...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_6(self, VAR_46, VAR_47):...\n", "return True\n" ]
[ "def run(self, vh, thing_name):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(self, VAR_38):...\n", "VAR_38 = CLASS_17.run(self, VAR_38)\n", "if VAR_38 and self.only_whitespace.match(VAR_38):\n", "VAR_101.errors.add(errors.NO_TITLE)\n", "return VAR_38\n" ]
[ "def run(self, title):...\n", "title = VLength.run(self, title)\n", "if title and self.only_whitespace.match(title):\n", "c.errors.add(errors.NO_TITLE)\n", "return title\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "@login_required...\n", "" ]
[ "@login_required...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_17(self, VAR_15):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_15 is None:\n", "return dict()\n", "VAR_37 = 0\n", "VAR_38 = None\n", "for o in self.products:\n", "VAR_47 = o.match(VAR_15)\n", "return VAR_38\n", "if VAR_47:\n", "VAR_50 = self.get_wildcard_len(VAR_47.groupdict())\n", "if ...
[ "def get_wildcards(self, requested_output):...\n", "\"\"\"docstring\"\"\"\n", "if requested_output is None:\n", "return dict()\n", "bestmatchlen = 0\n", "bestmatch = None\n", "for o in self.products:\n", "match = o.match(requested_output)\n", "return bestmatch\n", "if match:\n", "l = self.get_wi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Condition", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_24(self):...\n", "return ['id', 'lower_wf_analysis', 'central_wf_analysis', 'upper_wf_analysis']\n" ]
[ "def get_clean_comp_data_fieldnames(self):...\n", "return ['id', 'lower_wf_analysis', 'central_wf_analysis', 'upper_wf_analysis']\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_23(self, VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "VAR_35 = self.common._cli_run('showvlun -a -showcols Port', None)\n", "VAR_36 = {}\n", "for VAR_15 in VAR_16:\n", "VAR_36[VAR_15] = 0\n", "VAR_37 = None\n", "if VAR_35:\n", "VAR_35 = VAR_35[1:]\n", "return VAR_37\n", "for line in VAR...
[ "def _get_least_used_nsp(self, nspss):...\n", "\"\"\"docstring\"\"\"\n", "result = self.common._cli_run('showvlun -a -showcols Port', None)\n", "nsp_counts = {}\n", "for nsp in nspss:\n", "nsp_counts[nsp] = 0\n", "current_least_used_nsp = None\n", "if result:\n", "result = result[1:]\n", "return c...
[ 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "For", "Assign'", "Assign'", "Condition", "For", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_18(VAR_37):...\n", "VAR_37 = VAR_37.replace('[', '')\n", "VAR_37 = VAR_37.replace(']', '')\n", "VAR_45, VAR_46 = VAR_37.split(',')\n", "VAR_37 = '{} - {}'.format(VAR_45, VAR_46)\n", "return VAR_37\n" ]
[ "def reformat(score):...\n", "score = score.replace('[', '')\n", "score = score.replace(']', '')\n", "win, loss = score.split(',')\n", "score = '{} - {}'.format(win, loss)\n", "return score\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_1(self, VAR_7=None, VAR_8=None):...\n", "\"\"\"docstring\"\"\"\n", "self.input_channel.close()\n", "self.client_queue.close()\n", "self.connection.close()\n", "log.info('Worker exiting')\n", "sys.exit(0)\n" ]
[ "def exit(self, signal=None, frame=None):...\n", "\"\"\"docstring\"\"\"\n", "self.input_channel.close()\n", "self.client_queue.close()\n", "self.connection.close()\n", "log.info('Worker exiting')\n", "sys.exit(0)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_13(self):...\n", "VAR_19 = list(filter(lambda VAR_28: VAR_28.protected, self.expanded_output))\n", "if VAR_19:\n" ]
[ "def check_protected_output(self):...\n", "protected = list(filter(lambda f: f.protected, self.expanded_output))\n", "if protected:\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition" ]
[ "def FUNC_0():...\n", "VAR_0 = DisclosureExporter(TEST_BW_PROJECT_NAME, TEST_BW_DB_NAME,\n folder_path=TEST_FOLDER, filename=TEST_FILENAME)\n", "assert VAR_0.foreground_flows\n", "assert VAR_0.background_flows\n", "assert VAR_0.emission_flows\n", "assert VAR_0.Af\n", "assert VAR_0.Ad\n", "assert VA...
[ "def test_attributes():...\n", "de = DisclosureExporter(TEST_BW_PROJECT_NAME, TEST_BW_DB_NAME, folder_path=\n TEST_FOLDER, filename=TEST_FILENAME)\n", "assert de.foreground_flows\n", "assert de.background_flows\n", "assert de.emission_flows\n", "assert de.Af\n", "assert de.Ad\n", "assert de.Bf\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assert'", "Assert'", "Assert'", "Assert'", "Assert'", "Assert'", "Assert'" ]
[ "def FUNC_3(VAR_14, VAR_17=settings.DEFAULT_ORDER_BY, VAR_18=settings....\n", "return 'string' % {'name': VAR_14, 'order_by': VAR_17, 'partition_by':\n VAR_18, 'version_column': VAR_19, 'sample_expr': VAR_20}\n" ]
[ "def get_replicated_engine(name, order_by=settings.DEFAULT_ORDER_BY,...\n", "return \"\"\"\n ReplicatedReplacingMergeTree('/clickhouse/tables/{shard}/%(name)s', '{replica}', %(version_column)s)\n PARTITION BY %(partition_by)s\n ORDER BY %(order_by)s\n SAMPLE BY %(sample_expr)s;\"\"\" %...
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def __init__(self, VAR_0, VAR_3, VAR_2=None):...\n", "GenericRequest.__init__(self, VAR_0, VAR_2)\n", "self.user_test_id = VAR_3\n", "self.url = '%suser_test/%s' % (self.base_url, VAR_3)\n" ]
[ "def __init__(self, browser, user_test_id, base_url=None):...\n", "GenericRequest.__init__(self, browser, base_url)\n", "self.user_test_id = user_test_id\n", "self.url = '%suser_test/%s' % (self.base_url, user_test_id)\n" ]
[ 0, 0, 0, 5 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'" ]
[ "def FUNC_0(VAR_0):...\n", "VAR_12 = ['select', 'delete', 'drop', 'update', 'case', 'and', 'or', 'like']\n", "def FUNC_6():...\n", "VAR_13.throw(_('Invalid Search Field'), VAR_13.DataError)\n", "if len(VAR_0) >= 3:\n", "if '=' in VAR_0:\n", "FUNC_6()\n", "if ' --' in VAR_0:\n", "FUNC_6()\n", "if a...
[ "def sanitize_searchfield(searchfield):...\n", "blacklisted_keywords = ['select', 'delete', 'drop', 'update', 'case', 'and',\n 'or', 'like']\n", "def _raise_exception():...\n", "frappe.throw(_('Invalid Search Field'), frappe.DataError)\n", "if len(searchfield) >= 3:\n", "if '=' in searchfield:\n", "_...
[ 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "FunctionDef'", "Expr'", "Condition", "Condition", "Expr'", "Condition", "Expr'", "For", "Expr'", "For", "Expr'" ]
[ "def FUNC_9(self):...\n", "self.runner.policy.skip_performance_check = True\n", "self.runall(self.checks)\n", "VAR_15 = self.runner.stats\n", "self.assertEqual(7, VAR_15.num_cases())\n", "self.assertEqual(3, len(VAR_15.failures()))\n", "self.assertEqual(2, self._num_failures_stage('setup'))\n", "self....
[ "def test_runall_skip_performance_check(self):...\n", "self.runner.policy.skip_performance_check = True\n", "self.runall(self.checks)\n", "stats = self.runner.stats\n", "self.assertEqual(7, stats.num_cases())\n", "self.assertEqual(3, len(stats.failures()))\n", "self.assertEqual(2, self._num_failures_sta...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "from django.http import Http404\n", "from django.utils.translation import ugettext_lazy as _\n", "from authorization.permissions import ACCESS, Permission, MessageMixin, ObjectVisibleBasePermission, FilterBackend\n", "from exercise.cache.points import CachedPoints\n", "from userprofile.models import UserPr...
[ "from django.http import Http404\n", "from django.utils.translation import ugettext_lazy as _\n", "from authorization.permissions import ACCESS, Permission, MessageMixin, ObjectVisibleBasePermission, FilterBackend\n", "from exercise.cache.points import CachedPoints\n", "from userprofile.models import UserPr...
[ 0, 0, 0, 0, 0, 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 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Condition", "Retur...
[ "def __str__(self):...\n", "return f'{self.first_name} {self.nickname} {self.last_name} ({self.chat_id}) preferred language: {self.language}'\n" ]
[ "def __str__(self):...\n", "return f'{self.first_name} {self.nickname} {self.last_name} ({self.chat_id}) preferred language: {self.language}'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@staticmethod...\n", "VAR_10 = CLASS_1.conn()\n", "VAR_13 = VAR_10.execute(VAR_4)\n", "return CLASS_1.error_handle()\n", "if VAR_5:\n", "return VAR_10\n", "return VAR_13\n" ]
[ "@staticmethod...\n", "_cursor = DBManager.conn()\n", "result = _cursor.execute(sql)\n", "return DBManager.error_handle()\n", "if cursor:\n", "return _cursor\n", "return result\n" ]
[ 4, 0, 4, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_3(VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "return expm(-1.0j * VAR_8 / 2 * VAR_5)\n" ]
[ "def frz(theta):...\n", "\"\"\"docstring\"\"\"\n", "return expm(-1.0j * theta / 2 * Z)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_5(self):...\n", "VAR_1 = self.client.get(f'/habitsandpractices/54/')\n", "self.assertContains(VAR_1, '<b>Add New Habit and Practice</b>')\n" ]
[ "def test_habitsandpractices(self):...\n", "response = self.client.get(f'/habitsandpractices/54/')\n", "self.assertContains(response, '<b>Add New Habit and Practice</b>')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_4(VAR_1, VAR_5, VAR_6='', VAR_3='', VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_16[VAR_17(VAR_1.name)] = VAR_5, VAR_6\n", "if current_user.is_authenticated():\n", "VAR_23 = current_user.get_id()\n", "return None\n", "VAR_24 = VAR_1.consumer_key\n", "VAR_25 = RemoteToken.get(VAR_23, V...
[ "def token_setter(remote, token, secret='', token_type='', extra_data=None):...\n", "\"\"\"docstring\"\"\"\n", "session[token_session_key(remote.name)] = token, secret\n", "if current_user.is_authenticated():\n", "uid = current_user.get_id()\n", "return None\n", "cid = remote.consumer_key\n", "t = Rem...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_11):...\n", "VAR_33 = CLASS_43.run(self, VAR_11)\n", "if VAR_33 is None:\n", "return ''\n", "return VAR_33\n" ]
[ "def run(self, url):...\n", "val = VSanitizedUrl.run(self, url)\n", "if val is None:\n", "return ''\n", "return val\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "@property...\n", "return self._output\n" ]
[ "@property...\n", "return self._output\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_5(VAR_13):...\n", "return re.sub('{(.*)}', '{\\\\1:[^/\\\\.]+}', VAR_13)\n" ]
[ "def append_format_pattern(route):...\n", "return re.sub('{(.*)}', '{\\\\1:[^/\\\\.]+}', route)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_0=None):...\n", "self.depth = 0\n", "self.name = VAR_0\n", "self.hosts = []\n", "self._hosts = None\n", "self.vars = {}\n", "self.child_groups = []\n", "self.parent_groups = []\n", "self._hosts_cache = None\n", "self.priority = 1\n" ]
[ "def __init__(self, name=None):...\n", "self.depth = 0\n", "self.name = name\n", "self.hosts = []\n", "self._hosts = None\n", "self.vars = {}\n", "self.child_groups = []\n", "self.parent_groups = []\n", "self._hosts_cache = None\n", "self.priority = 1\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "self.subscribe(ray.gcs_utils.XRAY_HEARTBEAT_BATCH_CHANNEL)\n", "self.subscribe(ray.gcs_utils.XRAY_DRIVER_CHANNEL)\n", "while True:\n", "self.update_local_scheduler_map()\n", "if self.autoscaler:\n", "self.autoscaler.update()\n", "self._maybe_flus...
[ "def run(self):...\n", "\"\"\"docstring\"\"\"\n", "self.subscribe(ray.gcs_utils.XRAY_HEARTBEAT_BATCH_CHANNEL)\n", "self.subscribe(ray.gcs_utils.XRAY_DRIVER_CHANNEL)\n", "while True:\n", "self.update_local_scheduler_map()\n", "if self.autoscaler:\n", "self.autoscaler.update()\n", "self._maybe_flush_g...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_4(VAR_0, VAR_1, VAR_2):...\n", "VAR_0.objects = defaultdict(list)\n", "VAR_0.historyedgeclasses = dict()\n", "for VAR_24 in HistoryEdge.__subclasses__():\n", "VAR_0.historyedgeclasses[VAR_24.__name__] = VAR_24\n", "VAR_13 = sqlite3.connect(VAR_1)\n", "VAR_18 = VAR_13.cursor()\n", "VAR_13.exe...
[ "def LoadDocumentCollection(dc, filenameedges, filenamedata):...\n", "dc.objects = defaultdict(list)\n", "dc.historyedgeclasses = dict()\n", "for theclass in HistoryEdge.__subclasses__():\n", "dc.historyedgeclasses[theclass.__name__] = theclass\n", "c = sqlite3.connect(filenameedges)\n", "cur = c.cursor...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "For", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'", "Assign'", "Expr'",...
[ "def FUNC_1(self, VAR_6, VAR_7, VAR_8):...\n", "if VAR_6 in self.clients:\n", "VAR_14 = self.clients[VAR_6]['instance']\n", "if VAR_14 is None:\n", "self.register_queue[VAR_6].append((VAR_7, VAR_8))\n", "VAR_14.register_file(VAR_7, VAR_8)\n" ]
[ "def register_file(self, language, filename, signal):...\n", "if language in self.clients:\n", "language_client = self.clients[language]['instance']\n", "if language_client is None:\n", "self.register_queue[language].append((filename, signal))\n", "language_client.register_file(filename, signal)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_2(self):...\n", "VAR_9, VAR_22, VAR_17, VAR_10 = super().deconstruct()\n", "if self.encoder is not None:\n", "VAR_10['encoder'] = self.encoder\n", "return VAR_9, VAR_22, VAR_17, VAR_10\n" ]
[ "def deconstruct(self):...\n", "name, path, args, kwargs = super().deconstruct()\n", "if self.encoder is not None:\n", "kwargs['encoder'] = self.encoder\n", "return name, path, args, kwargs\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "from django.contrib import admin\n", "from django.urls import re_path\n", "from Shortener_App.views import HomeView, SuccessUrlView, CustomShortURLCreateView, ShortManyURLSView, URLDetailView, URLUpdateView, URLDeleteView, CategoryCreateView, CategoryListView, CategoryDetailView, CategoryUpdateView, CategoryDe...
[ "from django.contrib import admin\n", "from django.urls import re_path\n", "from Shortener_App.views import HomeView, SuccessUrlView, CustomShortURLCreateView, ShortManyURLSView, URLDetailView, URLUpdateView, URLDeleteView, CategoryCreateView, CategoryListView, CategoryDetailView, CategoryUpdateView, CategoryDe...
[ 0, 0, 0, 6 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'" ]
[ "def FUNC_9(self):...\n", "url_helper.urllib2.urlopen(mox.IgnoreArg(), mox.IgnoreArg(), timeout=mox.\n IgnoreArg()).AndRaise(urllib2.HTTPError('url', 400, 'error message',\n None, None))\n", "self._mox.ReplayAll()\n", "self.assertIsNone(url_helper.UrlOpen('url', max_tries=10))\n", "self._mox.VerifyAll...
[ "def testUrlOpenHTTPErrorNoRetry(self):...\n", "url_helper.urllib2.urlopen(mox.IgnoreArg(), mox.IgnoreArg(), timeout=mox.\n IgnoreArg()).AndRaise(urllib2.HTTPError('url', 400, 'error message',\n None, None))\n", "self._mox.ReplayAll()\n", "self.assertIsNone(url_helper.UrlOpen('url', max_tries=10))\n", ...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_7():...\n", "VAR_27 = VAR_9.read(VAR_10)\n", "VAR_6.set_result(VAR_27)\n" ]
[ "def retrieve_data_async():...\n", "block = file_stream.read(file_block_size)\n", "future.set_result(block)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_7, VAR_20=True, *VAR_15, **VAR_16):...\n", "CLASS_6.__init__(self, VAR_7, *VAR_15, VAR_20=redirect, **kw)\n" ]
[ "def __init__(self, param, redirect=True, *a, **kw):...\n", "VMeetup.__init__(self, param, *a, redirect=redirect, **kw)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@app.route('/view/<sid>')...\n", "if '/' not in VAR_0:\n", "VAR_4 = os.path.join(app.config['UPLOAD_FOLDER'], VAR_0)\n", "abort(403)\n", "if os.path.isdir(VAR_4):\n", "VAR_12 = 'true' if app.config['FIREBASE'] else 'false'\n", "abort(404)\n", "return render_template('view.html', VAR_0=sid, title='Pro...
[ "@app.route('/view/<sid>')...\n", "if '/' not in sid:\n", "path = os.path.join(app.config['UPLOAD_FOLDER'], sid)\n", "abort(403)\n", "if os.path.isdir(path):\n", "using_firebase = 'true' if app.config['FIREBASE'] else 'false'\n", "abort(404)\n", "return render_template('view.html', sid=sid, title='Pro...
[ 0, 2, 2, 2, 0, 0, 0, 2 ]
[ "Condition", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_21(self):...\n", "self.cursor.execute(self.sql)\n" ]
[ "def _exec(self):...\n", "self.cursor.execute(self.sql)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_17(VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_31 = {}\n", "if not isinstance(VAR_3, (list, tuple)):\n", "VAR_3 = [VAR_3]\n", "def FUNC_23(VAR_5, VAR_32=0):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = VAR_5['device']\n", "if VAR_1 in VAR_31:\n", "VAR_32 = max(VAR_31[VAR_1]['level'], VA...
[ "def plan_shutdown_holder_trees(holders_trees):...\n", "\"\"\"docstring\"\"\"\n", "reg = {}\n", "if not isinstance(holders_trees, (list, tuple)):\n", "holders_trees = [holders_trees]\n", "def flatten_holders_tree(tree, level=0):...\n", "\"\"\"docstring\"\"\"\n", "device = tree['device']\n", "if devi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "For", "Expr'", "For", "Expr'", "Return'" ]
[ "def FUNC_10(self, VAR_8, VAR_10, VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "if self.fileExists(VAR_8):\n", "VAR_7 = \"UPDATE {0} SET meta='{1}', mod_time='{3}' WHERE path='{2}';\".format(\n VAR_2, utils.SQLiteUtils.escapeText(VAR_10), VAR_8, VAR_9)\n", "print(\"updateMetadata: file doesn't exist!\")\n",...
[ "def updateMetadata(self, pth, metadata, mod_time):...\n", "\"\"\"docstring\"\"\"\n", "if self.fileExists(pth):\n", "command = \"UPDATE {0} SET meta='{1}', mod_time='{3}' WHERE path='{2}';\".format(\n TABLE_NAME, utils.SQLiteUtils.escapeText(metadata), pth, mod_time)\n", "print(\"updateMetadata: file doe...
[ 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = request.args.get('group_by')\n", "if not VAR_4:\n", "VAR_4 = ''\n", "return VAR_4\n" ]
[ "def get_group_by_args():...\n", "\"\"\"docstring\"\"\"\n", "group_by = request.args.get('group_by')\n", "if not group_by:\n", "group_by = ''\n", "return group_by\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_20(VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = os.path.normpath(VAR_8)\n", "VAR_33 = re.search('{[^{]', VAR_8)\n", "VAR_34 = os.path.dirname(VAR_8[:VAR_33.start()]\n ) if VAR_33 else os.path.dirname(VAR_8)\n", "if not VAR_34:\n", "VAR_34 = '.'\n", "VAR_35 = [VAR_29.group('name') fo...
[ "def glob_wildcards(pattern):...\n", "\"\"\"docstring\"\"\"\n", "pattern = os.path.normpath(pattern)\n", "first_wildcard = re.search('{[^{]', pattern)\n", "dirname = os.path.dirname(pattern[:first_wildcard.start()]\n ) if first_wildcard else os.path.dirname(pattern)\n", "if not dirname:\n", "dirname ...
[ 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'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "For", "Return'", "Condition", "Assign'", "Assign'", "Condition", "For", "Expr'" ]
[ "@auth.autologin...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = int(float(self.request.get('end', 0)) or time.time())\n", "VAR_4 = int(float(self.request.get('start', 0)) or ui.\n _get_default_start_time() or 0)\n", "VAR_5 = self.request.get('modules')\n", "if VAR_5:\n", "VAR_5 = VAR_5.split(',')\n", "...
[ "@auth.autologin...\n", "\"\"\"docstring\"\"\"\n", "end = int(float(self.request.get('end', 0)) or time.time())\n", "start = int(float(self.request.get('start', 0)) or ui.\n _get_default_start_time() or 0)\n", "modules = self.request.get('modules')\n", "if modules:\n", "modules = modules.split(',')\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_1(VAR_1):...\n", "VAR_2 = psycopg2.connect('dbname=forum')\n", "VAR_3 = VAR_2.cursor()\n", "VAR_3.execute('insert into posts values (%s)', (VAR_1,))\n", "VAR_2.commit()\n", "VAR_2.close()\n" ]
[ "def add_post(content):...\n", "data_base = psycopg2.connect('dbname=forum')\n", "cursor = data_base.cursor()\n", "cursor.execute('insert into posts values (%s)', (content,))\n", "data_base.commit()\n", "data_base.close()\n" ]
[ 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_2(self):...\n", "super(CLASS_1, self).setUp()\n", "api.reset_local_state()\n", "self.logged_errors = []\n", "self.mock(handler.logging, 'error', lambda *args, **kwargs: self.\n logged_errors.append((args, kwargs)))\n", "self.logged_warnings = []\n", "self.mock(handler.logging, 'warning', la...
[ "def setUp(self):...\n", "super(AuthenticatingHandlerTest, self).setUp()\n", "api.reset_local_state()\n", "self.logged_errors = []\n", "self.mock(handler.logging, 'error', lambda *args, **kwargs: self.\n logged_errors.append((args, kwargs)))\n", "self.logged_warnings = []\n", "self.mock(handler.loggi...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_1():...\n", "from optparse import OptionParser\n", "VAR_15 = OptionParser(VAR_0=usage)\n", "VAR_15.add_option('-v', '--verbose', default=0, action='count', help=\n 'Increment test verbosity (can be used multiple times)')\n", "VAR_15.add_option('-d', '--debug', action='store_true', default=False...
[ "def main():...\n", "from optparse import OptionParser\n", "parser = OptionParser(usage=usage)\n", "parser.add_option('-v', '--verbose', default=0, action='count', help=\n 'Increment test verbosity (can be used multiple times)')\n", "parser.add_option('-d', '--debug', action='store_true', default=False, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.get_options().incremental\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.get_options().incremental\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_0(*VAR_0, **VAR_1):...\n", "VAR_2 = requests.Response()\n", "VAR_2.status_code = 200\n", "VAR_2._content_consumed = True\n", "return VAR_2\n" ]
[ "def mock_import_repository_task(*args, **kwargs):...\n", "resp = requests.Response()\n", "resp.status_code = 200\n", "resp._content_consumed = True\n", "return resp\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_1(VAR_2, VAR_3=False):...\n", "\"\"\"docstring\"\"\"\n", "if FUNC_0(VAR_2):\n", "VAR_0.error('Unable to read from file %s. (%s)' % (VAR_2, ex1.strerror))\n", "VAR_11 = [line.decode('utf-8', 'replace') for line in VAR_24]\n", "if not FUNC_4('pdftotext'):\n", "VAR_24 = open(VAR_2, 'r')\n", "re...
[ "def text_lines_from_local_file(document, remote=False):...\n", "\"\"\"docstring\"\"\"\n", "if is_pdf(document):\n", "log.error('Unable to read from file %s. (%s)' % (document, ex1.strerror))\n", "lines = [line.decode('utf-8', 'replace') for line in filestream]\n", "if not executable_exists('pdftotext'):\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Expr'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "For", "AugAssign'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_3(VAR_11):...\n", "VAR_19 = '\"' + VAR_11 + '\"'\n", "VAR_20 = conn.cursor()\n", "VAR_20.execute('DELETE FROM recipe WHERE name = ' + '\"' + VAR_11 + '\"')\n", "print(VAR_20.rowcount)\n", "if VAR_20.rowcount == 1:\n", "messagebox.showinfo('Success', 'Recipe Deleted.')\n", "if VAR_20.rowcount...
[ "def actually_delete(recipeName):...\n", "queryString = '\"' + recipeName + '\"'\n", "cursor = conn.cursor()\n", "cursor.execute('DELETE FROM recipe WHERE name = ' + '\"' + recipeName + '\"')\n", "print(cursor.rowcount)\n", "if cursor.rowcount == 1:\n", "messagebox.showinfo('Success', 'Recipe Deleted.')...
[ 0, 4, 0, 4, 4, 0, 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@auth.autologin...\n", "VAR_18 = models.ErrorReportingMonitoring.query().fetch()\n", "VAR_18.sort(VAR_37=lambda x: x.created_ts)\n", "VAR_11 = {'silenced': VAR_18, 'xsrf_token': self.generate_xsrf_token()}\n", "self.response.out.write(template.render('ereporter2/silence.html', VAR_11))\n" ]
[ "@auth.autologin...\n", "items = models.ErrorReportingMonitoring.query().fetch()\n", "items.sort(key=lambda x: x.created_ts)\n", "params = {'silenced': items, 'xsrf_token': self.generate_xsrf_token()}\n", "self.response.out.write(template.render('ereporter2/silence.html', params))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "import main\n", "import db\n", "def __init__(self, VAR_2, VAR_3, VAR_4='member', VAR_5=100, VAR_6=0):...\n", "self.id = VAR_2\n", "self.nickname = VAR_3\n", "self.rank = VAR_4\n", "self.balance = VAR_5\n", "self.events_attd = VAR_6\n", "async def FUNC_0(VAR_0, VAR_1):...\n", "await FUNC_2(VAR_0, ...
[ "import main\n", "import db\n", "def __init__(self, id, nickname, rank='member', balance=100, events_attd=0):...\n", "self.id = id\n", "self.nickname = nickname\n", "self.rank = rank\n", "self.balance = balance\n", "self.events_attd = events_attd\n", "async def respond(bot, message):...\n", "await...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 4 ]
[ "Import'", "Import'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "AsyncFunctionDef'", "Expr'", "AsyncFunctionDef'", "Condition", "Expr'", "AsyncFunctionDef'", "Condition", "Assign'", "Condition", "Expr'" ]