lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_9(VAR_26):...\n", "VAR_26 = self.format_command_name(VAR_26)\n", "VAR_26 = f'• {VAR_26}'\n", "return VAR_26\n" ]
[ "def sub_cmd_map(c):...\n", "c = self.format_command_name(c)\n", "c = f'• {c}'\n", "return c\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_2():...\n", "\"\"\"docstring\"\"\"\n", "assert os.path.exists('/opt/tljh/user/bin/jupyter-labhub')\n" ]
[ "def test_labextensions():...\n", "\"\"\"docstring\"\"\"\n", "assert os.path.exists('/opt/tljh/user/bin/jupyter-labhub')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'" ]
[ "def FUNC_0(self):...\n", "return hpcommon.HP3PARCommon(self.configuration)\n" ]
[ "def _init_common(self):...\n", "return hpcommon.HP3PARCommon(self.configuration)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_1, VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "self.pid = VAR_1\n", "self.comp_name = VAR_2\n" ]
[ "def __init__(self, pid, comp_name):...\n", "\"\"\"docstring\"\"\"\n", "self.pid = pid\n", "self.comp_name = comp_name\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'" ]
[ "def FUNC_0(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "CLASS_0.mksetup()(VAR_1)\n", "CLASS_1.mksetup()(VAR_1)\n" ]
[ "def setup(bot):...\n", "\"\"\"docstring\"\"\"\n", "HelpCog.mksetup()(bot)\n", "ActivityChangerCog.mksetup()(bot)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def FUNC_4(VAR_1):...\n", "VAR_6 = sqlite3.connect('database.db')\n", "VAR_7 = VAR_6.cursor()\n", "return VAR_7.execute(\n \"SELECT COUNT(*) FROM ChallengeRankings WHERE SeriesTitle = '\" +\n getTitle(VAR_1) + \"' AND Date <= '\" + FUNC_6(VAR_1) + \"'\").fetchone()[0]\n" ]
[ "def getGameCountInSeriesSoFar(submission):...\n", "database = sqlite3.connect('database.db')\n", "cursor = database.cursor()\n", "return cursor.execute(\n \"SELECT COUNT(*) FROM ChallengeRankings WHERE SeriesTitle = '\" +\n getTitle(submission) + \"' AND Date <= '\" +\n getSubmissionDateFromDatabase...
[ 0, 0, 0, 4 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_19):...\n", "\"\"\"docstring\"\"\"\n", "return '' if VAR_19 is None else VAR_19\n" ]
[ "def run(self, value):...\n", "\"\"\"docstring\"\"\"\n", "return '' if value is None else value\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_4(self, VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "self.db.execute('PRAGMA cache_size = 20000; ')\n", "VAR_26 = 'string' % VAR_10\n", "self.db.execute(VAR_26)\n", "self.db.commit()\n" ]
[ "def create_tables(self, database):...\n", "\"\"\"docstring\"\"\"\n", "self.db.execute('PRAGMA cache_size = 20000; ')\n", "sqlstr = (\n \"\"\"CREATE TABLE IF NOT EXISTS %s.phrases\n (id INTEGER PRIMARY KEY AUTOINCREMENT,\n mlen INTEGER, clen INTEGER,\n ...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_3(VAR_6, VAR_8=False):...\n", "VAR_10 = get_executing_test()\n", "VAR_10.spynner_browser = spynner.Browser(debug_level=spynner.DEBUG)\n", "if VAR_8:\n", "VAR_10.spynner_browser.show(maximized=False)\n", "VAR_10.spynner_browser.load(VAR_6)\n", "while VAR_10.spynner_browser:\n", "VAR_10.spynne...
[ "def start_spynner_browser(url, visible=False):...\n", "test = get_executing_test()\n", "test.spynner_browser = spynner.Browser(debug_level=spynner.DEBUG)\n", "if visible:\n", "test.spynner_browser.show(maximized=False)\n", "test.spynner_browser.load(url)\n", "while test.spynner_browser:\n", "test.spy...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_12(self, VAR_19, VAR_20=lambda VAR_21: True, **VAR_4):...\n", "if self.closed:\n", "VAR_33 = {'msg': None}\n", "def FUNC_27(VAR_21):...\n", "VAR_33['msg'] = VAR_21\n", "return VAR_21.type == 'event' and VAR_21.event == VAR_19 and VAR_20(VAR_21)\n" ]
[ "def get_awaiter_for_event(self, event, condition=lambda msg: True, **kwargs):...\n", "if self.closed:\n", "result = {'msg': None}\n", "def match(msg):...\n", "result['msg'] = msg\n", "return msg.type == 'event' and msg.event == event and condition(msg)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_13(VAR_7):...\n", "VAR_20 = {'MANPAGER': 'cat', 'COLUMNS': '80'}\n", "VAR_21 = 'man 2 {}'.format(VAR_7)\n", "VAR_22 = subprocess.Popen(VAR_21.split(), VAR_16=subprocess.PIPE, env=\n man_environment_variables)\n", "VAR_16, VAR_17 = VAR_22.communicate()\n", "VAR_16 = VAR_16.decode()\n", "VAR_...
[ "def print_man_page_info(syscall_name):...\n", "man_environment_variables = {'MANPAGER': 'cat', 'COLUMNS': '80'}\n", "command = 'man 2 {}'.format(syscall_name)\n", "process = subprocess.Popen(command.split(), stdout=subprocess.PIPE, env=\n man_environment_variables)\n", "stdout, _ = process.communicate()...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "AugAssign'", "Expr'", "AugAssign'" ]
[ "def FUNC_2(VAR_2, VAR_5, VAR_4):...\n", "VAR_8 = VAR_4.connect()\n", "VAR_9 = VAR_8.cursor()\n", "VAR_10 = \"SELECT userId FROM Users WHERE userEmail = '{0}'\".format(VAR_2)\n", "VAR_9.execute(VAR_10)\n", "VAR_11 = VAR_9.fetchone()\n", "VAR_8.commit()\n", "if VAR_11 is None:\n", "return False, None...
[ "def deleteCalendar(username, calendarId, sqlInstance):...\n", "conn = sqlInstance.connect()\n", "cursor = conn.cursor()\n", "userCheckQuery = \"SELECT userId FROM Users WHERE userEmail = '{0}'\".format(\n username)\n", "cursor.execute(userCheckQuery)\n", "userResult = cursor.fetchone()\n", "conn.com...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Condition", "Return'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def __exit__(self, VAR_2, VAR_3, VAR_4):...\n", "if self.conn:\n", "self.conn.close()\n" ]
[ "def __exit__(self, exc_type, exc_val, exc_tb):...\n", "if self.conn:\n", "self.conn.close()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'" ]
[ "def __str__(self):...\n", "return self.get_name()\n" ]
[ "def __str__(self):...\n", "return self.get_name()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "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'" ]
[ "@property...\n", "if not hasattr(self, '_meta'):\n", "self._meta = VAR_54.get_meta(self.doctype)\n", "return self._meta\n" ]
[ "@property...\n", "if not hasattr(self, '_meta'):\n", "self._meta = frappe.get_meta(self.doctype)\n", "return self._meta\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Return'" ]
[ "@VAR_0.inclusion_tag('exercise/_text_stats.html', takes_context=True)...\n", "if not 'instance' in VAR_1:\n", "VAR_13 = VAR_1['instance']\n", "if not 'student_count' in VAR_1:\n", "VAR_1['student_count'] = VAR_13.students.count()\n", "VAR_23 = VAR_1['student_count']\n", "if isinstance(VAR_3, int):\n", ...
[ "@register.inclusion_tag('exercise/_text_stats.html', takes_context=True)...\n", "if not 'instance' in context:\n", "instance = context['instance']\n", "if not 'student_count' in context:\n", "context['student_count'] = instance.students.count()\n", "total = context['student_count']\n", "if isinstance(e...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "@retries(5, delay=0.5, backoff=1.5)...\n", "if VAR_11 == 'POST':\n", "return requests.post(FUNC_2(VAR_7), VAR_9=ToUtf8Json(data), headers=_HEADERS)\n", "if VAR_11 == 'GET':\n", "return requests.get(FUNC_2(VAR_7), headers=_HEADERS)\n" ]
[ "@retries(5, delay=0.5, backoff=1.5)...\n", "if method == 'POST':\n", "return requests.post(_BuildUri(handler), data=ToUtf8Json(data), headers=\n _HEADERS)\n", "if method == 'GET':\n", "return requests.get(_BuildUri(handler), headers=_HEADERS)\n" ]
[ 0, 0, 7, 0, 0 ]
[ "Condition", "Condition", "Return'", "Condition", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._unit_of_measurement\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._unit_of_measurement\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_33(VAR_8, VAR_9, VAR_10):...\n", "return VAR_10 in VAR_8[VAR_9]\n" ]
[ "def has_edge(graph, src, dst):...\n", "return dst in graph[src]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(self, VAR_7):...\n", "VAR_76 = CLASS_6.run(self, VAR_7)\n", "if VAR_76 and not (VAR_101.user_is_loggedin and VAR_76.can_edit(VAR_101.\n", "abort(403, 'forbidden')\n", "return VAR_76\n" ]
[ "def run(self, param):...\n", "meetup = VMeetup.run(self, param)\n", "if meetup and not (c.user_is_loggedin and meetup.can_edit(c.user, c.\n", "abort(403, 'forbidden')\n", "return meetup\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return None\n" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return None\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "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_1(self, VAR_2):...\n", "" ]
[ "def get(self, key):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_13(self, VAR_11):...\n", "\"\"\"docstring\"\"\"\n", "self._attributes['dimensions'] = VAR_11\n" ]
[ "def update_dimensions(self, new_dimensions):...\n", "\"\"\"docstring\"\"\"\n", "self._attributes['dimensions'] = new_dimensions\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'" ]
[ "def FUNC_9(self):...\n", "\"\"\"docstring\"\"\"\n", "self.assertTrue(self.client.login(username='autotest2', password='password'))\n", "VAR_4 = 'autotest'\n", "VAR_2 = '/api/apps'\n", "VAR_5 = {'id': VAR_4}\n", "VAR_3 = self.client.post(VAR_2, json.dumps(VAR_5), content_type=\n 'application/json')\n...
[ "def test_admin_can_see_other_apps(self):...\n", "\"\"\"docstring\"\"\"\n", "self.assertTrue(self.client.login(username='autotest2', password='password'))\n", "app_id = 'autotest'\n", "url = '/api/apps'\n", "body = {'id': app_id}\n", "response = self.client.post(url, json.dumps(body), content_type=\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_9(VAR_8):...\n", "VAR_10 = sqlite3.connect(VAR_1)\n", "VAR_11 = VAR_10.cursor()\n", "VAR_11.execute('SELECT secure_name FROM Notes WHERE uuid_filename = ?', [VAR_8]\n )\n", "VAR_17 = VAR_11.fetchone()\n", "VAR_10.close()\n", "return VAR_17[0]\n" ]
[ "def get_secure_filename(file_id):...\n", "connection = sqlite3.connect(DATABASE_PATH)\n", "cursor = connection.cursor()\n", "cursor.execute('SELECT secure_name FROM Notes WHERE uuid_filename = ?', [\n file_id])\n", "row = cursor.fetchone()\n", "connection.close()\n", "return row[0]\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def __init__(self, VAR_7, VAR_8, VAR_6, VAR_5, VAR_9):...\n", "self._binary_util = VAR_7\n", "self._relpath = VAR_8\n", "self._version = self._normalize_version(VAR_6)\n", "self.package_manager = self.validate_package_manager(VAR_5=package_manager)\n", "self.yarnpkg_version = self._normalize_version(VAR_...
[ "def __init__(self, binary_util, relpath, version, package_manager,...\n", "self._binary_util = binary_util\n", "self._relpath = relpath\n", "self._version = self._normalize_version(version)\n", "self.package_manager = self.validate_package_manager(package_manager=\n package_manager)\n", "self.yarnpkg_...
[ 0, 0, 2, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = logging.getLogger(__name__)\n", "VAR_7.setLevel(logging.DEBUG)\n", "VAR_7.debug('Started run funtion')\n", "while not self.end:\n", "VAR_10 = []\n", "VAR_11 = []\n", "VAR_12 = {}\n", "while not self.job_queue.empty():\n", "VAR_13 = se...
[ "def run(self):...\n", "\"\"\"docstring\"\"\"\n", "logger = logging.getLogger(__name__)\n", "logger.setLevel(logging.DEBUG)\n", "logger.debug('Started run funtion')\n", "while not self.end:\n", "comp_jobs = []\n", "jobs = []\n", "already_handleled = {}\n", "while not self.job_queue.empty():\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 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Condition", "For", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", ...
[ "def FUNC_41():...\n", "self.listenTCP(VAR_22, VAR_23)\n", "reactor.run()\n" ]
[ "def _start():...\n", "self.listenTCP(port, host)\n", "reactor.run()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_1(self):...\n", "super(CLASS_0, self).setUp()\n", "self.mock(net, 'url_open', self._url_open)\n", "self.mock(net, 'url_read_json', self._url_read_json)\n", "self.mock(net, 'sleep_before_retry', lambda *VAR_10: None)\n", "self._lock = threading.Lock()\n", "self._requests = []\n" ]
[ "def setUp(self):...\n", "super(TestCase, self).setUp()\n", "self.mock(net, 'url_open', self._url_open)\n", "self.mock(net, 'url_read_json', self._url_read_json)\n", "self.mock(net, 'sleep_before_retry', lambda *_: None)\n", "self._lock = threading.Lock()\n", "self._requests = []\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'" ]
[ "@classmethod...\n", "VAR_7 = request.json.get('Note', '')\n", "VAR_16 = VAR_2.__name__\n", "VAR_17 = db.delete_object(VAR_16, VAR_7, VAR_5)\n", "return FUNC_0('Slettet {0}: {1}'.format(VAR_16, VAR_5)), 200\n" ]
[ "@classmethod...\n", "note = request.json.get('Note', '')\n", "class_name = cls.__name__\n", "result = db.delete_object(class_name, note, uuid)\n", "return j('Slettet {0}: {1}'.format(class_name, uuid)), 200\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_17(self, VAR_6):...\n", "if VAR_6['host'] != 'localhost' and not self.run_on_localhost(VAR_6):\n", "self.logger.debug(\"Stopping remote component '%s' on host '%s'\" % (VAR_6[\n 'name'], VAR_6['host']))\n", "VAR_9 = FUNC_6(self.session, VAR_6['name'])\n", "self.stop_remote_component(VAR_6['name...
[ "def stop_component(self, comp):...\n", "if comp['host'] != 'localhost' and not self.run_on_localhost(comp):\n", "self.logger.debug(\"Stopping remote component '%s' on host '%s'\" % (comp[\n 'name'], comp['host']))\n", "window = find_window(self.session, comp['name'])\n", "self.stop_remote_component(comp...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_2(VAR_3, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_9 = re.match('[0-9]+\\\\.[0-9]+', platform.mac_ver()[0]).group(0)\n", "return not (VAR_9 < str(VAR_3) or VAR_4 is not None and VAR_9 > str(VAR_4))\n" ]
[ "def os_supported(min_v, max_v):...\n", "\"\"\"docstring\"\"\"\n", "os_version = re.match('[0-9]+\\\\.[0-9]+', platform.mac_ver()[0]).group(0)\n", "return not (os_version < str(min_v) or max_v is not None and os_version >\n str(max_v))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "if not VAR_101.user_is_sponsor:\n", "abort(403, 'forbidden')\n" ]
[ "def run(self):...\n", "if not c.user_is_sponsor:\n", "abort(403, 'forbidden')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'" ]
[ "def FUNC_2(VAR_7):...\n", "if isinstance(VAR_7, list):\n", "VAR_15, VAR_16 = zip(*VAR_7)\n", "return VAR_5 >= VAR_7\n", "for i, VAR_21 in enumerate(VAR_15):\n", "if VAR_2:\n", "return True\n", "VAR_17 = VAR_6.get(VAR_21, 0)\n", "if VAR_6.get(VAR_21, 0) < VAR_16[i]:\n", "VAR_18 = VAR_16[i]\n", "...
[ "def pass_limit(bound):...\n", "if isinstance(bound, list):\n", "ds, ls = zip(*bound)\n", "return points >= bound\n", "for i, d in enumerate(ds):\n", "if pad_points:\n", "return True\n", "p = d_points.get(d, 0)\n", "if d_points.get(d, 0) < ls[i]:\n", "l = ls[i]\n", "return False\n", "if p < l:...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "For", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Return'", "Condition", "For", "Assign'", "Assign'", "Condition", "AugAssign'", "AugAssign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_14(self, VAR_4, VAR_33, VAR_18=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_18 is not None:\n", "self.flags.ignore_permissions = VAR_18\n", "if isinstance(VAR_4, dict):\n", "VAR_4 = [VAR_4]\n", "for VAR_34 in VAR_4:\n", "if isinstance(VAR_34, string_types):\n", "VAR_33.append(VAR_34)\n...
[ "def build_filter_conditions(self, filters, conditions, ignore_permissions=None...\n", "\"\"\"docstring\"\"\"\n", "if ignore_permissions is not None:\n", "self.flags.ignore_permissions = ignore_permissions\n", "if isinstance(filters, dict):\n", "filters = [filters]\n", "for f in filters:\n", "if isins...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Assign'", "For", "Condition", "Expr'", "Expr'" ]
[ "import os\n", "import re\n", "import shutil\n", "from subprocess import check_call, CalledProcessError, DEVNULL\n", "import tempfile\n", "from coalib.bears.Bear import Bear\n", "from coalib.misc.Decorators import enforce_signature\n", "from coalib.misc.Shell import escape_path_argument, run_shell_com...
[ "import os\n", "import re\n", "import shutil\n", "from subprocess import check_call, CalledProcessError, DEVNULL\n", "import tempfile\n", "from coalib.bears.Bear import Bear\n", "from coalib.misc.Decorators import enforce_signature\n", "from coalib.misc.Shell import escape_path_argument, run_shell_com...
[ 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Ass...
[ "def FUNC_7(self):...\n", "VAR_7 = BokChoyTestSuite('', default_store='invalid')\n", "VAR_1 = 'tests'\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name, VAR_2='invalid')\n )\n" ]
[ "def test_invalid_default_store(self):...\n", "suite = BokChoyTestSuite('', default_store='invalid')\n", "name = 'tests'\n", "self.assertEqual(suite.cmd, self._expected_command(name=name, store='invalid'))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "from django.conf.urls import url\n", "from realpal.apps.chat.views import ChatRoomView\n", "from realpal.apps.chat.api import MessageCreateAPIView\n", "VAR_0 = [url('^$', ChatRoomView.as_view(), name='chat-room'), url(\n '^(?P<room_id>[0-9]+)/', ChatRoomView.as_view(), name='chat-room'), url\n ('^file/...
[ "from django.conf.urls import url\n", "from realpal.apps.chat.views import ChatRoomView\n", "from realpal.apps.chat.api import MessageCreateAPIView\n", "urlpatterns = [url('^$', ChatRoomView.as_view(), name='chat-room'), url(\n '^(?P<room_id>[0-9]+)/', ChatRoomView.as_view(), name='chat-room'), url\n ('...
[ 0, 0, 6, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'" ]
[ "def FUNC_2(VAR_4, VAR_10, VAR_11, VAR_12=None, VAR_9=None):...\n", "VAR_16 = collect_config.collect_config(VAR_4, VAR_9)\n", "VAR_23 = VAR_10.split('.')\n", "for VAR_10 in VAR_23:\n", "value_types.ensure_type(str(VAR_16), VAR_11)\n", "VAR_16 = VAR_16[VAR_10]\n", "if VAR_12 is not None:\n", "print(str...
[ "def print_key(config_path, key, type_name, default=None, fallback_metadata=None...\n", "config = collect_config.collect_config(config_path, fallback_metadata)\n", "keys = key.split('.')\n", "for key in keys:\n", "value_types.ensure_type(str(config), type_name)\n", "config = config[key]\n", "if default ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Expr'", "Assign'", "Condition", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_11(self, VAR_7=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_18 = set()\n", "if self.benchmark and (VAR_7 is None or self.benchmark in VAR_7):\n", "if not self.benchmark.exists:\n", "for VAR_28, VAR_27 in zip(self.output, self.rule.output):\n", "VAR_18.add(self.benchmark)\n", "if VAR_7 is No...
[ "def missing_output(self, requested=None):...\n", "\"\"\"docstring\"\"\"\n", "files = set()\n", "if self.benchmark and (requested is None or self.benchmark in requested):\n", "if not self.benchmark.exists:\n", "for f, f_ in zip(self.output, self.rule.output):\n", "files.add(self.benchmark)\n", "if req...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "For", "Expr'", "Condition", "Return'", "Condition", "Condition", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_4(self, VAR_6: str, VAR_7=None, VAR_8=None, VAR_9=False):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_7 is None:\n", "VAR_7 = ': '\n", "if VAR_8:\n", "VAR_6 = VAR_15(VAR_6, **format)\n", "if VAR_9:\n", "self.message = VAR_6\n", "assert 'message' not in self.__dict__, 'string'\n", "self.mes...
[ "def error_msg(self, message: str, delim=None, format=None, replace=False):...\n", "\"\"\"docstring\"\"\"\n", "if delim is None:\n", "delim = ': '\n", "if format:\n", "message = format_lazy(message, **format)\n", "if replace:\n", "self.message = message\n", "assert 'message' not in self.__dict__, 'Y...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assert'", "Assign'" ]
[ "def FUNC_6(VAR_6):...\n", "VAR_10 = sqlite3.connect(VAR_1)\n", "VAR_11 = VAR_10.cursor()\n", "VAR_11.execute('SELECT * FROM Notes WHERE uuid_filename = ?', [VAR_6])\n", "VAR_15 = VAR_11.fetchone()\n", "VAR_10.close()\n", "return VAR_15\n" ]
[ "def is_note_uuid_taken(uuid):...\n", "connection = sqlite3.connect(DATABASE_PATH)\n", "cursor = connection.cursor()\n", "cursor.execute('SELECT * FROM Notes WHERE uuid_filename = ?', [uuid])\n", "records = cursor.fetchone()\n", "connection.close()\n", "return records\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_6(self, VAR_4, VAR_5):...\n", "return 'OFFSET {} ROWS FETCH NEXT {} ROWS ONLY'.format(VAR_4, VAR_5)\n" ]
[ "def create_offset(self, offset, limit):...\n", "return 'OFFSET {} ROWS FETCH NEXT {} ROWS ONLY'.format(offset, limit)\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_43(self):...\n", "self.cursor.execute('create table t1(a int, b int, c int, d int)')\n", "self.cursor.execute('insert into t1 values(1,2,3,4)')\n", "VAR_24 = self.cursor.execute('select * from t1').fetchone()\n", "VAR_20 = VAR_24[:]\n", "self.assertTrue(VAR_20 is VAR_24)\n", "VAR_20 = VAR_24[:...
[ "def test_row_slicing(self):...\n", "self.cursor.execute('create table t1(a int, b int, c int, d int)')\n", "self.cursor.execute('insert into t1 values(1,2,3,4)')\n", "row = self.cursor.execute('select * from t1').fetchone()\n", "result = row[:]\n", "self.assertTrue(result is row)\n", "result = row[:-1]...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_1(self, VAR_0=''):...\n", "VAR_1 = self.xsrf_from_html()\n", "VAR_2 = {'error_info': VAR_0, 'xsrf_token': VAR_1}\n", "VAR_3 = self.wrap_html('templates/register.html', VAR_2)\n", "return self.write(VAR_3)\n" ]
[ "def get(self, error=''):...\n", "xsrf_token = self.xsrf_from_html()\n", "params = {'error_info': error, 'xsrf_token': xsrf_token}\n", "body = self.wrap_html('templates/register.html', params)\n", "return self.write(body)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_8(self):...\n", "return 'now()'\n" ]
[ "def sqlNowCall(self):...\n", "return 'now()'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_8(self):...\n", "self.runner.policy.skip_sanity_check = True\n", "self.runall(self.checks)\n", "VAR_15 = self.runner.stats\n", "self.assertEqual(7, VAR_15.num_cases())\n", "self.assertEqual(3, len(VAR_15.failures()))\n", "self.assertEqual(2, self._num_failures_stage('setup'))\n", "self.asser...
[ "def test_runall_skip_sanity_check(self):...\n", "self.runner.policy.skip_sanity_check = True\n", "self.runall(self.checks)\n", "stats = self.runner.stats\n", "self.assertEqual(7, stats.num_cases())\n", "self.assertEqual(3, len(stats.failures()))\n", "self.assertEqual(2, self._num_failures_stage('setup'...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_6(self):...\n", "VAR_83 = []\n", "if self.rate_user and VAR_101.user_is_loggedin:\n", "VAR_83.append('user' + VAR_100(VAR_101.user._id36))\n", "if self.rate_ip:\n", "VAR_83.append('ip' + VAR_100(VAR_102.ip))\n", "VAR_84 = cache.get_multi(VAR_83, self.prefix)\n", "if VAR_84:\n", "VAR_87 = V...
[ "def run(self):...\n", "to_check = []\n", "if self.rate_user and c.user_is_loggedin:\n", "to_check.append('user' + str(c.user._id36))\n", "if self.rate_ip:\n", "to_check.append('ip' + str(request.ip))\n", "r = cache.get_multi(to_check, self.prefix)\n", "if r:\n", "expire_time = max(r.values())\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'" ]
[ "@wraps(VAR_55)...\n", "def FUNC_27(VAR_6):...\n", "if callable(VAR_6):\n", "return VAR_6()\n", "if request.method == 'POST':\n", "return VAR_55(*VAR_69, **kwargs)\n", "VAR_10 = json.loads(request.data)\n", "VAR_54 = {'error': {'type': 'schema', 'message': str(e)}, 'schema': VAR_24}\n", "schemas.val...
[ "@wraps(func)...\n", "def default_encode(value):...\n", "if callable(value):\n", "return value()\n", "if request.method == 'POST':\n", "return func(*args, **kwargs)\n", "body = json.loads(request.data)\n", "result = {'error': {'type': 'schema', 'message': str(e)}, 'schema': schema}\n", "schemas.vali...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Assign'", "Assign'", "Expr'", "Return'", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_14(self):...\n", "self.run_test_case(self.scenario.create_instances())\n" ]
[ "def test_b_create_instances(self):...\n", "self.run_test_case(self.scenario.create_instances())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_5(self, VAR_12, VAR_11=True):...\n", "VAR_12['success'] = VAR_11\n", "self.update('event', VAR_12)\n" ]
[ "def log_event_success(self, event, success=True):...\n", "event['success'] = success\n", "self.update('event', event)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_13(self):...\n", "return any([FiletypeCompleterExistsForFiletype(x) for x in vimsupport.\n CurrentFiletypes()])\n" ]
[ "def NativeFiletypeCompletionAvailable(self):...\n", "return any([FiletypeCompleterExistsForFiletype(x) for x in vimsupport.\n CurrentFiletypes()])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "from __future__ import absolute_import, division, print_function\n", "__metaclass__ = type\n", "from ansible.errors import AnsibleError\n", "\"\"\" a group of ansible hosts \"\"\"\n", "def __init__(self, VAR_0=None):...\n", "self.depth = 0\n", "self.name = VAR_0\n", "self.hosts = []\n", "self._host...
[ "from __future__ import absolute_import, division, print_function\n", "__metaclass__ = type\n", "from ansible.errors import AnsibleError\n", "\"\"\" a group of ansible hosts \"\"\"\n", "def __init__(self, name=None):...\n", "self.depth = 0\n", "self.name = name\n", "self.hosts = []\n", "self._hosts ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Assign'", "ImportFrom'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Return'" ]
[ "@app.route('/people/<user_id>', methods=['POST'])...\n", "if not current_user.editor:\n", "return redirect(url_for('error403'))\n", "VAR_2 = NameForm(request.form)\n", "if not VAR_2.validate():\n", "return render_template('/people/edit.html', VAR_8=eval(request.form[\n 'person']), VAR_2=form)\n", "V...
[ "@app.route('/people/<user_id>', methods=['POST'])...\n", "if not current_user.editor:\n", "return redirect(url_for('error403'))\n", "form = NameForm(request.form)\n", "if not form.validate():\n", "return render_template('/people/edit.html', person=eval(request.form[\n 'person']), form=form)\n", "n =...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_5(VAR_4, *VAR_5, **VAR_6):...\n", "" ]
[ "def dummy_handler(remote, *args, **kargs):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_6(self, VAR_33):...\n", "if not VAR_33:\n", "return\n", "VAR_33 = int(VAR_33)\n", "VAR_101.errors.add(errors.BAD_NUMBER)\n", "if self.min is not None and VAR_33 < self.min:\n", "VAR_33 = self.min\n", "if self.max is not None and VAR_33 > self.max:\n", "return VAR_33\n", "VAR_33 = self.ma...
[ "def run(self, val):...\n", "if not val:\n", "return\n", "val = int(val)\n", "c.errors.add(errors.BAD_NUMBER)\n", "if self.min is not None and val < self.min:\n", "val = self.min\n", "if self.max is not None and val > self.max:\n", "return val\n", "val = self.max\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "Return'", "Assign'" ]
[ "def FUNC_2(VAR_34):...\n", "VAR_15.pack_forget()\n", "VAR_10.pack(expand=True, fill='both')\n", "VAR_9.pack_forget()\n", "VAR_39 = 'meal_planner.db'\n", "print(VAR_34)\n", "VAR_48 = conn.cursor()\n", "VAR_49 = VAR_48.execute('SELECT * FROM recipe WHERE name = ' + '\"' + VAR_34 +\n '\"')\n", "for...
[ "def callback(recipeName):...\n", "menu.pack_forget()\n", "viewRecipeFrame.pack(expand=True, fill='both')\n", "groceryButton.pack_forget()\n", "database_file = 'meal_planner.db'\n", "print(recipeName)\n", "cursor = conn.cursor()\n", "selection = cursor.execute('SELECT * FROM recipe WHERE name = ' + '\...
[ 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "For", "For", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def __init__(self, VAR_12):...\n", "self.yml = VAR_12\n", "self.aws_access_key_id = self._cfg('aws credentials aws_access_key_id'\n ) or os.environ.get('AWS_ACCESS_KEY_ID')\n", "self.aws_secret_access_key = self._cfg('aws credentials aws_secret_access_key'\n ) or os.environ.get('AWS_SECRET_ACCESS_KEY')...
[ "def __init__(self, yml):...\n", "self.yml = yml\n", "self.aws_access_key_id = self._cfg('aws credentials aws_access_key_id'\n ) or os.environ.get('AWS_ACCESS_KEY_ID')\n", "self.aws_secret_access_key = self._cfg('aws credentials aws_secret_access_key'\n ) or os.environ.get('AWS_SECRET_ACCESS_KEY')\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", ...
[ "import os.path\n", "import tornado.web\n", "import tornado.httpserver\n", "import tornado.options\n", "import tornado.ioloop\n", "from config.MockConfigDAO import MockConfigDAO\n", "VAR_0 = MockConfigDAO()\n", "from tornado.options import define, options\n", "define('port', default=8080, help='Serv...
[ "import os.path\n", "import tornado.web\n", "import tornado.httpserver\n", "import tornado.options\n", "import tornado.ioloop\n", "from config.MockConfigDAO import MockConfigDAO\n", "cfgDAO = MockConfigDAO()\n", "from tornado.options import define, options\n", "define('port', default=8080, help='Ser...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "Assign'", "ImportFrom'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Return'" ]
[ "@login_required()...\n", "VAR_12 = get_object_or_404(ExtractedHabitsAndPractices, VAR_1=pk)\n", "VAR_13 = HabitsPUCForm()\n", "if VAR_0.method == 'POST':\n", "VAR_13 = HabitsPUCForm(VAR_0.POST)\n", "VAR_14 = ExtractedHabitsAndPracticesToPUC.objects.filter(\n extracted_habits_and_practices=hnp).values(...
[ "@login_required()...\n", "hnp = get_object_or_404(ExtractedHabitsAndPractices, pk=pk)\n", "form = HabitsPUCForm()\n", "if request.method == 'POST':\n", "form = HabitsPUCForm(request.POST)\n", "linked = ExtractedHabitsAndPracticesToPUC.objects.filter(\n extracted_habits_and_practices=hnp).values('PUC')...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Expr'", "Return'", "Assign'" ]
[ "def __init__(self, VAR_16, VAR_17):...\n", "self.first = VAR_16\n", "self.second = VAR_17\n" ]
[ "def __init__(self, first, second):...\n", "self.first = first\n", "self.second = second\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_2(VAR_0):...\n", "VAR_2 = []\n", "VAR_3 = FUNC_4(VAR_0)\n", "VAR_4 = FUNC_3(VAR_0)\n", "for item in VAR_3:\n", "if VAR_4.get(item.name):\n", "return VAR_2\n", "VAR_9 = VAR_4[item.name]\n", "VAR_10 = {'item_group': item.item_group, 'item': item.name, 'item_name':\n item.item_name}\n", ...
[ "def get_data(filters):...\n", "data = []\n", "items = get_items(filters)\n", "sales_invoice_data = get_sales_details(filters)\n", "for item in items:\n", "if sales_invoice_data.get(item.name):\n", "return data\n", "item_obj = sales_invoice_data[item.name]\n", "row = {'item_group': item.item_group, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_10(self):...\n", "self.connection.close()\n" ]
[ "def close_connection(self):...\n", "self.connection.close()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_5(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'MEDIUM': 11}, 'CONFIDENCE': {'HIGH': 11}}\n", "self.check_example('crypto-md5.py', VAR_2)\n" ]
[ "def test_crypto_md5(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'MEDIUM': 11}, 'CONFIDENCE': {'HIGH': 11}}\n", "self.check_example('crypto-md5.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "@atomic...\n", "VAR_12, VAR_6 = self.common()\n", "VAR_13 = self.ipfs.files_read(self.get_mfs_path(self.fs_cwd, repo_info=\n 'active_branch_name')).decode('utf-8')\n", "if not self.quiet:\n", "print(VAR_13)\n", "return VAR_13\n" ]
[ "@atomic...\n", "_, branch = self.common()\n", "active = self.ipfs.files_read(self.get_mfs_path(self.fs_cwd, repo_info=\n 'active_branch_name')).decode('utf-8')\n", "if not self.quiet:\n", "print(active)\n", "return active\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_23(self, VAR_16, VAR_22):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', VAR_16['name'], 'size', '%sG' % VAR_22)\n", "VAR_0.error(_(\n 'Failed to extend_volume %(name)s from %(current_size)sGB to %(new_size)sGB'\n ), {'name': VAR_16['name'], 'current_size': VAR_16['si...
[ "def extend_volume(self, volume, new_size):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', volume['name'], 'size', '%sG' % new_size)\n", "LOG.error(_(\n 'Failed to extend_volume %(name)s from %(current_size)sGB to %(new_size)sGB'\n ), {'name': volume['name'], 'current_size': vo...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def FUNC_17(self):...\n", "def FUNC_23(VAR_11):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ "def test_get_output(self):...\n", "def _fake_recv(ignore_arg):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_18, VAR_35=10000, VAR_36=errors.BAD_COMMENT, VAR_37=...\n", "CLASS_0.__init__(self, VAR_18, **kw)\n", "self.length = VAR_35\n", "self.len_error = VAR_37\n", "self.emp_error = VAR_36\n" ]
[ "def __init__(self, item, length=10000, empty_error=errors.BAD_COMMENT,...\n", "Validator.__init__(self, item, **kw)\n", "self.length = length\n", "self.len_error = length_error\n", "self.emp_error = empty_error\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'" ]
[ "@wraps(VAR_7)...\n", "" ]
[ "@wraps(f)...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "@VAR_0.route('/processing')...\n", "VAR_16 = time.time()\n", "VAR_17 = VAR_10.get('domain', None)\n", "if VAR_17 == None:\n", "VAR_18 = 'data/%s' % (VAR_17,)\n", "VAR_19 = path_dict(VAR_18)\n", "VAR_20 = json.dumps(VAR_19, sort_keys=True, indent=4)\n", "VAR_21 = path_number_of_files(VAR_18)\n", "VA...
[ "@app.route('/processing')...\n", "proc_start_time = time.time()\n", "domain = session.get('domain', None)\n", "if domain == None:\n", "path = 'data/%s' % (domain,)\n", "hierarchy_dict = path_dict(path)\n", "hierarchy_json = json.dumps(hierarchy_dict, sort_keys=True, indent=4)\n", "n_files = path_numb...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_4(self, VAR_1, VAR_2, VAR_5, VAR_10=None, VAR_11=False, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_10:\n", "VAR_10 = []\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_29 = {}\n", "for VAR_48 in VAR_5:\n", "VAR_29[VAR_48] = {}.fromkeys(VAR_10, 0.0)\n", "for VAR_55 in VAR_...
[ "def _product_available(self, cr, uid, ids, field_names=None, arg=False,...\n", "\"\"\"docstring\"\"\"\n", "if not field_names:\n", "field_names = []\n", "if context is None:\n", "context = {}\n", "res = {}\n", "for id in ids:\n", "res[id] = {}.fromkeys(field_names, 0.0)\n", "for f in field_names:...
[ 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", "Assign'", "Condition", "Assign'", "Assign'", "For", "Assign'", "For", "Assign'", "Return'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "For", "Assign'" ]
[ "def FUNC_4(self, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_30 = inspect.stack()[1][3]\n", "VAR_31 = '[%s:%s] %s' % (self._hostname, VAR_30, VAR_4)\n", "self.logger.info(VAR_31)\n", "self.console.info(self._fmt_msg(VAR_4))\n" ]
[ "def log_info(self, msg):...\n", "\"\"\"docstring\"\"\"\n", "caller = inspect.stack()[1][3]\n", "lmsg = '[%s:%s] %s' % (self._hostname, caller, msg)\n", "self.logger.info(lmsg)\n", "self.console.info(self._fmt_msg(msg))\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@require_POST...\n", "\"\"\"docstring\"\"\"\n", "VAR_52 = VAR_0.POST.copy()\n", "VAR_62 = VAR_52.get('comment', None)\n", "if not VAR_62:\n", "return FUNC_6('Comments needed')\n", "VAR_63 = [i for i in VAR_52.get('run', '').split(',') if i]\n", "if not VAR_63:\n", "return FUNC_6('No runs selected.'...
[ "@require_POST...\n", "\"\"\"docstring\"\"\"\n", "data = request.POST.copy()\n", "comment = data.get('comment', None)\n", "if not comment:\n", "return say_no('Comments needed')\n", "run_ids = [i for i in data.get('run', '').split(',') if i]\n", "if not run_ids:\n", "return say_no('No runs selected.'...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Expr'", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "VAR_19 = self.common.create_cloned_volume(VAR_6, VAR_7)\n", "self.common.client_logout()\n", "return {'metadata': VAR_19}\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "new_vol = self.common.create_cloned_volume(volume, src_vref)\n", "self.common.client_logout()\n", "return {'metadata': new_vol}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "@wraps(VAR_6)...\n", "if not request.is_xhr:\n", "return abort(401)\n", "return VAR_6(*VAR_11, **kwargs)\n" ]
[ "@wraps(f)...\n", "if not request.is_xhr:\n", "return abort(401)\n", "return f(*args, **kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "from __future__ import unicode_literals\n", "from django.db import models, migrations\n", "VAR_0 = [('external_services', '0004_auto_20150828_1210'), ('exercise',\n '0013_auto_20151222_1320')]\n", "VAR_1 = [migrations.CreateModel(name='LTIExercise', fields=[(\n 'baseexercise_ptr', models.OneToOneField(...
[ "from __future__ import unicode_literals\n", "from django.db import models, migrations\n", "dependencies = [('external_services', '0004_auto_20150828_1210'), (\n 'exercise', '0013_auto_20151222_1320')]\n", "operations = [migrations.CreateModel(name='LTIExercise', fields=[(\n 'baseexercise_ptr', models.O...
[ 0, 0, 0, 4 ]
[ "ImportFrom'", "ImportFrom'", "Assign'", "Assign'" ]
[ "def FUNC_7():...\n", "VAR_14 = flask.request.json['protocoleForm']\n", "VAR_15 = list()\n", "VAR_16 = list()\n", "for key, value in VAR_14.iteritems():\n", "VAR_15.append(key)\n", "return {'keys': VAR_15, 'values': VAR_16}\n", "VAR_16.append(value)\n" ]
[ "def getParmeters():...\n", "data = flask.request.json['protocoleForm']\n", "listKeys = list()\n", "listValues = list()\n", "for key, value in data.iteritems():\n", "listKeys.append(key)\n", "return {'keys': listKeys, 'values': listValues}\n", "listValues.append(value)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Return'", "Expr'" ]
[ "def FUNC_0(self):...\n", "if not GenericRequest.test_success(self):\n", "return False\n", "VAR_13 = re.compile(self.username)\n", "if self.loggedin:\n", "if VAR_13.search(self.res_data) is None:\n", "if VAR_13.search(self.res_data) is not None:\n", "return False\n", "return True\n", "return False...
[ "def test_success(self):...\n", "if not GenericRequest.test_success(self):\n", "return False\n", "username_re = re.compile(self.username)\n", "if self.loggedin:\n", "if username_re.search(self.res_data) is None:\n", "if username_re.search(self.res_data) is not None:\n", "return False\n", "return Tru...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Condition", "Condition", "Return'", "Return'", "Return'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = VAR_6.lower()\n", "VAR_16 = VAR_2.__name__.lower()\n", "VAR_18 = u'{0}/{1}/{2}'.format(VAR_4, VAR_6, VAR_2.__name__.lower())\n", "VAR_19 = ('[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}' +\n '-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}')\n", "VAR_20 = u'{0...
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "hierarchy = hierarchy.lower()\n", "class_name = cls.__name__.lower()\n", "class_url = u'{0}/{1}/{2}'.format(base_url, hierarchy, cls.__name__.lower())\n", "uuid_regex = ('[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}' +\n '-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}'...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_5(VAR_6):...\n", "VAR_12 = f\"\"\"string{VAR_2} AS p INNER JOIN {VAR_1} AS c ON\n p.id=c.product_id\n WHERE c.user_id={VAR_6}\n \"\"\"\n", "VAR_14 = create_connection()\n", "VAR_14.close()\n", "VAR_15 = VAR_14.cursor()\n", "VAR_15.execute(VAR_12)\n", "return VA...
[ "def get_cart(userId):...\n", "sql_query = f\"\"\"\n SELECT p.id, p.name, p.company, p.rating, p.image_url, p.price, c.quantity AS quantity\n FROM {PRODUCTS_TABLE} AS p INNER JOIN {CARTS_TABLE} AS c ON\n p.id=c.product_id\n WHERE c.user_id={userId}\n \"\"\"\n...
[ 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def __init__(self, VAR_20='', **VAR_4):...\n", "CLASS_1.__init__(self, **kwargs)\n", "self.channel_pk = VAR_20\n" ]
[ "def __init__(self, channel_pk='', **kwargs):...\n", "TriblerContentModel.__init__(self, **kwargs)\n", "self.channel_pk = channel_pk\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'" ]
[ "def FUNC_4(self, VAR_7, VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "VAR_17 = []\n", "VAR_2 = VAR_1.view_submit(VAR_7)\n", "for entry in VAR_12['file_selection']:\n", "VAR_10 = copy.deepcopy(VAR_12['global'])\n", "return VAR_17\n", "VAR_10.update(entry)\n", "VAR_11 = copy.deepcopy(VAR_12['global']['...
[ "def submit(self, submit_id, config):...\n", "\"\"\"docstring\"\"\"\n", "ret = []\n", "submit = db.view_submit(submit_id)\n", "for entry in config['file_selection']:\n", "info = copy.deepcopy(config['global'])\n", "return ret\n", "info.update(entry)\n", "options = copy.deepcopy(config['global']['opt...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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'", "For", "Assign'", "Return'", "Expr'", "Assign'", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Condition", "Expr'", "...
[ "@command...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = VAR_1[0]\n", "if VAR_6 == 'create':\n", "if self.state.active_project is None:\n", "if VAR_6 == 'complete':\n", "VAR_13 = self.state.active_project.obj_id\n", "wrapper.todoist.complete_task(VAR_1[1])\n", "self.do_tasks(str(self.state.active_projec...
[ "@command...\n", "\"\"\"docstring\"\"\"\n", "sub_cmd = args[0]\n", "if sub_cmd == 'create':\n", "if self.state.active_project is None:\n", "if sub_cmd == 'complete':\n", "proj_id = self.state.active_project.obj_id\n", "wrapper.todoist.complete_task(args[1])\n", "self.do_tasks(str(self.state.active_p...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Condition", "Condition", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_2(self, VAR_13, VAR_11, VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "for diff in self.__yield_diffs(VAR_12, VAR_13):\n", "yield Result(self, self.diff_message, affected_code=(diff.range(filename),),\n diffs={filename: diff}, severity=self.diff_severity)\n" ]
[ "def _process_corrected(self, output, filename, file):...\n", "\"\"\"docstring\"\"\"\n", "for diff in self.__yield_diffs(file, output):\n", "yield Result(self, self.diff_message, affected_code=(diff.range(filename),),\n diffs={filename: diff}, severity=self.diff_severity)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Expr'" ]
[ "def FUNC_15(VAR_22, VAR_23):...\n", "\"\"\"docstring\"\"\"\n", "VAR_42 = logging.getLogger('ray')\n", "if type(VAR_22) is str:\n", "VAR_22 = logging.getLevelName(VAR_22.upper())\n", "VAR_42.setLevel(VAR_22)\n", "VAR_21 = logging.StreamHandler()\n", "VAR_21.setFormatter(logging.Formatter(VAR_23))\n", ...
[ "def setup_logger(logging_level, logging_format):...\n", "\"\"\"docstring\"\"\"\n", "logger = logging.getLogger('ray')\n", "if type(logging_level) is str:\n", "logging_level = logging.getLevelName(logging_level.upper())\n", "logger.setLevel(logging_level)\n", "_default_handler = logging.StreamHandler()\...
[ 0, 0, 6, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'" ]
[ "def FUNC_13(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_21 == '/':\n", "return True\n", "VAR_58 = self.getfile(VAR_21)\n", "VAR_58 = None\n", "if VAR_58 is None or VAR_58 is False:\n", "return False\n", "if VAR_58[VAR_2] == VAR_12:\n", "return True\n", "return False\n" ]
[ "def isdir(self, path):...\n", "\"\"\"docstring\"\"\"\n", "if path == '/':\n", "return True\n", "dir = self.getfile(path)\n", "dir = None\n", "if dir is None or dir is False:\n", "return False\n", "if dir[A_TYPE] == T_DIR:\n", "return True\n", "return False\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_17(self):...\n", "" ]
[ "def touch(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_24(self, VAR_16):...\n", "" ]
[ "def local_path(self, volume):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_6(VAR_9):...\n", "return VAR_5.search(VAR_9) is not None\n" ]
[ "def contains_wildcard(path):...\n", "return _wildcard_regex.search(path) is not None\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_16(self):...\n", "self.run_test_case(self.scenario.delete_app(), retry_interval_secs=8,\n max_retries=8)\n" ]
[ "def test_z_delete_app(self):...\n", "self.run_test_case(self.scenario.delete_app(), retry_interval_secs=8,\n max_retries=8)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_6(VAR_4, VAR_5, VAR_6=None):...\n", "VAR_4 = ('[%s]' % str(VAR_4)).center(8).lstrip()\n", "VAR_5 = FUNC_4(FUNC_3(VAR_5, VAR_2='green'))\n", "if VAR_6:\n", "VAR_6 = '\\n' + len(VAR_4) * ' ' + VAR_6\n", "VAR_6 = ''\n", "return VAR_4 + VAR_5 + VAR_6\n" ]
[ "def print_as_a_list_item(index, title, subtile=None):...\n", "index = ('[%s]' % str(index)).center(8).lstrip()\n", "title = print_left_just(rainbow(title, color='green'))\n", "if subtile:\n", "subtile = '\\n' + len(index) * ' ' + subtile\n", "subtile = ''\n", "return index + title + subtile\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "from argparse import ArgumentParser\n", "from ply import lex, yacc\n", "import locale\n", "import traceback\n", "import sys\n", "import git\n", "import re\n", "import os\n", "def __init__(self, VAR_3, VAR_4):...\n", "self.tok = VAR_3\n", "self.txt = VAR_4\n", "def __init__(self, VAR_5, VAR_4)...
[ "from argparse import ArgumentParser\n", "from ply import lex, yacc\n", "import locale\n", "import traceback\n", "import sys\n", "import git\n", "import re\n", "import os\n", "def __init__(self, tok, txt):...\n", "self.tok = tok\n", "self.txt = txt\n", "def __init__(self, el, txt):...\n", "s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "A...
[ "def FUNC_21(VAR_49, **VAR_18):...\n", "VAR_63 = mock.Mock()\n", "VAR_63.history = None\n", "VAR_63.headers = {'location': ''}\n", "VAR_63.raw._original_response = {}\n", "VAR_20.record_call(VAR_49, **kwargs)\n", "return VAR_63\n" ]
[ "def _adapter_send(request, **kwargs):...\n", "mock_response = mock.Mock()\n", "mock_response.history = None\n", "mock_response.headers = {'location': ''}\n", "mock_response.raw._original_response = {}\n", "cluster_api.record_call(request, **kwargs)\n", "return mock_response\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def __init__(self, VAR_7, VAR_20=True, *VAR_15, **VAR_16):...\n", "CLASS_5.__init__(self, VAR_7, *VAR_15, VAR_20=redirect, **kw)\n" ]
[ "def __init__(self, param, redirect=True, *a, **kw):...\n", "VLink.__init__(self, param, *a, redirect=redirect, **kw)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_7(VAR_18, VAR_16):...\n", "VAR_34 = renderers.JsonRenderer(missing_tags='ignore')\n", "return VAR_34.render(VAR_18, VAR_16)\n" ]
[ "def render_moustache(text, config):...\n", "r = renderers.JsonRenderer(missing_tags='ignore')\n", "return r.render(text, config)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "import mock\n", "import requests\n", "from django.test import TransactionTestCase\n", "from django.conf import settings\n", "def FUNC_0(...
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "import mock\n", "import requests\n", "from django.test import TransactionTestCase\n", "from django.conf import settings\n", "def mock_im...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "import sys\n", "from contextlib import redirect_stdout\n", "from gui import ControlApplication\n", "sys.argv.append('USB0::0x17E7::0x0102::07-40-01::INSTR')\n", "sys.argv.append('COM5')\n", "print(sys.argv)\n", "VAR_0 = ControlApplication.EXIT_CODE_RESTART\n", "while VAR_0 == ControlApplication.EXIT_...
[ "import sys\n", "from contextlib import redirect_stdout\n", "from gui import ControlApplication\n", "sys.argv.append('USB0::0x17E7::0x0102::07-40-01::INSTR')\n", "sys.argv.append('COM5')\n", "print(sys.argv)\n", "exit_code = ControlApplication.EXIT_CODE_RESTART\n", "while exit_code == ControlApplicati...
[ 0, 6, 0, 0, 0, 0, 0, 6, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "Expr'", "Expr'", "Expr'", "Assign'", "Condition", "Assign'", "Assign'" ]