lines
listlengths
1
383
raw_lines
listlengths
1
383
label
listlengths
1
383
type
listlengths
1
383
[ "\"\"\"string\"\"\"\n", "import os\n", "import json\n", "import cherrypy\n", "import codecs\n", "import sys\n", "from urllib.parse import unquote\n", "from backport.urllib.parse import unquote\n", "from urllib import parse\n", "from backport.urllib import parse\n", "import audiotranscode\n", "...
[ "\"\"\"This class provides the api to talk to the client.\nIt will then call the cherrymodel, to get the\nrequested information\"\"\"\n", "import os\n", "import json\n", "import cherrypy\n", "import codecs\n", "import sys\n", "from urllib.parse import unquote\n", "from backport.urllib.parse import unq...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "ImportFrom'",...
[ "def FUNC_23(self):...\n", "VAR_78 = self.cleaned_data.get('repo')\n", "if not VAR_78 or not is_repo_link(VAR_78) or '/' not in VAR_78[10:]:\n", "return VAR_78\n", "VAR_58, VAR_9 = VAR_78[10:].split('/', 1)\n", "VAR_55 = Component.objects.get(slug__iexact=component,\n project__slug__iexact=project)\n",...
[ "def clean_repo(self):...\n", "repo = self.cleaned_data.get('repo')\n", "if not repo or not is_repo_link(repo) or '/' not in repo[10:]:\n", "return repo\n", "project, component = repo[10:].split('/', 1)\n", "obj = Component.objects.get(slug__iexact=component, project__slug__iexact=\n project)\n", "re...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Return'", "Condition", "Return'" ]
[ "@FUNC_0...\n", "return E2eKeysHandler(self)\n" ]
[ "@cache_in_self...\n", "return E2eKeysHandler(self)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_55():...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = FUNC_5()\n", "if not VAR_19:\n", "session.flash = VAR_117\n", "VAR_26 = SQLFORM.factory(Field('changelog', requires=IS_NOT_EMPTY()))\n", "redirect(URL('site'))\n", "VAR_26.element('input[type=submit]')['_value'] = T('Push')\n", "VAR_26.add_b...
[ "def git_push():...\n", "\"\"\"docstring\"\"\"\n", "app = get_app()\n", "if not have_git:\n", "session.flash = GIT_MISSING\n", "form = SQLFORM.factory(Field('changelog', requires=IS_NOT_EMPTY()))\n", "redirect(URL('site'))\n", "form.element('input[type=submit]')['_value'] = T('Push')\n", "form.add_b...
[ 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'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_2: IReactorCore, VAR_3: Optional[...\n", "self._reactor = VAR_2\n", "self._tls_client_options_factory = VAR_3\n", "if VAR_11 is None:\n", "VAR_11 = SrvResolver()\n", "self._srv_resolver = VAR_11\n" ]
[ "def __init__(self, reactor: IReactorCore, tls_client_options_factory:...\n", "self._reactor = reactor\n", "self._tls_client_options_factory = tls_client_options_factory\n", "if srv_resolver is None:\n", "srv_resolver = SrvResolver()\n", "self._srv_resolver = srv_resolver\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_84(VAR_14):...\n", "for VAR_13 in VAR_43:\n", "VAR_104 = getattr(self.rules, VAR_13)\n", "return False\n", "VAR_44 = VAR_104.match(VAR_14)\n", "if not VAR_44:\n", "getattr(self, 'parse_%s' % VAR_13)(VAR_44)\n", "return VAR_44\n" ]
[ "def manipulate(text):...\n", "for key in rules:\n", "rule = getattr(self.rules, key)\n", "return False\n", "m = rule.match(text)\n", "if not m:\n", "getattr(self, 'parse_%s' % key)(m)\n", "return m\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Assign'", "Return'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_93(*VAR_79, **VAR_42):...\n", "\"\"\"docstring\"\"\"\n", "import frappe.realtime\n", "return frappe.realtime.publish_realtime(*VAR_79, **kwargs)\n" ]
[ "def publish_realtime(*args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "import frappe.realtime\n", "return frappe.realtime.publish_realtime(*args, **kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Import'", "Return'" ]
[ "def FUNC_7(self):...\n", "self.distribution.run_command('jsversion')\n", "VAR_60 = self.distribution.get_command_obj('jsdeps')\n", "VAR_61 = self.distribution.get_command_obj('js')\n", "VAR_62 = self.distribution.get_command_obj('css')\n", "VAR_60.force = VAR_61.force = VAR_18\n", "VAR_37 = [VAR_60.bow...
[ "def run(self):...\n", "self.distribution.run_command('jsversion')\n", "jsdeps = self.distribution.get_command_obj('jsdeps')\n", "js = self.distribution.get_command_obj('js')\n", "css = self.distribution.get_command_obj('css')\n", "jsdeps.force = js.force = strict\n", "targets = [jsdeps.bower_dir]\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 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Expr'", "Assign'", "Assign'", "Return'", "Expr'", "Condition", "Condition", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", ...
[ "def FUNC_1(self, VAR_3, VAR_4, VAR_6):...\n", "self.room_id = self.helper.create_room_as(self.user_id)\n" ]
[ "def prepare(self, reactor, clock, hs):...\n", "self.room_id = self.helper.create_room_as(self.user_id)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_13(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_1.key_ids:\n", "return defer.fail(SynapseError(400, 'Not signed by %s' % (VAR_1.server_name\n ,), Codes.UNAUTHORIZED))\n", "VAR_0.debug('Verifying %s for %s with key_ids %s, min_validity %i', VAR_1.\n request_name, VAR_1.server_name, V...
[ "def process(verify_request):...\n", "\"\"\"docstring\"\"\"\n", "if not verify_request.key_ids:\n", "return defer.fail(SynapseError(400, 'Not signed by %s' % (verify_request.\n server_name,), Codes.UNAUTHORIZED))\n", "logger.debug('Verifying %s for %s with key_ids %s, min_validity %i',\n verify_reques...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Expr'", "Expr'", "Return'" ]
[ "@VAR_2.route('/ajax/table_settings', methods=['POST'])...\n", "VAR_87.view_settings['table'] = json.loads(request.data)\n", "VAR_3.error('Invalid request received: %r ', request)\n", "return ''\n", "flag_modified(VAR_87, 'view_settings')\n", "ub.session.commit()\n", "return 'Invalid request', 400\n" ]
[ "@web.route('/ajax/table_settings', methods=['POST'])...\n", "current_user.view_settings['table'] = json.loads(request.data)\n", "log.error('Invalid request received: %r ', request)\n", "return ''\n", "flag_modified(current_user, 'view_settings')\n", "ub.session.commit()\n", "return 'Invalid request', 4...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Expr'", "Return'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_24(self):...\n", "self.client.logout()\n" ]
[ "def tearDown(self):...\n", "self.client.logout()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1(self):...\n", "self.data = {'': lower(type(self).__name__)}\n" ]
[ "def encode(self):...\n", "self.data = {'': lower(type(self).__name__)}\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_41(*VAR_79, **VAR_42):...\n", "if VAR_79 and len(VAR_79) > 1 and isinstance(VAR_79[1], text_type):\n", "VAR_46 = FUNC_42(VAR_79[0], VAR_79[1])\n", "VAR_94 = FUNC_45(*VAR_79, **kwargs)\n", "VAR_94 = VAR_1.document_cache.get(VAR_46)\n", "return VAR_94\n", "if VAR_94:\n", "return VAR_94\n", "...
[ "def get_cached_doc(*args, **kwargs):...\n", "if args and len(args) > 1 and isinstance(args[1], text_type):\n", "key = get_document_cache_key(args[0], args[1])\n", "doc = get_doc(*args, **kwargs)\n", "doc = local.document_cache.get(key)\n", "return doc\n", "if doc:\n", "return doc\n", "doc = cache()...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Assign'", "Return'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_35, VAR_33):...\n", "self.lang = VAR_35\n", "self.nodelist = VAR_33\n" ]
[ "def __init__(self, lang, code):...\n", "self.lang = lang\n", "self.nodelist = code\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "\"\"\"Tests REST events for /rooms paths.\"\"\"\n", "from mock import Mock\n", "from twisted.internet import defer\n", "from synapse.rest.client.v1 import room\n", "from synapse.types import UserID\n", "from tests import unittest\n", "VAR_0 = '/_matrix/client/api/v1'\n", "\"\"\" Tests /rooms/$room_id...
[ "\"\"\"Tests REST events for /rooms paths.\"\"\"\n", "from mock import Mock\n", "from twisted.internet import defer\n", "from synapse.rest.client.v1 import room\n", "from synapse.types import UserID\n", "from tests import unittest\n", "PATH_PREFIX = '/_matrix/client/api/v1'\n", "\"\"\" Tests /rooms/$r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "AsyncFunctionDef'", "Return'" ]
[ "def FUNC_44(self):...\n", "VAR_87 = VAR_1.query(CLASS_1).filter(CLASS_1.role.op('&')(constants.\n ROLE_ANONYMOUS) == constants.ROLE_ANONYMOUS).first()\n", "self.name = VAR_87.name\n", "self.role = VAR_87.role\n", "self.id = VAR_87.id\n", "self.sidebar_view = VAR_87.sidebar_view\n", "self.default_lan...
[ "def loadSettings(self):...\n", "data = session.query(User).filter(User.role.op('&')(constants.\n ROLE_ANONYMOUS) == constants.ROLE_ANONYMOUS).first()\n", "self.name = data.name\n", "self.role = data.role\n", "self.id = data.id\n", "self.sidebar_view = data.sidebar_view\n", "self.default_language = d...
[ 0, 0, 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'", "Assign'", "Assign'" ]
[ "def FUNC_10(self):...\n", "\"\"\"docstring\"\"\"\n", "if 'checksum' not in self.cleaned_data:\n", "return\n", "VAR_27 = self.unit_set\n", "self.cleaned_data['unit'] = VAR_27.filter(id_hash=self.cleaned_data['checksum']\n )[0]\n" ]
[ "def clean_checksum(self):...\n", "\"\"\"docstring\"\"\"\n", "if 'checksum' not in self.cleaned_data:\n", "return\n", "unit_set = self.unit_set\n", "self.cleaned_data['unit'] = unit_set.filter(id_hash=self.cleaned_data[\n 'checksum'])[0]\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Assign'" ]
[ "def FUNC_13(self):...\n", "if self.report_type == 'Script Report':\n", "make_boilerplate('controller.py', self, {'name': self.name})\n", "make_boilerplate('controller.js', self, {'name': self.name})\n" ]
[ "def create_report_py(self):...\n", "if self.report_type == 'Script Report':\n", "make_boilerplate('controller.py', self, {'name': self.name})\n", "make_boilerplate('controller.js', self, {'name': self.name})\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_2(*, VAR_0: Client, VAR_5: AModel) ->Union[None, HTTPValidationError]:...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = '{}/tests/json_body'.format(VAR_0.base_url)\n", "VAR_12: Dict[str, Any] = VAR_0.get_headers()\n", "VAR_9 = VAR_5.to_dict()\n", "VAR_8 = httpx.post(VAR_6=url, VAR_12=headers, json=jso...
[ "def json_body_tests_json_body_post(*, client: Client, json_body: AModel...\n", "\"\"\"docstring\"\"\"\n", "url = '{}/tests/json_body'.format(client.base_url)\n", "headers: Dict[str, Any] = client.get_headers()\n", "json_json_body = json_body.to_dict()\n", "response = httpx.post(url=url, headers=headers, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "AnnAssign'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Return'" ]
[ "def FUNC_16(VAR_3, VAR_4, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = FUNC_0(VAR_4.config) + ['--basedir', str(VAR_3)]\n", "VAR_6.start(VAR_11)\n", "VAR_6.open_path('qute://settings/set?option=search.ignore_case&value=always')\n", "assert VAR_6.get_setting('search.ignore_case') == 'always'\n", ...
[ "def test_qute_settings_persistence(short_tmpdir, request, quteproc_new):...\n", "\"\"\"docstring\"\"\"\n", "args = _base_args(request.config) + ['--basedir', str(short_tmpdir)]\n", "quteproc_new.start(args)\n", "quteproc_new.open_path(\n 'qute://settings/set?option=search.ignore_case&value=always')\n", ...
[ 0, 0, 0, 0, 3, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Assert'", "Expr'", "Expr'", "Expr'", "Assert'" ]
[ "def FUNC_42():...\n", "VAR_129 = make_response(render_template('index.jinja2', **render_kwargs))\n", "if VAR_107:\n", "VAR_129 = util.flask.add_non_caching_response_headers(VAR_129)\n", "return VAR_129\n" ]
[ "def make_default_ui():...\n", "r = make_response(render_template('index.jinja2', **render_kwargs))\n", "if wizard:\n", "r = util.flask.add_non_caching_response_headers(r)\n", "return r\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_17(self):...\n", "VAR_15 = self._makeOne()\n", "VAR_16 = CLASS_1()\n", "VAR_17 = CLASS_0(RESPONSE=response)\n", "VAR_26 = 'NjE2NDZkNjk2ZTo3MDZjNmY2ZTY1MzQ3NQ%3D%3D'[:-1]\n", "VAR_17.set(VAR_15.cookie_name, VAR_26)\n", "self.assertEqual(VAR_15.extractCredentials(VAR_17), {})\n" ]
[ "def test_extractCredentials_from_cookie_with_bad_binascii(self):...\n", "helper = self._makeOne()\n", "response = FauxCookieResponse()\n", "request = FauxSettableRequest(RESPONSE=response)\n", "cookie_val = 'NjE2NDZkNjk2ZTo3MDZjNmY2ZTY1MzQ3NQ%3D%3D'[:-1]\n", "request.set(helper.cookie_name, cookie_val)\n...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_14(self):...\n", "def __init__(self):...\n", "self.called = False\n", "def FUNC_29(self):...\n", "self.called = True\n", "VAR_21 = CLASS_4()\n", "get_pagination_html(VAR_21)\n", "assert VAR_21.called is True\n" ]
[ "def test_get_pagination_html(self):...\n", "def __init__(self):...\n", "self.called = False\n", "def to_html(self):...\n", "self.called = True\n", "pager = MockPager()\n", "get_pagination_html(pager)\n", "assert pager.called is True\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assert'" ]
[ "def FUNC_10(VAR_20):...\n", "return os.path.join(VAR_4, VAR_20)\n" ]
[ "def _get_obj_absolute_path(obj_path):...\n", "return os.path.join(DATAROOT, obj_path)\n" ]
[ 0, 1 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_30(VAR_27):...\n", "print(VAR_26 + VAR_27)\n" ]
[ "def in_print(s):...\n", "print(indent_str + s)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_83(VAR_9, *VAR_2, **VAR_3):...\n", "VAR_164 = VAR_9.is_ajax() or VAR_9.META.get('HTTP_ACCEPT', '').startswith(\n 'application/json')\n", "return VAR_1(VAR_9, *VAR_2, **kwargs)\n", "VAR_74 = _('User does not exist.')\n", "return FUNC_83\n...
[ "def common_exceptions_400(func):...\n", "\"\"\"docstring\"\"\"\n", "def wrapped(request, *args, **kwargs):...\n", "use_json = request.is_ajax() or request.META.get('HTTP_ACCEPT', '').startswith(\n 'application/json')\n", "return func(request, *args, **kwargs)\n", "message = _('User does not exist.')\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Assign'", "Return'", "Assign'", "Return'", "Condition", "Return'", "Return'" ]
[ "async def FUNC_76(*VAR_20, **VAR_21):...\n", "return None\n" ]
[ "async def _insert_client_ip(*args, **kwargs):...\n", "return None\n" ]
[ 0, 0 ]
[ "AsyncFunctionDef'", "Return'" ]
[ "def __init__(self, VAR_12=True, **VAR_7):...\n", "if 'widget' not in VAR_7:\n", "VAR_7['widget'] = CLASS_1(VAR_12=datepicker)\n", "super().__init__(**kwargs)\n" ]
[ "def __init__(self, datepicker=True, **kwargs):...\n", "if 'widget' not in kwargs:\n", "kwargs['widget'] = WeblateDateInput(datepicker=datepicker)\n", "super().__init__(**kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Expr'" ]
[ "def FUNC_1(self, VAR_10):...\n", "self.appbuilder.sm.reset_password(g.user.id, VAR_10.password.data)\n", "flash(as_unicode(self.message), 'info')\n" ]
[ "def form_post(self, form):...\n", "self.appbuilder.sm.reset_password(g.user.id, form.password.data)\n", "flash(as_unicode(self.message), 'info')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "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'", ...
[ "from django.utils import timezone\n", "from django.shortcuts import render, redirect, get_object_or_404\n", "from django.contrib import messages\n", "from django.utils.translation import gettext as _\n", "from spirit.core.utils.views import is_post\n", "from spirit.core.utils.decorators import moderator_...
[ "from django.utils import timezone\n", "from django.shortcuts import render, redirect, get_object_or_404\n", "from django.contrib import messages\n", "from django.utils.translation import gettext as _\n", "from spirit.core.utils.views import is_post\n", "from spirit.core.utils.decorators import moderator_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Condition", "Assign'", "Condition", "Assign'", "Return'", "Condition", "Expr'", "Condition", "Expr'", "Return'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return 'components/{}'.format(VAR_17)\n" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return 'components/{}'.format(file_id)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_40(self):...\n", "VAR_12 = 'hello'\n", "VAR_22, VAR_23 = self.make_request('POST',\n '/_matrix/client/r0/rooms/{}/join'.format(self.room_id), VAR_19={\n 'reason': reason}, VAR_16=self.second_tok)\n", "self.assertEqual(VAR_23.code, 200, VAR_23.result)\n", "self._check_for_reason(VAR_12)\n" ]
[ "def test_join_reason(self):...\n", "reason = 'hello'\n", "request, channel = self.make_request('POST',\n '/_matrix/client/r0/rooms/{}/join'.format(self.room_id), content={\n 'reason': reason}, access_token=self.second_tok)\n", "self.assertEqual(channel.code, 200, channel.result)\n", "self._check_for_...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_5(VAR_7, VAR_9, VAR_13, VAR_14, VAR_15, VAR_16, VAR_4=-1):...\n", "if VAR_15 == 'divs':\n", "VAR_7[0].insert(VAR_4, DIV(DIV(LABEL(VAR_9), _class='w2p_fl'), DIV(VAR_13,\n _class='w2p_fw'), DIV(VAR_14, _class='w2p_fc'), VAR_16=_id))\n", "if VAR_15 == 'table2cols':\n", "VAR_7[0].insert(VAR_4, TR(T...
[ "def addrow(form, a, b, c, style, _id, position=-1):...\n", "if style == 'divs':\n", "form[0].insert(position, DIV(DIV(LABEL(a), _class='w2p_fl'), DIV(b, _class=\n 'w2p_fw'), DIV(c, _class='w2p_fc'), _id=_id))\n", "if style == 'table2cols':\n", "form[0].insert(position, TR(TD(LABEL(a), _class='w2p_fl'), ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "@VAR_5.route('/obj/start/<int:start>/span/<int:span>/<path:video>')...\n", "VAR_13 = str(FUNC_5(VAR_10))\n", "VAR_17 = FUNC_8(VAR_13, VAR_14=start, VAR_15=span)\n", "def FUNC_9():...\n", "while True:\n", "VAR_24 = VAR_17.stdout.read(4096)\n", "if not VAR_24:\n", "yield VAR_24\n", "VAR_16 = Headers(...
[ "@scope_blueprint.route('/obj/start/<int:start>/span/<int:span>/<path:video>')...\n", "video_path = str(_get_obj_absolute_path(video))\n", "proc = _create_ffmpeg_segment_proc(video_path, start_sec=start,\n duration_sec=span)\n", "def generate():...\n", "while True:\n", "data = proc.stdout.read(4096)\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "FunctionDef'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_4(VAR_1):...\n", "return FUNC_1(VAR_1, VAR_3=User.objects.filter(st__is_moderator=True,\n st__is_administrator=False), VAR_4='spirit/user/admin/mods.html')\n" ]
[ "def index_mods(request):...\n", "return _index(request, queryset=User.objects.filter(st__is_moderator=True,\n st__is_administrator=False), template='spirit/user/admin/mods.html')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@VAR_2.route('/formats')...\n", "if VAR_87.check_visibility(constants.SIDEBAR_FORMAT):\n", "if VAR_87.get_view_property('ratings', 'dir') == 'desc':\n", "abort(404)\n", "VAR_10 = db.Data.format.desc()\n", "VAR_10 = db.Data.format.asc()\n", "VAR_109 = 0\n", "VAR_109 = 1\n", "VAR_63 = calibre_db.sess...
[ "@web.route('/formats')...\n", "if current_user.check_visibility(constants.SIDEBAR_FORMAT):\n", "if current_user.get_view_property('ratings', 'dir') == 'desc':\n", "abort(404)\n", "order = db.Data.format.desc()\n", "order = db.Data.format.asc()\n", "order_no = 0\n", "order_no = 1\n", "entries = cali...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "For", "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_27(VAR_87=False, VAR_88=False, VAR_89=None):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_89:\n", "VAR_89 = ['GET', 'POST', 'PUT', 'DELETE']\n", "def FUNC_115(VAR_129):...\n", "VAR_83.append(VAR_129)\n", "VAR_86[VAR_129] = VAR_89\n", "if VAR_87:\n", "VAR_84.append(VAR_129)\n", "return V...
[ "def whitelist(allow_guest=False, xss_safe=False, methods=None):...\n", "\"\"\"docstring\"\"\"\n", "if not methods:\n", "methods = ['GET', 'POST', 'PUT', 'DELETE']\n", "def innerfn(fn):...\n", "whitelisted.append(fn)\n", "allowed_http_methods_for_whitelisted_func[fn] = methods\n", "if allow_guest:\n",...
[ 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "FunctionDef'", "Expr'", "Assign'", "Condition", "Expr'", "Return'", "Condition", "Expr'" ]
[ "def FUNC_42(self, VAR_25, *VAR_0, **VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "if 'flags' in VAR_1:\n", "if hasattr(self, VAR_25) and hasattr(getattr(self, VAR_25), '__call__'):\n", "VAR_72 = lambda self, *VAR_0, **VAR_1: getattr(self, VAR_25)(*VAR_0, **kwargs)\n", "VAR_72 = lambda self, *VAR_0, **VAR_1:...
[ "def run_method(self, method, *args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "if 'flags' in kwargs:\n", "if hasattr(self, method) and hasattr(getattr(self, method), '__call__'):\n", "fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)\n", "fn = lambda self, *args, **kwargs: None...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_6(VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_29 = VAR_21.get('front_url')\n", "if not VAR_29:\n", "return VAR_29\n", "VAR_29 = reverse('shuup:index')\n", "VAR_29 = None\n" ]
[ "def get_front_url(context):...\n", "\"\"\"docstring\"\"\"\n", "front_url = context.get('front_url')\n", "if not front_url:\n", "return front_url\n", "front_url = reverse('shuup:index')\n", "front_url = None\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Assign'" ]
[ "def __init__(self, VAR_84, *VAR_6, **VAR_7):...\n", "super().__init__(*VAR_6, **kwargs)\n", "self.fields['units'].queryset = VAR_84\n" ]
[ "def __init__(self, units, *args, **kwargs):...\n", "super().__init__(*args, **kwargs)\n", "self.fields['units'].queryset = units\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'" ]
[ "@transaction.non_atomic_requests...\n", "\"\"\"docstring\"\"\"\n", "VAR_38 = CourseKey.from_string(VAR_10)\n", "if VAR_43 == 'all':\n", "VAR_125 = 'all_whitelisted'\n", "if VAR_43 == 'new':\n", "instructor_task.api.generate_certificates_for_students(VAR_9, VAR_38,\n student_set=students)\n", "VAR_...
[ "@transaction.non_atomic_requests...\n", "\"\"\"docstring\"\"\"\n", "course_key = CourseKey.from_string(course_id)\n", "if generate_for == 'all':\n", "students = 'all_whitelisted'\n", "if generate_for == 'new':\n", "instructor_task.api.generate_certificates_for_students(request, course_key,\n student...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "Return'" ]
[ "def FUNC_20(self):...\n", "self.room_list_handler.enable_room_list_search = True\n", "self.directory_handler.enable_room_list_search = True\n", "VAR_20, VAR_21 = self.make_request('GET', b'publicRooms')\n", "self.assertEquals(200, VAR_21.code, VAR_21.result)\n", "self.assertTrue(len(VAR_21.json_body['chu...
[ "def test_disabling_room_list(self):...\n", "self.room_list_handler.enable_room_list_search = True\n", "self.directory_handler.enable_room_list_search = True\n", "request, channel = self.make_request('GET', b'publicRooms')\n", "self.assertEquals(200, channel.code, channel.result)\n", "self.assertTrue(len(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_7():...\n", "return FUNC_4('email_on_ticket_assign')\n" ]
[ "def email_on_ticket_assign_default():...\n", "return get_default_setting('email_on_ticket_assign')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@CLASS_4('back')...\n", "\"\"\"docstring\"\"\"\n", "VAR_20 = jinja.render('back.html', title='Suspended: ' + urllib.parse.\n unquote(url.fragment()))\n", "return 'text/html', VAR_20\n" ]
[ "@add_handler('back')...\n", "\"\"\"docstring\"\"\"\n", "html = jinja.render('back.html', title='Suspended: ' + urllib.parse.unquote\n (url.fragment()))\n", "return 'text/html', html\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Return'" ]
[ "@app.route('/bookmarklet')...\n", "return render_template('bookmarklet.html', title='Bookmarklet')\n" ]
[ "@app.route('/bookmarklet')...\n", "return render_template('bookmarklet.html', title='Bookmarklet')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_20(VAR_20):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_20.tag_set:\n", "FUNC_11(saved_model_utils.get_meta_graph_def(VAR_20.dir, VAR_20.tag_set))\n", "VAR_72 = saved_model_utils.read_saved_model(VAR_20.dir)\n", "for VAR_4 in VAR_72.meta_graphs:\n", "FUNC_11(VAR_4)\n" ]
[ "def scan(args):...\n", "\"\"\"docstring\"\"\"\n", "if args.tag_set:\n", "scan_meta_graph_def(saved_model_utils.get_meta_graph_def(args.dir, args.\n tag_set))\n", "saved_model = saved_model_utils.read_saved_model(args.dir)\n", "for meta_graph_def in saved_model.meta_graphs:\n", "scan_meta_graph_def(m...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Assign'", "For", "Expr'" ]
[ "def FUNC_12(VAR_5, VAR_21, VAR_22, VAR_23='crop'):...\n", "if VAR_5[0:6] != 'mxc://':\n", "return ''\n", "VAR_61 = VAR_5[6:]\n", "VAR_62 = None\n", "if '#' in VAR_61:\n", "VAR_61, VAR_62 = VAR_61.split('#', 1)\n", "VAR_63 = {'width': VAR_21, 'height': VAR_22, 'method': VAR_23}\n", "VAR_62 = '#' + V...
[ "def mxc_to_http_filter(value, width, height, resize_method='crop'):...\n", "if value[0:6] != 'mxc://':\n", "return ''\n", "server_and_media_id = value[6:]\n", "fragment = None\n", "if '#' in server_and_media_id:\n", "server_and_media_id, fragment = server_and_media_id.split('#', 1)\n", "params = {'wi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@property...\n", "VAR_4 = self.request.user\n", "if VAR_4.is_superuser:\n", "return False\n", "if settings.OFFER_HOSTING:\n", "return True\n", "return not any('component.edit' in permissions for permissions, _langs in\n VAR_4.component_permissions[self.instance.pk])\n" ]
[ "@property...\n", "user = self.request.user\n", "if user.is_superuser:\n", "return False\n", "if settings.OFFER_HOSTING:\n", "return True\n", "return not any('component.edit' in permissions for permissions, _langs in\n user.component_permissions[self.instance.pk])\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_80(VAR_31, VAR_136, VAR_138=None, VAR_5=None, VAR_139=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_67 = FUNC_37(VAR_100=8)\n", "VAR_51 = {'context': VAR_5 or {}, 'http_status_code': VAR_138 or 200}\n", "VAR_51['context'].update({'header': VAR_31, 'title': VAR_31, 'message':\n VAR_136})\n", "...
[ "def redirect_to_message(title, html, http_status_code=None, context=None,...\n", "\"\"\"docstring\"\"\"\n", "message_id = generate_hash(length=8)\n", "message = {'context': context or {}, 'http_status_code': http_status_code or\n 200}\n", "message['context'].update({'header': title, 'title': title, 'mes...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Condition", "Assign'", "Return'", "Assign'" ]
[ "def FUNC_16(VAR_2):...\n", "VAR_53 = self.key_downloads.pop(VAR_2)\n", "VAR_53.callback(None)\n" ]
[ "def drop_server_lock(server_name):...\n", "d = self.key_downloads.pop(server_name)\n", "d.callback(None)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "@VAR_0.filter...\n", "\"\"\"docstring\"\"\"\n", "return VAR_17.data\n" ]
[ "@register.filter...\n", "\"\"\"docstring\"\"\"\n", "return value.data\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_5(self, VAR_3) ->Optional[CLASS_1]:...\n", "\"\"\"docstring\"\"\"\n", "return None\n" ]
[ "def relative(self, _) ->Optional[InputSource]:...\n", "\"\"\"docstring\"\"\"\n", "return None\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_12(self):...\n", "self.client.post('/password_reset/', {'email': 'staffmember@example.com'})\n", "self.assertEqual(len(mail.outbox), 1)\n", "return self._read_signup_email(mail.outbox[0])\n" ]
[ "def _test_confirm_start(self):...\n", "self.client.post('/password_reset/', {'email': 'staffmember@example.com'})\n", "self.assertEqual(len(mail.outbox), 1)\n", "return self._read_signup_email(mail.outbox[0])\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_19(self):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_80():...\n", "VAR_84 = self.as_dict()\n", "for VAR_43, VAR_26 in iteritems(VAR_84):\n", "if VAR_26 == None:\n", "return VAR_84\n", "VAR_84[VAR_43] = ''\n" ]
[ "def set_title_field(self):...\n", "\"\"\"docstring\"\"\"\n", "def get_values():...\n", "values = self.as_dict()\n", "for key, value in iteritems(values):\n", "if value == None:\n", "return values\n", "values[key] = ''\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Assign'", "For", "Condition", "Return'", "Assign'" ]
[ "def FUNC_8(self, VAR_21):...\n", "VAR_21.changed_on = datetime.datetime.now()\n", "VAR_21.changed_by_fk = g.user.id\n" ]
[ "def pre_update(self, item):...\n", "item.changed_on = datetime.datetime.now()\n", "item.changed_by_fk = g.user.id\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_15(VAR_37):...\n", "VAR_39, VAR_23 = VAR_37\n", "VAR_16.write(VAR_39)\n", "return VAR_23\n" ]
[ "def write_to(r):...\n", "data, response = r\n", "output_stream.write(data)\n", "return response\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "@administrator_required...\n", "VAR_8 = yt_paginate(VAR_3.order_by('-date_joined', '-pk'), per_page=config.\n topics_per_page, page_number=request.GET.get('page', 1))\n", "return render(VAR_1, VAR_4, context={'users': users})\n" ]
[ "@administrator_required...\n", "users = yt_paginate(queryset.order_by('-date_joined', '-pk'), per_page=\n config.topics_per_page, page_number=request.GET.get('page', 1))\n", "return render(request, template, context={'users': users})\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_50(self):...\n", "\"\"\"docstring\"\"\"\n", "os.unlink(self.info_file)\n", "if e.errno != errno.ENOENT:\n" ]
[ "def remove_server_info_file(self):...\n", "\"\"\"docstring\"\"\"\n", "os.unlink(self.info_file)\n", "if e.errno != errno.ENOENT:\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Condition" ]
[ "def __init__(self):...\n", "self.reqparse = reqparse.RequestParser()\n", "super(CLASS_0, self).__init__()\n", "self.auth_dict = dict()\n", "if current_user.is_authenticated():\n", "VAR_15 = []\n", "if app.config.get('FRONTED_BY_NGINX'):\n", "for role in current_user.roles:\n", "VAR_16 = 'https://{}...
[ "def __init__(self):...\n", "self.reqparse = reqparse.RequestParser()\n", "super(AuthenticatedService, self).__init__()\n", "self.auth_dict = dict()\n", "if current_user.is_authenticated():\n", "roles_marshal = []\n", "if app.config.get('FRONTED_BY_NGINX'):\n", "for role in current_user.roles:\n", "...
[ 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "For", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "For", "Expr'", "Assign'" ]
[ "def FUNC_10(VAR_13: Callable[[Text], bool], VAR_12: Text) ->Type['Validator']:...\n", "\"\"\"docstring\"\"\"\n", "from prompt_toolkit.validation import Validator, ValidationError\n", "from prompt_toolkit.document import Document\n", "@staticmethod...\n", "VAR_26 = VAR_13(VAR_24.text)\n", "if not VAR_26...
[ "def create_validator(function: Callable[[Text], bool], error_message: Text...\n", "\"\"\"docstring\"\"\"\n", "from prompt_toolkit.validation import Validator, ValidationError\n", "from prompt_toolkit.document import Document\n", "@staticmethod...\n", "is_valid = function(document.text)\n", "if not is_v...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "ImportFrom'", "ImportFrom'", "Condition", "Assign'", "Condition", "Return'" ]
[ "def FUNC_10(self):...\n", "VAR_5 = self._makeContext()\n", "self.assertEqual(VAR_5.evaluate('dummy2'), 'dummy')\n" ]
[ "def test_evaluate_with_render_DTML_template(self):...\n", "ec = self._makeContext()\n", "self.assertEqual(ec.evaluate('dummy2'), 'dummy')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_9(self, VAR_15):...\n", "if VAR_15.tag not in self._tag_link_attrs:\n", "return False\n", "VAR_75 = self._tag_link_attrs[VAR_15.tag]\n", "if isinstance(VAR_75, (list, tuple)):\n", "for one_attr in VAR_75:\n", "VAR_57 = VAR_15.get(VAR_75)\n", "VAR_57 = VAR_15.get(one_attr)\n", "return True\...
[ "def allow_element(self, el):...\n", "if el.tag not in self._tag_link_attrs:\n", "return False\n", "attr = self._tag_link_attrs[el.tag]\n", "if isinstance(attr, (list, tuple)):\n", "for one_attr in attr:\n", "url = el.get(attr)\n", "url = el.get(one_attr)\n", "return True\n", "if not url:\n", "i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "For", "Assign'", "Assign'", "Return'", "Condition", "Condition", "Return'", "Return'", "Return'", "Condition", "Return'" ]
[ "@FUNC_27()...\n", "\"\"\"docstring\"\"\"\n", "VAR_42.pop('ignore_permissions', None)\n", "VAR_42.pop('cmd', None)\n", "from frappe.model.rename_doc import rename_doc\n", "return FUNC_54(*VAR_79, **kwargs)\n" ]
[ "@whitelist()...\n", "\"\"\"docstring\"\"\"\n", "kwargs.pop('ignore_permissions', None)\n", "kwargs.pop('cmd', None)\n", "from frappe.model.rename_doc import rename_doc\n", "return rename_doc(*args, **kwargs)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Expr'", "ImportFrom'", "Return'" ]
[ "def FUNC_0(self):...\n", "if not current_user.is_authenticated():\n", "return 'Must be logged in to log out', 200\n", "logout_user()\n", "return 'Logged Out', 200\n" ]
[ "def get(self):...\n", "if not current_user.is_authenticated():\n", "return 'Must be logged in to log out', 200\n", "logout_user()\n", "return 'Logged Out', 200\n" ]
[ 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Expr'", "Return'" ]
[ "def FUNC_65(self) ->str:...\n", "return RoomAlias(random_string(5), self.hs.hostname).to_string()\n" ]
[ "def _random_alias(self) ->str:...\n", "return RoomAlias(random_string(5), self.hs.hostname).to_string()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_2(self):...\n", "\"\"\"docstring\"\"\"\n", "self.assertEqual(format_value(True), '<code>true</code>')\n", "self.assertEqual(format_value(False), '<code>false</code>')\n", "self.assertEqual(format_value(None), '<code>null</code>')\n" ]
[ "def test_format_value_boolean_or_none(self):...\n", "\"\"\"docstring\"\"\"\n", "self.assertEqual(format_value(True), '<code>true</code>')\n", "self.assertEqual(format_value(False), '<code>false</code>')\n", "self.assertEqual(format_value(None), '<code>null</code>')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'" ]
[ "@action('resetmypassword', lazy_gettext('Reset my password'), '', 'fa-lock',...\n", "return redirect(url_for(self.appbuilder.sm.resetmypasswordview.__name__ +\n '.this_form_get'))\n" ]
[ "@action('resetmypassword', lazy_gettext('Reset my password'), '', 'fa-lock',...\n", "return redirect(url_for(self.appbuilder.sm.resetmypasswordview.__name__ +\n '.this_form_get'))\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_29(VAR_90, VAR_51=False):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_1.flags.in_test:\n", "return\n", "if not isinstance(VAR_90, (tuple, list)):\n", "VAR_90 = VAR_90,\n", "VAR_90 = set(VAR_90)\n", "VAR_182 = set(FUNC_24())\n", "if not VAR_90.intersection(VAR_182):\n", "if VAR_51:\n", "F...
[ "def only_for(roles, message=False):...\n", "\"\"\"docstring\"\"\"\n", "if local.flags.in_test:\n", "return\n", "if not isinstance(roles, (tuple, list)):\n", "roles = roles,\n", "roles = set(roles)\n", "myroles = set(get_roles())\n", "if not roles.intersection(myroles):\n", "if message:\n", "msg...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Expr'" ]
[ "def FUNC_26(VAR_14, VAR_16, VAR_19, VAR_32):...\n", "VAR_50 = False\n", "for VAR_28 in VAR_32:\n", "VAR_30 = 'custom_column_' + str(VAR_28.id)\n", "return VAR_50\n", "if not VAR_28.is_multiple:\n", "if len(getattr(VAR_16, VAR_30)) > 0:\n", "VAR_58 = VAR_19[VAR_30].split(',')\n", "VAR_29 = getattr(V...
[ "def edit_cc_data(book_id, book, to_save, cc):...\n", "changed = False\n", "for c in cc:\n", "cc_string = 'custom_column_' + str(c.id)\n", "return changed\n", "if not c.is_multiple:\n", "if len(getattr(book, cc_string)) > 0:\n", "input_tags = to_save[cc_string].split(',')\n", "cc_db_value = getattr(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "AugAssign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_7(self):...\n", "return f'https://{self.hostname}/{self.user}/{self.repo}'\n" ]
[ "def get_repo_url(self):...\n", "return f'https://{self.hostname}/{self.user}/{self.repo}'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_1():...\n", "\"\"\"docstring\"\"\"\n", "VAR_20 = []\n", "for dir, subdirs, VAR_65 in os.walk(VAR_5):\n", "VAR_44 = dir.replace(os.path.sep, '.')\n", "return VAR_20\n", "if '__init__.py' not in VAR_65:\n", "VAR_20.append(VAR_44)\n" ]
[ "def find_packages():...\n", "\"\"\"docstring\"\"\"\n", "packages = []\n", "for dir, subdirs, files in os.walk(name):\n", "package = dir.replace(os.path.sep, '.')\n", "return packages\n", "if '__init__.py' not in files:\n", "packages.append(package)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Assign'", "Return'", "Condition", "Expr'" ]
[ "def FUNC_83(*VAR_2, **VAR_3):...\n", "VAR_9 = VAR_2[0]\n", "VAR_193 = {'error': 'Missing required query parameter(s)', 'parameters': [],\n 'info': {}}\n", "for VAR_209, extra in VAR_47:\n", "VAR_199 = object()\n", "if len(VAR_193['parameters']) > 0:\n", "if VAR_9.POST.get(VAR_209, VAR_199) == VAR_19...
[ "def wrapped(*args, **kwargs):...\n", "request = args[0]\n", "error_response_data = {'error': 'Missing required query parameter(s)',\n 'parameters': [], 'info': {}}\n", "for param, extra in required_params:\n", "default = object()\n", "if len(error_response_data['parameters']) > 0:\n", "if request.PO...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Assign'", "Condition", "Condition", "Return'", "Return'", "Expr'", "Assign'" ]
[ "@pytest.mark.parametrize('path,body,expected_status,expected_response', [(...\n", "VAR_10 = VAR_0.post(VAR_6, json=body)\n", "assert VAR_10.status_code == VAR_8\n", "assert VAR_10.json() == VAR_9\n" ]
[ "@pytest.mark.parametrize('path,body,expected_status,expected_response', [(...\n", "response = client.post(path, json=body)\n", "assert response.status_code == expected_status\n", "assert response.json() == expected_response\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assert'", "Assert'" ]
[ "def FUNC_67(VAR_44, VAR_45, VAR_46, VAR_47, VAR_48):...\n", "VAR_55 = request.form.to_dict()\n", "VAR_87.random_books = 0\n", "if VAR_87.role_passwd() or VAR_87.role_admin():\n", "if VAR_55.get('password'):\n", "if VAR_55.get('kindle_mail', VAR_87.kindle_mail) != VAR_87.kindle_mail:\n", "flash(str(ex),...
[ "def change_profile(kobo_support, local_oauth_check, oauth_status,...\n", "to_save = request.form.to_dict()\n", "current_user.random_books = 0\n", "if current_user.role_passwd() or current_user.role_admin():\n", "if to_save.get('password'):\n", "if to_save.get('kindle_mail', current_user.kindle_mail\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, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "For", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "AugAssign'", "Condition", "Assign'", "Condition",...
[ "from os import path\n", "from synapse.config import ConfigError\n", "from ._base import Config\n", "VAR_0 = 'string'\n", "VAR_1 = 'consent'\n", "def __init__(self, *VAR_2):...\n", "super().__init__(*VAR_2)\n", "self.user_consent_version = None\n", "self.user_consent_template_dir = None\n", "self....
[ "from os import path\n", "from synapse.config import ConfigError\n", "from ._base import Config\n", "DEFAULT_CONFIG = \"\"\"# User Consent configuration\n#\n# for detailed instructions, see\n# https://github.com/matrix-org/synapse/blob/master/docs/consent_tracking.md\n#\n# Parts of this section are required i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Assig...
[ "def FUNC_13(self):...\n", "assert join(None) == '/'\n", "assert join(None, None, '', 0) == '/'\n" ]
[ "def test_it_works_with_garbage(self):...\n", "assert join(None) == '/'\n", "assert join(None, None, '', 0) == '/'\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assert'", "Assert'" ]
[ "def FUNC_23(self):...\n", "VAR_5 = self._makeContext()\n", "self.assertEqual(VAR_5.evaluate('path: '), None)\n" ]
[ "def test_empty_path_expression_explicit_with_trailing_whitespace(self):...\n", "ec = self._makeContext()\n", "self.assertEqual(ec.evaluate('path: '), None)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_2(VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = VAR_2.session.get('connector')\n", "if VAR_5 is not None:\n", "return VAR_5.is_public\n" ]
[ "def is_public_user(request):...\n", "\"\"\"docstring\"\"\"\n", "connector = request.session.get('connector')\n", "if connector is not None:\n", "return connector.is_public\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'" ]
[ "@app.route('/dataobj/delete/<int:dataobj_id>', methods=['DELETE', 'GET'])...\n", "" ]
[ "@app.route('/dataobj/delete/<int:dataobj_id>', methods=['DELETE', 'GET'])...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_3(VAR_2: str, VAR_3: pathlib.Path) ->typing.Tuple[pathlib.Path, dict]:...\n", "VAR_14 = FUNC_0(VAR_2, pathlib.Path(VAR_0.config['DATA_ROOT']))\n", "VAR_13, VAR_5 = FUNC_1(VAR_14)\n", "return VAR_13, FUNC_2(VAR_5)\n" ]
[ "def get_info(path: str, root: pathlib.Path) ->typing.Tuple[pathlib.Path, dict]:...\n", "dest_path = sanitized_join(path, pathlib.Path(app.config['DATA_ROOT']))\n", "data_file, metadata_file = get_paths(dest_path)\n", "return data_file, load_metadata(metadata_file)\n" ]
[ 0, 1, 1, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_21(VAR_8, VAR_9):...\n", "self.query_handlers[VAR_8] = VAR_9\n" ]
[ "def register_query_handler(query_type, handler):...\n", "self.query_handlers[query_type] = handler\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_14(self, VAR_46):...\n", "\"\"\"docstring\"\"\"\n", "self.log.info('Writing notebook server cookie secret to %s', self.\n cookie_secret_file)\n", "VAR_102.write(VAR_46)\n", "os.chmod(self.cookie_secret_file, 384)\n", "self.log.warn('Could not set permissions on %s', self.cookie_secret_file)\n...
[ "def _write_cookie_secret_file(self, secret):...\n", "\"\"\"docstring\"\"\"\n", "self.log.info('Writing notebook server cookie secret to %s', self.\n cookie_secret_file)\n", "f.write(secret)\n", "os.chmod(self.cookie_secret_file, 384)\n", "self.log.warn('Could not set permissions on %s', self.cookie_se...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@ratelimit(field='username', rate='5/5m')...\n", "if VAR_7.user.is_authenticated:\n", "return redirect(VAR_7.GET.get('next', VAR_7.user.st.get_absolute_url()))\n", "if VAR_7.method == 'POST' and VAR_7.is_limited():\n", "return redirect(VAR_7.get_full_path())\n", "return VAR_1(VAR_7, authentication_form=L...
[ "@ratelimit(field='username', rate='5/5m')...\n", "if request.user.is_authenticated:\n", "return redirect(request.GET.get('next', request.user.st.get_absolute_url()))\n", "if request.method == 'POST' and request.is_limited():\n", "return redirect(request.get_full_path())\n", "return _login_view(request, a...
[ 0, 0, 4, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_2(VAR_3, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_3 or not VAR_69:\n", "return None\n", "VAR_1.warning('Keyring is skipped due to an exception: %s', str(exc))\n", "VAR_92 = VAR_69.get_credential\n", "VAR_1.debug('Getting credentials from keyring for %s', VAR_3)\n", "if VAR_4:\n"...
[ "def _get_keyring_auth(url, username):...\n", "\"\"\"docstring\"\"\"\n", "if not url or not keyring:\n", "return None\n", "logger.warning('Keyring is skipped due to an exception: %s', str(exc))\n", "get_credential = keyring.get_credential\n", "logger.debug('Getting credentials from keyring for %s', url)...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Expr'", "Assign'", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Return'", "Return'", "Condition", "Return'" ]
[ "async def FUNC_10(self, VAR_17: str, VAR_16: str, VAR_39, VAR_36: Optional[...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = CLASS_0(VAR_15='GET', VAR_17=destination, VAR_16=path, VAR_20=args)\n", "VAR_11 = await self._send_request(VAR_10, VAR_28=retry_on_dns_fail, VAR_31=\n ignore_backoff)\n", "VAR_14 = dic...
[ "async def get_file(self, destination: str, path: str, output_stream, args:...\n", "\"\"\"docstring\"\"\"\n", "request = MatrixFederationRequest(method='GET', destination=destination,\n path=path, query=args)\n", "response = await self._send_request(request, retry_on_dns_fail=\n retry_on_dns_fail, ignor...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'", "Assign'" ]
[ "def FUNC_49(self, VAR_14):...\n", "\"\"\"docstring\"\"\"\n", "return '<li>%s</li>\\n' % VAR_14\n" ]
[ "def list_item(self, text):...\n", "\"\"\"docstring\"\"\"\n", "return '<li>%s</li>\\n' % text\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_67(self, VAR_14):...\n", "\"\"\"docstring\"\"\"\n", "VAR_64 = \"\"\"<div class=\"footnotes\">\n%s<ol>%s</ol>\n</div>\n\"\"\"\n", "return VAR_64 % (self.hrule(), VAR_14)\n" ]
[ "def footnotes(self, text):...\n", "\"\"\"docstring\"\"\"\n", "html = \"\"\"<div class=\"footnotes\">\n%s<ol>%s</ol>\n</div>\n\"\"\"\n", "return html % (self.hrule(), text)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def __init__(self, VAR_3=None):...\n", "VAR_28 = {'class': 'vTextField'}\n", "if VAR_3 is not None:\n", "VAR_28.update(VAR_3)\n", "super(CLASS_11, self).__init__(VAR_3=final_attrs)\n" ]
[ "def __init__(self, attrs=None):...\n", "final_attrs = {'class': 'vTextField'}\n", "if attrs is not None:\n", "final_attrs.update(attrs)\n", "super(AdminTextInputWidget, self).__init__(attrs=final_attrs)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "@app.route('/folders/create', methods=['POST'])...\n", "VAR_9 = forms.NewFolderForm()\n", "if VAR_9.validate_on_submit():\n", "VAR_7 = Path(VAR_9.parent_dir.data.strip('/')) / VAR_9.new_dir.data\n", "flash('Could not create folder.', 'error')\n", "VAR_35 = data.create_dir(str(VAR_7))\n", "return redire...
[ "@app.route('/folders/create', methods=['POST'])...\n", "form = forms.NewFolderForm()\n", "if form.validate_on_submit():\n", "path = Path(form.parent_dir.data.strip('/')) / form.new_dir.data\n", "flash('Could not create folder.', 'error')\n", "new_path = data.create_dir(str(path))\n", "return redirect(r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'", "Expr'", "Return'" ]
[ "def FUNC_14(VAR_7, VAR_8=False, VAR_9='', VAR_10=False):...\n", "\"\"\"docstring\"\"\"\n", "import salt.utils.win_functions\n", "import salt.utils.win_dacl\n", "VAR_11 = VAR_7[0]\n", "while VAR_54.path.basename(VAR_11) not in ['salt', 'salt-tests-tmpdir']:\n", "VAR_11, VAR_48 = VAR_54.path.split(VAR_11...
[ "def win_verify_env(dirs, permissive=False, pki_dir='', skip_extra=False):...\n", "\"\"\"docstring\"\"\"\n", "import salt.utils.win_functions\n", "import salt.utils.win_dacl\n", "path = dirs[0]\n", "while os.path.basename(path) not in ['salt', 'salt-tests-tmpdir']:\n", "path, base = os.path.split(path)\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Import'", "Import'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "For", "Expr'", "Assign'", "Condition", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'...
[ "\"\"\"string\"\"\"\n", "import argparse\n", "import os\n", "import re\n", "import sys\n", "from absl import app\n", "import numpy as np\n", "import six\n", "from tensorflow.core.example import example_pb2\n", "from tensorflow.core.framework import types_pb2\n", "from tensorflow.python.client im...
[ "\"\"\"Command-line interface to inspect and execute a graph in a SavedModel.\n\nFor detailed usages and examples, please refer to:\nhttps://www.tensorflow.org/guide/saved_model#cli_to_inspect_and_execute_savedmodel\n\n\"\"\"\n", "import argparse\n", "import os\n", "import re\n", "import sys\n", "from abs...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Impor...
[ "def FUNC_10(*VAR_17):...\n", "VAR_29 = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))\n", "return os.path.join(VAR_29, *VAR_17)\n" ]
[ "def scriptPath(*pathSegs):...\n", "startPath = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))\n", "return os.path.join(startPath, *pathSegs)\n" ]
[ 0, 0, 1 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "VAR_7 = self.created_rmid\n", "self.helper.invite(VAR_7=room, src=self.rmcreator_id, targ=self.user_id)\n", "self._test_get_membership(VAR_8=[self.user_id, self.rmcreator_id], VAR_7=\n room, VAR_9=403)\n", "self.helper.join(VAR_7=room, user=self.user_id)\n", "self._test_get_m...
[ "def test_membership_private_room_perms(self):...\n", "room = self.created_rmid\n", "self.helper.invite(room=room, src=self.rmcreator_id, targ=self.user_id)\n", "self._test_get_membership(members=[self.user_id, self.rmcreator_id], room=\n room, expect_code=403)\n", "self.helper.join(room=room, user=self....
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_12(VAR_0, VAR_1: FlaskClient):...\n", "VAR_8 = VAR_1.post('/login', data={'username': 'halcyon', 'password':\n 'password'}, follow_redirects=True)\n", "assert VAR_8.status_code == 200\n", "assert request.path == '/'\n", "assert current_user\n" ]
[ "def test_logging_in(test_app, client: FlaskClient):...\n", "resp = client.post('/login', data={'username': 'halcyon', 'password':\n 'password'}, follow_redirects=True)\n", "assert resp.status_code == 200\n", "assert request.path == '/'\n", "assert current_user\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assert'", "Assert'", "Assert'" ]
[ "def FUNC_7(self, VAR_26: str, VAR_27: Callable[..., Any], *, VAR_29:...\n", "VAR_46 = VAR_49 or self.route_class\n", "VAR_35 = VAR_35 or {}\n", "VAR_60 = {**self.responses, **VAR_35}\n", "VAR_61 = get_value_or_default(VAR_14, self.default_response_class)\n", "VAR_62 = self.tags.copy()\n", "if VAR_30:\n...
[ "def add_api_route(self, path: str, endpoint: Callable[..., Any], *,...\n", "route_class = route_class_override or self.route_class\n", "responses = responses or {}\n", "combined_responses = {**self.responses, **responses}\n", "current_response_class = get_value_or_default(response_class, self.\n default...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_20):...\n", "super().__init__(VAR_20)\n", "if self.param.form_type == 'text':\n", "self.link_name = request.form[self.key]\n", "self.file_suffix = '.out'\n", "self.file_suffix = request.form[self.key]\n" ]
[ "def __init__(self, fimeta):...\n", "super().__init__(fimeta)\n", "if self.param.form_type == 'text':\n", "self.link_name = request.form[self.key]\n", "self.file_suffix = '.out'\n", "self.file_suffix = request.form[self.key]\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "For", "Assign'", "Assign'", "Assign'" ]
[ "@default('access_token')...\n", "return os.getenv('GITHUB_ACCESS_TOKEN', '')\n" ]
[ "@default('access_token')...\n", "return os.getenv('GITHUB_ACCESS_TOKEN', '')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@CLASS_4('history')...\n", "\"\"\"docstring\"\"\"\n", "if VAR_3.path() == '/data':\n", "return 'text/html', jinja.render('history.html', title='History',\n gap_interval=config.val.history_gap_interval)\n", "VAR_6 = QUrlQuery(VAR_3).queryItemValue('offset')\n", "VAR_5 = QUrlQuery(VAR_3).queryItemValue(...
[ "@add_handler('history')...\n", "\"\"\"docstring\"\"\"\n", "if url.path() == '/data':\n", "return 'text/html', jinja.render('history.html', title='History',\n gap_interval=config.val.history_gap_interval)\n", "offset = QUrlQuery(url).queryItemValue('offset')\n", "start_time = QUrlQuery(url).queryItemVa...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "Return'", "Assign'", "Assign'" ]