lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "@validate(VUser(), VCreateMeetup(), VAR_4=ValueOrBlank('title'), VAR_8=...\n", "return BoringPage(pagename='New Meetup', VAR_27=NewMeetup(*a, **kw)).render()\n" ]
[ "@validate(VUser(), VCreateMeetup(), title=ValueOrBlank('title'),...\n", "return BoringPage(pagename='New Meetup', content=NewMeetup(*a, **kw)).render()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_3(self):...\n", "return self.name\n" ]
[ "def get_name(self):...\n", "return self.name\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "import pytest\n", "from sanic import Sanic\n", "import random\n", "import json\n", "from jogging.main import config_app\n", "from jogging import config\n", "from jogging.Models.user import User\n", "VAR_0 = None\n", "VAR_1 = None\n", "VAR_2 = None\n", "@pytest.yield_fixture...\n", "config.app...
[ "import pytest\n", "from sanic import Sanic\n", "import random\n", "import json\n", "from jogging.main import config_app\n", "from jogging import config\n", "from jogging.Models.user import User\n", "username = None\n", "access_token = None\n", "refresh_token = None\n", "@pytest.yield_fixture......
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_6(self, VAR_18):...\n", "if not VAR_18:\n", "self.error()\n", "return VAR_18\n" ]
[ "def run(self, item):...\n", "if not item:\n", "self.error()\n", "return item\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_47(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(n int, s varchar(10))')\n", "self.cursor.execute(\"insert into t1 values (1, 'a')\")\n", "VAR_24 = self.cursor.execute('select n, s from t1').fetchone()\n", "self.assertNotEqual(VAR_24, None)\n", "self.cursor.exe...
[ "def test_row_execute(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(n int, s varchar(10))')\n", "self.cursor.execute(\"insert into t1 values (1, 'a')\")\n", "row = self.cursor.execute('select n, s from t1').fetchone()\n", "self.assertNotEqual(row, None)\n", "self.cursor....
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_23(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = VAR_0[:]\n", "VAR_14 = self.contractor.login\n", "VAR_11.append((Allow, u'%s' % VAR_14, ('view_competence', 'edit_competence')))\n", "return VAR_11\n" ]
[ "def get_competence_acl(self):...\n", "\"\"\"docstring\"\"\"\n", "acl = DEFAULT_PERM[:]\n", "login = self.contractor.login\n", "acl.append((Allow, u'%s' % login, ('view_competence', 'edit_competence')))\n", "return acl\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_5(self):...\n", "VAR_1 = 'http://my.url.com'\n", "VAR_2 = 'True'\n", "url_helper.urllib2.urlopen(VAR_1, mox.IgnoreArg(), timeout=mox.IgnoreArg()\n ).AndReturn(StringIO.StringIO(VAR_2))\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen(VAR_1, method='POST'), VAR_2)\n", "sel...
[ "def testUrlOpenPOSTSuccess(self):...\n", "url = 'http://my.url.com'\n", "response = 'True'\n", "url_helper.urllib2.urlopen(url, mox.IgnoreArg(), timeout=mox.IgnoreArg()\n ).AndReturn(StringIO.StringIO(response))\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen(url, method='POST'), r...
[ 0, 0, 0, 5, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@integration_synonym_api...\n", "FUNC_2(VAR_2)\n", "FUNC_3(VAR_2, 'CRYSTAL', VAR_7='1')\n", "FUNC_5(VAR_4, VAR_5, VAR_11='CRISTAL', VAR_10=[{'name': '----CRISTAL'}, {\n 'name': 'CRYSTAL'}])\n" ]
[ "@integration_synonym_api...\n", "clean_database(solr)\n", "seed_database_with(solr, 'CRYSTAL', id='1')\n", "verify_results(client, jwt, query='CRISTAL', expected=[{'name':\n '----CRISTAL'}, {'name': 'CRYSTAL'}])\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return db.session.query(CLASS_0.id).all()\n" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return db.session.query(User.id).all()\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_16(self, VAR_35=True):...\n", "\"\"\"docstring\"\"\"\n", "self.match_filters = []\n", "self.match_conditions = []\n", "VAR_55 = False\n", "if not self.user:\n", "self.user = frappe.session.user\n", "if not self.tables:\n", "self.extract_tables()\n", "VAR_1 = frappe.get_meta(self.doctype)...
[ "def build_match_conditions(self, as_condition=True):...\n", "\"\"\"docstring\"\"\"\n", "self.match_filters = []\n", "self.match_conditions = []\n", "only_if_shared = False\n", "if not self.user:\n", "self.user = frappe.session.user\n", "if not self.tables:\n", "self.extract_tables()\n", "meta = f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Assig...
[ "def FUNC_1():...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = FUNC_0()\n", "VAR_4 = VAR_3.cursor()\n", "VAR_5 = 'matches'\n", "VAR_6 = 'players'\n", "VAR_4.execute('DELETE FROM %s;' % (VAR_5,))\n", "VAR_4.execute(\n \"\"\"UPDATE %s SET wins = 0, \n loss = 0, matchesPlayed = 0\"\"\" % (\n VAR_...
[ "def deleteMatches():...\n", "\"\"\"docstring\"\"\"\n", "conn = connect()\n", "c = conn.cursor()\n", "table = 'matches'\n", "playerTable = 'players'\n", "c.execute('DELETE FROM %s;' % (table,))\n", "c.execute(\n \"\"\"UPDATE %s SET wins = 0, \n loss = 0, matchesPlayed = 0\"\"\" % (\n play...
[ 0, 0, 0, 0, 0, 0, 4, 4, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@VAR_8.command()...\n", "\"\"\"docstring\"\"\"\n", "if FUNC_0(VAR_9):\n", "pgsql.delete_quest(VAR_3, VAR_12)\n", "await VAR_9.send(VAR_5)\n", "await VAR_9.send('Quest with ID ' + VAR_12 + ' deleted.')\n" ]
[ "@bot.command()...\n", "\"\"\"docstring\"\"\"\n", "if whitelist_check(ctx):\n", "pgsql.delete_quest(pg_connection, quest_id)\n", "await ctx.send(permission_error_message)\n", "await ctx.send('Quest with ID ' + quest_id + ' deleted.')\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_23):...\n", "if VAR_23 and self.r_css_name.match(VAR_23):\n", "return VAR_23\n" ]
[ "def run(self, name):...\n", "if name and self.r_css_name.match(name):\n", "return name\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'" ]
[ "import sys, threading, time\n", "from datetime import datetime\n", "from tkinter import *\n", "print('You need to install: tkinter')\n", "import bane\n", "print('You need to install: bane')\n", "def FUNC_2(self):...\n", "from tkinter import ttk\n", "sys.exit()\n", "sys.exit()\n", "VAR_15 = time...
[ "import sys, threading, time\n", "from datetime import datetime\n", "from tkinter import *\n", "print('You need to install: tkinter')\n", "import bane\n", "print('You need to install: bane')\n", "def run(self):...\n", "from tkinter import ttk\n", "sys.exit()\n", "sys.exit()\n", "ti = time.time()...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Expr'", "Import'", "Expr'", "FunctionDef'", "ImportFrom'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Condition", "AugAssign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "...
[ "def FUNC_14(self, VAR_11, VAR_12):...\n", "self.common._cli_run('createhost -iscsi -add %s %s' % (VAR_11, VAR_12), None)\n" ]
[ "def _modify_3par_iscsi_host(self, hostname, iscsi_iqn):...\n", "self.common._cli_run('createhost -iscsi -add %s %s' % (hostname, iscsi_iqn),\n None)\n" ]
[ 0, 2 ]
[ "FunctionDef'", "Expr'" ]
[ "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",...
[ "def FUNC_4(self):...\n", "for clause in self._ruleorder:\n", "for rulename in clause:\n", "if not self.is_rule(rulename):\n" ]
[ "def check(self):...\n", "for clause in self._ruleorder:\n", "for rulename in clause:\n", "if not self.is_rule(rulename):\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "For", "Condition" ]
[ "def FUNC_6(self, VAR_38):...\n", "if not VAR_38:\n", "if self.emp_error is not None:\n", "if len(VAR_38) > self.length:\n", "VAR_101.errors.add(self.emp_error)\n", "VAR_101.errors.add(self.len_error)\n", "return VAR_38\n" ]
[ "def run(self, title):...\n", "if not title:\n", "if self.emp_error is not None:\n", "if len(title) > self.length:\n", "c.errors.add(self.emp_error)\n", "c.errors.add(self.len_error)\n", "return title\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Condition", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_1(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = self.client.get('/api/apps', HTTP_X_DEIS_VERSION=__version__.rsplit\n ('.', 1)[0])\n", "self.assertEqual(VAR_1.status_code, 200)\n" ]
[ "def test_x_deis_version_header_good(self):...\n", "\"\"\"docstring\"\"\"\n", "response = self.client.get('/api/apps', HTTP_X_DEIS_VERSION=__version__.\n rsplit('.', 1)[0])\n", "self.assertEqual(response.status_code, 200)\n" ]
[ 0, 0, 5, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_16(self, VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = \"SELECT file_id FROM {0} WHERE path='{1}'\".format(VAR_2, VAR_8)\n", "VAR_4 = self._run_command(VAR_7)\n", "VAR_4 = VAR_4[0][0]\n", "VAR_4 = None\n", "return VAR_4\n" ]
[ "def getFileCacheID(self, pth):...\n", "\"\"\"docstring\"\"\"\n", "command = \"SELECT file_id FROM {0} WHERE path='{1}'\".format(TABLE_NAME, pth)\n", "data = self._run_command(command)\n", "data = data[0][0]\n", "data = None\n", "return data\n" ]
[ 0, 0, 4, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_25(VAR_40):...\n", "for VAR_18 in VAR_40.sub_items:\n", "VAR_40.sub_names_idx[VAR_18.file_name]\n" ]
[ "def iterate_node_fn(node):...\n", "for item in node.sub_items:\n", "node.sub_names_idx[item.file_name]\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'" ]
[ "@abc.abstractmethod...\n", "\"\"\"docstring\"\"\"\n" ]
[ "@abc.abstractmethod...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "Condition", "Docstring" ]
[ "def FUNC_4(VAR_2: str, VAR_3: str, VAR_4: str, VAR_5: Dict[str, str]) ->None:...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = path.join(VAR_2, VAR_3)\n", "if path.isdir(VAR_1):\n", "print_green(f'Fetching {VAR_3}')\n", "print_green(f'Cloning {VAR_3}')\n", "FUNC_1(f'git -C {VAR_1} fetch')\n", "FUNC_1(f'git...
[ "def fetch_repo(working_directory: str, name: str, url: str, summery_info:...\n", "\"\"\"docstring\"\"\"\n", "repo_path = path.join(working_directory, name)\n", "if path.isdir(repo_path):\n", "print_green(f'Fetching {name}')\n", "print_green(f'Cloning {name}')\n", "shell_first(f'git -C {repo_path} fetch...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_14(VAR_5):...\n", "VAR_36 = False\n", "VAR_10 = 'https://api.github.com/user/repos'\n", "VAR_8 = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN']}\n", "VAR_9 = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n", "VAR_11 = requests.get(VAR_10, VAR_8=headers, VAR_9=auth)\n", "for r...
[ "def delete_if_forked(data):...\n", "FORKED = False\n", "url = 'https://api.github.com/user/repos'\n", "headers = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN']}\n", "auth = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n", "r = requests.get(url, headers=headers, auth=auth)\n", "for re...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Return'", "Condition", "Assign'", "Assign'" ]
[ "@abc.abstractmethod...\n", "\"\"\"docstring\"\"\"\n" ]
[ "@abc.abstractmethod...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "Condition", "Docstring" ]
[ "def FUNC_18(self):...\n", "if not self._IsServerAlive():\n", "return\n", "SendEventNotificationAsync('InsertLeave')\n" ]
[ "def OnInsertLeave(self):...\n", "if not self._IsServerAlive():\n", "return\n", "SendEventNotificationAsync('InsertLeave')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Expr'" ]
[ "def FUNC_13(self):...\n", "return all(self.datadocument_set.values_list('extracted', flat=True))\n" ]
[ "def all_extracted(self):...\n", "return all(self.datadocument_set.values_list('extracted', flat=True))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "import telebot\n", "import sqlite3\n", "def __init__(self, VAR_11):...\n", "super(CLASS_0, self).__init__()\n", "self.db_name = VAR_11\n", "def __db_connect__(self):...\n", "self.db = sqlite3.connect(self.db_name)\n", "self.db.row_factory = sqlite3.Row\n", "self.cursor = self.db.cursor()\n", "def...
[ "import telebot\n", "import sqlite3\n", "def __init__(self, db_name):...\n", "super(DbHandler, self).__init__()\n", "self.db_name = db_name\n", "def __db_connect__(self):...\n", "self.db = sqlite3.connect(self.db_name)\n", "self.db.row_factory = sqlite3.Row\n", "self.cursor = self.db.cursor()\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, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0...
[ "Import'", "Import'", "FunctionDef'", "Expr'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "Expr'", "FunctionDef'", "Condition", "Return'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Condition...
[ "@inlineCallbacks...\n", "\"\"\"docstring\"\"\"\n", "if GLSetting.loglevel == logging.DEBUG and GLSetting.devel_mode:\n", "return\n", "VAR_25 = 0.8\n", "VAR_26 = self.request.request_time()\n", "VAR_27 = VAR_25 - VAR_26\n", "if VAR_27 > 0:\n", "yield security_sleep(VAR_27)\n" ]
[ "@inlineCallbacks...\n", "\"\"\"docstring\"\"\"\n", "if GLSetting.loglevel == logging.DEBUG and GLSetting.devel_mode:\n", "return\n", "uniform_delay = 0.8\n", "request_time = self.request.request_time()\n", "needed_diff = uniform_delay - request_time\n", "if needed_diff > 0:\n", "yield security_slee...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'" ]
[ "def __del__(self):...\n", "self.conn.close()\n" ]
[ "def __del__(self):...\n", "self.conn.close()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0(self, VAR_27):...\n", "VAR_22 = self.gic.unproxy(self)\n", "VAR_32 = FdtNode('interrupt-controller')\n", "VAR_32.appendCompatible(['gem5,gic', 'arm,cortex-a15-gic', 'arm,cortex-a9-gic']\n )\n", "VAR_32.append(FdtPropertyWords('#interrupt-cells', [3]))\n", "VAR_32.append(FdtPropertyWords('#a...
[ "def generateDeviceTree(self, state):...\n", "gic = self.gic.unproxy(self)\n", "node = FdtNode('interrupt-controller')\n", "node.appendCompatible(['gem5,gic', 'arm,cortex-a15-gic', 'arm,cortex-a9-gic'])\n", "node.append(FdtPropertyWords('#interrupt-cells', [3]))\n", "node.append(FdtPropertyWords('#address...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_14(self, VAR_17):...\n", "return True\n" ]
[ "def does_intersect_path(self, pathctx):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_26(self):...\n", "FUNC_4()\n" ]
[ "def setUp(self):...\n", "create_dummy_data()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "from __future__ import absolute_import\n", "import datetime\n", "from .config import get_config_file_paths\n", "from .util import *\n", "VAR_0 = get_config_file_paths()['GOALS_CONFIG_FILE_PATH']\n", "VAR_1 = get_folder_path_from_file_path(VAR_0)\n", "def FUNC_0(VAR_2):...\n", "\"\"\"docstring\"\"\"\n...
[ "from __future__ import absolute_import\n", "import datetime\n", "from .config import get_config_file_paths\n", "from .util import *\n", "GOALS_CONFIG_FILE_PATH = get_config_file_paths()['GOALS_CONFIG_FILE_PATH']\n", "GOALS_CONFIG_FOLDER_PATH = get_folder_path_from_file_path(\n GOALS_CONFIG_FILE_PATH)\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_10(self):...\n", "self.env_var_override.set('VERIFY_XSS', 'True')\n", "VAR_7 = BokChoyTestSuite('')\n", "VAR_1 = 'tests'\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name, VAR_3=True))\n" ]
[ "def test_verify_xss_env_var(self):...\n", "self.env_var_override.set('VERIFY_XSS', 'True')\n", "suite = BokChoyTestSuite('')\n", "name = 'tests'\n", "self.assertEqual(suite.cmd, self._expected_command(name=name, verify_xss=True))\n" ]
[ 0, 3, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_12(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_29 = self.config_file()\n", "VAR_21 = ''\n", "if VAR_29 is not None:\n", "for VAR_34, line in enumerate(VAR_29):\n", "return VAR_21\n", "VAR_29[VAR_34] = line if line.endswith('\\n') else line + '\\n'\n", "VAR_32, VAR_21 = tempfile.mkstemp()...
[ "def generate_config_file(self):...\n", "\"\"\"docstring\"\"\"\n", "config_lines = self.config_file()\n", "config_file = ''\n", "if config_lines is not None:\n", "for i, line in enumerate(config_lines):\n", "return config_file\n", "config_lines[i] = line if line.endswith('\\n') else line + '\\n'\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "For", "Return'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_1 and not VAR_2:\n", "VAR_8 = []\n", "for taken_dir in VAR_1:\n", "if isinstance(taken_dir, tuple):\n", "VAR_1 = VAR_8\n", "VAR_8.append(taken_dir[0])\n", "VAR_8.append(taken_dir)\n", "if not VAR_3:\n", "VAR_3 = AnalysisController.get_...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "if not taken_dirs and not taken_files:\n", "taken_dirs_tmp = []\n", "for taken_dir in taken_dirs:\n", "if isinstance(taken_dir, tuple):\n", "taken_dirs = taken_dirs_tmp\n", "taken_dirs_tmp.append(taken_dir[0])\n", "taken_dirs_tmp.append(taken_dir)\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Assign'", "For", "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Assign'", "For", "Condition", "Expr'", "Condition", "For", "Expr'", "Expr'", "...
[ "def FUNC_1(VAR_11):...\n", "VAR_5.pack_forget()\n", "VAR_12 = 'meal_planner.db'\n", "VAR_6.pack(fill='both')\n", "VAR_8 = Image.open('home.jpg')\n", "VAR_9 = ImageTk.PhotoImage(VAR_8)\n", "VAR_10 = Button(VAR_6, image=render, borderwidth=0, highlightthickness=0,\n highlightbackground='#e7e7e7', comm...
[ "def callback(recipeName):...\n", "viewRecipeFrame.pack_forget()\n", "database_file = 'meal_planner.db'\n", "menuFrame.pack(fill='both')\n", "load = Image.open('home.jpg')\n", "render = ImageTk.PhotoImage(load)\n", "img = Button(menuFrame, image=render, borderwidth=0, highlightthickness=0,\n highligh...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "For", "For", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'",...
[ "@defer.inlineCallbacks...\n", "VAR_9 = yield VAR_2.client.mail_store.all_mails()\n", "for mail in VAR_9:\n", "yield VAR_2.client.mail_store.delete_mail(mail.ident)\n" ]
[ "@defer.inlineCallbacks...\n", "mails = yield context.client.mail_store.all_mails()\n", "for mail in mails:\n", "yield context.client.mail_store.delete_mail(mail.ident)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Assign'", "For", "Expr'" ]
[ "def __init__(self, VAR_18, VAR_19):...\n", "self.fs = VAR_18\n", "self.cfg = VAR_19\n", "self.tempfiles = {}\n", "self.filenames = {}\n", "self.newcount = 0\n", "self.init_honeyfs(self.cfg.get('honeypot', 'contents_path'))\n" ]
[ "def __init__(self, fs, cfg):...\n", "self.fs = fs\n", "self.cfg = cfg\n", "self.tempfiles = {}\n", "self.filenames = {}\n", "self.newcount = 0\n", "self.init_honeyfs(self.cfg.get('honeypot', 'contents_path'))\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_10(VAR_18):...\n", "\"\"\"docstring\"\"\"\n", "VAR_35 = FUNC_8('contest/' + VAR_68(VAR_18) + '/users')\n", "VAR_36 = re.findall('string', VAR_35.text, re.X)\n", "VAR_38 = {}\n", "for VAR_46 in VAR_36:\n", "VAR_60, VAR_61, VAR_57, VAR_54 = VAR_46\n", "return VAR_38\n", "VAR_57 = int(VAR_57)...
[ "def get_users(contest_id):...\n", "\"\"\"docstring\"\"\"\n", "r = admin_req('contest/' + str(contest_id) + '/users')\n", "groups = re.findall(\n \"\"\"\n <tr> \\\\s*\n <td> \\\\s* (.*) \\\\s* </td> \\\\s*\n <td> \\\\s* (.*) \\\\s* </td> \\\\s*\n <td><a\\\\s+href=\"./user/(\\\\d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'" ]
[ "def FUNC_26(VAR_3):...\n", "VAR_0, VAR_10 = FUNC_0()\n", "VAR_18 = \"SELECT EXISTS( SELECT 1 FROM {} WHERE name='{}')\".format(CFG(\n 'poll_table_name'), VAR_3)\n", "VAR_19 = FUNC_3(VAR_10, VAR_18)\n", "VAR_0.close()\n", "return VAR_19\n" ]
[ "def checkPollExists(poll_name):...\n", "conn, c = connectDB()\n", "req = \"SELECT EXISTS( SELECT 1 FROM {} WHERE name='{}')\".format(CFG(\n 'poll_table_name'), poll_name)\n", "tmp = queryOne(c, req)\n", "conn.close()\n", "return tmp\n" ]
[ 0, 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_20(self):...\n", "self.run_test_case(self.scenario.delete_load_balancer(), max_retries=5)\n" ]
[ "def test_z_delete_load_balancer(self):...\n", "self.run_test_case(self.scenario.delete_load_balancer(), max_retries=5)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_7(self):...\n", "self.compilation_ok('string')\n", "self.representation_is(\n \"\"\"\nif (type: control)\n size (type: test)\n :over\n 100K\n discard (type: action)\n\"\"\"\n )\n" ]
[ "def test_bracket_comment(self):...\n", "self.compilation_ok(\n \"\"\"\nif size :over 100K { /* this is a comment\n this is still a comment */ discard /* this is a comment\n */ ;\n}\n\"\"\"\n )\n", "self.representation_is(\n \"\"\"\nif (type: control)\n size (type: test)\n :over\n ...
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_3():...\n", "VAR_7 = VAR_4.read_namespaced_pod(name='busybox', namespace='default')\n", "assert VAR_7.status.phase == 'Running', \"Wrong status for 'busybox' Pod - found {status}\".format(\n status=pod_info.status.phase)\n" ]
[ "def _check_status():...\n", "pod_info = k8s_client.read_namespaced_pod(name='busybox', namespace='default')\n", "assert pod_info.status.phase == 'Running', \"Wrong status for 'busybox' Pod - found {status}\".format(\n status=pod_info.status.phase)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assert'" ]
[ "def __init__(self):...\n", "self.current_x = 0\n", "self.current_y = 0\n" ]
[ "def __init__(self):...\n", "self.current_x = 0\n", "self.current_y = 0\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_36(self):...\n", "VAR_79 = TestCase.mail_scene(VAR_13=self._update_objects, VAR_55=self.\n target_field, VAR_45=self.new_value)\n", "if VAR_79:\n", "from tcms.core.utils.mailto import mailto\n", "VAR_79['context']['user'] = self.request.user\n", "mailto(**mail_context)\n" ]
[ "def _sendmail(self):...\n", "mail_context = TestCase.mail_scene(objects=self._update_objects, field=self\n .target_field, value=self.new_value)\n", "if mail_context:\n", "from tcms.core.utils.mailto import mailto\n", "mail_context['context']['user'] = self.request.user\n", "mailto(**mail_context)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "ImportFrom'", "Assign'", "Expr'" ]
[ "def FUNC_4(self, *VAR_4, **VAR_5):...\n", "for daemon in filter(lambda x: IZMSDaemon.IZMSDaemon in list(zope.interface\n", "daemon.startDaemon()\n", "VAR_11 = self.REQUEST\n", "VAR_11.set('ZMS_THIS', self.getSelf())\n", "VAR_11.set('ZMS_DOCELMNT', self.breadcrumbs_obj_path()[0])\n", "VAR_11.set('ZMS_RO...
[ "def _zmi_page_request(self, *args, **kwargs):...\n", "for daemon in filter(lambda x: IZMSDaemon.IZMSDaemon in list(zope.interface\n", "daemon.startDaemon()\n", "request = self.REQUEST\n", "request.set('ZMS_THIS', self.getSelf())\n", "request.set('ZMS_DOCELMNT', self.breadcrumbs_obj_path()[0])\n", "requ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Condition", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_11(self):...\n", "self.runner.policy.force_local = True\n", "self.runall([HelloTest()])\n", "VAR_15 = self.runner.stats\n", "for VAR_33 in VAR_15.tasks():\n", "self.assertTrue(VAR_33.check.local)\n" ]
[ "def test_force_local_execution(self):...\n", "self.runner.policy.force_local = True\n", "self.runall([HelloTest()])\n", "stats = self.runner.stats\n", "for t in stats.tasks():\n", "self.assertTrue(t.check.local)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "For", "Expr'" ]
[ "def FUNC_0(self, VAR_0):...\n", "VAR_0 = VAR_0.lower()\n", "VAR_1 = self.search_date(VAR_0)\n", "if 'выручка' in VAR_0:\n", "return self.parse_revenue_message(VAR_0, VAR_1)\n", "if 'отчет' in VAR_0 or 'отчёт' in VAR_0:\n", "return self.parse_report_message(VAR_0, VAR_1)\n", "if VAR_0 == \"'\":\n", ...
[ "def parse_message(self, string):...\n", "string = string.lower()\n", "date = self.search_date(string)\n", "if 'выручка' in string:\n", "return self.parse_revenue_message(string, date)\n", "if 'отчет' in string or 'отчёт' in string:\n", "return self.parse_report_message(string, date)\n", "if string ==...
[ 0, 0, 0, 0, 0, 0, 0, 4, 4, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.r_handler.current_user_model\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.r_handler.current_user_model\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "@property...\n", "self.check_broken_symlink()\n", "return os.path.getsize(self.file)\n" ]
[ "@property...\n", "self.check_broken_symlink()\n", "return os.path.getsize(self.file)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Expr'", "Return'" ]
[ "def FUNC_4(VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_20 = enterprise_customer_for_request(VAR_3)\n", "if not VAR_20:\n", "return {}\n", "VAR_21 = configuration_helpers.get_value('PLATFORM_NAME', settings.\n PLATFORM_NAME)\n", "if VAR_20.branding_configuration.logo:\n", "VAR_34 = VAR_20.brandi...
[ "def enterprise_sidebar_context(request):...\n", "\"\"\"docstring\"\"\"\n", "enterprise_customer = enterprise_customer_for_request(request)\n", "if not enterprise_customer:\n", "return {}\n", "platform_name = configuration_helpers.get_value('PLATFORM_NAME', settings.\n PLATFORM_NAME)\n", "if enterpri...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_8(VAR_3, VAR_11):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_11 == 'login':\n", "return external_auth_login(VAR_3)\n", "if VAR_11 == 'register':\n", "return external_auth_register(VAR_3)\n" ]
[ "def _external_auth_intercept(request, mode):...\n", "\"\"\"docstring\"\"\"\n", "if mode == 'login':\n", "return external_auth_login(request)\n", "if mode == 'register':\n", "return external_auth_register(request)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Return'" ]
[ "def FUNC_4(self):...\n", "if len(self.written):\n", "return self.written[0]\n" ]
[ "def getWrittenData(self):...\n", "if len(self.written):\n", "return self.written[0]\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'" ]
[ "def FUNC_2(VAR_0):...\n", "VAR_9 = ['youtube.com', 'play.md', 'vimeo.com']\n", "VAR_7 = bs4.BeautifulSoup(VAR_0, 'lxml')\n", "VAR_10 = VAR_7.find_all('iframe', {'src': True})\n", "for source in VAR_10:\n", "if not any(x in source['src'] for x in VAR_9):\n", "VAR_11 = ['b', 'p', 'i', 'strong', 'em', 'im...
[ "def validate_html(text):...\n", "sites = ['youtube.com', 'play.md', 'vimeo.com']\n", "soup = bs4.BeautifulSoup(text, 'lxml')\n", "sources = soup.find_all('iframe', {'src': True})\n", "for source in sources:\n", "if not any(x in source['src'] for x in sites):\n", "tags = ['b', 'p', 'i', 'strong', 'em', ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "For", "Assign'", "Return'", "Assign'", "Return'" ]
[ "def FUNC_38(self):...\n", "for VAR_46 in self.threads:\n", "VAR_46.join()\n" ]
[ "def join_threads(self):...\n", "for t in self.threads:\n", "t.join()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'" ]
[ "@jwt_required...\n", "\"\"\"docstring\"\"\"\n", "return database_utilities.execute_query(\n f\"delete from users where user_id = '{VAR_1}'\")\n" ]
[ "@jwt_required...\n", "\"\"\"docstring\"\"\"\n", "return database_utilities.execute_query(\n f\"delete from users where user_id = '{user_id}'\")\n" ]
[ 0, 0, 4 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_1(VAR_3):...\n", "if VAR_3 in ('friends', 'all', ' reddit.com'):\n", "return False\n", "return VAR_100(VAR_3) if VAR_3 and VAR_2.match(VAR_3) else None\n", "return None\n" ]
[ "def chksrname(x):...\n", "if x in ('friends', 'all', ' reddit.com'):\n", "return False\n", "return str(x) if x and subreddit_rx.match(x) else None\n", "return None\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'", "Return'" ]
[ "def FUNC_6(self):...\n", "self.parse_args()\n", "self.sanitize_fields()\n", "self.extract_tables()\n", "self.set_optional_columns()\n", "self.build_conditions()\n", "VAR_2 = frappe._dict()\n", "if self.with_childnames:\n", "for t in self.tables:\n", "VAR_2.tables = self.tables[0]\n", "if t != '...
[ "def prepare_args(self):...\n", "self.parse_args()\n", "self.sanitize_fields()\n", "self.extract_tables()\n", "self.set_optional_columns()\n", "self.build_conditions()\n", "args = frappe._dict()\n", "if self.with_childnames:\n", "for t in self.tables:\n", "args.tables = self.tables[0]\n", "if t ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Condition", "For", "Assign'", "Condition", "For", "Expr'", "AugAssign'", "Condition", "Expr'", "Assign'", "Condition", "AugAssign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "A...
[ "@VAR_13.whitelist()...\n", "FUNC_2(VAR_1, VAR_2, VAR_3, VAR_0=searchfield, VAR_5=page_length, VAR_4=filters\n )\n", "VAR_13.response['results'] = FUNC_4(VAR_13.response['values'])\n" ]
[ "@frappe.whitelist()...\n", "search_widget(doctype, txt, query, searchfield=searchfield, page_length=\n page_length, filters=filters)\n", "frappe.response['results'] = build_for_autosuggest(frappe.response['values'])\n" ]
[ 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'" ]
[ "def FUNC_3(self, VAR_11, VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "if self._path is None:\n", "self._path = self.floorplan.getShortestPath(self.map_pos, Point(VAR_11,\n VAR_12, 0))\n", "if self.goToPosition(self._path[0].x, self._path[0].y):\n", "self._logger.info('Arrived at waypoint ' + str((self....
[ "def takePathToDest(self, x, y):...\n", "\"\"\"docstring\"\"\"\n", "if self._path is None:\n", "self._path = self.floorplan.getShortestPath(self.map_pos, Point(x, y, 0))\n", "if self.goToPosition(self._path[0].x, self._path[0].y):\n", "self._logger.info('Arrived at waypoint ' + str((self._path[0].x, self....
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "Return'", "Expr'", "Return'" ]
[ "def __init__(self, VAR_0):...\n", "self.conn = VAR_0\n" ]
[ "def __init__(self, conn):...\n", "self.conn = conn\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "from modules import sql\n", "def __init__(self, VAR_0):...\n", "self.conn = VAR_0\n", "def FUNC_0(self, VAR_1):...\n", "VAR_4 = 'string' % (VAR_1, VAR_1, VAR_1)\n", "VAR_5 = sql.queryDB(self.conn, VAR_4)\n", "return VAR_5\n" ]
[ "from modules import sql\n", "def __init__(self, conn):...\n", "self.conn = conn\n", "def getAllPosts(self, userid):...\n", "sqlText = (\n 'select users.name,post.comment,post.postid,(select Count(*) from post_like where post.postid = post_like.postid) as like, (select Coun...
[ 0, 0, 0, 0, 4, 4, 0 ]
[ "ImportFrom'", "FunctionDef'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_31(self, VAR_17, VAR_15):...\n", "VAR_28 = FileManager()\n", "VAR_29 = ImageManager()\n", "for file_col in VAR_17.files:\n", "if self.is_file(file_col):\n", "for file_col in VAR_17.files:\n", "VAR_28.save_file(VAR_17.files[file_col], getattr(VAR_15, file_col))\n", "if self.is_image(file_col)...
[ "def _add_files(self, this_request, item):...\n", "fm = FileManager()\n", "im = ImageManager()\n", "for file_col in this_request.files:\n", "if self.is_file(file_col):\n", "for file_col in this_request.files:\n", "fm.save_file(this_request.files[file_col], getattr(item, file_col))\n", "if self.is_imag...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Condition", "For", "Expr'", "Condition", "Expr'" ]
[ "import collections.abc\n", "__version__ = '0.3'\n", "VAR_0 = object()\n", "VAR_1 = '.'\n", "def FUNC_0(VAR_2, VAR_3, **VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_1(VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_4(**VAR_4):...\n", "return VAR_5()\n" ]
[ "import collections.abc\n", "__version__ = '0.3'\n", "MISSING = object()\n", "DEFAULT_PATH_SEPARATOR = '.'\n", "def raise_on_missing(sep, visited, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "def create_on_missing(factory):...\n", "\"\"\"docstring\"\"\"\n", "def on_missing(**kwargs):...\n", "retu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "FunctionDef'", "Docstring", "FunctionDef'", "Return'" ]
[ "def FUNC_12(self, VAR_11):...\n", "self.get(VAR_11.parentfield).remove(VAR_11)\n" ]
[ "def remove(self, doc):...\n", "self.get(doc.parentfield).remove(doc)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0(VAR_1, VAR_2=None):...\n", "return CLASS_3(VAR_1, VAR_2=_raise)\n" ]
[ "def r(item, _raise=None):...\n", "return Roamer(item, _raise=_raise)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(**VAR_1):...\n", "VAR_14 = CLASS_2.objects\n", "if 'academic_year' in VAR_1:\n", "VAR_6 = VAR_1['academic_year']\n", "if 'child_leaf' in VAR_1:\n", "VAR_14 = VAR_14.filter(Q(parent__academic_year=academic_year) | Q(\n child_branch__academic_year=academic_year) | Q(\n child_leaf__academic...
[ "def search(**kwargs):...\n", "queryset = GroupElementYear.objects\n", "if 'academic_year' in kwargs:\n", "academic_year = kwargs['academic_year']\n", "if 'child_leaf' in kwargs:\n", "queryset = queryset.filter(Q(parent__academic_year=academic_year) | Q(\n child_branch__academic_year=academic_year) | Q...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_1(VAR_1):...\n", "return CLASS_3(VAR_1, VAR_2=True)\n" ]
[ "def r_strict(item):...\n", "return Roamer(item, _raise=True)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_2(self, VAR_6):...\n", "VAR_15 = VAR_6.save(commit=False)\n", "VAR_15.author = self.request.user\n", "VAR_15.save()\n", "return super().form_valid(VAR_6)\n" ]
[ "def form_valid(self, form):...\n", "a = form.save(commit=False)\n", "a.author = self.request.user\n", "a.save()\n", "return super().form_valid(form)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_43(VAR_127, VAR_96):...\n", "for VAR_121 in VAR_127['events']:\n", "if all([(match in VAR_121) for match in VAR_96]):\n", "return None\n", "return VAR_121\n" ]
[ "def get_event(events, matches):...\n", "for e in events['events']:\n", "if all([(match in e) for match in matches]):\n", "return None\n", "return e\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "For", "Return'", "Return'" ]
[ "@auth.route('/test')...\n", "if current_user.is_authenticated:\n", "return str(current_user.username) + str(current_user.user_id)\n", "return 'not logged in ' + str(current_user.is_authenticated)\n" ]
[ "@auth.route('/test')...\n", "if current_user.is_authenticated:\n", "return str(current_user.username) + str(current_user.user_id)\n", "return 'not logged in ' + str(current_user.is_authenticated)\n" ]
[ 6, 6, 6, 6 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "def FUNC_27(VAR_40, VAR_41):...\n", "VAR_71 = os.path.dirname(VAR_40)\n", "if not os.path.isdir(VAR_71):\n", "os.mkdir(VAR_71)\n", "VAR_72 = open(VAR_40, 'w')\n", "VAR_72.write(VAR_41)\n", "VAR_72.close()\n" ]
[ "def save_keywords(filename, xml):...\n", "tmp_dir = os.path.dirname(filename)\n", "if not os.path.isdir(tmp_dir):\n", "os.mkdir(tmp_dir)\n", "file_desc = open(filename, 'w')\n", "file_desc.write(xml)\n", "file_desc.close()\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_5(self):...\n", "for VAR_30 in VAR_7(len(self.attkeys)):\n", "if self.attkeys[VAR_30]:\n", "if self._['alert']:\n", "VAR_8 = self.sql_session.query(TempFileList)\n", "return False\n", "if not self._['title']:\n", "VAR_8 = VAR_8.filter(TempFileList.key == self.attkeys[VAR_30])\n", "self._['...
[ "def check_ann(self):...\n", "for i in xrange(len(self.attkeys)):\n", "if self.attkeys[i]:\n", "if self._['alert']:\n", "q = self.sql_session.query(TempFileList)\n", "return False\n", "if not self._['title']:\n", "q = q.filter(TempFileList.key == self.attkeys[i])\n", "self._['alert'] = '標題不能空白'\n", ...
[ 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", "Condition", "Condition", "Assign'", "Return'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Return'", "Return'", "Expr'" ]
[ "def FUNC_13(self, VAR_7):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def _get_relation_attribute_value(self, attribute):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def FUNC_1(self):...\n", "VAR_9 = (\n \"select count(*) from users where name='%s' and password='%s';\"\n % (self.name, self.password))\n", "VAR_10 = sql.queryDB(self.conn, VAR_9)\n", "VAR_11 = VAR_10[0][0]\n", "if VAR_11 == 0:\n", "self.clean()\n", "return True\n", "return Fal...
[ "def userLogin(self):...\n", "sqlName = (\n \"select count(*) from users where name='%s' and password='%s';\"\n % (self.name, self.password))\n", "checkName = sql.queryDB(self.conn, sqlName)\n", "result = checkName[0][0]\n", "if result == 0:\n", "self.clean()\n", "return True\n", ...
[ 0, 4, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Return'", "Return'" ]
[ "def FUNC_37(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.sos_path:\n", "if self.config['need_sudo'] or self.config['become_root']:\n", "if self.stderr.read():\n", "self.logger.info('Retrieving sosreport from %s' % self.address)\n", "self.make_archive_readable(self.sos_path)\n", "self.log_error('...
[ "def retrieve_sosreport(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.sos_path:\n", "if self.config['need_sudo'] or self.config['become_root']:\n", "if self.stderr.read():\n", "self.logger.info('Retrieving sosreport from %s' % self.address)\n", "self.make_archive_readable(self.sos_path)\n", "self....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Return'", "Expr'", "Assign'", "Expr'", "Condition", "Return'", "Expr'", "Expr'", "Assign'", "Return'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = self.config.get(self.section, 'syslog_socket')\n", "if not VAR_5:\n", "VAR_5 = None\n", "return VAR_5\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "res = self.config.get(self.section, 'syslog_socket')\n", "if not res:\n", "res = None\n", "return res\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_21(VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "return json.load(VAR_0)\n", "VAR_0.seek(0)\n", "import yaml\n", "return yaml.load(VAR_0)\n" ]
[ "def _load_configfile(configpath):...\n", "\"\"\"docstring\"\"\"\n", "return json.load(f)\n", "f.seek(0)\n", "import yaml\n", "return yaml.load(f)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'", "Expr'", "Import'", "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'" ...
[ "def FUNC_11(self):...\n", "VAR_22 = 'string'\n", "self.cur.execute(VAR_22)\n", "self.conn.commit()\n", "VAR_22 = 'string'\n", "self.cur.execute(VAR_22)\n", "self.conn.commit()\n", "VAR_22 = 'string'\n", "self.cur.execute(VAR_22)\n", "self.conn.commit()\n", "VAR_27 = {}\n", "for VAR_30 in self...
[ "def get_reference_feedback(self):...\n", "sql = (\n 'CREATE OR REPLACE VIEW feedback_reference_result AS SELECT article_hash, is_relevant, feedback_label, COUNT(*) AS count FROM feedback_reference GROUP BY article_hash, is_relevant, feedback_label'\n )\n", "self.cur.execute(sql)\n", "self.conn.commit()...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "Condition", "Docstring" ]
[ "def FUNC_31(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "return VAR_21\n" ]
[ "def realpath(self, path):...\n", "\"\"\"docstring\"\"\"\n", "return path\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_6(self, VAR_11='', VAR_6=None):...\n", "VAR_5 = self.session.query(self.obj)\n", "VAR_5 = self._get_base_query(VAR_5=query, VAR_6=filters)\n", "VAR_25 = VAR_5.all()\n", "VAR_27 = GroupByDateYear(VAR_11, 'Group by Year')\n", "return VAR_27.apply(VAR_25)\n" ]
[ "def query_year_group(self, group_by='', filters=None):...\n", "query = self.session.query(self.obj)\n", "query = self._get_base_query(query=query, filters=filters)\n", "query_result = query.all()\n", "group_year = GroupByDateYear(group_by, 'Group by Year')\n", "return group_year.apply(query_result)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "import os\n", "import sys\n", "import unittest\n", "from coalib.misc.Shell import escape_path_argument, prepare_string_argument, run_interactive_shell_command, run_shell_command\n", "def FUNC_0(self):...\n", "VAR_1 = 'sh'\n", "self.assertEqual(escape_path_argument('/home/usr/a-file', VAR_1),\n '/hom...
[ "import os\n", "import sys\n", "import unittest\n", "from coalib.misc.Shell import escape_path_argument, prepare_string_argument, run_interactive_shell_command, run_shell_command\n", "def test_escape_path_argument_sh(self):...\n", "_type = 'sh'\n", "self.assertEqual(escape_path_argument('/home/usr/a-fil...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ]
[ "Import'", "Import'", "Import'", "ImportFrom'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "E...
[ "from osv import fields, osv\n", "from tools.translate import _\n", "VAR_0 = 'product.product'\n", "def FUNC_0(self, VAR_1, VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_17 = self.pool.get('product.product').browse(VAR_1, VAR_2, VAR_3, VAR_4\n...
[ "from osv import fields, osv\n", "from tools.translate import _\n", "_inherit = 'product.product'\n", "def get_product_accounts(self, cr, uid, product_id, context=None):...\n", "\"\"\"docstring\"\"\"\n", "if context is None:\n", "context = {}\n", "product_obj = self.pool.get('product.product').browse(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_1 = 'cmd'\n", "self.assertEqual(escape_path_argument('C:\\\\Windows\\\\has-a-weird-shell.txt',\n VAR_1), '\"C:\\\\Windows\\\\has-a-weird-shell.txt\"')\n", "self.assertEqual(escape_path_argument('C:\\\\Windows\\\\lolrofl\\\\dirs\\\\', VAR_1\n ), '\"C:\\\\Windows\\\\lolrofl\...
[ "def test_escape_path_argument_cmd(self):...\n", "_type = 'cmd'\n", "self.assertEqual(escape_path_argument('C:\\\\Windows\\\\has-a-weird-shell.txt',\n _type), '\"C:\\\\Windows\\\\has-a-weird-shell.txt\"')\n", "self.assertEqual(escape_path_argument('C:\\\\Windows\\\\lolrofl\\\\dirs\\\\', _type\n ), '\"C:...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@handled_slot(bool)...\n", "if VAR_4:\n", "for action in self.lock_actions:\n", "for action in reversed(self.lock_actions):\n", "if not action.isChecked():\n", "if all([action.isChecked() for action in self.lock_actions]):\n", "action.trigger()\n", "action.trigger()\n", "[action.setEnabled(False) f...
[ "@handled_slot(bool)...\n", "if checked:\n", "for action in self.lock_actions:\n", "for action in reversed(self.lock_actions):\n", "if not action.isChecked():\n", "if all([action.isChecked() for action in self.lock_actions]):\n", "action.trigger()\n", "action.trigger()\n", "[action.setEnabled(False)...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "For", "For", "Condition", "For", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe.utils import getdate, add_days, today, cint\n", "from frappe import _\n", "def FUNC_0(VAR_0=None):...\n", "VAR_1 = FUNC_1()\n", "VAR_2 = FUNC_2(VAR_0)\n", "return VAR_1, VAR_2\n" ]
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe.utils import getdate, add_days, today, cint\n", "from frappe import _\n", "def execute(filters=None):...\n", "columns = get_columns()\n", "data = get_data(filters)\n", "return columns, data\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_53):...\n", "if VAR_53:\n", "self.error()\n", "VAR_23 = _force_utf8(VAR_53)\n", "return self.error(errors.USER_DOESNT_EXIST)\n", "return Account._by_name(VAR_23)\n" ]
[ "def run(self, username):...\n", "if username:\n", "self.error()\n", "name = _force_utf8(username)\n", "return self.error(errors.USER_DOESNT_EXIST)\n", "return Account._by_name(name)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_3(self):...\n", "VAR_6 = mock.Mock()\n", "VAR_6.nsxlib_config = mock.Mock()\n", "VAR_6.nsxlib_config.retries = 100\n", "VAR_6.nsxlib_config.insecure = True\n", "VAR_6.nsxlib_config.ca_file = None\n", "VAR_6.nsxlib_config.http_timeout = 99\n", "VAR_6.nsxlib_config.conn_idle_timeout = 39\n", ...
[ "def test_new_connection_with_client_auth(self):...\n", "mock_api = mock.Mock()\n", "mock_api.nsxlib_config = mock.Mock()\n", "mock_api.nsxlib_config.retries = 100\n", "mock_api.nsxlib_config.insecure = True\n", "mock_api.nsxlib_config.ca_file = None\n", "mock_api.nsxlib_config.http_timeout = 99\n", "...
[ 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'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_33(VAR_57, VAR_22):...\n", "if not len(VAR_57):\n", "VAR_56.append('/%s' % ('/'.join(VAR_22),))\n", "if VAR_57[0] == '.':\n", "FUNC_33(VAR_57[1:], VAR_22)\n", "if VAR_57[0] == '..':\n", "FUNC_33(VAR_57[1:], VAR_22[:-1])\n", "VAR_65 = [x[VAR_1] for x in self.get_path('/'.join(VAR_22))]\n", ...
[ "def foo(p, cwd):...\n", "if not len(p):\n", "found.append('/%s' % ('/'.join(cwd),))\n", "if p[0] == '.':\n", "foo(p[1:], cwd)\n", "if p[0] == '..':\n", "foo(p[1:], cwd[:-1])\n", "names = [x[A_NAME] for x in self.get_path('/'.join(cwd))]\n", "matches = [x for x in names if fnmatch.fnmatchcase(x, p[0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", "For", "Expr'" ]
[ "def FUNC_24():...\n", "" ]
[ "def connect_timeout():...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@property...\n", "return self._params\n" ]
[ "@property...\n", "return self._params\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_30(self):...\n", "self.assertEqual(self.cursor.rowcount, -1)\n", "self.cursor.execute('create table t1(i int)')\n", "VAR_26 = 4\n", "for i in range(VAR_26):\n", "self.cursor.execute('insert into t1 values (?)', i)\n", "self.cursor.execute('delete from t1')\n", "self.assertEqual(self.cursor.r...
[ "def test_rowcount_delete(self):...\n", "self.assertEqual(self.cursor.rowcount, -1)\n", "self.cursor.execute('create table t1(i int)')\n", "count = 4\n", "for i in range(count):\n", "self.cursor.execute('insert into t1 values (?)', i)\n", "self.cursor.execute('delete from t1')\n", "self.assertEqual(se...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "For", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_14(self, VAR_2, VAR_3, VAR_4, *VAR_5):...\n", "self.write_data({'type': 'market_bid', 'event': VAR_5[0]})\n" ]
[ "def on_market_bid(self, subject, changetype, objectID, *args):...\n", "self.write_data({'type': 'market_bid', 'event': args[0]})\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "logging.debug('Getting cli arguments')\n", "VAR_0 = argparse.ArgumentParser(description=\n 'A benchmark for genomics routines in Python.')\n", "VAR_1 = VAR_0.add_subparsers(title='commands', dest='command')\n", "VAR_1.required = True\n", "VAR_2 = VAR_...
[ "def get_cli_arguments():...\n", "\"\"\"docstring\"\"\"\n", "logging.debug('Getting cli arguments')\n", "parser = argparse.ArgumentParser(description=\n 'A benchmark for genomics routines in Python.')\n", "subparser = parser.add_subparsers(title='commands', dest='command')\n", "subparser.required = Tru...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "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(VAR_14, VAR_13='{}'):...\n", "VAR_49 = VAR_13[0]\n", "VAR_50 = VAR_13[-1]\n", "VAR_34 = VAR_14.index(VAR_49)\n", "VAR_14 = VAR_14[VAR_34:]\n", "VAR_51 = 0\n", "for VAR_94, letter in enumerate(VAR_14):\n", "if letter == VAR_49:\n", "VAR_14 = VAR_14[:VAR_34 + 1]\n", "VAR_51 = VAR_51 + 1...
[ "def sanitize_bracket(bracket, symbol='{}'):...\n", "opn = symbol[0]\n", "close = symbol[-1]\n", "index = bracket.index(opn)\n", "bracket = bracket[index:]\n", "count = 0\n", "for i, letter in enumerate(bracket):\n", "if letter == opn:\n", "bracket = bracket[:index + 1]\n", "count = count + 1\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'" ]