lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "@login_required(redirect_field_name='', login_url='/403')...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = forms.BatchActionsForm(VAR_6.POST)\n", "if not VAR_11.is_valid():\n", "return HttpResponseBadRequest(VAR_11.errors.as_json())\n", "VAR_2 = get_object_or_404(Locale, code=form.cleaned_data['locale'])\n", ...
[ "@login_required(redirect_field_name='', login_url='/403')...\n", "\"\"\"docstring\"\"\"\n", "form = forms.BatchActionsForm(request.POST)\n", "if not form.is_valid():\n", "return HttpResponseBadRequest(form.errors.as_json())\n", "locale = get_object_or_404(Locale, code=form.cleaned_data['locale'])\n", "...
[ 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "For", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Expr'", "Expr'", ...
[ "def FUNC_0(self, VAR_1):...\n", "VAR_2 = VAR_1.query_params.get('item')\n", "VAR_3 = VAR_1.query_params.get('city')\n", "if not VAR_2 and not VAR_3:\n", "return Response(VAR_0)\n", "VAR_4 = 'string'\n", "if VAR_2 and VAR_3:\n", "VAR_4 = \"{} WHERE city = '{}' and title = '{}'\".format(VAR_4, VAR_3, V...
[ "def get(self, request):...\n", "item = request.query_params.get('item')\n", "city = request.query_params.get('city')\n", "if not item and not city:\n", "return Response(NOT_FOUND_JSON_RESPONSE)\n", "sql = \"\"\"SELECT\n mode() WITHIN GROUP (ORDER BY list_price DESC) AS model_value,\n ...
[ 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_30(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'LOW': 2, 'MEDIUM': 6}, 'CONFIDENCE': {'HIGH': 8}}\n", "self.check_example('pickle_deserialize.py', VAR_2)\n" ]
[ "def test_pickle(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'LOW': 2, 'MEDIUM': 6}, 'CONFIDENCE': {'HIGH': 8}}\n", "self.check_example('pickle_deserialize.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_4(self, VAR_7=None, VAR_8=None, VAR_4=None, VAR_9=None, VAR_10=...\n", "if not VAR_18 and not frappe.has_permission(self.doctype, 'read', VAR_19=user):\n", "frappe.flags.error_message = _('Insufficient Permission for {0}').format(frappe\n .bold(self.doctype))\n", "if isinstance(VAR_8, dict) or is...
[ "def execute(self, query=None, fields=None, filters=None, or_filters=None,...\n", "if not ignore_permissions and not frappe.has_permission(self.doctype,\n", "frappe.flags.error_message = _('Insufficient Permission for {0}').format(frappe\n .bold(self.doctype))\n", "if isinstance(fields, dict) or isinstance...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "...
[ "def FUNC_23(self, VAR_16, VAR_22):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', VAR_16['name'], 'size', '%sG' % VAR_22)\n", "VAR_0.error(_(\n 'Failed to extend_volume %(name)s from %(current_size)sGB to %(new_size)sGB'\n ), {'name': VAR_16['name'], 'current_size': VAR_16['si...
[ "def extend_volume(self, volume, new_size):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', volume['name'], 'size', '%sG' % new_size)\n", "LOG.error(_(\n 'Failed to extend_volume %(name)s from %(current_size)sGB to %(new_size)sGB'\n ), {'name': volume['name'], 'current_size': vo...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def FUNC_37(VAR_7):...\n", "VAR_7 = VAR_7 + '/log'\n", "VAR_14, VAR_45 = FUNC_5(VAR_7)\n", "VAR_91 = '2015-03-07'\n", "if 'created_at' not in VAR_14:\n", "return VAR_91\n", "VAR_92 = str(VAR_14).index('created_at')\n", "VAR_14 = VAR_14[VAR_92:]\n", "VAR_93 = 'created_at\":\"'\n", "VAR_94 = len(VA...
[ "def get_date(url):...\n", "url = url + '/log'\n", "bracket, status = hit_url(url)\n", "s2 = '2015-03-07'\n", "if 'created_at' not in bracket:\n", "return s2\n", "first_occurance = str(bracket).index('created_at')\n", "bracket = bracket[first_occurance:]\n", "s = 'created_at\":\"'\n", "i = len(s)\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_22(VAR_30, VAR_3):...\n", "if not isinstance(VAR_30, _IOFile):\n", "return IOFile(VAR_30, VAR_16=self)\n", "return VAR_30.apply_wildcards(VAR_3, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)\n" ]
[ "def concretize_iofile(f, wildcards):...\n", "if not isinstance(f, _IOFile):\n", "return IOFile(f, rule=self)\n", "return f.apply_wildcards(wildcards, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "@handler('unregistered', VAR_0='*')...\n", "if isinstance(VAR_5, BaseController) and VAR_5.channel in self.paths:\n" ]
[ "@handler('unregistered', channel='*')...\n", "if isinstance(component, BaseController) and component.channel in self.paths:\n" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "@property...\n", "if self._snakefile is None:\n", "return os.path.abspath(os.path.join(self.workdir, 'Snakefile'))\n", "if not os.path.isabs(self._snakefile):\n", "return os.path.abspath(os.path.join(self.workflow.basedir, self._snakefile))\n", "return self._snakefile\n" ]
[ "@property...\n", "if self._snakefile is None:\n", "return os.path.abspath(os.path.join(self.workdir, 'Snakefile'))\n", "if not os.path.isabs(self._snakefile):\n", "return os.path.abspath(os.path.join(self.workflow.basedir, self._snakefile))\n", "return self._snakefile\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_3(VAR_7):...\n", "if VAR_7:\n", "VAR_25 = c_onboarding_status(use_secondary=True).find_one({onboarding.\n USER_ID: VAR_7}) or {}\n", "return 0\n", "if VAR_25:\n", "VAR_26 = [VAR_25.get(key, False) for key in FUNC_2()]\n", "return round(len(filter(lambda x: x, VAR_26)) / float(len(VAR_26)) *...
[ "def get_onboarding_percentage(user_id):...\n", "if user_id:\n", "status = c_onboarding_status(use_secondary=True).find_one({onboarding.\n USER_ID: user_id}) or {}\n", "return 0\n", "if status:\n", "steps = [status.get(key, False) for key in get_onboarding_steps()]\n", "return round(len(filter(lambda...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_11(self):...\n", "return 'FixedString({})'.format(self.length)\n" ]
[ "def for_schema(self):...\n", "return 'FixedString({})'.format(self.length)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_22(self, *VAR_69, **VAR_70):...\n", "def FUNC_39(VAR_101):...\n", "VAR_101.input = VAR_69, VAR_70\n", "return VAR_101\n" ]
[ "def input(self, *paths, **kwpaths):...\n", "def decorate(ruleinfo):...\n", "ruleinfo.input = paths, kwpaths\n", "return ruleinfo\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_2(self):...\n", "self.assertTrue({'name': 'DocType', 'issingle': 0} in DatabaseQuery(\n 'DocType').execute(fields=['name', 'issingle'], limit_page_length=None))\n" ]
[ "def test_fields(self):...\n", "self.assertTrue({'name': 'DocType', 'issingle': 0} in DatabaseQuery(\n 'DocType').execute(fields=['name', 'issingle'], limit_page_length=None))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "VAR_46 = None\n", "if self.xsrf_token_header:\n", "VAR_46 = self.request.headers.get(self.xsrf_token_header)\n", "if not VAR_46 and self.xsrf_token_request_param:\n", "VAR_53 = self.request.get_all(self.xsrf_token_request_param)\n", "return VAR_46\n", "V...
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "token = None\n", "if self.xsrf_token_header:\n", "token = self.request.headers.get(self.xsrf_token_header)\n", "if not token and self.xsrf_token_request_param:\n", "param = self.request.get_all(self.xsrf_token_request_param)\n", "return token\n", "token ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'", "Assign'" ]
[ "@property...\n", "VAR_4 = self.request.session.get('oidc_login_next', None)\n", "return VAR_4 or import_from_settings('LOGIN_REDIRECT_URL', '/')\n" ]
[ "@property...\n", "next_url = self.request.session.get('oidc_login_next', None)\n", "return next_url or import_from_settings('LOGIN_REDIRECT_URL', '/')\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_10(self):...\n", "\"\"\"docstring\"\"\"\n", "import soscollector.hosts\n", "VAR_4 = soscollector.hosts\n", "VAR_19 = {}\n", "VAR_20 = self._load_modules(VAR_4, 'hosts')\n", "for VAR_24 in VAR_20:\n", "VAR_19[VAR_24[0]] = VAR_24[1]\n", "return VAR_19\n" ]
[ "def _load_supported_hosts(self):...\n", "\"\"\"docstring\"\"\"\n", "import soscollector.hosts\n", "package = soscollector.hosts\n", "supported_hosts = {}\n", "hosts = self._load_modules(package, 'hosts')\n", "for host in hosts:\n", "supported_hosts[host[0]] = host[1]\n", "return supported_hosts\n" ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Import'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'" ]
[ "def FUNC_23(self):...\n", "VAR_0 = [SleepCheck(0.5) for i in range(3)]\n", "self.set_max_jobs(len(VAR_0))\n", "self.runall(VAR_0)\n", "self.assertEqual(len(VAR_0), self.runner.stats.num_cases())\n", "self.assertEqual(0, len(self.runner.stats.failures()))\n", "self.assertEqual(len(VAR_0), max(self.monit...
[ "def test_concurrency_unlimited(self):...\n", "checks = [SleepCheck(0.5) for i in range(3)]\n", "self.set_max_jobs(len(checks))\n", "self.runall(checks)\n", "self.assertEqual(len(checks), self.runner.stats.num_cases())\n", "self.assertEqual(0, len(self.runner.stats.failures()))\n", "self.assertEqual(len...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_8(self, VAR_6):...\n", "if VAR_6 in self.clients:\n", "VAR_14 = self.clients[VAR_6]\n", "if VAR_14['status'] == self.RUNNING:\n", "VAR_0.info('Stopping LSP client for {}...'.format(VAR_6))\n", "VAR_14['status'] = self.STOPPED\n", "VAR_14['instance'].stop()\n" ]
[ "def close_client(self, language):...\n", "if language in self.clients:\n", "language_client = self.clients[language]\n", "if language_client['status'] == self.RUNNING:\n", "logger.info('Stopping LSP client for {}...'.format(language))\n", "language_client['status'] = self.STOPPED\n", "language_client['...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_42(self, VAR_16):...\n", "VAR_25 = self.meta.get_field(VAR_16)\n", "VAR_46 = self.get(VAR_16)\n", "return self.cast(VAR_46, VAR_25)\n" ]
[ "def get_value(self, fieldname):...\n", "df = self.meta.get_field(fieldname)\n", "val = self.get(fieldname)\n", "return self.cast(val, df)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "@inlineCallbacks...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = self.nodes[0].overlay.metadata_store.ChannelMetadata.create_channel(\n 'test', 'bla')\n", "for _ in xrange(20):\n", "self.add_random_torrent(self.nodes[0].overlay.metadata_store.TorrentMetadata)\n", "VAR_6.commit_channel_torrent()\n", "self...
[ "@inlineCallbacks...\n", "\"\"\"docstring\"\"\"\n", "channel = self.nodes[0].overlay.metadata_store.ChannelMetadata.create_channel(\n 'test', 'bla')\n", "for _ in xrange(20):\n", "self.add_random_torrent(self.nodes[0].overlay.metadata_store.TorrentMetadata)\n", "channel.commit_channel_torrent()\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "For", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "from django.apps import apps\n", "from clickgestion.transactions.forms import TransactionEditForm, TransactionPayForm\n", "from clickgestion.transactions.models import BaseConcept, Transaction\n", "from django.shortcuts import get_object_or_404, render, redirect, reverse\n", "from django.utils.translation ...
[ "from django.apps import apps\n", "from clickgestion.transactions.forms import TransactionEditForm, TransactionPayForm\n", "from clickgestion.transactions.models import BaseConcept, Transaction\n", "from django.shortcuts import get_object_or_404, render, redirect, reverse\n", "from django.utils.translation ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition"...
[ "def __eq__(self, VAR_17):...\n", "return self.name == VAR_17.name\n" ]
[ "def __eq__(self, other):...\n", "return self.name == other.name\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "VAR_4 = '/api/apps/{app_id}/config'.format(**locals())\n", "VAR_7 = {'values': json.dumps({...
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/config'.format(**locals())\n", "body =...
[ 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'"...
[ "def FUNC_9(self):...\n", "VAR_14 = ['8.9.10.11', '9.10.11.12:4433']\n", "VAR_15 = self.new_mocked_cluster(VAR_14, FUNC_0, concurrent_connections=11)\n", "for ep_id, ep in VAR_15.endpoints.items():\n", "self.assertEqual(ep.pool.max_size, 11)\n" ]
[ "def test_conns_per_pool(self):...\n", "conf_managers = ['8.9.10.11', '9.10.11.12:4433']\n", "api = self.new_mocked_cluster(conf_managers, _validate_conn_up,\n concurrent_connections=11)\n", "for ep_id, ep in api.endpoints.items():\n", "self.assertEqual(ep.pool.max_size, 11)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Expr'" ]
[ "def FUNC_17(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def wait(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def __init__(self, VAR_2: dict, VAR_3: forms.Field, VAR_4=None):...\n", "VAR_13 = []\n", "self.scheme = VAR_2\n", "self.field = VAR_3\n", "for VAR_31, VAR_32, VAR_33 in self.scheme['fields']:\n", "VAR_30 = copy.copy(VAR_4) or {}\n", "super().__init__(VAR_13, VAR_4)\n", "VAR_30['data-fname'] = VAR_31\...
[ "def __init__(self, scheme: dict, field: forms.Field, attrs=None):...\n", "widgets = []\n", "self.scheme = scheme\n", "self.field = field\n", "for fname, label, size in self.scheme['fields']:\n", "a = copy.copy(attrs) or {}\n", "super().__init__(widgets, attrs)\n", "a['data-fname'] = fname\n", "widg...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_16(self, VAR_14):...\n", "" ]
[ "def is_datetime(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_13(self, VAR_20, VAR_21=True):...\n", "def FUNC_39(VAR_62):...\n", "return json.loads(VAR_62) if VAR_21 else VAR_62\n" ]
[ "def _render(self, request, as_json=True):...\n", "def get_str(_str):...\n", "return json.loads(_str) if as_json else _str\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Return'" ]
[ "import vim\n", "import requests\n", "import urlparse\n", "from retries import retries\n", "from requests_futures.sessions import FuturesSession\n", "from ycm.unsafe_thread_pool_executor import UnsafeThreadPoolExecutor\n", "from ycm import vimsupport\n", "from ycm.utils import ToUtf8Json\n", "from y...
[ "import vim\n", "import requests\n", "import urlparse\n", "from retries import retries\n", "from requests_futures.sessions import FuturesSession\n", "from ycm.unsafe_thread_pool_executor import UnsafeThreadPoolExecutor\n", "from ycm import vimsupport\n", "from ycm.utils import ToUtf8Json\n", "from y...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "FunctionDef'", "FunctionDef'", "Return'" ]
[ "def FUNC_19(self, *VAR_18):...\n", "\"\"\"docstring\"\"\"\n", "self.order.append(list(VAR_18))\n" ]
[ "def add(self, *rulenames):...\n", "\"\"\"docstring\"\"\"\n", "self.order.append(list(rulenames))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_17(VAR_5):...\n", "VAR_11 = VAR_5['children']\n", "if VAR_11:\n", "return itertools.chain.from_iterable([FUNC_17(child) for child in VAR_11])\n", "return VAR_5['id'],\n" ]
[ "def get_descendant_ids(node):...\n", "children = node['children']\n", "if children:\n", "return itertools.chain.from_iterable([get_descendant_ids(child) for child in\n children])\n", "return node['id'],\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def __init__(self, *VAR_11, **VAR_12):...\n", "if 'health' not in VAR_12 and 'infohash' in VAR_12:\n", "VAR_12['health'] = VAR_0.TorrentState.get(VAR_2=kwargs['infohash']\n ) or VAR_0.TorrentState(VAR_2=kwargs['infohash'])\n", "if 'xxx' not in VAR_12:\n", "VAR_12['xxx'] = default_xxx_filter.isXXXTorrent...
[ "def __init__(self, *args, **kwargs):...\n", "if 'health' not in kwargs and 'infohash' in kwargs:\n", "kwargs['health'] = db.TorrentState.get(infohash=kwargs['infohash']\n ) or db.TorrentState(infohash=kwargs['infohash'])\n", "if 'xxx' not in kwargs:\n", "kwargs['xxx'] = default_xxx_filter.isXXXTorrentMe...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = jc.Contract()\n", "return st.OperationContract(self.agent.make_delete_app_operation(VAR_1=self\n .bindings, application=self.TEST_APP), VAR_6=contract)\n" ]
[ "def delete_app(self):...\n", "\"\"\"docstring\"\"\"\n", "contract = jc.Contract()\n", "return st.OperationContract(self.agent.make_delete_app_operation(bindings=\n self.bindings, application=self.TEST_APP), contract=contract)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_4(VAR_15, VAR_16):...\n", "VAR_33 = {}\n", "for in_file, VAR_45 in VAR_15:\n", "VAR_33[VAR_45] = FUNC_5(in_file, VAR_16)\n", "return VAR_33\n" ]
[ "def build_tree(templates, config):...\n", "res = {}\n", "for in_file, out_file in templates:\n", "res[out_file] = render_template(in_file, config)\n", "return res\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'" ]
[ "def FUNC_8(VAR_0, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = pd.read_sql_table(VAR_0, db.engine, columns=[attr])\n", "print('FILL MEAN FAILED')\n", "VAR_21 = VAR_15[VAR_5].median()\n", "db.engine.execute('UPDATE \"{0}\" SET \"{1}\" = {2} WHERE \"{1}\" IS NULL'.format\n (VAR_0, VAR_5, VAR_21))...
[ "def fill_null_with_median(table_name, attr):...\n", "\"\"\"docstring\"\"\"\n", "dataframe = pd.read_sql_table(table_name, db.engine, columns=[attr])\n", "print('FILL MEAN FAILED')\n", "median = dataframe[attr].median()\n", "db.engine.execute('UPDATE \"{0}\" SET \"{1}\" = {2} WHERE \"{1}\" IS NULL'.format...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_10():...\n", "log_files.clean_log_folder(1)\n", "users.cache(100)\n", "db.connect()\n", "bot.start_bot()\n" ]
[ "def main():...\n", "log_files.clean_log_folder(1)\n", "users.cache(100)\n", "db.connect()\n", "bot.start_bot()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@api.route('/songs/<name>')...\n", "return jsonify(VAR_0=name)\n" ]
[ "@api.route('/songs/<name>')...\n", "return jsonify(name=name)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_6(self, VAR_2):...\n", "VAR_15['XSRF-TOKEN'] = '{0:x}'.format(random.SystemRandom().getrandbits(160))\n", "VAR_2.set_cookie('XSRF-TOKEN', VAR_15['XSRF-TOKEN'])\n" ]
[ "def set_csrf_token(self, resp):...\n", "session['XSRF-TOKEN'] = '{0:x}'.format(random.SystemRandom().getrandbits(160))\n", "resp.set_cookie('XSRF-TOKEN', session['XSRF-TOKEN'])\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_16(self, VAR_27, VAR_6, VAR_28):...\n", "self.host_list.append(VAR_28)\n", "self.logger.debug('Saving component to tmp')\n", "VAR_48 = '%s/%s.yaml' % (VAR_2, VAR_6)\n", "FUNC_10(VAR_48)\n", "dump(VAR_27, outfile, default_flow_style=False)\n", "self.logger.debug('Copying component \"%s\" to rem...
[ "def copy_component_to_remote(self, infile, comp, host):...\n", "self.host_list.append(host)\n", "self.logger.debug('Saving component to tmp')\n", "tmp_comp_path = '%s/%s.yaml' % (TMP_COMP_DIR, comp)\n", "ensure_dir(tmp_comp_path)\n", "dump(infile, outfile, default_flow_style=False)\n", "self.logger.deb...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_3(self, VAR_8, VAR_9):...\n", "VAR_0.debug('Generating MySQL command for insertion/update for table c{:d}'\n .format(VAR_9))\n", "if VAR_8.id < 0:\n", "VAR_0.error('TypeError: id must be non-negative')\n", "if type(VAR_8.pubdate) != datetime:\n", "VAR_0.error('Skipping the Listing')\n", "VA...
[ "def gen_sql_insert(self, listing, cat_id):...\n", "logger.debug('Generating MySQL command for insertion/update for table c{:d}'\n .format(cat_id))\n", "if listing.id < 0:\n", "logger.error('TypeError: id must be non-negative')\n", "if type(listing.pubdate) != datetime:\n", "logger.error('Skipping the ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 4, 0, 0, 4, 0, 0, 4, 4 ]
[ "FunctionDef'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Return'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Assign'", "AugAssign'", "Expr'", "AugAssign'", "Return'" ]
[ "@defer.inlineCallbacks...\n", "VAR_37 = os.path.join(self._leap_home, self._uuid)\n", "self.soledad = yield FUNC_0(VAR_0=soledad_test_folder, VAR_1=self._uuid)\n", "self.search_engine = SearchEngine(self.INDEX_KEY, user_home=soledad_test_folder\n )\n", "self.keymanager = mock()\n", "self.mail_sender =...
[ "@defer.inlineCallbacks...\n", "soledad_test_folder = os.path.join(self._leap_home, self._uuid)\n", "self.soledad = yield initialize_soledad(tempdir=soledad_test_folder, uuid=\n self._uuid)\n", "self.search_engine = SearchEngine(self.INDEX_KEY, user_home=soledad_test_folder\n )\n", "self.keymanager = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'" ]
[ "def __init__(self, VAR_1=None):...\n", "super(CLASS_0, self).__init__(VAR_1)\n", "self.data_items = []\n", "self.item_load_batch = 50\n", "self.total_items = 0\n", "self.infohashes = {}\n" ]
[ "def __init__(self, parent=None):...\n", "super(RemoteTableModel, self).__init__(parent)\n", "self.data_items = []\n", "self.item_load_batch = 50\n", "self.total_items = 0\n", "self.infohashes = {}\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_2(self):...\n", "VAR_1 = '/api/apps'\n", "VAR_2 = self.client.post(VAR_1)\n", "self.assertEqual(VAR_2.status_code, 201)\n", "VAR_3 = VAR_2.data['id']\n", "VAR_1 = '/api/apps/{app_id}/builds'.format(**locals())\n", "VAR_4 = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile': json.\n d...
[ "def test_create_chaos(self):...\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/builds'.format(**locals())\n", "body = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile'...
[ 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", ...
[ "def FUNC_5(self, VAR_8):...\n", "VAR_18 = random.randint(0, self.width)\n", "VAR_19 = random.randint(0, self.width)\n", "VAR_20 = set()\n", "while len(VAR_20) < self.keysPerNode:\n", "VAR_20.add(random.randint(0, self.keyPoolSize))\n", "self.G.add_node(VAR_8, VAR_18=x, VAR_19=y, VAR_20=keys)\n" ]
[ "def addNewNode(self, index):...\n", "x = random.randint(0, self.width)\n", "y = random.randint(0, self.width)\n", "keys = set()\n", "while len(keys) < self.keysPerNode:\n", "keys.add(random.randint(0, self.keyPoolSize))\n", "self.G.add_node(index, x=x, y=y, keys=keys)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_29():...\n", "self.assertIn('reauthn-for-termination', VAR_32)\n", "VAR_29 = VAR_32['reauthn-for-termination']\n", "VAR_30 = int(time.time())\n", "self.assertTrue(VAR_30 - VAR_29 < 5)\n" ]
[ "def _check():...\n", "self.assertIn('reauthn-for-termination', session)\n", "then = session['reauthn-for-termination']\n", "now = int(time.time())\n", "self.assertTrue(now - then < 5)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_39(VAR_101):...\n", "VAR_101.resources = VAR_76, VAR_52\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.resources = args, resources\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_4(self, VAR_2, VAR_3):...\n", "" ]
[ "def _executeSQL(self, cur, sql):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "from __future__ import absolute_import, division, print_function\n", "__metaclass__ = type\n", "from ansible.inventory.group import Group\n", "from ansible.utils.vars import combine_vars, get_unique_id\n", "__all__ = ['Host']\n", "\"\"\" a single ansible host \"\"\"\n", "def __getstate__(self):...\n", ...
[ "from __future__ import absolute_import, division, print_function\n", "__metaclass__ = type\n", "from ansible.inventory.group import Group\n", "from ansible.utils.vars import combine_vars, get_unique_id\n", "__all__ = ['Host']\n", "\"\"\" a single ansible host \"\"\"\n", "def __getstate__(self):...\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Assign'", "ImportFrom'", "ImportFrom'", "Assign'", "Expr'", "FunctionDef'", "Return'" ]
[ "def FUNC_19(self):...\n", "\"\"\"docstring\"\"\"\n", "if not (CLASS_1.smb_user and CLASS_1.smb_pass and CLASS_1.smb_ip and\n", "return False\n", "return SMBConnection(CLASS_1.smb_user, CLASS_1.smb_pass, 'odoo', 'nas')\n" ]
[ "def _get_smb_connection(self):...\n", "\"\"\"docstring\"\"\"\n", "if not (SmbConfig.smb_user and SmbConfig.smb_pass and SmbConfig.smb_ip and\n", "return False\n", "return SMBConnection(SmbConfig.smb_user, SmbConfig.smb_pass, 'odoo', 'nas')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Return'" ]
[ "def FUNC_4(VAR_0):...\n", "VAR_0.clear_filters()\n", "for arg in request.args:\n", "VAR_8 = re.findall('_flt_(\\\\d)_(.*)', arg)\n", "if VAR_8:\n", "VAR_0.add_filter_index(VAR_8[0][1], int(VAR_8[0][0]), request.args.get(arg))\n" ]
[ "def get_filter_args(filters):...\n", "filters.clear_filters()\n", "for arg in request.args:\n", "re_match = re.findall('_flt_(\\\\d)_(.*)', arg)\n", "if re_match:\n", "filters.add_filter_index(re_match[0][1], int(re_match[0][0]), request.args.\n get(arg))\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "For", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_22(VAR_14, VAR_15):...\n", "VAR_37 = VAR_14.state['sleep_streak']\n", "self.assertEqual(VAR_14.remote, self.server)\n", "if VAR_37 == 5:\n", "return False\n" ]
[ "def poll_server(botobj, _):...\n", "sleep_streak = botobj.state['sleep_streak']\n", "self.assertEqual(botobj.remote, self.server)\n", "if sleep_streak == 5:\n", "return False\n" ]
[ 0, 0, 5, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Condition", "Return'" ]
[ "from django.urls import path, include\n", "from . import views\n", "VAR_0 = [path('', views.index, name='home'), path('register/', views.\n register_form, name='register'), path('login/', views.login_form, name=\n 'login'), path('logout/', views.logout_view, name='logout'), path(\n 'confirm/', views.l...
[ "from django.urls import path, include\n", "from . import views\n", "urlpatterns = [path('', views.index, name='home'), path('register/', views.\n register_form, name='register'), path('login/', views.login_form, name=\n 'login'), path('logout/', views.logout_view, name='logout'), path(\n 'confirm/', v...
[ 0, 0, 6 ]
[ "ImportFrom'", "ImportFrom'", "Assign'" ]
[ "def FUNC_3(self, VAR_10, VAR_11):...\n", "\"\"\"docstring\"\"\"\n", "VAR_17 = {}\n", "if not int(VAR_11['simulated-human-interaction']):\n", "VAR_17['human'] = int(VAR_11['simulated-human-interaction'])\n", "return emit_options(VAR_17)\n" ]
[ "def translate_options(self, info, options):...\n", "\"\"\"docstring\"\"\"\n", "ret = {}\n", "if not int(options['simulated-human-interaction']):\n", "ret['human'] = int(options['simulated-human-interaction'])\n", "return emit_options(ret)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1, VAR_2=('view_project',)):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = models.Project.objects.get(pk=project_pk, deleting=False)\n", "return VAR_6\n", "for perm in VAR_2:\n", "if not VAR_0.user.has_perm(perm, VAR_6):\n" ]
[ "def get_and_check_project(request, project_pk, perms=('view_project',)):...\n", "\"\"\"docstring\"\"\"\n", "project = models.Project.objects.get(pk=project_pk, deleting=False)\n", "return project\n", "for perm in perms:\n", "if not request.user.has_perm(perm, project):\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'", "For", "Condition" ]
[ "def FUNC_24(self):...\n", "self.assertIsNone(handler.gae_cookie_authentication(webapp2.Request({})))\n" ]
[ "def test_non_applicable(self):...\n", "self.assertIsNone(handler.gae_cookie_authentication(webapp2.Request({})))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_9(self, VAR_8, VAR_9, VAR_10=None):...\n", "\"\"\"docstring\"\"\"\n", "return list(entry.path for entry in self.compile_classpath_entries(VAR_8,\n VAR_9, VAR_10))\n" ]
[ "def compile_classpath(self, classpath_product_key, target, extra_cp_entries...\n", "\"\"\"docstring\"\"\"\n", "return list(entry.path for entry in self.compile_classpath_entries(\n classpath_product_key, target, extra_cp_entries))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "import asyncio\n", "import mistune\n", "from tortoise import fields\n", "from tortoise.query_utils import Q\n", "from arq import create_pool\n", "from config import REDIS_URL\n", "from .base import BaseModel\n", "from .mc import cache, clear_mc\n", "from .user import GithubUser\n", "from .consts ...
[ "import asyncio\n", "import mistune\n", "from tortoise import fields\n", "from tortoise.query_utils import Q\n", "from arq import create_pool\n", "from config import REDIS_URL\n", "from .base import BaseModel\n", "from .mc import cache, clear_mc\n", "from .user import GithubUser\n", "from .consts ...
[ 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'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", ...
[ "def FUNC_3(self):...\n", "GenericRequest._prepare(self)\n", "VAR_15, VAR_16 = tempfile.mkstemp()\n", "self.files = list(zip(self.submission_format, self.filenames)) + [('input',\n VAR_16)]\n" ]
[ "def _prepare(self):...\n", "GenericRequest._prepare(self)\n", "_, temp_filename = tempfile.mkstemp()\n", "self.files = list(zip(self.submission_format, self.filenames)) + [('input',\n temp_filename)]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'" ]
[ "from osv import osv\n", "from tools.translate import _\n", "VAR_0 = 'pos.close.statement'\n", "VAR_1 = 'Close Statements'\n", "def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = self.pool.get('res.users').browse(VAR_2, VAR_3, VAR_3).company_id.id\n", "VAR_7 = []\...
[ "from osv import osv\n", "from tools.translate import _\n", "_name = 'pos.close.statement'\n", "_description = 'Close Statements'\n", "def close_statement(self, cr, uid, ids, context):...\n", "\"\"\"docstring\"\"\"\n", "company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id\n", "li...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Condition", "Conditi...
[ "def FUNC_1(self):...\n", "return self.extracted_cpcat.data_document.get_absolute_url()\n" ]
[ "def get_datadocument_url(self):...\n", "return self.extracted_cpcat.data_document.get_absolute_url()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self, VAR_1, VAR_2, VAR_5, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_30 = VAR_4.get('states', [])\n", "VAR_31 = VAR_4.get('what', ())\n", "if not VAR_5:\n", "VAR_5 = self.search(VAR_1, VAR_2, [])\n", "VAR_29 = {}.fromkeys(VAR_5, 0.0)\n", ...
[ "def get_product_available(self, cr, uid, ids, context=None):...\n", "\"\"\"docstring\"\"\"\n", "if context is None:\n", "context = {}\n", "states = context.get('states', [])\n", "what = context.get('what', ())\n", "if not ids:\n", "ids = self.search(cr, uid, [])\n", "res = {}.fromkeys(ids, 0.0)\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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition"...
[ "def __init__(self, VAR_0=None, VAR_1=None, VAR_2=None, VAR_3=None, VAR_4=...\n", "self.object_id_seed = VAR_11\n", "self.redis_address = VAR_0\n", "self.num_cpus = VAR_1\n", "self.num_gpus = VAR_2\n", "self.resources = VAR_3\n", "self.object_store_memory = VAR_4\n", "self.redis_max_memory = VAR_5\n",...
[ "def __init__(self, redis_address=None, num_cpus=None, num_gpus=None,...\n", "self.object_id_seed = object_id_seed\n", "self.redis_address = redis_address\n", "self.num_cpus = num_cpus\n", "self.num_gpus = num_gpus\n", "self.resources = resources\n", "self.object_store_memory = object_store_memory\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 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "A...
[ "@staticmethod...\n", "return users.create_login_url(VAR_23)\n" ]
[ "@staticmethod...\n", "return users.create_login_url(dest_url)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_2 = self.client.get('/datadocument/167497/')\n", "self.assertContains(VAR_2, '/link_product_form/167497/')\n", "VAR_6 = {'title': ['New Product'], 'upc': ['stub_1860'], 'document_type': [\n 1], 'return_url': ['/datadocument/167497/']}\n", "VAR_2 = self.client.post('/link_pr...
[ "def test_product_create_link(self):...\n", "response = self.client.get('/datadocument/167497/')\n", "self.assertContains(response, '/link_product_form/167497/')\n", "data = {'title': ['New Product'], 'upc': ['stub_1860'], 'document_type': [1\n ], 'return_url': ['/datadocument/167497/']}\n", "response = ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_13, VAR_11, VAR_4, VAR_6):...\n", "self.field_name = VAR_13\n", "self.label = VAR_11\n", "self.value = VAR_4\n", "self.query_params = VAR_6\n" ]
[ "def __init__(self, field_name, label, value, query_params):...\n", "self.field_name = field_name\n", "self.label = label\n", "self.value = value\n", "self.query_params = query_params\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def __init__(self, VAR_7, VAR_20=True, *VAR_15, **VAR_16):...\n", "CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n", "self.redirect = VAR_20\n" ]
[ "def __init__(self, param, redirect=True, *a, **kw):...\n", "Validator.__init__(self, param, *a, **kw)\n", "self.redirect = redirect\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'" ]
[ "def FUNC_12():...\n", "VAR_18 = requests.get(FUNC_2('healthy'))\n", "VAR_18.raise_for_status()\n", "return VAR_18.json()\n" ]
[ "def _ServerIsHealthy():...\n", "response = requests.get(_BuildUri('healthy'))\n", "response.raise_for_status()\n", "return response.json()\n" ]
[ 0, 7, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_6(VAR_10, VAR_11):...\n", "VAR_10 = VAR_10.replace('/b/', '/osu/').split('&', 1)[0]\n", "if VAR_11 == '':\n", "VAR_37 = 'curl ' + VAR_10 + ' | /home/pi/DiscordBots/Oppai/oppai/oppai -'\n", "VAR_37 = ('curl ' + VAR_10 + ' | /home/pi/DiscordBots/Oppai/oppai/oppai - ' +\n VAR_11)\n", "return FUN...
[ "def return_simple_beatmap_info(url, oppaiParameters):...\n", "url = url.replace('/b/', '/osu/').split('&', 1)[0]\n", "if oppaiParameters == '':\n", "command = 'curl ' + url + ' | /home/pi/DiscordBots/Oppai/oppai/oppai -'\n", "command = ('curl ' + url + ' | /home/pi/DiscordBots/Oppai/oppai/oppai - ' +\n ...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_16(VAR_24):...\n", "VAR_42 = logging.getLogger('ray')\n", "if VAR_21:\n", "VAR_53 = logging.StreamHandler(stream=new_stream)\n", "VAR_53.setFormatter(VAR_21.formatter)\n", "VAR_21.close()\n", "VAR_21 = VAR_53\n", "VAR_42.addHandler(VAR_21)\n" ]
[ "def try_update_handler(new_stream):...\n", "logger = logging.getLogger('ray')\n", "if _default_handler:\n", "new_handler = logging.StreamHandler(stream=new_stream)\n", "new_handler.setFormatter(_default_handler.formatter)\n", "_default_handler.close()\n", "_default_handler = new_handler\n", "logger.a...
[ 0, 0, 6, 6, 6, 6, 6, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "import json\n", "import logging\n", "from typing import List\n", "from datetime import timedelta\n", "import tornado.web\n", "from tornado_sqlalchemy import as_future, SessionMixin\n", "from pinnwand import database\n", "from pinnwand import utility\n", "from pinnwand import path\n", "VAR_0 = log...
[ "import json\n", "import logging\n", "from typing import List\n", "from datetime import timedelta\n", "import tornado.web\n", "from tornado_sqlalchemy import as_future, SessionMixin\n", "from pinnwand import database\n", "from pinnwand import utility\n", "from pinnwand import path\n", "log = loggi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "AsyncFunctionDef'", "Expr'", "Expr'", "AsyncFunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Expr'", "...
[ "def FUNC_13(self, *VAR_16, **VAR_10):...\n", "if not self.current_user or not self.current_user.admin:\n", "return VAR_7(self, *VAR_16, **kwargs)\n" ]
[ "def wrapper(self, *args, **kwargs):...\n", "if not self.current_user or not self.current_user.admin:\n", "return method(self, *args, **kwargs)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'" ]
[ "def FUNC_7(VAR_2, VAR_5='/tmp/source.html'):...\n", "out.write(VAR_2.browser.page_source.encode('utf8'))\n" ]
[ "def save_source(context, filename='/tmp/source.html'):...\n", "out.write(context.browser.page_source.encode('utf8'))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_2(VAR_1: 'projects.Project', VAR_3: str, VAR_4: SyntaxError) ->dict:...\n", "\"\"\"docstring\"\"\"\n", "VAR_9 = [dict(VAR_15=error.filename, VAR_16=None, line_number=error.lineno,\n line=error.text.rstrip())]\n", "VAR_10 = dict(type=error.__class__.__name__, message='{}'.format(error),\n VAR_9...
[ "def render_syntax_error(project: 'projects.Project', code: str, error:...\n", "\"\"\"docstring\"\"\"\n", "stack = [dict(filename=error.filename, location=None, line_number=error.\n lineno, line=error.text.rstrip())]\n", "render_data = dict(type=error.__class__.__name__, message='{}'.format(error\n ), s...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_31(self, VAR_44):...\n", "\"\"\"docstring\"\"\"\n", "if self.counter['tag'] != VAR_44.pk:\n", "if VAR_44.pk == self.counter['tag']:\n", "self.counter = self.test_tags.__next__()\n", "return 0\n", "return self.counter[self.key]\n", "return 0\n" ]
[ "def calculate_tag_count(self, tag):...\n", "\"\"\"docstring\"\"\"\n", "if self.counter['tag'] != tag.pk:\n", "if tag.pk == self.counter['tag']:\n", "self.counter = self.test_tags.__next__()\n", "return 0\n", "return self.counter[self.key]\n", "return 0\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "Assign'", "Return'", "Return'", "Return'" ]
[ "def FUNC_0(self):...\n", "VAR_17 = 'string'\n", "return VAR_17\n" ]
[ "def _select(self):...\n", "select_str = \"\"\"\n select\n id,\n c.date_open as opening_date,\n c.date_closed as date_closed,\n c.state,\n c.user_id,\n c.team_id,\n c.partner_id,\n c....
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_18(self):...\n", "VAR_13 = ['Line1 passed', 'Line1 failed']\n", "VAR_14 = ['Line1', 'Line2']\n", "VAR_15 = [' passed', None]\n", "self.assertEqual(self.driver._get_prefixed_value(VAR_13, VAR_14[0]), VAR_15[0])\n", "self.assertEqual(self.driver._get_prefixed_value(VAR_13, VAR_14[1]), VAR_15[1])\n...
[ "def test_get_prefixed_value(self):...\n", "lines = ['Line1 passed', 'Line1 failed']\n", "prefix = ['Line1', 'Line2']\n", "expected_output = [' passed', None]\n", "self.assertEqual(self.driver._get_prefixed_value(lines, prefix[0]),\n expected_output[0])\n", "self.assertEqual(self.driver._get_prefixed_v...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def __str__(self):...\n", "return ' '.join(map(str, self))\n" ]
[ "def __str__(self):...\n", "return ' '.join(map(str, self))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_21(self, VAR_2):...\n", "VAR_1 = frappe.get_meta(self.doctype)\n", "if self.order_by:\n", "VAR_2.order_by = self.order_by\n", "VAR_2.order_by = ''\n", "VAR_65 = len(self.fields) == 1 and (self.fields[0].lower().startswith(\n 'count(') or self.fields[0].lower().startswith('min(') or self.field...
[ "def set_order_by(self, args):...\n", "meta = frappe.get_meta(self.doctype)\n", "if self.order_by:\n", "args.order_by = self.order_by\n", "args.order_by = ''\n", "group_function_without_group_by = len(self.fields) == 1 and (self.fields[0]\n .lower().startswith('count(') or self.fields[0].lower().starts...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'" ]
[ "@VAR_0.route('/<page_name>/history/record')...\n", "VAR_12 = request.args.get('id')\n", "VAR_3 = VAR_1.query('string' % VAR_12)\n", "VAR_13 = VAR_3.namedresult()[0]\n", "return render_template('page_record.html', VAR_2=page_name, VAR_13=page_record)\n" ]
[ "@app.route('/<page_name>/history/record')...\n", "content_id = request.args.get('id')\n", "query = db.query(\n \"select page_content.content, page_content.timestamp from page, page_content where page.id = page_content.page_id and page_content.id = '%s'\"\n % content_id)\n", "page_record = query.namedr...
[ 0, 0, 4, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def __enter__(self):...\n", "\"\"\"docstring\"\"\"\n", "self.start_time = time.time()\n", "return self\n" ]
[ "def __enter__(self):...\n", "\"\"\"docstring\"\"\"\n", "self.start_time = time.time()\n", "return self\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_17(VAR_16):...\n", "VAR_0.info('Login Error for %s' % VAR_5.args['username'][0])\n", "VAR_0.info('%s' % VAR_16)\n", "VAR_5.setResponseCode(UNAUTHORIZED)\n", "return self._render_template(VAR_5, 'Invalid credentials')\n" ]
[ "def render_error(error):...\n", "log.info('Login Error for %s' % request.args['username'][0])\n", "log.info('%s' % error)\n", "request.setResponseCode(UNAUTHORIZED)\n", "return self._render_template(request, 'Invalid credentials')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_6(VAR_8, VAR_14, VAR_22, VAR_23, VAR_18):...\n", "\"\"\"docstring\"\"\"\n", "VAR_20 = FUNC_0()\n", "if VAR_23:\n", "if VAR_8.grace_period:\n", "VAR_37 = VAR_3 if VAR_18 else VAR_2\n", "return max(VAR_20 - VAR_23 - VAR_8.grace_period, 0.0)\n", "return 0.0\n", "if VAR_8.hard_timeout:\n", "...
[ "def calc_yield_wait(task_details, start, last_io, timed_out, stdout):...\n", "\"\"\"docstring\"\"\"\n", "now = monotonic_time()\n", "if timed_out:\n", "if task_details.grace_period:\n", "out = MIN_PACKET_INTERNAL if stdout else MAX_PACKET_INTERVAL\n", "return max(now - timed_out - task_details.grace_pe...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "Assign'", "Return'", "Return'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "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'" ]
[ "@app.route('/api/sequences/<id>', methods=['DELETE'])...\n", "VAR_19 = controller.sequences.lookup(VAR_4)\n", "VAR_20 = VAR_19.to_map()\n", "VAR_20.update({'status': 'deleted'})\n", "controller.sequences.remove(VAR_19)\n", "return VAR_20\n" ]
[ "@app.route('/api/sequences/<id>', methods=['DELETE'])...\n", "sequence = controller.sequences.lookup(id)\n", "sequence_json = sequence.to_map()\n", "sequence_json.update({'status': 'deleted'})\n", "controller.sequences.remove(sequence)\n", "return sequence_json\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return set(VAR_28 for VAR_28 in self.input if not VAR_28.exists and not \n VAR_28 in self.subworkflow_input)\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return set(f for f in self.input if not f.exists and not f in self.\n subworkflow_input)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_12(self, VAR_9, VAR_10, VAR_11, VAR_16={}):...\n", "get_and_check_project(VAR_9, VAR_11)\n", "VAR_28 = self.queryset.annotate(**annotate).get(VAR_10=pk, VAR_1=project_pk)\n", "return VAR_28\n" ]
[ "def get_and_check_task(self, request, pk, project_pk, annotate={}):...\n", "get_and_check_project(request, project_pk)\n", "task = self.queryset.annotate(**annotate).get(pk=pk, project=project_pk)\n", "return task\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_10(self):...\n", "VAR_14 = self.new_mocked_client(client.RESTClient, url_prefix='api/v1/ports')\n", "VAR_14.create(VAR_24=jsonutils.dumps({'resource-name': 'port1'}))\n", "FUNC_1('post', VAR_14, 'https://1.2.3.4/api/v1/ports', VAR_8=jsonutils.\n dumps({'resource-name': 'port1'}))\n" ]
[ "def test_client_create(self):...\n", "api = self.new_mocked_client(client.RESTClient, url_prefix='api/v1/ports')\n", "api.create(body=jsonutils.dumps({'resource-name': 'port1'}))\n", "assert_call('post', api, 'https://1.2.3.4/api/v1/ports', data=jsonutils.\n dumps({'resource-name': 'port1'}))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'" ]
[ "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_0(VAR_3=None, VAR_4=None, VAR_5=True):...\n", "VAR_14, VAR_15 = vimsupport.CurrentLineAndColumn()\n", "VAR_16 = vimsupport.GetCurrentBufferFilepath()\n", "VAR_17 = {'filetypes': vimsupport.CurrentFiletypes(), 'line_num': VAR_14,\n 'column_num': VAR_15, 'start_column': VAR_3, 'line_value': vim.cur...
[ "def BuildRequestData(start_column=None, query=None, include_buffer_data=True):...\n", "line, column = vimsupport.CurrentLineAndColumn()\n", "filepath = vimsupport.GetCurrentBufferFilepath()\n", "request_data = {'filetypes': vimsupport.CurrentFiletypes(), 'line_num':\n line, 'column_num': column, 'start_co...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_13(VAR_18, VAR_19):...\n", "VAR_6 = {}\n", "for id_, VAR_21 in enumerate(VAR_18.description):\n", "VAR_6[VAR_21[0]] = VAR_19[id_]\n", "return VAR_6\n" ]
[ "def dict_factory(cursor, row):...\n", "dictionary = {}\n", "for id_, column in enumerate(cursor.description):\n", "dictionary[column[0]] = row[id_]\n", "return dictionary\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'" ]
[ "def FUNC_0(self, VAR_1, VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_17 = self.pool.get('product.product').browse(VAR_1, VAR_2, VAR_3, VAR_4\n =context)\n", "VAR_18 = (VAR_17.property_stock_account_input and VAR_17.\n property_stock_accoun...
[ "def get_product_accounts(self, cr, uid, product_id, context=None):...\n", "\"\"\"docstring\"\"\"\n", "if context is None:\n", "context = {}\n", "product_obj = self.pool.get('product.product').browse(cr, uid, product_id,\n context=context)\n", "stock_input_acc = (product_obj.property_stock_account_inpu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(self, VAR_0):...\n", "return [name for name in creatable_models.keys() if name.startswith(VAR_0)]\n" ]
[ "def complete(self, token):...\n", "return [name for name in creatable_models.keys() if name.startswith(token)]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@defer.inlineCallbacks...\n", "VAR_71 = {'encoding': [VAR_44]}\n", "if VAR_45:\n", "VAR_71['filename'] = [VAR_45]\n", "if VAR_46:\n", "VAR_71['content_type'] = [VAR_46]\n", "VAR_72, VAR_73 = self.get('/attachment/%s' % VAR_43, VAR_71, VAR_21=False)\n", "VAR_69 = yield VAR_72\n", "defer.returnValue(...
[ "@defer.inlineCallbacks...\n", "params = {'encoding': [encoding]}\n", "if filename:\n", "params['filename'] = [filename]\n", "if content_type:\n", "params['content_type'] = [content_type]\n", "deferred_result, req = self.get('/attachment/%s' % ident, params, as_json=False\n )\n", "res = yield defer...
[ 5, 0, 0, 0, 0, 0, 5, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_12():...\n", "VAR_18 = requests.get(FUNC_2('healthy'))\n", "VAR_18.raise_for_status()\n", "return VAR_18.json()\n" ]
[ "def _ServerIsHealthy():...\n", "response = requests.get(_BuildUri('healthy'))\n", "response.raise_for_status()\n", "return response.json()\n" ]
[ 0, 7, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_11(self):...\n", "return 'Float{}'.format(self.size)\n" ]
[ "def for_schema(self):...\n", "return 'Float{}'.format(self.size)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(VAR_1, VAR_2, VAR_3='NGTREE'):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 'CSV', 'TREE', 'JSON', 'YAML', 'NGTREE'\n", "if VAR_3 in VAR_11:\n", "VAR_0.info('Query: Finding Full Path (%s --> %s) for %s', VAR_1, VAR_2,\n nglib.user)\n", "VAR_8, VAR_9 = VAR_1, VAR_2\n", "VAR_12, VAR_13 = Non...
[ "def get_full_path(src, dst, rtype='NGTREE'):...\n", "\"\"\"docstring\"\"\"\n", "rtypes = 'CSV', 'TREE', 'JSON', 'YAML', 'NGTREE'\n", "if rtype in rtypes:\n", "logger.info('Query: Finding Full Path (%s --> %s) for %s', src, dst, nglib.user\n )\n", "net1, net2 = src, dst\n", "n1tree, n2tree = None, No...
[ 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Conditio...
[ "def FUNC_22(self, VAR_14):...\n", "if self.is_relation_many_to_one(VAR_14):\n", "VAR_34 = self.get_relation_fk(VAR_14)\n", "return self.list_columns[VAR_14].nullable\n", "return False\n", "return VAR_34.nullable\n" ]
[ "def is_nullable(self, col_name):...\n", "if self.is_relation_many_to_one(col_name):\n", "col = self.get_relation_fk(col_name)\n", "return self.list_columns[col_name].nullable\n", "return False\n", "return col.nullable\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Return'", "Return'" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed('string')\n" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed(\n 'If you are receiving a \"PM init failed\" error when attempting to launch safehax and are not on 11.3, use [this version of safehax.](https://github.com/TiniVi/safehax/releases/tag/r19)'\n )\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'" ]
[ "def FUNC_10(VAR_5, VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "VAR_26 = True\n", "VAR_0 = VAR_5['repository']\n", "VAR_8 = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN']}\n", "VAR_9 = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n", "VAR_10 = 'https://api.github.com/repos/{}/issues/{}...
[ "def comment_permission_check(data, comment):...\n", "\"\"\"docstring\"\"\"\n", "PERMITTED_TO_COMMENT = True\n", "repository = data['repository']\n", "headers = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN']}\n", "auth = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n", "url = 'https:/...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Expr'", "Assign'", "For", "Condition", "Return'", "Condition", "Condition", "Assign'" ]