lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "for et in ExtractedText.objects.all():\n", "for ex_child in et.fetch_extracted_records():\n", "VAR_21 = ex_child.__class__\n", "self.assertEqual(et.pk, VAR_21.objects.get(pk=ex_child.pk).extracted_text.\n pk, 'string')\n" ]
[ "def test_fetch_extracted_records(self):...\n", "\"\"\"docstring\"\"\"\n", "for et in ExtractedText.objects.all():\n", "for ex_child in et.fetch_extracted_records():\n", "child_model = ex_child.__class__\n", "self.assertEqual(et.pk, child_model.objects.get(pk=ex_child.pk).\n extracted_text.pk,\n 'Th...
[ 0, 0, 0, 6, 6, 0 ]
[ "FunctionDef'", "Docstring", "For", "For", "Assign'", "Expr'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_volume(VAR_7)\n", "self.common.client_logout()\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_volume(volume)\n", "self.common.client_logout()\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_8(self, VAR_8=False):...\n", "if not self.NativeFiletypeCompletionAvailable(\n", "self._latest_completion_request = OmniCompletionRequest(self._omnicomp)\n", "VAR_5 = {}\n", "return self._latest_completion_request\n", "self._AddExtraConfDataIfNeeded(VAR_5)\n", "if VAR_8:\n", "VAR_5['force_se...
[ "def CreateCompletionRequest(self, force_semantic=False):...\n", "if not self.NativeFiletypeCompletionAvailable(\n", "self._latest_completion_request = OmniCompletionRequest(self._omnicomp)\n", "extra_data = {}\n", "return self._latest_completion_request\n", "self._AddExtraConfDataIfNeeded(extra_data)\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Return'", "Expr'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_26():...\n", "return self.closed\n" ]
[ "def stop():...\n", "return self.closed\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13=logging.getLogger()):...\n", "\"\"\"docstring\"\"\"\n", "self.host_port = VAR_9\n", "self.device_port = VAR_10\n", "self.app_name = VAR_11\n", "self.uid = None\n", "self._adb = VAR_12\n", "self._client = None\n", "self._conn = None\n", "sel...
[ "def __init__(self, host_port, device_port, app_name, adb_proxy, log=logging...\n", "\"\"\"docstring\"\"\"\n", "self.host_port = host_port\n", "self.device_port = device_port\n", "self.app_name = app_name\n", "self.uid = None\n", "self._adb = adb_proxy\n", "self._client = None\n", "self._conn = None...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_17(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.contains('ynh_package_install') or self.contains('apt-get install'):\n", "FUNC_3('string')\n", "if self.contains('ynh_package_remove') or self.contains('apt-get remove'):\n", "FUNC_3('string')\n" ]
[ "def check_helper_usage_dependencies(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.contains('ynh_package_install') or self.contains('apt-get install'):\n", "print_warning(\n 'You should not use `ynh_package_install` or `apt-get install`, use `ynh_install_app_dependencies` instead'\n )\n", "if self...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_4(VAR_3):...\n", "VAR_10 = {onboarding.INTRODUCTION_INTRO: {'html': '<p>instructor_intro</p>',\n 'description': 'instructor_intro desc', 'title': 'instructor_intro'},\n onboarding.CREATE_COURSE: {'html': '<p>create_course</p>',\n 'description': 'create_course desc', 'title': 'create_course'},\n...
[ "def mocked_setting(setting_name):...\n", "data = {onboarding.INTRODUCTION_INTRO: {'html': '<p>instructor_intro</p>',\n 'description': 'instructor_intro desc', 'title': 'instructor_intro'},\n onboarding.CREATE_COURSE: {'html': '<p>create_course</p>',\n 'description': 'create_course desc', 'title': 'creat...
[ 0, 6, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_24(self, VAR_6):...\n", "return self.is_localhost(VAR_6['host'])\n" ]
[ "def run_on_localhost(self, comp):...\n", "return self.is_localhost(comp['host'])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(self, VAR_41):...\n", "if VAR_41:\n", "VAR_95 = Thing._by_fullname(VAR_41, False, data=True)\n", "abort(403, 'forbidden')\n", "if isinstance(VAR_95, Message):\n", "return VAR_95\n", "VAR_52 = VAR_95.subreddit_slow\n", "if VAR_101.user_is_loggedin and VAR_52.can_comment(VAR_101.user):\n", ...
[ "def run(self, fullname):...\n", "if fullname:\n", "parent = Thing._by_fullname(fullname, False, data=True)\n", "abort(403, 'forbidden')\n", "if isinstance(parent, Message):\n", "return parent\n", "sr = parent.subreddit_slow\n", "if c.user_is_loggedin and sr.can_comment(c.user):\n", "return parent\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Expr'", "Condition", "Return'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_23():...\n", "return threading.current_thread().getName() == 'MainThread'\n" ]
[ "def is_main_thread():...\n", "return threading.current_thread().getName() == 'MainThread'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_24(self, VAR_54):...\n", "\"\"\"docstring\"\"\"\n", "return MySQLdb.escape_string(VAR_54)\n" ]
[ "def _sql_injection_proof(self, value):...\n", "\"\"\"docstring\"\"\"\n", "return MySQLdb.escape_string(value)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@handler('request_value_changed')...\n", "if VAR_10.handled:\n", "return\n", "VAR_4, VAR_8 = VAR_10.event.args[:2]\n", "if VAR_10.result and not VAR_10.errors:\n", "VAR_8.body = VAR_10.value\n", "if VAR_10.promise:\n", "self.fire(response(VAR_8))\n", "VAR_10.event.notify = True\n", "self.fire(htt...
[ "@handler('request_value_changed')...\n", "if value.handled:\n", "return\n", "req, res = value.event.args[:2]\n", "if value.result and not value.errors:\n", "res.body = value.value\n", "if value.promise:\n", "self.fire(response(res))\n", "value.event.notify = True\n", "self.fire(httperror(req, res...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def __hash__(self):...\n", "return hash(tuple(self))\n" ]
[ "def __hash__(self):...\n", "return hash(tuple(self))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "\"\"\"Front-end UI.\"\"\"\n", "import logging\n", "import os\n", "import webapp2\n", "from components import auth\n", "from components import datastore_utils\n", "from components import template\n", "from components import utils\n", "import handlers_endpoints\n", "import models\n", "VAR_0 = os....
[ "\"\"\"Front-end UI.\"\"\"\n", "import logging\n", "import os\n", "import webapp2\n", "from components import auth\n", "from components import datastore_utils\n", "from components import template\n", "from components import utils\n", "import handlers_endpoints\n", "import models\n", "THIS_DIR = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Ex...
[ "def FUNC_10(self, VAR_32):...\n", "self.tables.append(VAR_32)\n", "VAR_0 = VAR_32[4:-1]\n", "if not self.flags.ignore_permissions and not frappe.has_permission(VAR_0):\n", "frappe.flags.error_message = _('Insufficient Permission for {0}').format(frappe\n .bold(VAR_0))\n" ]
[ "def append_table(self, table_name):...\n", "self.tables.append(table_name)\n", "doctype = table_name[4:-1]\n", "if not self.flags.ignore_permissions and not frappe.has_permission(doctype):\n", "frappe.flags.error_message = _('Insufficient Permission for {0}').format(frappe\n .bold(doctype))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Condition", "Assign'" ]
[ "def __init__(self, VAR_20, *VAR_17, **VAR_10):...\n", "assert isinstance(VAR_20, CLASS_2)\n", "VAR_28 = CLASS_3(VAR_20.key_name, *VAR_20.source_expressions, **\n key_transform.extra)\n", "super().__init__(VAR_28, *VAR_17, **kwargs)\n" ]
[ "def __init__(self, key_transform, *args, **kwargs):...\n", "assert isinstance(key_transform, KeyTransform)\n", "key_text_transform = KeyTextTransform(key_transform.key_name, *\n key_transform.source_expressions, **key_transform.extra)\n", "super().__init__(key_text_transform, *args, **kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assert'", "Assign'", "Expr'" ]
[ "def FUNC_2(self, VAR_13):...\n", "VAR_23 = False\n", "VAR_24 = False\n", "if self.notRegex:\n", "VAR_36 = re.search(self.notRegex, VAR_13)\n", "if self.trueRegex and not VAR_23:\n", "if VAR_36 == None:\n", "VAR_36 = re.search(self.trueRegex, VAR_13)\n", "return VAR_23\n", "VAR_23 = True\n", "if...
[ "def isASuccessfulUpload(self, html):...\n", "result = False\n", "validExt = False\n", "if self.notRegex:\n", "fileUploaded = re.search(self.notRegex, html)\n", "if self.trueRegex and not result:\n", "if fileUploaded == None:\n", "fileUploaded = re.search(self.trueRegex, html)\n", "return result\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'" ]
[ "@renderer...\n", "return CLASS_0(self.disclaimer_banner_file).render(VAR_5)\n" ]
[ "@renderer...\n", "return DisclaimerElement(self.disclaimer_banner_file).render(request)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_9(VAR_2):...\n", "assert VAR_2 == 'hello'\n" ]
[ "def assert_warn(line):...\n", "assert line == 'hello'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assert'" ]
[ "def FUNC_2(self, VAR_1, VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = VAR_2['nome']\n", "VAR_8 = VAR_2['sobrenome']\n", "VAR_9 = VAR_2['endereco']\n", "VAR_10 = 'INSERT INTO users (nome, sobrenome, endereco) VALUES (%s,%s,%s)'\n", "VAR_11 = VAR_7, VAR_8, VAR_9\n", "self.cursor.execute(VAR_10, VA...
[ "def insert(self, table, content):...\n", "\"\"\"docstring\"\"\"\n", "nome = content['nome']\n", "sobrenome = content['sobrenome']\n", "endereco = content['endereco']\n", "add_user = 'INSERT INTO users (nome, sobrenome, endereco) VALUES (%s,%s,%s)'\n", "data_user = nome, sobrenome, endereco\n", "self....
[ 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "\"\"\"string\"\"\"\n", "import argparse\n", "import importlib\n", "import os\n", "import sys\n", "from parlai.core.agents import get_agent_module, get_task_module\n", "from parlai.tasks.tasks import ids_to_tasks\n", "def FUNC_0(VAR_0):...\n", "VAR_3 = VAR_0.lower()\n", "if VAR_3 in ('yes', 'true'...
[ "\"\"\"Provides an argument parser and a set of default command line options for\nusing the ParlAI package.\n\"\"\"\n", "import argparse\n", "import importlib\n", "import os\n", "import sys\n", "from parlai.core.agents import get_agent_module, get_task_module\n", "from parlai.tasks.tasks import ids_to_t...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Condition", "Return'", "Condition", "Return'", "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(self):...\n", "VAR_14 = []\n", "VAR_4 = list(self.actors.keys())\n", "for ind1 in range(len(VAR_4)):\n", "for ind2 in range(ind1 + 1, len(VAR_4)):\n", "return VAR_14\n", "VAR_17 = self.actors[VAR_4[ind1]].collideWith(self.actors[VAR_4[ind2]])\n", "VAR_14 = VAR_14 + VAR_17\n" ]
[ "def getCollisionCommands(self):...\n", "all_commands = []\n", "keys = list(self.actors.keys())\n", "for ind1 in range(len(keys)):\n", "for ind2 in range(ind1 + 1, len(keys)):\n", "return all_commands\n", "commands = self.actors[keys[ind1]].collideWith(self.actors[keys[ind2]])\n", "all_commands = all_...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "For", "Return'", "Assign'", "Assign'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return list(listfiles(VAR_12, VAR_13=restriction, VAR_14=omit_value))\n" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return list(listfiles(pattern, restriction=restriction, omit_value=omit_value))\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_0(VAR_0, *, VAR_1: Optional[int]=None, VAR_2: Optional[str]=None,...\n", "VAR_9 = []\n", "params: Union[tuple, Tuple[Any]] = ()\n", "if VAR_1:\n", "VAR_9.append(f'user_id = {VAR_1}')\n", "if VAR_2:\n", "VAR_9.append('updated_at >= ?')\n", "if VAR_3:\n", "params += VAR_2,\n", "VAR_9.appen...
[ "def find_notes(conn, *, user_id: Optional[int]=None, from_date: Optional[...\n", "conditions = []\n", "params: Union[tuple, Tuple[Any]] = ()\n", "if user_id:\n", "conditions.append(f'user_id = {user_id}')\n", "if from_date:\n", "conditions.append('updated_at >= ?')\n", "if to_date:\n", "params += f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 ]
[ "Condition", "Assign'", "AnnAssign'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "AugAssign'", "Expr'", "Condition", "Expr'", "Assign'", "AugAssign'", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_3 = ('INSERT INTO jdk_entries ' +\n '(title, body, date_created, date_last_modified)' + \"VALUES ('', '', \" +\n VAR_1 + ', ' + VAR_1 + ');')\n", "FUNC_0(VAR_3)\n", "return None\n" ]
[ "def create_entry(self):...\n", "sql = ('INSERT INTO jdk_entries ' +\n '(title, body, date_created, date_last_modified)' + \"VALUES ('', '', \" +\n CURRENT_DATESTAMP + ', ' + CURRENT_DATESTAMP + ');')\n", "db_execute(sql)\n", "return None\n" ]
[ 0, 4, 4, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_5(self):...\n", "self.assertFalse({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n filters={'name': ['like', 'J%']}))\n" ]
[ "def test_filters_3(self):...\n", "self.assertFalse({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n filters={'name': ['like', 'J%']}))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@FUNC_0...\n", "VAR_27 = VAR_10.get_transport()\n", "VAR_7 = VAR_27.open_session()\n", "VAR_7.invoke_shell()\n", "VAR_0.debug(_('Reading CLI MOTD'))\n", "self._get_output(VAR_7)\n", "VAR_28 = 'stty columns 255'\n", "VAR_0.debug(_(\"Setting CLI terminal width: '%s'\"), VAR_28)\n", "VAR_7.send(VAR_28...
[ "@with_timeout...\n", "transport = ssh.get_transport()\n", "chan = transport.open_session()\n", "chan.invoke_shell()\n", "LOG.debug(_('Reading CLI MOTD'))\n", "self._get_output(chan)\n", "cmd = 'stty columns 255'\n", "LOG.debug(_(\"Setting CLI terminal width: '%s'\"), cmd)\n", "chan.send(cmd + '\\r'...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "For", "Assign'", "Return'", "Assign'", "Expr'" ]
[ "def FUNC_1(self, VAR_5):...\n", "for p in self.ALLOWED_PATHS:\n", "if VAR_5.startswith(p):\n", "return False\n", "return True\n" ]
[ "def _path_allowed(self, path):...\n", "for p in self.ALLOWED_PATHS:\n", "if path.startswith(p):\n", "return False\n", "return True\n" ]
[ 0, 5, 5, 5, 5 ]
[ "FunctionDef'", "For", "Condition", "Return'", "Return'" ]
[ "@classmethod...\n", "return JarDependency(org='org.scala-lang', VAR_5=name, rev=scala_build_info\n [version].full_version)\n" ]
[ "@classmethod...\n", "return JarDependency(org='org.scala-lang', name=name, rev=scala_build_info[\n version].full_version)\n" ]
[ 7, 0 ]
[ "Condition", "Return'" ]
[ "@VAR_0.route('/delete_crawl', methods=['POST'])...\n", "VAR_7 = request.form['cid']\n", "VAR_28 = VAR_1.connection.cursor()\n", "VAR_29 = VAR_28.execute('DELETE FROM Crawls WHERE cid = %s' % VAR_7)\n", "VAR_1.connection.commit()\n", "VAR_28.close()\n", "flash('Crawl successfully removed', 'success')\n"...
[ "@app.route('/delete_crawl', methods=['POST'])...\n", "cid = request.form['cid']\n", "cur = mysql.connection.cursor()\n", "result = cur.execute('DELETE FROM Crawls WHERE cid = %s' % cid)\n", "mysql.connection.commit()\n", "cur.close()\n", "flash('Crawl successfully removed', 'success')\n", "return red...
[ 0, 0, 0, 4, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "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 FUNC_5(VAR_13):...\n", "\"\"\"docstring\"\"\"\n", "VAR_56 = in_f.readlines()\n", "VAR_33 = set(VAR_13.keys())\n", "for VAR_69, line in enumerate(VAR_56):\n", "VAR_46 = re.match('^(\\\\s*)\"([^\"]+)\":', line)\n", "for l in VAR_56:\n", "if VAR_46:\n", "out_f.write(l)\n", "if VAR_33:\n", "VAR...
[ "def configure_cms(options):...\n", "\"\"\"docstring\"\"\"\n", "lines = in_f.readlines()\n", "unset = set(options.keys())\n", "for i, line in enumerate(lines):\n", "g = re.match('^(\\\\s*)\"([^\"]+)\":', line)\n", "for l in lines:\n", "if g:\n", "out_f.write(l)\n", "if unset:\n", "whitespace, ke...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "For", "Assign'", "For", "Condition", "Expr'", "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_5(self, VAR_7):...\n", "return VAR_54.db.get_value(self.doctype, self.name, VAR_7)\n" ]
[ "def get_db_value(self, key):...\n", "return frappe.db.get_value(self.doctype, self.name, key)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "async def FUNC_5(VAR_6):...\n", "VAR_10 = {'Authorization': f'Bearer {VAR_1}'}\n", "VAR_7 = {'date': '2015-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n", "VAR_8 = await VAR_6.post('/results', VAR_10=headers, VAR_7=json.dumps(data))\n", "assert VAR_8.status == 201\n" ]
[ "async def test_positive_jogging_result(test_cli):...\n", "headers = {'Authorization': f'Bearer {access_token}'}\n", "data = {'date': '2015-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n", "resp = await test_cli.post('/results', headers=headers, data=json.dumps(data))\n", "asse...
[ 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "Assign'", "Assert'" ]
[ "def FUNC_8(self, VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "VAR_17 = b64encode(self.urandom(24)).decode('utf-8')\n", "VAR_18['oidc_csrf_token'] = VAR_17\n", "VAR_19 = {'csrf_token': VAR_17, 'destination': VAR_10}\n", "VAR_20 = {'state': json.dumps(VAR_19)}\n", "VAR_16 = self.flow_for_request()\n", "...
[ "def redirect_to_auth_server(self, destination):...\n", "\"\"\"docstring\"\"\"\n", "csrf_token = b64encode(self.urandom(24)).decode('utf-8')\n", "session['oidc_csrf_token'] = csrf_token\n", "state = {'csrf_token': csrf_token, 'destination': destination}\n", "extra_params = {'state': json.dumps(state)}\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_4(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_24 = self.getfile(VAR_21, VAR_23=True)\n", "if VAR_24 is not False:\n", "return True\n" ]
[ "def exists(self, path):...\n", "\"\"\"docstring\"\"\"\n", "f = self.getfile(path, follow_symlinks=True)\n", "if f is not False:\n", "return True\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'" ]
[ "def FUNC_3(self):...\n", "VAR_10 = VAR_11(self.container, self)\n", "self.frames[VAR_11] = VAR_10\n", "VAR_10.grid(row=0, column=0, sticky='nsew')\n", "self.show_frame(VAR_11)\n" ]
[ "def custom_frame(self):...\n", "result_frame = ResultsPage(self.container, self)\n", "self.frames[ResultsPage] = result_frame\n", "result_frame.grid(row=0, column=0, sticky='nsew')\n", "self.show_frame(ResultsPage)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9=None, VAR_10=None,...\n", "threading.Thread.__init__(self)\n", "self.username = VAR_5\n", "self.password = VAR_6\n", "self.metrics = VAR_7\n", "self.tasks = VAR_8\n", "self.log = VAR_9\n", "self.base_url = VAR_10\n", "self.submissions_path = VAR_...
[ "def __init__(self, username, password, metrics, tasks, log=None, base_url=...\n", "threading.Thread.__init__(self)\n", "self.username = username\n", "self.password = password\n", "self.metrics = metrics\n", "self.tasks = tasks\n", "self.log = log\n", "self.base_url = base_url\n", "self.submissions_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def __init__(self):...\n", "self.content = VAR_2\n" ]
[ "def __init__(self):...\n", "self.content = content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_24(self, VAR_30):...\n", "\"\"\"docstring\"\"\"\n", "return self.build_graph.resolve(VAR_30)\n" ]
[ "def resolve(self, spec):...\n", "\"\"\"docstring\"\"\"\n", "return self.build_graph.resolve(spec)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_0(VAR_3):...\n", "@functools.wraps(VAR_3)...\n", "VAR_23 = VAR_5.pop('timeout', None)\n", "VAR_24 = eventlet.spawn(VAR_3, self, *VAR_4, **kwargs)\n", "if VAR_23 is None:\n", "return VAR_24.wait()\n", "VAR_36 = eventlet.spawn_after(VAR_23, VAR_24.kill)\n", "VAR_48 = VAR_24.wait()\n", "VAR_3...
[ "def with_timeout(f):...\n", "@functools.wraps(f)...\n", "timeout = kwargs.pop('timeout', None)\n", "gt = eventlet.spawn(f, self, *args, **kwargs)\n", "if timeout is None:\n", "return gt.wait()\n", "kill_thread = eventlet.spawn_after(timeout, gt.kill)\n", "res = gt.wait()\n", "kill_thread.cancel()\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Expr'", "Return'", "Return'" ]
[ "def FUNC_6(self, VAR_20, VAR_12, VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_20:\n", "VAR_12.standard_price = VAR_16\n" ]
[ "def fix_quant_data(self, quant, prod, cost):...\n", "\"\"\"docstring\"\"\"\n", "if not quant:\n", "prod.standard_price = cost\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'" ]
[ "def FUNC_4(self):...\n", "VAR_15 = []\n", "VAR_16 = datetime.now(timezone(timedelta(hours=+9), 'JST'))\n", "VAR_16 = VAR_16.replace(hour=0, minute=0, second=0, microsecond=0)\n", "for day in range(30)[::-1]:\n", "VAR_18 = VAR_16 - timedelta(days=day)\n", "return VAR_15\n", "VAR_19 = VAR_16 - timedelt...
[ "def thirty_day_data(self):...\n", "data = []\n", "today = datetime.now(timezone(timedelta(hours=+9), 'JST'))\n", "today = today.replace(hour=0, minute=0, second=0, microsecond=0)\n", "for day in range(30)[::-1]:\n", "from_date = today - timedelta(days=day)\n", "return data\n", "to_date = today - time...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_7(self, VAR_7):...\n", "VAR_10 = os.path.join(logging.log_path, 'AndroidDevice%s' % self.serial,\n 'BugReports', 'test_something,sometime,%s' % self.serial)\n", "assert VAR_10 in VAR_7, \"Expected '%s', got '%s'.\" % (VAR_10, VAR_7)\n" ]
[ "def bugreport(self, params):...\n", "expected = os.path.join(logging.log_path, 'AndroidDevice%s' % self.serial,\n 'BugReports', 'test_something,sometime,%s' % self.serial)\n", "assert expected in params, \"Expected '%s', got '%s'.\" % (expected, params)\n" ]
[ 0, 2, 2 ]
[ "FunctionDef'", "Assign'", "Assert'" ]
[ "def FUNC_2(self):...\n", "return HttpResponseRedirect(self.failure_url)\n" ]
[ "def login_failure(self):...\n", "return HttpResponseRedirect(self.failure_url)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_21(self, VAR_17, VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "self._check_volume(VAR_16)\n", "VAR_0.warn(_('Volume %s is not found!, it may have been deleted'), VAR_16[\n 'name'])\n", "VAR_0.error(_('Failed to ensure export of volume %s'), VAR_16['name'])\n" ]
[ "def ensure_export(self, context, volume):...\n", "\"\"\"docstring\"\"\"\n", "self._check_volume(volume)\n", "LOG.warn(_('Volume %s is not found!, it may have been deleted'), volume['name']\n )\n", "LOG.error(_('Failed to ensure export of volume %s'), volume['name'])\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'" ]
[ "def __init__(self):...\n", "self._sqlite_engine_cache = Cache()\n" ]
[ "def __init__(self):...\n", "self._sqlite_engine_cache = Cache()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_19(self, VAR_16, VAR_20, VAR_21=False, **VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', VAR_16['name'], 'access', 'delete', '1')\n", "VAR_0.error(_('Failed to terminate connection to volume %s'), VAR_16['name'])\n" ]
[ "def terminate_connection(self, volume, connector, force=False, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', volume['name'], 'access', 'delete', '1')\n", "LOG.error(_('Failed to terminate connection to volume %s'), volume['name'])\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def FUNC_11(self, VAR_8):...\n", "if not self.current_user:\n", "return False\n", "if self.current_user.admin:\n", "return True\n", "VAR_8 = GroupList.check(self.current_user.key, VAR_8, self.sql_session)\n", "return bool(VAR_8)\n" ]
[ "def is_group_user(self, group):...\n", "if not self.current_user:\n", "return False\n", "if self.current_user.admin:\n", "return True\n", "group = GroupList.check(self.current_user.key, group, self.sql_session)\n", "return bool(group)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Assign'", "Return'" ]
[ "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = {'TEST_STACK': str(CLASS_0.DEFAULT_TEST_ID), 'TEST_APP': \n 'gcpsmoketest' + CLASS_0.DEFAULT_TEST_ID}\n", "return st.ScenarioTestRunner.main(CLASS_0, default_binding_overrides=\n defaults, test_case_list=[GoogleSmokeTest])\n" ]
[ "def main():...\n", "\"\"\"docstring\"\"\"\n", "defaults = {'TEST_STACK': str(GoogleSmokeTestScenario.DEFAULT_TEST_ID),\n 'TEST_APP': 'gcpsmoketest' + GoogleSmokeTestScenario.DEFAULT_TEST_ID}\n", "return st.ScenarioTestRunner.main(GoogleSmokeTestScenario,\n default_binding_overrides=defaults, test_case_...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_11, VAR_12, VAR_10):...\n", "return True\n" ]
[ "def validate(self, levelfields, path_list, client):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "import fnmatch\n", "import inspect\n", "import logging\n", "import os\n", "import random\n", "import re\n", "import string\n", "import tarfile\n", "import threading\n", "import tempfile\n", "import shutil\n", "import subprocess\n", "import sys\n", "from datetime import datetime\n", "fro...
[ "import fnmatch\n", "import inspect\n", "import logging\n", "import os\n", "import random\n", "import re\n", "import string\n", "import tarfile\n", "import threading\n", "import tempfile\n", "import shutil\n", "import subprocess\n", "import sys\n", "from datetime import datetime\n", "fro...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", ...
[ "def FUNC_13(self):...\n", "self.run_test_case(self.scenario.delete_server_group(), max_retries=5)\n" ]
[ "def test_x_delete_server_group(self):...\n", "self.run_test_case(self.scenario.delete_server_group(), max_retries=5)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "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'" ]
[ "def FUNC_13(VAR_0, VAR_5, VAR_6, VAR_12=False):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_12:\n", "print('REMOVE OUTLIERS FAILED')\n", "db.engine.execute('DELETE FROM \"{0}\" WHERE \"{1}\" < {2}'.format(VAR_0, VAR_5,\n VAR_6))\n", "db.engine.execute('DELETE FROM \"{0}\" WHERE \"{1}\" > {2}'.format(VAR...
[ "def remove_outliers(table_name, attr, value, smaller_than=False):...\n", "\"\"\"docstring\"\"\"\n", "if smaller_than:\n", "print('REMOVE OUTLIERS FAILED')\n", "db.engine.execute('DELETE FROM \"{0}\" WHERE \"{1}\" < {2}'.format(table_name,\n attr, value))\n", "db.engine.execute('DELETE FROM \"{0}\" WHE...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_0(VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = dict(VAR_4 or {})\n", "VAR_4['Content-Length'] = len(VAR_2)\n", "def __init__(self):...\n", "self.content = VAR_2\n", "def FUNC_6(self, VAR_7):...\n", "VAR_8 = self.content\n", "while VAR_8:\n", "yield VAR_8[:VAR_7]\...
[ "def make_fake_response(content, url, headers=None):...\n", "\"\"\"docstring\"\"\"\n", "headers = dict(headers or {})\n", "headers['Content-Length'] = len(content)\n", "def __init__(self):...\n", "self.content = content\n", "def iter_content(self, chunk_size):...\n", "c = self.content\n", "while c:\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "FunctionDef'", "Assign'", "FunctionDef'", "Assign'", "Condition", "Expr'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_13(self):...\n", "VAR_28 = QueryDict('', mutable=True)\n", "VAR_28.update(self.filter_data)\n", "VAR_28.update(self.request.GET)\n", "self.is_filtered = False\n", "if len([k for k in VAR_28.keys() if k != 'page']) > 0:\n", "self.is_filtered = True\n", "self.filter = TransactionFilter(VAR_28)...
[ "def get_queryset(self):...\n", "data = QueryDict('', mutable=True)\n", "data.update(self.filter_data)\n", "data.update(self.request.GET)\n", "self.is_filtered = False\n", "if len([k for k in data.keys() if k != 'page']) > 0:\n", "self.is_filtered = True\n", "self.filter = TransactionFilter(data)\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "For", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_5(self, VAR_3, VAR_4=None, VAR_1=None):...\n", "VAR_3 = VAR_3.lower()\n", "VAR_8 = sqlite3.connect('data/ed.db').cursor()\n", "if ',' in VAR_3:\n", "VAR_3, VAR_4 = (i.strip() for i in VAR_3.split(','))\n", "VAR_11 = f\"select * from stations where lower(name) = '{VAR_3}'\"\n", "if VAR_4 is not...
[ "def station_search(self, search, target_system=None, ctx=None):...\n", "search = search.lower()\n", "conn = sqlite3.connect('data/ed.db').cursor()\n", "if ',' in search:\n", "search, target_system = (i.strip() for i in search.split(','))\n", "query = f\"select * from stations where lower(name) = '{search...
[ 0, 0, 0, 0, 0, 4, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "Return'", "Return'", "Return'", "Return'", "AugAssign'" ]
[ "def FUNC_1(self):...\n", "VAR_2 = self.connect()\n", "VAR_3 = 'SELECT description FROM crimes;'\n", "VAR_2.close()\n", "cursor.execute(VAR_3)\n", "return cursor.fetchall()\n" ]
[ "def get_all_inputs(self):...\n", "connection = self.connect()\n", "query = 'SELECT description FROM crimes;'\n", "connection.close()\n", "cursor.execute(query)\n", "return cursor.fetchall()\n" ]
[ 0, 0, 0, 0, 4, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "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'" ]
[ "def __init__(self, VAR_0):...\n", "warn('Plus integration not yet implemented')\n", "super(CLASS_7, self).__init__('Plus: ' + VAR_0)\n" ]
[ "def __init__(self, txt):...\n", "warn('Plus integration not yet implemented')\n", "super(PlusEnv, self).__init__('Plus: ' + txt)\n" ]
[ 0, 2, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed('string', VAR_2='Big SD cards')\n" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed(\n \"\"\"If you want to change your SD card to one bigger than 32GB then you'll have to format it to FAT32.\nYou can do this with the tool of your preference.\nFormatter examples:\n- [guiformat - Windows](http://www.ridgecrop.dem...
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'" ]
[ "def FUNC_1(self):...\n", "\"\"\"docstring\"\"\"\n", "for VAR_10 in self.log_files:\n", "if VAR_10 in self.log_file_handles:\n", "VAR_11 = []\n", "if VAR_10 in self.files_to_ignore:\n", "while True:\n", "self.log_file_handles[VAR_10] = open(VAR_10, 'r')\n", "if e.errno == os.errno.EMFILE:\n", "VAR...
[ "def check_log_files_and_push_updates(self):...\n", "\"\"\"docstring\"\"\"\n", "for log_filename in self.log_files:\n", "if log_filename in self.log_file_handles:\n", "new_lines = []\n", "if log_filename in self.files_to_ignore:\n", "while True:\n", "self.log_file_handles[log_filename] = open(log_file...
[ 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "AugAssign'", "Assign'", "Expr'" ]
[ "def FUNC_4(self, VAR_6, VAR_7):...\n", "if self.telnet:\n", "for attempt in range(VAR_7):\n", "self.dut.serial.write('\\x03')\n", "self.command('reset', VAR_6, 'Error resetting DUT', False)\n", "db.log_event('Warning' if attempt < VAR_7 - 1 else 'Error', 'Debugger',\n 'Error resetting DUT', db.log_exc...
[ "def reset_dut(self, expected_output, attempts):...\n", "if self.telnet:\n", "for attempt in range(attempts):\n", "self.dut.serial.write('\\x03')\n", "self.command('reset', expected_output, 'Error resetting DUT', False)\n", "db.log_event('Warning' if attempt < attempts - 1 else 'Error', 'Debugger',\n '...
[ 0, 0, 0, 0, 0, 0, 2, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "For", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_26(VAR_51, VAR_52):...\n", "for sub_ in VAR_51.sub_items:\n", "FUNC_26(sub_, VAR_52)\n", "VAR_51.owner = VAR_52\n", "if VAR_51.is_dir:\n", "self._update_in_db(VAR_51)\n", "return\n" ]
[ "def _chown_recursive(item_, owner_):...\n", "for sub_ in item_.sub_items:\n", "_chown_recursive(sub_, owner_)\n", "item_.owner = owner_\n", "if item_.is_dir:\n", "self._update_in_db(item_)\n", "return\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_0(VAR_0):...\n", "VAR_1 = Template(filename='r2/templates/showmeetup.html', output_encoding=\n 'utf-8', encoding_errors='replace')\n", "VAR_2 = VAR_1.get_def('meetup_info').render_unicode(VAR_0=meetup)\n", "VAR_3 = url_for(controller='meetups', action='show', id=meetup._id36)\n", "VAR_4 = pytho...
[ "def meetup_article_text(meetup):...\n", "t = Template(filename='r2/templates/showmeetup.html', output_encoding=\n 'utf-8', encoding_errors='replace')\n", "res = t.get_def('meetup_info').render_unicode(meetup=meetup)\n", "url = url_for(controller='meetups', action='show', id=meetup._id36)\n", "title = py...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@VAR_0.route('/users/new', methods=['GET', 'POST'])...\n", "if request.method == 'POST':\n", "VAR_2 = connectToMySQL('users_db')\n", "return render_template('edit.html', VAR_4=None)\n", "VAR_6 = 'string'\n", "VAR_8 = {'fn': request.form['first_name'], 'ln': request.form['last_name'],\n 'e': request.fo...
[ "@app.route('/users/new', methods=['GET', 'POST'])...\n", "if request.method == 'POST':\n", "mysql = connectToMySQL('users_db')\n", "return render_template('edit.html', user=None)\n", "query = (\n 'INSERT INTO users (first_name, last_name, email, description, created_at) VALUES (%(fn)s, %(ln)s, %(e)s, %(...
[ 0, 0, 0, 0, 4, 0, 0, 4 ]
[ "Condition", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_31(VAR_31):...\n", "\"\"\"docstring\"\"\"\n", "def __getitem__(self, *VAR_30):...\n", "return dict.__getitem__(self, VAR_30)\n" ]
[ "def memoize(f):...\n", "\"\"\"docstring\"\"\"\n", "def __getitem__(self, *key):...\n", "return dict.__getitem__(self, key)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Return'" ]
[ "def FUNC_9(self, VAR_7, VAR_6):...\n", "VAR_11 = VAR_7[0]\n", "VAR_12 = VAR_7[1]\n", "if VAR_7['lkvm'] < VAR_6:\n", "VAR_26 = 1\n", "VAR_26 = float('inf')\n", "self.G[VAR_11][VAR_12]['tpvm'] = VAR_26\n" ]
[ "def calcTPVM(self, edge, gamma):...\n", "i = edge[0]\n", "j = edge[1]\n", "if edge['lkvm'] < gamma:\n", "tpvm = 1\n", "tpvm = float('inf')\n", "self.G[i][j]['tpvm'] = tpvm\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_2(VAR_0=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = getUtility(IRegistry)\n", "VAR_15['collective.solr.active'] = VAR_0\n" ]
[ "def activate(active=True):...\n", "\"\"\"docstring\"\"\"\n", "registry = getUtility(IRegistry)\n", "registry['collective.solr.active'] = active\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'" ]
[ "def FUNC_1(VAR_5):...\n", "VAR_12 = f\"\"\"\n SELECT * FROM {VAR_0} WHERE id=%s\n \"\"\"\n", "VAR_14 = create_connection()\n", "VAR_14.close()\n", "VAR_15 = VAR_14.cursor()\n", "VAR_15.execute(VAR_12, VAR_5)\n", "VAR_16 = VAR_15.fetchone()\n", "if not VAR_16:\n", "return None\...
[ "def get_user(id):...\n", "sql_query = f\"\"\"\n SELECT * FROM {USERS_TABLE} WHERE id=%s\n \"\"\"\n", "connection = create_connection()\n", "connection.close()\n", "cursor = connection.cursor()\n", "cursor.execute(sql_query, id)\n", "user = cursor.fetchone()\n", "if not user:\n",...
[ 0, 4, 0, 0, 0, 4, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_27(VAR_32, VAR_3):...\n", "self.assertEqual('https://localhost:1/swarming/api/v1/bot/bot_code/123', VAR_3)\n", "self.assertEqual(VAR_31, VAR_32)\n", "z.writestr('__main__.py', 'print(\"hi\")')\n", "return True\n" ]
[ "def url_retrieve(f, url):...\n", "self.assertEqual('https://localhost:1/swarming/api/v1/bot/bot_code/123', url)\n", "self.assertEqual(new_zip, f)\n", "z.writestr('__main__.py', 'print(\"hi\")')\n", "return True\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_7():...\n", "VAR_36 = FUNC_3(VAR_18, VAR_19)\n", "VAR_37 = CLASS_17 if VAR_20 else CLASS_18\n", "return VAR_37, VAR_36\n" ]
[ "def four():...\n", "ListPresenceFormSet = make_formset(parent, child)\n", "ParentForm = ExtractedCPCatForm if extracted else ExtractedCPCatEditForm\n", "return ParentForm, ListPresenceFormSet\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_24, VAR_25):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_24[VAR_10] and os.path.exists(VAR_25) and not os.path.islink(VAR_25\n", "VAR_24[VAR_10] = VAR_25\n" ]
[ "def update_realfile(self, f, realfile):...\n", "\"\"\"docstring\"\"\"\n", "if not f[A_REALFILE] and os.path.exists(realfile) and not os.path.islink(\n", "f[A_REALFILE] = realfile\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'" ]
[ "def FUNC_1(self):...\n", "\"\"\"docstring\"\"\"\n", "if socket.gethostname() == config.PROD_HOST_NAME:\n", "log.info('Connecting to the local database...')\n", "log.info('Connecting to the database via SSH...')\n", "VAR_6 = 3306\n", "if not self.tunnel_opened:\n", "self.conn = MySQLdb.connect(host='1...
[ "def connect(self):...\n", "\"\"\"docstring\"\"\"\n", "if socket.gethostname() == config.PROD_HOST_NAME:\n", "log.info('Connecting to the local database...')\n", "log.info('Connecting to the database via SSH...')\n", "port = 3306\n", "if not self.tunnel_opened:\n", "self.conn = MySQLdb.connect(host='1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Expr'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_0(self):...\n", "self._mox = mox.Mox()\n", "self.mock(logging, 'error', lambda *_: None)\n", "self.mock(logging, 'exception', lambda *_: None)\n", "self.mock(logging, 'info', lambda *_: None)\n", "self.mock(logging, 'warning', lambda *_: None)\n", "self._mox.StubOutWithMock(time, 'sleep')\n", ...
[ "def setUp(self):...\n", "self._mox = mox.Mox()\n", "self.mock(logging, 'error', lambda *_: None)\n", "self.mock(logging, 'exception', lambda *_: None)\n", "self.mock(logging, 'info', lambda *_: None)\n", "self.mock(logging, 'warning', lambda *_: None)\n", "self._mox.StubOutWithMock(time, 'sleep')\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_9(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'MEDIUM': 1}, 'CONFIDENCE': {'HIGH': 1}}\n", "self.check_example('mark_safe.py', VAR_2)\n" ]
[ "def test_mark_safe(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'MEDIUM': 1}, 'CONFIDENCE': {'HIGH': 1}}\n", "self.check_example('mark_safe.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_5(self):...\n", "" ]
[ "def _check_children_depth(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "VAR_23 = self.common.create_volume(VAR_7)\n", "self.common.client_logout()\n", "return {'metadata': VAR_23}\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "metadata = self.common.create_volume(volume)\n", "self.common.client_logout()\n", "return {'metadata': metadata}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "@VAR_0.route('/')...\n", "return render_template('homepage.html')\n" ]
[ "@app.route('/')...\n", "return render_template('homepage.html')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_6(self):...\n", "VAR_8 = 'test_foo.py'\n", "VAR_7 = BokChoyTestSuite('', test_spec=spec, default_store='draft')\n", "VAR_1 = 'tests/{}'.format(VAR_8)\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name, VAR_2='draft'))\n" ]
[ "def test_spec_with_draft_default_store(self):...\n", "spec = 'test_foo.py'\n", "suite = BokChoyTestSuite('', test_spec=spec, default_store='draft')\n", "name = 'tests/{}'.format(spec)\n", "self.assertEqual(suite.cmd, self._expected_command(name=name, store='draft'))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_4():...\n", "VAR_3 = {'foo': 'bar'}\n", "VAR_1 = json.dumps(VAR_3)\n", "VAR_4 = tempfile.NamedTemporaryFile(mode='w', suffix='.json')\n", "VAR_4.write(VAR_1)\n", "VAR_4.flush()\n", "VAR_2 = load_source(VAR_4.name)\n", "assert VAR_2 == VAR_3\n" ]
[ "def test_json_file_path():...\n", "native = {'foo': 'bar'}\n", "source = json.dumps(native)\n", "tmp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json')\n", "tmp_file.write(source)\n", "tmp_file.flush()\n", "result = load_source(tmp_file.name)\n", "assert result == native\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assert'" ]
[ "def FUNC_7(self, VAR_10=None):...\n", "VAR_25 = VAR_20.path.join(self.parlai_home, 'downloads')\n", "VAR_26 = self.add_argument_group('Main ParlAI Arguments')\n", "VAR_26.add_argument('-t', '--task', help=\n 'ParlAI task(s), e.g. \"babi:Task1\" or \"babi,cbt\"')\n", "VAR_26.add_argument('--download-path...
[ "def add_parlai_args(self, args=None):...\n", "default_downloads_path = os.path.join(self.parlai_home, 'downloads')\n", "parlai = self.add_argument_group('Main ParlAI Arguments')\n", "parlai.add_argument('-t', '--task', help=\n 'ParlAI task(s), e.g. \"babi:Task1\" or \"babi,cbt\"')\n", "parlai.add_argume...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_2(VAR_3, VAR_5):...\n", "VAR_8 = VAR_3.cursor()\n", "VAR_10 = VAR_8.execute(VAR_5)\n", "VAR_3.commit()\n", "print('insert data successfull')\n", "return VAR_10\n" ]
[ "def insertDB(conn, sql_insert):...\n", "cur = conn.cursor()\n", "result = cur.execute(sql_insert)\n", "conn.commit()\n", "print('insert data successfull')\n", "return result\n" ]
[ 0, 0, 4, 0, 0, 4 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_47(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'HIGH': 1}, 'CONFIDENCE': {'HIGH': 1}}\n", "self.check_example('httpoxy_cgihandler.py', VAR_2)\n", "self.check_example('httpoxy_twisted_script.py', VAR_2)\n", "self.check_example('httpoxy_twisted_directory.py', VAR_2)\n" ]
[ "def test_httpoxy(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'HIGH': 1}, 'CONFIDENCE': {'HIGH': 1}}\n", "self.check_example('httpoxy_cgihandler.py', expect)\n", "self.check_example('httpoxy_twisted_script.py', expect)\n", "self.check_example('httpoxy_twisted_directory.py', expect)\n"...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_0(self):...\n", "VAR_7 = []\n", "for parent in self.parent_groups:\n", "VAR_7.append(parent.serialize())\n", "self._hosts = None\n", "VAR_8 = dict(VAR_0=self.name, vars=self.vars.copy(), VAR_7=parent_groups,\n depth=self.depth, VAR_9=self.hosts)\n", "return VAR_8\n" ]
[ "def serialize(self):...\n", "parent_groups = []\n", "for parent in self.parent_groups:\n", "parent_groups.append(parent.serialize())\n", "self._hosts = None\n", "result = dict(name=self.name, vars=self.vars.copy(), parent_groups=\n parent_groups, depth=self.depth, hosts=self.hosts)\n", "return resul...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_8(VAR_13, VAR_14):...\n", "\"\"\"docstring\"\"\"\n", "VAR_25 = 'string'\n", "VAR_14.execute(VAR_25)\n", "VAR_31 = []\n", "for record in VAR_14:\n", "VAR_38 = record[0]\n", "return VAR_31\n", "VAR_31.append(VAR_38)\n" ]
[ "def get_all_old_sourcebyinstitutions(conn, sqlite):...\n", "\"\"\"docstring\"\"\"\n", "query = \"\"\"\n SELECT\n sourcebyinstitution\n FROM\n sourcebyinstitution\n GROUP BY\n sourcebyinstitution\n \"\"\"\n", "sqlite.execute(query)\n", "old_sourcebyin...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "For", "Assign'", "Return'", "Expr'" ]
[ "def FUNC_0(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = threading.Thread(target=self._run, name='ray_import_thread')\n", "VAR_3.daemon = True\n", "VAR_3.start()\n" ]
[ "def start(self):...\n", "\"\"\"docstring\"\"\"\n", "t = threading.Thread(target=self._run, name='ray_import_thread')\n", "t.daemon = True\n", "t.start()\n" ]
[ 0, 0, 6, 6, 6 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_7(self):...\n", "for VAR_30 in VAR_7(len(self._['tags'])):\n", "self._['tags'][VAR_30] = self._['tags'][VAR_30][:40]\n", "VAR_10 = AnnTag.get_ann_tags(self.ann_id, self.sql_session)\n", "if not VAR_4.match(self._['tags'][VAR_30]):\n", "VAR_11 = set(self._['tags'])\n", "VAR_12 = set(VAR_10)\n",...
[ "def parse_tag(self):...\n", "for i in xrange(len(self._['tags'])):\n", "self._['tags'][i] = self._['tags'][i][:40]\n", "old_tags = AnnTag.get_ann_tags(self.ann_id, self.sql_session)\n", "if not tag_re.match(self._['tags'][i]):\n", "new_tag_set = set(self._['tags'])\n", "old_tag_set = set(old_tags)\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "For", "Expr'" ]
[ "def FUNC_12(self):...\n", "VAR_33 = []\n", "VAR_34 = self.redirection()\n", "while VAR_34:\n", "VAR_33.append(VAR_34)\n", "if len(VAR_33) > 0:\n", "VAR_34 = self.redirection()\n", "return CLASS_11(VAR_33)\n", "return None\n" ]
[ "def redirections(self):...\n", "redirs = []\n", "redir = self.redirection()\n", "while redir:\n", "redirs.append(redir)\n", "if len(redirs) > 0:\n", "redir = self.redirection()\n", "return RedirectionsHelper(redirs)\n", "return None\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Return'", "Return'" ]
[ "def FUNC_5(self):...\n", "VAR_1 = self.client.get(url_for('oauthclient.login', remote_app='test'))\n", "self.assertStatus(VAR_1, 302)\n", "self.assertEqual(VAR_1.location, \n 'https://foo.bar/oauth/authorize?response_type=code&client_id=testid&redirect_uri=%s'\n % quote_plus(url_for('oauthclient.autho...
[ "def test_login(self):...\n", "resp = self.client.get(url_for('oauthclient.login', remote_app='test'))\n", "self.assertStatus(resp, 302)\n", "self.assertEqual(resp.location, \n 'https://foo.bar/oauth/authorize?response_type=code&client_id=testid&redirect_uri=%s'\n % quote_plus(url_for('oauthclient.auth...
[ 0, 5, 0, 5, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_22(self, VAR_2, VAR_3, VAR_4, *VAR_6):...\n", "VAR_46 = self.pool.get('res.request')\n", "VAR_47 = self.browse(VAR_2, VAR_3, VAR_4)\n", "for VAR_23 in VAR_47:\n", "VAR_51 = VAR_23.project_id\n", "return True\n", "if VAR_51 and VAR_51.warn_manager and VAR_51.manager.id and VAR_51.manager.id != ...
[ "def do_reopen(self, cr, uid, ids, *args):...\n", "request = self.pool.get('res.request')\n", "tasks = self.browse(cr, uid, ids)\n", "for task in tasks:\n", "project = task.project_id\n", "return True\n", "if project and project.warn_manager and project.manager.id and project.manager.id != uid:\n", "r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Condition", "Expr'", "Expr'" ]
[ "from gi.repository import Gio, Gtk\n", "from keepassgtk.database_manager import DatabaseManager\n", "from keepassgtk.unlocked_database import UnlockedDatabase\n", "import keepassgtk.config_manager\n", "from keepassgtk.logging_manager import LoggingManager\n", "import gi\n", "gi.require_version('Gtk', '...
[ "from gi.repository import Gio, Gtk\n", "from keepassgtk.database_manager import DatabaseManager\n", "from keepassgtk.unlocked_database import UnlockedDatabase\n", "import keepassgtk.config_manager\n", "from keepassgtk.logging_manager import LoggingManager\n", "import gi\n", "gi.require_version('Gtk', '...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Import'", "ImportFrom'", "Import'", "Expr'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", ...
[ "@jwt_required...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = f'insert into spaces values (%s, %s, %s, %s, %s);'\n", "VAR_7 = request.get_json()\n", "VAR_6 = VAR_7['space_id'], VAR_7['building_id'], VAR_7['name'], VAR_7[\n 'capacity'], VAR_7['features']\n", "database_utilities.execute_query(VAR_5, VAR_6)\n...
[ "@jwt_required...\n", "\"\"\"docstring\"\"\"\n", "query = f'insert into spaces values (%s, %s, %s, %s, %s);'\n", "json_data = request.get_json()\n", "parameters = json_data['space_id'], json_data['building_id'], json_data['name'\n ], json_data['capacity'], json_data['features']\n", "database_utilities....
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_7, VAR_71=20, **VAR_16):...\n", "self.num = VAR_71\n", "CLASS_0.__init__(self, VAR_7=param, **kw)\n" ]
[ "def __init__(self, param, num=20, **kw):...\n", "self.num = num\n", "Validator.__init__(self, param=param, **kw)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_12(VAR_18):...\n", "VAR_44 = QtGui.QApplication(sys.argv)\n", "VAR_45 = QtGui.QMainWindow()\n", "VAR_46 = hyperGUI.UiMainWindow()\n", "VAR_46.ui_init(VAR_45, VAR_18)\n", "VAR_45.show()\n", "sys.exit(VAR_44.exec_())\n" ]
[ "def start_gui(control_center):...\n", "app = QtGui.QApplication(sys.argv)\n", "main_window = QtGui.QMainWindow()\n", "ui = hyperGUI.UiMainWindow()\n", "ui.ui_init(main_window, control_center)\n", "main_window.show()\n", "sys.exit(app.exec_())\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "\"\"\"string\"\"\"\n", "import Pyjo.Base\n", "import Pyjo.Mixin.String\n", "from Pyjo.Util import b, u, url_escape, url_unescape\n", "\"\"\"string\"\"\"\n", "VAR_2 = 'utf-8'\n", "\"\"\"string\"\"\"\n", "VAR_3 = False\n", "VAR_4 = None\n", "VAR_5 = None\n", "VAR_6 = False\n", "def __init__(sel...
[ "\"\"\"\nPyjo.Path - Path\n================\n::\n\n import Pyjo.Path\n\n # Parse\n path = Pyjo.Path.new('/foo%2Fbar%3B/baz.html')\n print(path[0])\n\n # Build\n path = Pyjo.Path.new(u'/i/♥')\n path.append('pyjo')\n print(path)\n\n:mod:`Pyjo.Path` is a container for paths used by :mod:`Pyjo.U...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "ImportFrom'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Expr'", "Condition", "Expr'", "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_19(self):...\n", "self.running.clear()\n" ]
[ "def term(self):...\n", "self.running.clear()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_7(self, VAR_9, VAR_10):...\n", "return ' %s %s,' % (VAR_9, VAR_10)\n" ]
[ "def create_table_field(self, current, field):...\n", "return ' %s %s,' % (current, field)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_15(self, VAR_26):...\n", "for group in self.config['groups']:\n", "for VAR_6 in group['components']:\n", "VAR_47 = Node({'name': 'master_node'})\n", "self.nodes[VAR_6['name']] = Node(VAR_6)\n", "for VAR_11 in self.nodes:\n", "VAR_49 = self.nodes.get(VAR_11)\n", "self.nodes['master_node'] = V...
[ "def set_dependencies(self, exit_on_fail):...\n", "for group in self.config['groups']:\n", "for comp in group['components']:\n", "master_node = Node({'name': 'master_node'})\n", "self.nodes[comp['name']] = Node(comp)\n", "for name in self.nodes:\n", "node = self.nodes.get(name)\n", "self.nodes['master...
[ 0, 0, 0, 0, 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'", "For", "For", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "For", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'", "Condition", "For", "Expr'", "Condition",...