lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def __init__(self):...\n", "self.license_files = 0\n", "self.exception_files = 0\n", "self.licenses = []\n", "self.exceptions = {}\n" ]
[ "def __init__(self):...\n", "self.license_files = 0\n", "self.exception_files = 0\n", "self.licenses = []\n", "self.exceptions = {}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_3(VAR_9, VAR_10):...\n", "VAR_15 = VAR_9.search_fields and VAR_9.search_fields.split(',') or []\n", "VAR_16 = [VAR_9.title_field\n ] if VAR_9.title_field and VAR_9.title_field not in VAR_15 else []\n", "VAR_15 = ['name'] + VAR_15 + VAR_16\n", "if not VAR_10 in VAR_15:\n", "VAR_15 = VAR_15 + [...
[ "def get_std_fields_list(meta, key):...\n", "sflist = meta.search_fields and meta.search_fields.split(',') or []\n", "title_field = [meta.title_field\n ] if meta.title_field and meta.title_field not in sflist else []\n", "sflist = ['name'] + sflist + title_field\n", "if not key in sflist:\n", "sflist =...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_13():...\n", "\"\"\"docstring\"\"\"\n", "log.info('Stopping worker(s)')\n", "for pid in VAR_20:\n", "if pid is not None:\n", "os.kill(pid, VAR_7.SIGTERM)\n" ]
[ "def kill_children():...\n", "\"\"\"docstring\"\"\"\n", "log.info('Stopping worker(s)')\n", "for pid in child_pids:\n", "if pid is not None:\n", "os.kill(pid, signal.SIGTERM)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "For", "Condition", "Expr'" ]
[ "def FUNC_31():...\n", "VAR_24 = vim.eval('tagfiles()')\n", "VAR_25 = VAR_0.getcwd()\n", "return [VAR_0.path.join(VAR_25, x) for x in VAR_24]\n" ]
[ "def GetTagFiles():...\n", "tag_files = vim.eval('tagfiles()')\n", "current_working_directory = os.getcwd()\n", "return [os.path.join(current_working_directory, x) for x in tag_files]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "from dal import autocomplete\n", "from bootstrap_datepicker_plus import DatePickerInput\n", "from django import forms\n", "from django.forms import BaseInlineFormSet\n", "from django.utils.translation import ugettext_lazy as _\n", "from dashboard.models import *\n", "from django.db.models import F\n", ...
[ "from dal import autocomplete\n", "from bootstrap_datepicker_plus import DatePickerInput\n", "from django import forms\n", "from django.forms import BaseInlineFormSet\n", "from django.utils.translation import ugettext_lazy as _\n", "from dashboard.models import *\n", "from django.db.models import F\n", ...
[ 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'",...
[ "def FUNC_24(VAR_15):...\n", "import subprocess\n", "VAR_60 = subprocess.Popen(VAR_15, VAR_12=subprocess.PIPE, VAR_42=subprocess\n .PIPE, shell=True, universal_newlines=True)\n", "VAR_12, VAR_42 = VAR_60.communicate()\n", "VAR_41 = VAR_12.splitlines()\n", "return VAR_41, VAR_42\n" ]
[ "def subprocess_execute(cmd):...\n", "import subprocess\n", "p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,\n shell=True, universal_newlines=True)\n", "stdout, stderr = p.communicate()\n", "output = stdout.splitlines()\n", "return output, stderr\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Import'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_35(self, VAR_14):...\n", "VAR_20 = self.get_related_model(VAR_14)\n", "return self.session.query(VAR_20).all()\n" ]
[ "def query_model_relation(self, col_name):...\n", "model = self.get_related_model(col_name)\n", "return self.session.query(model).all()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_17(self, *VAR_67):...\n", "self._ruleorder.add(*VAR_67)\n" ]
[ "def ruleorder(self, *rulenames):...\n", "self._ruleorder.add(*rulenames)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "from flask import Flask, jsonify, make_response, request, g\n", "from flask_restful import Api\n", "from celery import Celery\n", "from sqlalchemy.ext.automap import automap_base\n", "from sqlalchemy import create_engine\n", "from sqlalchemy.orm import Session\n", "from common.utils import unauthorized...
[ "from flask import Flask, jsonify, make_response, request, g\n", "from flask_restful import Api\n", "from celery import Celery\n", "from sqlalchemy.ext.automap import automap_base\n", "from sqlalchemy import create_engine\n", "from sqlalchemy.orm import Session\n", "from common.utils import unauthorized...
[ 0, 0, 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'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "For", "Docstring", "Assign'", "Assign'", "Condition", "Docstri...
[ "def FUNC_8(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.eng is not None and self.backend == 'Simulator' or self.backend == 'IBMBackend':\n", "self.eng.flush()\n", "self.eng.backend.collapse_wavefunction(self.reg, [(0) for i in range(len(\n self.reg))])\n" ]
[ "def _deallocate3(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.eng is not None and self.backend == 'Simulator' or self.backend == 'IBMBackend':\n", "self.eng.flush()\n", "self.eng.backend.collapse_wavefunction(self.reg, [(0) for i in range(len(\n self.reg))])\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Expr'" ]
[ "@VAR_0.route('/signup/<remote_app>/', methods=['GET', 'POST'])...\n", "\"\"\"docstring\"\"\"\n", "if VAR_1 not in signup_handlers:\n", "return abort(404)\n", "VAR_3 = signup_handlers[VAR_1]['view']()\n", "return abort(404) if VAR_3 is None else VAR_3\n" ]
[ "@blueprint.route('/signup/<remote_app>/', methods=['GET', 'POST'])...\n", "\"\"\"docstring\"\"\"\n", "if remote_app not in signup_handlers:\n", "return abort(404)\n", "res = signup_handlers[remote_app]['view']()\n", "return abort(404) if res is None else res\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Return'", "Assign'", "Return'" ]
[ "def FUNC_3(self, VAR_9, VAR_10):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def create_export(self, context, volume):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def __init__(self, VAR_11, VAR_4, VAR_5=None):...\n", "\"\"\"docstring\"\"\"\n", "self.profiler = VAR_11\n", "self.event_type = VAR_4\n", "self.extra_data = VAR_5 if VAR_5 is not None else {}\n" ]
[ "def __init__(self, profiler, event_type, extra_data=None):...\n", "\"\"\"docstring\"\"\"\n", "self.profiler = profiler\n", "self.event_type = event_type\n", "self.extra_data = extra_data if extra_data is not None else {}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return quote(self.path)\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return quote(self.path)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_10(self, VAR_6):...\n", "VAR_22 = \"SELECT * FROM article_reference WHERE query_hash = '%s'\" % VAR_6\n", "self.cur.execute(VAR_22)\n", "self.conn.commit()\n", "VAR_20 = []\n", "if self.cur.rowcount > 0:\n", "for VAR_30 in self.cur.fetchall():\n", "return VAR_20\n", "VAR_29 = {}\n", "VAR...
[ "def get_reference_by_qhash(self, qhash):...\n", "sql = \"SELECT * FROM article_reference WHERE query_hash = '%s'\" % qhash\n", "self.cur.execute(sql)\n", "self.conn.commit()\n", "articles = []\n", "if self.cur.rowcount > 0:\n", "for row in self.cur.fetchall():\n", "return articles\n", "article = {}...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Condition", "For", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_3, VAR_4, VAR_5=None, VAR_6=None):...\n", "self.rule = VAR_3\n", "self.dag = VAR_4\n", "self.targetfile = VAR_5\n", "self.wildcards_dict = self.rule.get_wildcards(VAR_5)\n", "self.wildcards = Wildcards(fromdict=self.wildcards_dict)\n", "self._format_wildcards = self.wildcards if ...
[ "def __init__(self, rule, dag, targetfile=None, format_wildcards=None):...\n", "self.rule = rule\n", "self.dag = dag\n", "self.targetfile = targetfile\n", "self.wildcards_dict = self.rule.get_wildcards(targetfile)\n", "self.wildcards = Wildcards(fromdict=self.wildcards_dict)\n", "self._format_wildcards ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "For", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Cond...
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "if len(self.nodes) > 0:\n", "VAR_5 = self.nodes[-1].proxy\n", "VAR_5 = None\n", "return VAR_5\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "if len(self.nodes) > 0:\n", "parent = self.nodes[-1].proxy\n", "parent = None\n", "return parent\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_3, VAR_2=None, VAR_4=True, VAR_5=True):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(VAR_3, dict):\n", "return FUNC_1(VAR_3, VAR_2, VAR_4, VAR_5)\n", "if isinstance(VAR_3, list):\n", "return [FUNC_2(o, VAR_2, VAR_4, VAR_5) for o in VAR_3]\n", "return VAR_3\n" ]
[ "def build_object_graph(d, resource=None, full_clean=True, copy_dict=True):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(d, dict):\n", "return create_resource_from_dict(d, resource, full_clean, copy_dict)\n", "if isinstance(d, list):\n", "return [build_object_graph(o, resource, full_clean, copy_dict) ...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_5():...\n", "VAR_6 = VAR_14.url_for('main.home')\n", "VAR_7 = VAR_14.request.args.get('next') or VAR_14.request.referrer or VAR_6\n", "if VAR_7 == VAR_14.request.url:\n", "return VAR_6\n", "return VAR_7\n" ]
[ "def redirect_url():...\n", "home_url = flask.url_for('main.home')\n", "url = flask.request.args.get('next') or flask.request.referrer or home_url\n", "if url == flask.request.url:\n", "return home_url\n", "return url\n" ]
[ 0, 6, 6, 6, 6, 6 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def __init__(self):...\n", "super(CLASS_0, self).__init__()\n", "self._scsi_disks_timeout_set = False\n" ]
[ "def __init__(self):...\n", "super(FreeBSDOSUtil, self).__init__()\n", "self._scsi_disks_timeout_set = False\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'" ]
[ "def FUNC_8(VAR_17):...\n", "\"\"\"docstring\"\"\"\n", "VAR_34 = VAR_17.replace(',', '\" OR \"')\n", "print(VAR_34)\n", "VAR_18 = sql.connect('./resources/comments.db')\n", "VAR_33 = []\n", "VAR_20 = (\"\"\" SELECT * FROM comments\n WHERE id = \"{0}\";\n \"\"\"\n .format(VAR_34))\n", ...
[ "def __get_comments(comments):...\n", "\"\"\"docstring\"\"\"\n", "comment_id_input = comments.replace(',', '\" OR \"')\n", "print(comment_id_input)\n", "con = sql.connect('./resources/comments.db')\n", "return_obj = []\n", "cmd = (\"\"\" SELECT * FROM comments\n WHERE id = \"{0}\";\n \"\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'", "Assign'", "Assign'", "Expr'", "Condition", "For", "Assign'", "Expr'" ]
[ "def FUNC_6(VAR_10, VAR_11):...\n", "if not VAR_10:\n", "return FUNC_5\n", "VAR_18 = dict(point=0, line=0, polygon=0)\n", "for format_ext, format_cfg in VAR_10.items():\n", "VAR_28 = format_cfg.get('layer', {}).get(VAR_11)\n", "if VAR_18['point'] == VAR_18['line'] == VAR_18['polygon'] == 0:\n", "VAR_2...
[ "def create_query_bounds_pad_fn(buffer_cfg, layer_name):...\n", "if not buffer_cfg:\n", "return _bounds_pad_no_buf\n", "buf_by_type = dict(point=0, line=0, polygon=0)\n", "for format_ext, format_cfg in buffer_cfg.items():\n", "format_layer_cfg = format_cfg.get('layer', {}).get(layer_name)\n", "if buf_by...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "For", "Assign'", "Condition", "Assign'", "Return'", "FunctionDef'", "Condition", "Assign'", "For", "Condition", "For", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'" ]
[ "def FUNC_13(VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "if FUNC_12(VAR_16, 'protected'):\n", "return VAR_19(VAR_16, 'temp')\n" ]
[ "def temp(value):...\n", "\"\"\"docstring\"\"\"\n", "if is_flagged(value, 'protected'):\n", "return flag(value, 'temp')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'" ]
[ "def FUNC_2(self, VAR_11='', VAR_12=None, VAR_13=False):...\n", "return self.url_list(VAR_11, VAR_12=headers, VAR_13=silent)\n" ]
[ "def list(self, resource='', headers=None, silent=False):...\n", "return self.url_list(resource, headers=headers, silent=silent)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self):...\n", "VAR_37 = os.path.join(self._leap_home, self._uuid)\n", "shutil.rmtree(VAR_37)\n" ]
[ "def cleanup(self):...\n", "soledad_test_folder = os.path.join(self._leap_home, self._uuid)\n", "shutil.rmtree(soledad_test_folder)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "@staticmethod...\n", "return users.create_logout_url(VAR_23)\n" ]
[ "@staticmethod...\n", "return users.create_logout_url(dest_url)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "from flask import Blueprint, request, render_template, send_from_directory\n", "from player_web import get_web\n", "import json\n", "from database_writer import get_db\n", "import constants\n", "import bracket_utils\n", "import requests\n", "import logger\n", "VAR_0 = None\n", "VAR_1 = 'https://l...
[ "from flask import Blueprint, request, render_template, send_from_directory\n", "from player_web import get_web\n", "import json\n", "from database_writer import get_db\n", "import constants\n", "import bracket_utils\n", "import requests\n", "import logger\n", "db = None\n", "BASE_URL = 'https://l...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(self):...\n", "auth.login(self.request, self.user)\n", "VAR_5 = import_from_settings('OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS', 60 * 15)\n", "self.request.session['oidc_id_token_expiration'] = time.time() + VAR_5\n", "return HttpResponseRedirect(self.success_url)\n" ]
[ "def login_success(self):...\n", "auth.login(self.request, self.user)\n", "expiration_interval = import_from_settings('OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS'\n , 60 * 15)\n", "self.request.session['oidc_id_token_expiration'] = time.time(\n ) + expiration_interval\n", "return HttpResponseRedirect(self.suc...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "\"\"\" Easily traverse nested Python data structures \"\"\"\n", "__version__ = '0.2'\n", "import re\n", "\"\"\" Falsey class used to flag item \"missing\" from traversal path \"\"\"\n", "def __bool__(self):...\n", "return False\n" ]
[ "\"\"\" Easily traverse nested Python data structures \"\"\"\n", "__version__ = '0.2'\n", "import re\n", "\"\"\" Falsey class used to flag item \"missing\" from traversal path \"\"\"\n", "def __bool__(self):...\n", "return False\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Assign'", "Import'", "Expr'", "FunctionDef'", "Return'" ]
[ "def FUNC_33(self):...\n", "def FUNC_39(VAR_101):...\n", "VAR_101.norun = True\n", "return VAR_101\n" ]
[ "def norun(self):...\n", "def decorate(ruleinfo):...\n", "ruleinfo.norun = True\n", "return ruleinfo\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Assign'", "Return'" ]
[ "@mock.patch('requests.post', FUNC_0)...\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}/builds'.format(**locals())\n", "VAR_7 = {'image': 'autotest/example'}\n", "VAR_5 = self.cl...
[ "@mock.patch('requests.post', mock_import_repository_task)...\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'...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assi...
[ "@login_required...\n", "VAR_23 = ['filename', 'title', 'document_type', 'url', 'organization']\n", "VAR_5 = DataGroup.objects.filter(VAR_2=pk).first()\n", "if VAR_5:\n", "VAR_23.insert(0, 'id')\n", "VAR_41 = DataDocument.objects.filter(data_group_id=0).values(*VAR_23)\n", "VAR_41 = DataDocument.objects...
[ "@login_required...\n", "columnlist = ['filename', 'title', 'document_type', 'url', 'organization']\n", "dg = DataGroup.objects.filter(pk=pk).first()\n", "if dg:\n", "columnlist.insert(0, 'id')\n", "qs = DataDocument.objects.filter(data_group_id=0).values(*columnlist)\n", "qs = DataDocument.objects.filt...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Return'", "Return'" ]
[ "@classmethod...\n", "super(CLASS_1, VAR_3).register_options(VAR_4)\n", "VAR_4('--setuptools-version', advanced=True, fingerprint=True, default=\n '40.6.3', help=\n 'The setuptools version to use when executing `setup.py` scripts.')\n", "VAR_4('--wheel-version', advanced=True, fingerprint=True, default=...
[ "@classmethod...\n", "super(BuildSetupRequiresPex, cls).register_options(register)\n", "register('--setuptools-version', advanced=True, fingerprint=True, default=\n '40.6.3', help=\n 'The setuptools version to use when executing `setup.py` scripts.')\n", "register('--wheel-version', advanced=True, finge...
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_15(self):...\n", "VAR_28 = sqlite3.connect(':memory:')\n", "self.prepare_connection(VAR_28)\n", "VAR_43 = VAR_28.execute('select sqlite_version()').fetchone()[0]\n", "VAR_12 = {}\n", "for VAR_69, testsql, hasversion in (('json1', \"SELECT json('{}')\", False),\n", "VAR_44 = []\n", "VAR_63 = ...
[ "def versions(self):...\n", "conn = sqlite3.connect(':memory:')\n", "self.prepare_connection(conn)\n", "sqlite_version = conn.execute('select sqlite_version()').fetchone()[0]\n", "sqlite_extensions = {}\n", "for extension, testsql, hasversion in (('json1', \"SELECT json('{}')\", False\n", "fts_versions ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "For", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "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'" ]
[ "import time\n", "import sys\n", "import citest.gcp_testing as gcp\n", "import citest.json_contract as jc\n", "import citest.service_testing as st\n", "import spinnaker_testing as sk\n", "import spinnaker_testing.gate as gate\n", "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_age...
[ "import time\n", "import sys\n", "import citest.gcp_testing as gcp\n", "import citest.json_contract as jc\n", "import citest.service_testing as st\n", "import spinnaker_testing as sk\n", "import spinnaker_testing.gate as gate\n", "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_age...
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Condition", "Docstring", "Return'" ]
[ "def __iter__(self):...\n", "return self.order.__iter__()\n" ]
[ "def __iter__(self):...\n", "return self.order.__iter__()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __call__(self, VAR_13, VAR_14):...\n", "VAR_17 = decode_path_info(VAR_13.get('PATH_INFO', ''))\n", "if self.autorefresh:\n", "VAR_15 = self.find_file(VAR_17)\n", "VAR_15 = self.files.get(VAR_17)\n", "if VAR_15 is None:\n", "return self.application(VAR_13, VAR_14)\n", "return self.serve(VAR_15, VA...
[ "def __call__(self, environ, start_response):...\n", "path = decode_path_info(environ.get('PATH_INFO', ''))\n", "if self.autorefresh:\n", "static_file = self.find_file(path)\n", "static_file = self.files.get(path)\n", "if static_file is None:\n", "return self.application(environ, start_response)\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_31():...\n", "VAR_24 = vim.eval('tagfiles()')\n", "VAR_25 = VAR_0.getcwd()\n", "return [VAR_0.path.join(VAR_25, x) for x in VAR_24]\n" ]
[ "def GetTagFiles():...\n", "tag_files = vim.eval('tagfiles()')\n", "current_working_directory = os.getcwd()\n", "return [os.path.join(current_working_directory, x) for x in tag_files]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "\"\"\"docstring\"\"\"\n", "self.common.client_login()\n", "VAR_20 = self._create_host(VAR_6, VAR_9)\n", "VAR_21 = self.common.create_vlun(VAR_6, VAR_20)\n", "VAR_22 = self.common.get_ports()\n", "self.common.client_logout()\n", "VAR_23 = {'driver_vol...
[ "@utils.synchronized('3par', external=True)...\n", "\"\"\"docstring\"\"\"\n", "self.common.client_login()\n", "host = self._create_host(volume, connector)\n", "vlun = self.common.create_vlun(volume, host)\n", "ports = self.common.get_ports()\n", "self.common.client_logout()\n", "info = {'driver_volume...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_2(self):...\n", "" ]
[ "def tearDown(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_0(VAR_0, VAR_1=None, VAR_2=None, VAR_3='name', VAR_4=None):...\n", "if not VAR_4:\n", "VAR_4 = 'Entry with that name already exists.'\n", "def FUNC_2(VAR_6, VAR_7):...\n", "VAR_8 = VAR_1 and VAR_2\n", "VAR_9 = 'SELECT COALESCE(COUNT(' + VAR_0 + '.' + VAR_3 + '), 0) FROM ' + VAR_0\n", "if VAR_8...
[ "def unique(table, subtable=None, subname=None, name='name', message=None):...\n", "if not message:\n", "message = 'Entry with that name already exists.'\n", "def _unique(form, field):...\n", "sub = subtable and subname\n", "query = 'SELECT COALESCE(COUNT(' + table + '.' + name + '), 0) FROM ' + table\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Condition", "AugAssign'", "AugAssign'", "Condition", "AugAssign'", "AugAssign'", "Assign'", "Assign'", "For", "Condition", "Return'" ]
[ "def FUNC_3(VAR_7, VAR_8, VAR_2, VAR_9, VAR_10=0):...\n", "VAR_3 = []\n", "VAR_12 = VAR_2 // len(VAR_9)\n", "VAR_13 = {k: globals()[k] for k in VAR_0 if k in globals()}\n", "VAR_13['__name__'] = VAR_8\n", "VAR_13['__builtins__'] = {k: __builtins__.__dict__[k] for k in VAR_1 if k in\n __builtins__.__dic...
[ "def grade(code_obj, name, points, test_case_objs, vlevel=0):...\n", "deductions = []\n", "points_per_case = points // len(test_case_objs)\n", "instr_globals = {k: globals()[k] for k in global_whitelist if k in globals()}\n", "instr_globals['__name__'] = name\n", "instr_globals['__builtins__'] = {k: __bui...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "For", "Expr'", "Expr'", "Return'", "Assign'", "Condition", "Return'", "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_5(self):...\n", "\"\"\"docstring\"\"\"\n", "if request.endpoint in frozenset(['oidc_callback', 'oidc_error']):\n", "return None\n", "VAR_6 = self.get_cookie_id_token()\n", "if VAR_6 is None:\n", "return self.redirect_to_auth_server(request.url)\n", "if self.time() >= VAR_6['exp']:\n", "g.o...
[ "def authenticate_or_redirect(self):...\n", "\"\"\"docstring\"\"\"\n", "if request.endpoint in frozenset(['oidc_callback', 'oidc_error']):\n", "return None\n", "id_token = self.get_cookie_id_token()\n", "if id_token is None:\n", "return self.redirect_to_auth_server(request.url)\n", "if self.time() >= ...
[ 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", "Return'", "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'", "Return'", "Assign'", "Return'", "Assign'", "Expr'" ]
[ "import sqlite3\n", "import operator\n", "from AddScoresToDatabase import getTitle\n", "from AddScoresToDatabase import getDate\n", "from InitDatabase import getRedditInstance\n", "def FUNC_0(VAR_0):...\n", "VAR_1 = sqlite3.connect('database.db')\n", "VAR_2 = VAR_1.cursor()\n", "VAR_3 = set()\n", ...
[ "import sqlite3\n", "import operator\n", "from AddScoresToDatabase import getTitle\n", "from AddScoresToDatabase import getDate\n", "from InitDatabase import getRedditInstance\n", "def getRankingsFromDatabase(submission):...\n", "database = sqlite3.connect('database.db')\n", "cursor = database.cursor(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "For", "Assign'", "Condition", "Assign'", "For", "For", "Expr'", "For", "Expr'", "For", "Expr'", "Condition", "Return'", "For", "AugAssign'" ]
[ "def FUNC_7(self):...\n", "vimsupport.PostVimMessage('Restarting ycmd server...')\n", "self._user_notified_about_crash = False\n", "self._ServerCleanup()\n", "self._SetupServer()\n" ]
[ "def RestartServer(self):...\n", "vimsupport.PostVimMessage('Restarting ycmd server...')\n", "self._user_notified_about_crash = False\n", "self._ServerCleanup()\n", "self._SetupServer()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_23(VAR_11):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ "def _fake_recv(ignore_arg):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@login_required()...\n", "VAR_13 = get_object_or_404(DataSource, VAR_2=pk)\n", "VAR_14 = DataGroup.objects.filter(data_source=datasource).count() + 1\n", "VAR_15 = '{} {}'.format(VAR_13.title, VAR_14)\n", "VAR_16 = 'Create New Data Group For Data Source \"' + str(VAR_13) + '\"'\n", "VAR_17 = {'downloaded...
[ "@login_required()...\n", "datasource = get_object_or_404(DataSource, pk=pk)\n", "group_key = DataGroup.objects.filter(data_source=datasource).count() + 1\n", "default_name = '{} {}'.format(datasource.title, group_key)\n", "header = 'Create New Data Group For Data Source \"' + str(datasource) + '\"'\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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "For", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Assign'", "Ret...
[ "def FUNC_0(VAR_0, VAR_1='_', VAR_2=-2, VAR_3=-1):...\n", "\"\"\"docstring\"\"\"\n", "import pandas as pd\n", "VAR_18 = [int(fn.split('.')[0].split(VAR_1)[VAR_2]) for fn in VAR_0]\n", "VAR_19 = [int(fn.split('.')[0].split(VAR_1)[VAR_3]) for fn in VAR_0]\n", "VAR_20 = pd.DataFrame({'fn': VAR_0, 'month': VA...
[ "def sort_files(files, split_on='_', elem_month=-2, elem_year=-1):...\n", "\"\"\"docstring\"\"\"\n", "import pandas as pd\n", "months = [int(fn.split('.')[0].split(split_on)[elem_month]) for fn in files]\n", "years = [int(fn.split('.')[0].split(split_on)[elem_year]) for fn in files]\n", "df = pd.DataFrame...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "from __future__ import unicode_literals\n", "import frappe, json\n", "from frappe import _\n", "from frappe.utils import cint, formatdate\n", "@frappe.whitelist(allow_guest=True)...\n", "from frappe.www.contact import send_message as website_send_message\n", "VAR_4 = VAR_5 = None\n", "website_send_me...
[ "from __future__ import unicode_literals\n", "import frappe, json\n", "from frappe import _\n", "from frappe.utils import cint, formatdate\n", "@frappe.whitelist(allow_guest=True)...\n", "from frappe.www.contact import send_message as website_send_message\n", "lead = customer = None\n", "website_send_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Condition", "ImportFrom'", "Assign'", "Expr'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ...
[ "\"\"\"string\"\"\"\n", "import random\n", "from eventlet import greenthread\n", "from oslo.config import cfg\n", "from cinder import exception\n", "from cinder.openstack.common import excutils\n", "from cinder.openstack.common import log as logging\n", "from cinder import utils\n", "from cinder.vol...
[ "\"\"\"\nDefault Driver for san-stored volumes.\n\nThe unique thing about a SAN is that we don't expect that we can run the volume\ncontroller on the SAN hardware. We expect to access it over SSH or some API.\n\"\"\"\n", "import random\n", "from eventlet import greenthread\n", "from oslo.config import cfg\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 ]
[ "Expr'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "FunctionDef'", "Condition", ...
[ "def FUNC_11(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_1 = {'name': self.volume_name}\n", "self.stubs.Set(self.driver, '_get_iscsi_properties', self.\n _fake_get_iscsi_properties)\n", "self.driver._eql_execute('volume', 'select', VAR_1['name'], 'acce...
[ "def test_initialize_connection(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "volume = {'name': self.volume_name}\n", "self.stubs.Set(self.driver, '_get_iscsi_properties', self.\n _fake_get_iscsi_properties)\n", "self.driver._eql_execute('volume', 'select', ...
[ 0, 0, 0, 0, 2, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "@VAR_0.route('/search', methods=['POST'])...\n", "VAR_10 = request.form.get('search')\n", "return redirect('/%s' % VAR_10)\n" ]
[ "@app.route('/search', methods=['POST'])...\n", "search = request.form.get('search')\n", "return redirect('/%s' % search)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "import hashlib\n", "from django import forms\n", "from django.contrib.auth import authenticate, login, logout\n", "from django.contrib.auth.forms import UserCreationForm, PasswordChangeForm\n", "from django.contrib.auth.models import User\n", "from django.contrib.auth.decorators import login_required\n",...
[ "import hashlib\n", "from django import forms\n", "from django.contrib.auth import authenticate, login, logout\n", "from django.contrib.auth.forms import UserCreationForm, PasswordChangeForm\n", "from django.contrib.auth.models import User\n", "from django.contrib.auth.decorators import login_required\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 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'"...
[ "def FUNC_8(self):...\n", "VAR_13 = self.cnxn.getinfo(pyodbc.SQL_CATALOG_NAME_SEPARATOR)\n", "self.assertTrue(isinstance(VAR_13, str))\n" ]
[ "def test_getinfo_string(self):...\n", "value = self.cnxn.getinfo(pyodbc.SQL_CATALOG_NAME_SEPARATOR)\n", "self.assertTrue(isinstance(value, str))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_13(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_21 == '/':\n", "return True\n", "VAR_58 = self.getfile(VAR_21)\n", "VAR_58 = None\n", "if VAR_58 is None or VAR_58 is False:\n", "return False\n", "if VAR_58[VAR_2] == VAR_12:\n", "return True\n", "return False\n" ]
[ "def isdir(self, path):...\n", "\"\"\"docstring\"\"\"\n", "if path == '/':\n", "return True\n", "dir = self.getfile(path)\n", "dir = None\n", "if dir is None or dir is False:\n", "return False\n", "if dir[A_TYPE] == T_DIR:\n", "return True\n", "return False\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_1(self, VAR_0):...\n", "self.__init__(VAR_4=False)\n", "self.name = VAR_0.get('name')\n", "self.vars = VAR_0.get('vars', dict())\n", "self.address = VAR_0.get('address', '')\n", "self._uuid = VAR_0.get('uuid', None)\n", "self.implicit = VAR_0.get('implicit', False)\n", "VAR_8 = VAR_0.get('gr...
[ "def deserialize(self, data):...\n", "self.__init__(gen_uuid=False)\n", "self.name = data.get('name')\n", "self.vars = data.get('vars', dict())\n", "self.address = data.get('address', '')\n", "self._uuid = data.get('uuid', None)\n", "self.implicit = data.get('implicit', False)\n", "groups = data.get('...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Expr'", "Expr'" ]
[ "import pytest\n", "import bottle\n", "import webtest\n", "import MySQLdb\n", "import os\n", "from logging import getLogger\n", "from bottle_mysql import Plugin\n", "from video import video_api\n", "from playlist import playlist_api\n", "from database import populate_test_database\n", "VAR_0 = g...
[ "import pytest\n", "import bottle\n", "import webtest\n", "import MySQLdb\n", "import os\n", "from logging import getLogger\n", "from bottle_mysql import Plugin\n", "from video import video_api\n", "from playlist import playlist_api\n", "from database import populate_test_database\n", "logger = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Assign'...
[ "def FUNC_7(self):...\n", "VAR_4 = os.getcwd()\n", "self.assertEqual(os.path.realpath(tempdir1), os.getcwd())\n", "self.assertEqual(os.path.realpath(tempdir2), os.getcwd())\n", "self.assertEqual(os.path.realpath(tempdir1), os.getcwd())\n", "self.assertEqual(os.path.realpath(tempdir1), os.getcwd())\n", "...
[ "def test_nested_pushd(self):...\n", "pre_cwd = os.getcwd()\n", "self.assertEqual(os.path.realpath(tempdir1), os.getcwd())\n", "self.assertEqual(os.path.realpath(tempdir2), os.getcwd())\n", "self.assertEqual(os.path.realpath(tempdir1), os.getcwd())\n", "self.assertEqual(os.path.realpath(tempdir1), os.getc...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_14(self, VAR_26: MappingLevel):...\n", "\"\"\"docstring\"\"\"\n", "self.mapping_level = VAR_26.value\n", "db.session.commit()\n" ]
[ "def set_mapping_level(self, level: MappingLevel):...\n", "\"\"\"docstring\"\"\"\n", "self.mapping_level = level.value\n", "db.session.commit()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_6(self, VAR_44=None):...\n", "if not VAR_101.user_is_loggedin:\n", "if VAR_44 is not None and not valid_password(VAR_101.user, VAR_44):\n", "VAR_101.errors.add(errors.WRONG_PASSWORD)\n" ]
[ "def run(self, password=None):...\n", "if not c.user_is_loggedin:\n", "if password is not None and not valid_password(c.user, password):\n", "c.errors.add(errors.WRONG_PASSWORD)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Expr'" ]
[ "def FUNC_11(self):...\n", "return self.current_user()['first_name']\n" ]
[ "def current_first_name(self):...\n", "return self.current_user()['first_name']\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_26(self):...\n", "return self.account\n" ]
[ "def get_id(self):...\n", "return self.account\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_20(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'LOW': 2}, 'CONFIDENCE': {'HIGH': 2}}\n", "self.check_example('imports.py', VAR_2)\n" ]
[ "def test_imports(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'LOW': 2}, 'CONFIDENCE': {'HIGH': 2}}\n", "self.check_example('imports.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "@staticmethod...\n", "if not VAR_1 or not VAR_7 or not VAR_6:\n", "if not VAR_5:\n", "VAR_5 = CLASS_0.get_report(VAR_1)['analysis']\n", "VAR_16 = VAR_5['behavior']['generic']\n", "VAR_17 = [z for z in VAR_16 if z['pid'] == VAR_6]\n", "if not VAR_17:\n", "VAR_17 = VAR_17[0]\n", "VAR_18 = VAR_17['sum...
[ "@staticmethod...\n", "if not task_id or not watcher or not pid:\n", "if not report:\n", "report = AnalysisController.get_report(task_id)['analysis']\n", "behavior_generic = report['behavior']['generic']\n", "process = [z for z in behavior_generic if z['pid'] == pid]\n", "if not process:\n", "process ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "@VAR_0.route('/token-login', methods=['POST'])...\n", "current_app.logger.debug('Starting token login')\n", "VAR_20 = current_app.config.get('TOKEN_LOGIN_FAILURE_REDIRECT_URL')\n", "VAR_21 = current_app.config.get('TOKEN_LOGIN_SUCCESS_REDIRECT_URL')\n", "VAR_13 = request.form.get('eppn')\n", "VAR_22 = re...
[ "@authn_views.route('/token-login', methods=['POST'])...\n", "current_app.logger.debug('Starting token login')\n", "location_on_fail = current_app.config.get('TOKEN_LOGIN_FAILURE_REDIRECT_URL')\n", "location_on_success = current_app.config.get('TOKEN_LOGIN_SUCCESS_REDIRECT_URL'\n )\n", "eppn = request.fo...
[ 0, 0, 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", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Return'", "Condition", "Expr'", "Expr'", "Assign'", "Return'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "...
[ "def FUNC_1(self) ->str:...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = self.bytes_buffer.getvalue()\n", "return 'Redirect Buffer Error: {}'.format(err)\n", "if VAR_6 is None:\n", "return ''\n", "return VAR_6.decode(self.source_encoding)\n" ]
[ "def read_all(self) ->str:...\n", "\"\"\"docstring\"\"\"\n", "buffered_bytes = self.bytes_buffer.getvalue()\n", "return 'Redirect Buffer Error: {}'.format(err)\n", "if buffered_bytes is None:\n", "return ''\n", "return buffered_bytes.decode(self.source_encoding)\n" ]
[ 0, 0, 0, 0, 0, 0, 6 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'", "Condition", "Return'", "Return'" ]
[ "def __init__(self, VAR_5, VAR_4):...\n", "self.el = VAR_5\n", "self.txt = VAR_4\n" ]
[ "def __init__(self, el, txt):...\n", "self.el = el\n", "self.txt = txt\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "import json\n", "from django.http import JsonResponse\n", "from django.shortcuts import redirect\n", "from django.views.decorators.csrf import csrf_exempt\n", "from django.views.decorators.http import require_http_methods\n", "from cuckoo.common.config import config\n", "from cuckoo.core.submit import ...
[ "import json\n", "from django.http import JsonResponse\n", "from django.shortcuts import redirect\n", "from django.views.decorators.csrf import csrf_exempt\n", "from django.views.decorators.http import require_http_methods\n", "from cuckoo.common.config import config\n", "from cuckoo.core.submit import ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_9(self):...\n", "for resource in set(resource for VAR_13 in self.rules for resource in\n", "if resource not in '_cores _nodes'.split():\n", "logger.info(resource)\n" ]
[ "def list_resources(self):...\n", "for resource in set(resource for rule in self.rules for resource in rule.\n", "if resource not in '_cores _nodes'.split():\n", "logger.info(resource)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Expr'" ]
[ "def FUNC_0(self):...\n", "for _ in range(3):\n", "VAR_2 = ''.join([chr(random.randint(65, 90)) for _ in range(9)])\n", "VAR_3 = {'first_name': VAR_2, 'second_name': VAR_2, 'login': VAR_2,\n 'password': VAR_2}\n", "print(VAR_3)\n", "VAR_0 = requests.post('http://127.0.0.1:5000/register', json=data)\n",...
[ "def test_add_user(self):...\n", "for _ in range(3):\n", "string = ''.join([chr(random.randint(65, 90)) for _ in range(9)])\n", "data = {'first_name': string, 'second_name': string, 'login': string,\n 'password': string}\n", "print(data)\n", "resp = requests.post('http://127.0.0.1:5000/register', json=...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._out\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._out\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_9(self):...\n", "return combine_vars(self.vars, self.get_magic_vars())\n" ]
[ "def get_vars(self):...\n", "return combine_vars(self.vars, self.get_magic_vars())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(VAR_10, VAR_11):...\n", "VAR_7 = VAR_10.find_where({'session_name': VAR_11})\n", "VAR_7.kill_session()\n" ]
[ "def kill_session_by_name(server, name):...\n", "session = server.find_where({'session_name': name})\n", "session.kill_session()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_13(self, VAR_15, *VAR_9, **VAR_7):...\n", "if self.closed:\n", "if self._adapter is not None:\n", "assert self._session is None\n", "VAR_9 = [VAR_15] + list(VAR_9)\n", "if VAR_7.pop('nodebug', False):\n", "VAR_9.insert(0, '--nodebug')\n", "self._launch(VAR_9, **kwargs)\n", "return self._ad...
[ "def launch_script(self, filename, *argv, **kwargs):...\n", "if self.closed:\n", "if self._adapter is not None:\n", "assert self._session is None\n", "argv = [filename] + list(argv)\n", "if kwargs.pop('nodebug', False):\n", "argv.insert(0, '--nodebug')\n", "self._launch(argv, **kwargs)\n", "return s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Assert'", "Assign'", "Condition", "Expr'", "Expr'", "Return'" ]
[ "@session_manager...\n", "\"\"\"docstring\"\"\"\n", "from invenio.modules.accounts.models import User, UserEXT\n", "from invenio.ext.sqlalchemy import db\n", "from ..handlers import token_session_key\n", "from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound\n", "import json\n", "import r...
[ "@session_manager...\n", "\"\"\"docstring\"\"\"\n", "from invenio.modules.accounts.models import User, UserEXT\n", "from invenio.ext.sqlalchemy import db\n", "from ..handlers import token_session_key\n", "from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound\n", "import json\n", "import r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Expr'", ...
[ "def FUNC_6(self, VAR_7):...\n", "VAR_76 = CLASS_6.run(self, VAR_7)\n", "if VAR_76 and not (VAR_101.user_is_loggedin and VAR_76.can_edit(VAR_101.\n", "abort(403, 'forbidden')\n", "return VAR_76\n" ]
[ "def run(self, param):...\n", "meetup = VMeetup.run(self, param)\n", "if meetup and not (c.user_is_loggedin and meetup.can_edit(c.user, c.\n", "abort(403, 'forbidden')\n", "return meetup\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_6(self):...\n", "if self._IsServerAlive():\n", "self._server_popen.terminate()\n", "utils.RemoveIfExists(self._temp_options_filename)\n" ]
[ "def _ServerCleanup(self):...\n", "if self._IsServerAlive():\n", "self._server_popen.terminate()\n", "utils.RemoveIfExists(self._temp_options_filename)\n" ]
[ 0, 0, 0, 7 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_12(VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = VAR_3.user\n", "VAR_38 = [(unicode(year), unicode(year)) for year in UserProfile.VALID_YEARS]\n", "VAR_31 = FUNC_9(VAR_12)\n", "VAR_1.exception('Error fetching order history from Otto.')\n", "VAR_5 = {'auth': {}, 'duplicate_provider': None...
[ "def account_settings_context(request):...\n", "\"\"\"docstring\"\"\"\n", "user = request.user\n", "year_of_birth_options = [(unicode(year), unicode(year)) for year in\n UserProfile.VALID_YEARS]\n", "user_orders = get_user_orders(user)\n", "log.exception('Error fetching order history from Otto.')\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'" ]
[ "@VAR_0.route('/disconnect/<remote_app>/')...\n", "\"\"\"docstring\"\"\"\n", "if VAR_1 not in disconnect_handlers:\n", "return abort(404)\n", "return disconnect_handlers[VAR_1]()\n" ]
[ "@blueprint.route('/disconnect/<remote_app>/')...\n", "\"\"\"docstring\"\"\"\n", "if remote_app not in disconnect_handlers:\n", "return abort(404)\n", "return disconnect_handlers[remote_app]()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Return'", "Return'" ]
[ "def FUNC_3(self, VAR_9, VAR_7, *VAR_10):...\n", "if VAR_9 not in self._gates:\n", "VAR_17 = VAR_0[VAR_9](*VAR_10)\n", "if isinstance(VAR_7, int):\n", "VAR_17 | self.reg[VAR_7]\n", "VAR_17 | tuple([self.reg[i] for i in VAR_7])\n" ]
[ "def apply(self, gate_name, wires, *par):...\n", "if gate_name not in self._gates:\n", "gate = operator_map[gate_name](*par)\n", "if isinstance(wires, int):\n", "gate | self.reg[wires]\n", "gate | tuple([self.reg[i] for i in wires])\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_3(self, VAR_2):...\n", "self.reply(VAR_2, \"yeah, right, I'll go and rob a die factory\")\n" ]
[ "def _too_much(self, msg):...\n", "self.reply(msg, \"yeah, right, I'll go and rob a die factory\")\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = []\n", "VAR_7 = self.pool.get('ir.model.data')\n", "VAR_8 = self.pool.get('res.users').browse(VAR_2, VAR_3, VAR_3).company_id.id\n", "VAR_9 = self.pool.get('account.bank.statement')\n", "VAR_10 = self.pool.get('ir....
[ "def open_statement(self, cr, uid, ids, context):...\n", "\"\"\"docstring\"\"\"\n", "list_statement = []\n", "mod_obj = self.pool.get('ir.model.data')\n", "company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id\n", "statement_obj = self.pool.get('account.bank.statement')\n", "sequenc...
[ 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, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", ...
[ "def __init__(self, VAR_8):...\n", "self.spdx = VAR_8\n", "self.lasttok = None\n", "self.lastid = None\n", "self.lexer = lex.lex(module=self, reflags=re.UNICODE)\n", "self.parser = yacc.yacc(module=self, write_tables=False, debug=False)\n", "self.lines_checked = 0\n", "self.checked = 0\n", "self.spd...
[ "def __init__(self, spdx):...\n", "self.spdx = spdx\n", "self.lasttok = None\n", "self.lastid = None\n", "self.lexer = lex.lex(module=self, reflags=re.UNICODE)\n", "self.parser = yacc.yacc(module=self, write_tables=False, debug=False)\n", "self.lines_checked = 0\n", "self.checked = 0\n", "self.spdx_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "@property...\n", "self.validate()\n", "return self._is_jdk\n" ]
[ "@property...\n", "self.validate()\n", "return self._is_jdk\n" ]
[ 0, 0, 0 ]
[ "Condition", "Expr'", "Return'" ]
[ "def FUNC_0(self, VAR_1, VAR_2=False):...\n", "if not VAR_1.get('database'):\n", "VAR_1['database'] = self._model.sqlDatabaseName()\n" ]
[ "def augmentDatabaseArgs(self, args, pool=False):...\n", "if not args.get('database'):\n", "args['database'] = self._model.sqlDatabaseName()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'" ]
[ "def FUNC_0(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "return '%s_%s' % (cfg['OAUTHCLIENT_SESSION_KEY_PREFIX'], VAR_0)\n" ]
[ "def token_session_key(remote_app):...\n", "\"\"\"docstring\"\"\"\n", "return '%s_%s' % (cfg['OAUTHCLIENT_SESSION_KEY_PREFIX'], remote_app)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@rest_utils.ajax()...\n", "\"\"\"docstring\"\"\"\n", "VAR_25 = VAR_1.DATA['updated']\n", "VAR_26 = VAR_1.DATA['removed']\n", "if VAR_25:\n", "api.nova.server_metadata_update(VAR_1, VAR_3, VAR_25)\n", "if VAR_26:\n", "api.nova.server_metadata_delete(VAR_1, VAR_3, VAR_26)\n" ]
[ "@rest_utils.ajax()...\n", "\"\"\"docstring\"\"\"\n", "updated = request.DATA['updated']\n", "removed = request.DATA['removed']\n", "if updated:\n", "api.nova.server_metadata_update(request, server_id, updated)\n", "if removed:\n", "api.nova.server_metadata_delete(request, server_id, removed)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "@VAR_2.route('/ranks')...\n", "if VAR_0 == None:\n", "FUNC_16()\n", "VAR_14 = request.args.get('scene', default='austin')\n", "VAR_19 = request.args.get('date')\n", "if VAR_19 == None:\n", "VAR_8 = (\n \"SELECT distinct date FROM ranks WHERE scene='{}' ORDER BY date DESC LIMIT 1;\"\n .format(VAR_...
[ "@endpoints.route('/ranks')...\n", "if db == None:\n", "init()\n", "scene = request.args.get('scene', default='austin')\n", "date = request.args.get('date')\n", "if date == None:\n", "sql = (\n \"SELECT distinct date FROM ranks WHERE scene='{}' ORDER BY date DESC LIMIT 1;\"\n .format(scene))\n", ...
[ 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'...
[ "def FUNC_5():...\n", "if VAR_11 and VAR_11.is_alive():\n", "return\n", "VAR_10, VAR_19 = multiprocessing.Pipe()\n", "VAR_11 = multiprocessing.Process(target=redditUserImageScraper.\n runLikedSavedDownloader, args=(childConnection,))\n", "VAR_11.start()\n" ]
[ "def startScript():...\n", "if scriptProcess and scriptProcess.is_alive():\n", "return\n", "scriptPipeConnection, childConnection = multiprocessing.Pipe()\n", "scriptProcess = multiprocessing.Process(target=redditUserImageScraper.\n runLikedSavedDownloader, args=(childConnection,))\n", "scriptProcess.s...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_1(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = re.findall('[^a-zA-Z0-9:_-]', VAR_1)\n", "if len(VAR_5) > 0:\n", "VAR_0.info('Command: {0} contains invalid characters: {1}'.format(VAR_1, VAR_5)\n )\n", "return True\n", "return False\n" ]
[ "def _valid_command(string):...\n", "\"\"\"docstring\"\"\"\n", "invalid_characters = re.findall('[^a-zA-Z0-9:_-]', string)\n", "if len(invalid_characters) > 0:\n", "log.info('Command: {0} contains invalid characters: {1}'.format(string,\n invalid_characters))\n", "return True\n", "return False\n" ]
[ 0, 0, 2, 2, 2, 2, 2 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'", "Return'", "Return'" ]
[ "def FUNC_7(self):...\n", "return \"\"\"Username: %s\nPassword: %s\n\"\"\" % (self.username, self.password\n ) + CLASS_1.specific_info(self)\n" ]
[ "def specific_info(self):...\n", "return \"\"\"Username: %s\nPassword: %s\n\"\"\" % (self.username, self.password\n ) + GenericRequest.specific_info(self)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_2(self, VAR_2, VAR_3, VAR_4=False):...\n", "VAR_6 = os.path.join(self.namespace, VAR_2)\n", "self.etcd.write(VAR_6, VAR_3, prevExist=replace)\n", "FUNC_0('Error storing key %s: [%r]' % (VAR_2, repr(err)))\n" ]
[ "def set(self, key, value, replace=False):...\n", "path = os.path.join(self.namespace, key)\n", "self.etcd.write(path, value, prevExist=replace)\n", "log_error('Error storing key %s: [%r]' % (key, repr(err)))\n" ]
[ 0, 1, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_snapshot(VAR_9)\n", "self.common.client_logout()\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_snapshot(snapshot)\n", "self.common.client_logout()\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_3(self):...\n", "self.assertTrue(self.client.login(VAR_1='autotest-1', VAR_2='password'))\n", "VAR_6 = self.client.get('/api/apps')\n", "VAR_8 = VAR_6.data['results'][0]['id']\n", "VAR_5 = '/api/apps/{}/perms'.format(VAR_8)\n", "VAR_7 = {'username': 'autotest-2'}\n", "VAR_6 = self.client.post(...
[ "def test_delete(self):...\n", "self.assertTrue(self.client.login(username='autotest-1', password='password'))\n", "response = self.client.get('/api/apps')\n", "app_id = response.data['results'][0]['id']\n", "url = '/api/apps/{}/perms'.format(app_id)\n", "body = {'username': 'autotest-2'}\n", "response ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "@Throttle(VAR_4)...\n", "\"\"\"docstring\"\"\"\n", "import pyatmo\n", "self.station_data = pyatmo.WeatherStationData(self.auth)\n", "if self.station is not None:\n", "self.data = self.station_data.lastData(VAR_19=self.station, exclude=3600)\n", "self.data = self.station_data.lastData(exclude=3600)\n" ]
[ "@Throttle(MIN_TIME_BETWEEN_UPDATES)...\n", "\"\"\"docstring\"\"\"\n", "import pyatmo\n", "self.station_data = pyatmo.WeatherStationData(self.auth)\n", "if self.station is not None:\n", "self.data = self.station_data.lastData(station=self.station, exclude=3600)\n", "self.data = self.station_data.lastDat...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Import'", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_22(self):...\n", "return self._email\n" ]
[ "def nickname(self):...\n", "return self._email\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_1(VAR_0):...\n", "return base64.b64decode(binascii.unhexlify(VAR_0.encode('utf-8'))).decode(\n 'utf-8')\n" ]
[ "def decode_hexed_b64_to_str(data):...\n", "return base64.b64decode(binascii.unhexlify(data.encode('utf-8'))).decode(\n 'utf-8')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_11(self):...\n", "VAR_9 = []\n", "VAR_10 = {}\n", "for kid in self.child_groups:\n", "VAR_13 = kid.get_hosts()\n", "for VAR_14 in self.hosts:\n", "for VAR_15 in VAR_13:\n", "if VAR_14 not in VAR_10:\n", "return VAR_9\n", "if VAR_15 not in VAR_10:\n", "VAR_10[VAR_14] = 1\n", "VAR_10[V...
[ "def _get_hosts(self):...\n", "hosts = []\n", "seen = {}\n", "for kid in self.child_groups:\n", "kid_hosts = kid.get_hosts()\n", "for mine in self.hosts:\n", "for kk in kid_hosts:\n", "if mine not in seen:\n", "return hosts\n", "if kk not in seen:\n", "seen[mine] = 1\n", "seen[kk] = 1\n", "i...
[ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Assign'", "For", "For", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Expr'", "Expr'" ]
[ "\"\"\"\nAll queries and commands that the user makes in the retail application\n\"\"\"\n", "import psycopg2\n", "VAR_0 = 1\n", "def __init__(self, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5=5432):...\n", "self.db_conn = psycopg2.connect(VAR_4=host, VAR_1=dbname, VAR_2=user, VAR_3\n =password, VAR_5=port)\n", "...
[ "\"\"\"\nAll queries and commands that the user makes in the retail application\n\"\"\"\n", "import psycopg2\n", "ONLINE_STORE_ID = 1\n", "def __init__(self, dbname, user, password, host, port=5432):...\n", "self.db_conn = psycopg2.connect(host=host, dbname=dbname, user=user,\n password=password, port=po...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "FunctionDef'", "Expr'", "Return'" ]