lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_0(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_83.included_stack:\n", "return None\n", "return os.path.join(os.path.dirname(VAR_83.included_stack[-1]), VAR_0)\n" ]
[ "def srcdir(path):...\n", "\"\"\"docstring\"\"\"\n", "if not workflow.included_stack:\n", "return None\n", "return os.path.join(os.path.dirname(workflow.included_stack[-1]), path)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Return'" ]
[ "def FUNC_9(VAR_8, VAR_9):...\n", "VAR_30 = {}\n", "for VAR_36 in ('point', 'line', 'polygon'):\n", "VAR_35 = VAR_9 * VAR_18[VAR_36]\n", "return VAR_30\n", "VAR_30[VAR_36] = bounds_buffer(VAR_8, VAR_35)\n" ]
[ "def bounds_pad(bounds, meters_per_pixel_dim):...\n", "buffered_by_type = {}\n", "for geometry_type in ('point', 'line', 'polygon'):\n", "offset = meters_per_pixel_dim * buf_by_type[geometry_type]\n", "return buffered_by_type\n", "buffered_by_type[geometry_type] = bounds_buffer(bounds, offset)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'", "Assign'" ]
[ "@VAR_47.exception(Exception)...\n", "VAR_56 = None\n", "VAR_57 = None\n", "if isinstance(VAR_52, NotFound):\n", "VAR_66 = 404\n", "if isinstance(VAR_52, InvalidUsage):\n", "VAR_64 = {}\n", "VAR_66 = 405\n", "if isinstance(VAR_52, DatasetteError):\n", "VAR_67 = VAR_52.args[0]\n", "VAR_64 = {}\n"...
[ "@app.exception(Exception)...\n", "title = None\n", "help = None\n", "if isinstance(exception, NotFound):\n", "status = 404\n", "if isinstance(exception, InvalidUsage):\n", "info = {}\n", "status = 405\n", "if isinstance(exception, DatasetteError):\n", "message = exception.args[0]\n", "info = {}...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Expr'"...
[ "def FUNC_29(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "return self.stat(VAR_21, VAR_23=False)\n" ]
[ "def lstat(self, path):...\n", "\"\"\"docstring\"\"\"\n", "return self.stat(path, follow_symlinks=False)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_36(self, VAR_14):...\n", "return self.__class__(self.get_related_model(VAR_14), self.session)\n" ]
[ "def get_related_interface(self, col_name):...\n", "return self.__class__(self.get_related_model(col_name), self.session)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_23(VAR_33, VAR_13, VAR_20, VAR_21, VAR_12):...\n", "if VAR_21 == wzrpc.status.success:\n", "self.log.debug('Succesfully set route type for (%s, %s) to %s', VAR_16,\n VAR_17, wzrpc.name_route_type(VAR_19))\n", "if VAR_21 == wzrpc.status.e_req_denied:\n", "self.log.warn('Status {0}, reauthentific...
[ "def accept(that, reqid, seqnum, status, data):...\n", "if status == wzrpc.status.success:\n", "self.log.debug('Succesfully set route type for (%s, %s) to %s', i, m, wzrpc\n .name_route_type(t))\n", "if status == wzrpc.status.e_req_denied:\n", "self.log.warn('Status {0}, reauthentificating'.format(wzrpc....
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'" ]
[ "def FUNC_10(self, VAR_5=False, VAR_6=False):...\n", "\"\"\"docstring\"\"\"\n", "assert self._raylet_socket_name is None\n", "self._raylet_socket_name = (self._ray_params.raylet_socket_name or\n get_raylet_socket_name())\n", "self.prepare_socket_file(self._raylet_socket_name)\n", "VAR_14, VAR_15 = new_...
[ "def start_raylet(self, use_valgrind=False, use_profiler=False):...\n", "\"\"\"docstring\"\"\"\n", "assert self._raylet_socket_name is None\n", "self._raylet_socket_name = (self._ray_params.raylet_socket_name or\n get_raylet_socket_name())\n", "self.prepare_socket_file(self._raylet_socket_name)\n", "st...
[ 0, 0, 0, 0, 0, 6, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Assign'", "Expr'", "Assign'", "Assign'", "Assert'", "Assign'" ]
[ "def FUNC_5(VAR_4, VAR_5, VAR_11, VAR_10):...\n", "VAR_9 = FUNC_6(VAR_4, VAR_5, VAR_11)\n", "FUNC_4(VAR_9, VAR_10)\n" ]
[ "def verify_results(client, jwt, query, expected):...\n", "data = search(client, jwt, query)\n", "verify(data, expected)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "@VAR_0.route('/terminate')...\n", "\"\"\"docstring\"\"\"\n", "return FUNC_3('terminate-account-action', VAR_2=True)\n" ]
[ "@authn_views.route('/terminate')...\n", "\"\"\"docstring\"\"\"\n", "return _authn('terminate-account-action', force_authn=True)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_4(self):...\n", "self.run_test_case(self.scenario.upsert_load_balancer())\n" ]
[ "def test_a_upsert_load_balancer(self):...\n", "self.run_test_case(self.scenario.upsert_load_balancer())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_10(VAR_1, VAR_2, VAR_3, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_9 = FUNC_1(VAR_1)\n", "VAR_11 = db.connection.cursor(db.pymysql.cursors.DictCursor)\n", "VAR_11.execute('string', (VAR_1, VAR_2))\n", "VAR_14 = VAR_11.fetchone()\n", "VAR_15 = 'REVEALED'\n", "VAR_10 = False\n", "VAR_16 ...
[ "def update_steps(achievement_id, player_id, steps, steps_function):...\n", "\"\"\"docstring\"\"\"\n", "achievement = achievements_get(achievement_id)\n", "cursor = db.connection.cursor(db.pymysql.cursors.DictCursor)\n", "cursor.execute(\n \"\"\"SELECT\n current_steps,\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'", "Assign'" ]
[ "def FUNC_2(self, VAR_1, VAR_2):...\n", "if not VAR_1.is_loading():\n", "VAR_1.window().focus_view(VAR_2)\n", "sublime.set_timeout(lambda : self.return_to_left(VAR_1, VAR_2), 10)\n", "VAR_1.window().focus_group(0)\n" ]
[ "def return_to_left(self, view, return_view):...\n", "if not view.is_loading():\n", "view.window().focus_view(return_view)\n", "sublime.set_timeout(lambda : self.return_to_left(view, return_view), 10)\n", "view.window().focus_group(0)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_3(self):...\n", "\"\"\"docstring\"\"\"\n", "self._prepare()\n", "self._execute()\n" ]
[ "def execute(self):...\n", "\"\"\"docstring\"\"\"\n", "self._prepare()\n", "self._execute()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_0):...\n", "self.cursor = VAR_0\n", "self.rides = []\n" ]
[ "def __init__(self, cursor):...\n", "self.cursor = cursor\n", "self.rides = []\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "@staticmethod...\n", "return os.path.isfile(VAR_3) and os.access(VAR_3, os.X_OK)\n" ]
[ "@staticmethod...\n", "return os.path.isfile(path) and os.access(path, os.X_OK)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_11(self, VAR_1=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = FUNC_0(VAR_1)\n", "logging.info('Removing all completed jobs from history')\n", "return self.execute(\n \"DELETE FROM history WHERE name LIKE ? AND status = 'Completed'\", (\n VAR_1,), VAR_17=True)\n" ]
[ "def remove_completed(self, search=None):...\n", "\"\"\"docstring\"\"\"\n", "search = convert_search(search)\n", "logging.info('Removing all completed jobs from history')\n", "return self.execute(\n \"DELETE FROM history WHERE name LIKE ? AND status = 'Completed'\", (\n search,), save=True)\n" ]
[ 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "\"\"\"\nModule for gathering disk information\n\"\"\"\n", "import logging\n", "import salt.utils\n", "VAR_0 = logging.getLogger(__name__)\n", "def __virtual__():...\n", "\"\"\"docstring\"\"\"\n", "if salt.utils.is_windows():\n", "return False\n", "return 'disk'\n" ]
[ "\"\"\"\nModule for gathering disk information\n\"\"\"\n", "import logging\n", "import salt.utils\n", "log = logging.getLogger(__name__)\n", "def __virtual__():...\n", "\"\"\"docstring\"\"\"\n", "if salt.utils.is_windows():\n", "return False\n", "return 'disk'\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Assign'", "FunctionDef'", "Docstring", "Condition", "Return'", "Return'" ]
[ "def __del__(self):...\n", "self.connection.close()\n" ]
[ "def __del__(self):...\n", "self.connection.close()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@VAR_0.route('/screenshot/<page>')...\n", "if current_user.email == 'brocksmith225@gmail.com':\n", "return render_template(VAR_7 + '.html')\n", "return redirect(VAR_4)\n" ]
[ "@app.route('/screenshot/<page>')...\n", "if current_user.email == 'brocksmith225@gmail.com':\n", "return render_template(page + '.html')\n", "return redirect(url_prefix)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "def FUNC_6(VAR_2):...\n", "if len(set(getattr(obj, 'academic_year_id') for obj in VAR_2)) > 1:\n", "return VAR_2[0].academic_year\n" ]
[ "def _extract_common_academic_year(objects):...\n", "if len(set(getattr(obj, 'academic_year_id') for obj in objects)) > 1:\n", "return objects[0].academic_year\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Return'" ]
[ "def FUNC_2(VAR_2, VAR_3='main'):...\n", "VAR_8, VAR_6 = FUNC_1(VAR_2)\n", "if VAR_8 not in VAR_9.path:\n", "VAR_9.path.insert(0, VAR_8)\n", "VAR_9.modules['__tng_runfile__'] = VAR_10 = imp.load_source(VAR_6, VAR_2)\n", "if hasattr(VAR_10, VAR_3):\n", "return getattr(VAR_10, VAR_3)\n", "logging.getLog...
[ "def run_file(runfile, func_to_get='main'):...\n", "import_path, name = _guess_import_path_and_name(runfile)\n", "if import_path not in sys.path:\n", "sys.path.insert(0, import_path)\n", "sys.modules['__tng_runfile__'] = module = imp.load_source(name, runfile)\n", "if hasattr(module, func_to_get):\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Return'", "Expr'" ]
[ "import mimetypes\n", "import os\n", "from django.contrib.gis.db.models import GeometryField\n", "from django.contrib.gis.db.models.functions import Envelope\n", "from django.core.exceptions import ObjectDoesNotExist\n", "from django.db.models.functions import Cast\n", "from django.http import HttpRespo...
[ "import mimetypes\n", "import os\n", "from django.contrib.gis.db.models import GeometryField\n", "from django.contrib.gis.db.models.functions import Envelope\n", "from django.core.exceptions import ObjectDoesNotExist\n", "from django.db.models.functions import Cast\n", "from django.http import HttpRespo...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_37=None, VAR_38=None, VAR_39=False):...\n", "\"\"\"docstring\"\"\"\n", "list.__init__(self)\n", "self._names = dict()\n", "if VAR_37:\n", "self.extend(map(str, VAR_37) if VAR_39 else VAR_37)\n", "if VAR_38:\n", "if isinstance(VAR_37, CLASS_2):\n", "for VAR_44, item in VAR_38....
[ "def __init__(self, toclone=None, fromdict=None, plainstr=False):...\n", "\"\"\"docstring\"\"\"\n", "list.__init__(self)\n", "self._names = dict()\n", "if toclone:\n", "self.extend(map(str, toclone) if plainstr else toclone)\n", "if fromdict:\n", "if isinstance(toclone, Namedlist):\n", "for key, ite...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Condition", "Expr'", "Condition", "Condition", "For", "Expr'", "Expr'", "Expr'" ]
[ "@VAR_0.before_app_first_request...\n", "\"\"\"docstring\"\"\"\n", "user_logged_out.connect(oauth_logout_handler)\n", "oauth.init_app(current_app)\n", "for VAR_1, conf in cfg['OAUTHCLIENT_REMOTE_APPS'].items():\n", "if VAR_1 not in oauth.remote_apps:\n", "VAR_4 = oauth.remote_app(VAR_1, **conf['params']...
[ "@blueprint.before_app_first_request...\n", "\"\"\"docstring\"\"\"\n", "user_logged_out.connect(oauth_logout_handler)\n", "oauth.init_app(current_app)\n", "for remote_app, conf in cfg['OAUTHCLIENT_REMOTE_APPS'].items():\n", "if remote_app not in oauth.remote_apps:\n", "remote = oauth.remote_app(remote_a...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "For", "Docstring", "Expr'", "Expr'", "For", "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_5(VAR_6):...\n", "return JsonResponse({'applinks': {'apps': [], 'details': [{'appID':\n settings.APPLE_APPID, 'paths': ['*']}]}})\n" ]
[ "def aasa_redirect(request):...\n", "return JsonResponse({'applinks': {'apps': [], 'details': [{'appID':\n settings.APPLE_APPID, 'paths': ['*']}]}})\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "async def FUNC_2(VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_10, VAR_7, VAR_8, VAR_9...\n", "VAR_7 = VAR_7.split(' ')\n", "if len(VAR_7) >= 2:\n", "VAR_0 = VAR_7[0].lower()\n", "await VAR_1.send_message(VAR_2,\n '{}, **USAGE:** {}remindall <time> <message...>'.format(VAR_3, VAR_9))\n", "VAR_14 = ''\n", "...
[ "async def ex_all(dclient, channel, mention, con, con_ex, channel_id, a,...\n", "a = a.split(' ')\n", "if len(a) >= 2:\n", "time = a[0].lower()\n", "await dclient.send_message(channel,\n '{}, **USAGE:** {}remindall <time> <message...>'.format(mention, cmd_char))\n", "msg = ''\n", "print('')\n", "fo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Expr'", "For", "AugAssign'", "Condition", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_23(self):...\n", "VAR_15 = 1\n", "VAR_16 = 2\n", "mock_signal.return_value = VAR_15\n", "self.assertEqual(mock_signal.call_count, 2)\n", "mock_signal.assert_has_calls([mock.call(signal.SIGUSR2, VAR_16), mock.call(\n signal.SIGUSR2, VAR_15)])\n" ]
[ "def test_signal_handler_as(self):...\n", "mock_initial_handler = 1\n", "mock_new_handler = 2\n", "mock_signal.return_value = mock_initial_handler\n", "self.assertEqual(mock_signal.call_count, 2)\n", "mock_signal.assert_has_calls([mock.call(signal.SIGUSR2, mock_new_handler),\n mock.call(signal.SIGUSR2,...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_7(self):...\n", "return self.data\n" ]
[ "def to_json(self):...\n", "return self.data\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_19(self, VAR_6):...\n", "VAR_49 = self.nodes.get(VAR_6['name'])\n", "VAR_50 = []\n", "VAR_51 = []\n", "dep_resolve(VAR_49, VAR_50, VAR_51)\n", "for VAR_49 in VAR_50:\n", "self.logger.debug(\"node name '%s' vs. comp name '%s'\" % (VAR_49.comp_name,\n VAR_6['name']))\n", "self.logger.debug(...
[ "def start_component(self, comp):...\n", "node = self.nodes.get(comp['name'])\n", "res = []\n", "unres = []\n", "dep_resolve(node, res, unres)\n", "for node in res:\n", "self.logger.debug(\"node name '%s' vs. comp name '%s'\" % (node.comp_name,\n comp['name']))\n", "self.logger.debug(\"All dependen...
[ 0, 0, 0, 0, 0, 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'", "Expr'", "For", "Expr'", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Return'", "Expr'", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", ...
[ "def FUNC_2(VAR_0, VAR_3):...\n", "VAR_4 = VAR_0.cursor()\n", "VAR_5 = 'ALTER TABLE Presets DROP COLUMN id;'\n", "VAR_4.execute(VAR_5)\n", "VAR_5 = (\n 'ALTER TABLE Presets ADD COLUMN id INT AUTO_INCREMENT PRIMARY KEY NOT NULL FIRST;'\n )\n", "VAR_4.execute(VAR_5)\n", "VAR_5 = 'DELETE FROM Presets...
[ "def remove_preset(conn, key):...\n", "cursor = conn.cursor()\n", "quer = 'ALTER TABLE Presets DROP COLUMN id;'\n", "cursor.execute(quer)\n", "quer = (\n 'ALTER TABLE Presets ADD COLUMN id INT AUTO_INCREMENT PRIMARY KEY NOT NULL FIRST;'\n )\n", "cursor.execute(quer)\n", "quer = 'DELETE FROM Preset...
[ 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_23(self):...\n", "if self.get('__islocal') or not self.name:\n", "self.db_insert()\n", "VAR_6 = self.get_valid_dict(VAR_13=True)\n", "return\n", "VAR_34 = VAR_6['name']\n", "VAR_33 = list(VAR_6)\n", "VAR_54.db.sql(\"\"\"update `tab{doctype}`\n\t\t\t\tset {values} where name=%s\"\"\".\n fo...
[ "def db_update(self):...\n", "if self.get('__islocal') or not self.name:\n", "self.db_insert()\n", "d = self.get_valid_dict(convert_dates_to_str=True)\n", "return\n", "name = d['name']\n", "columns = list(d)\n", "frappe.db.sql(\"\"\"update `tab{doctype}`\n\t\t\t\tset {values} where name=%s\"\"\".\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "Assign'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_8(self):...\n", "return 'try to login'\n" ]
[ "def describe(self):...\n", "return 'try to login'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_5(self, VAR_7):...\n", "return VAR_54.db.get_value(self.doctype, self.name, VAR_7)\n" ]
[ "def get_db_value(self, key):...\n", "return frappe.db.get_value(self.doctype, self.name, key)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "int(VAR_7)\n", "return False\n", "return True\n" ]
[ "def isInt(ss):...\n", "\"\"\"docstring\"\"\"\n", "int(ss)\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Return'", "Return'" ]
[ "def __init__(self, *VAR_6, **VAR_7):...\n", "super(CLASS_21, self).__init__(*VAR_6, **kwargs)\n", "self.fields['document_type'].label = ''\n", "self.fields['document_type'].widget.attrs.update({'onchange': 'form.submit();'}\n )\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super(DocumentTypeForm, self).__init__(*args, **kwargs)\n", "self.fields['document_type'].label = ''\n", "self.fields['document_type'].widget.attrs.update({'onchange': 'form.submit();'}\n )\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_30(self, VAR_16):...\n", "" ]
[ "def delete_all(self, items):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_8(VAR_4):...\n", "if not os.path.exists('D:' + VAR_4):\n", "return VAR_4\n", "VAR_28 = 1\n", "while VAR_28 < 101:\n", "VAR_32 = re.sub('\\\\.(.*?)$', ' (%d).\\\\1' % VAR_28, VAR_4)\n", "return ''\n", "if not os.path.exists('D:' + VAR_32):\n", "return VAR_32\n", "VAR_28 = VAR_28 + 1\n" ]
[ "def get_non_duplicate_path(file_path):...\n", "if not os.path.exists('D:' + file_path):\n", "return file_path\n", "duplicate = 1\n", "while duplicate < 101:\n", "new_path = re.sub('\\\\.(.*?)$', ' (%d).\\\\1' % duplicate, file_path)\n", "return ''\n", "if not os.path.exists('D:' + new_path):\n", "r...
[ 0, 4, 4, 4, 4, 4, 4, 4, 4, 4 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Return'", "Condition", "Return'", "Assign'" ]
[ "def FUNC_3(VAR_2, VAR_3):...\n", "if VAR_3 == True:\n", "print('I will be tracking this series: ' + FUNC_1(VAR_2.submission.title) +\n ' because of this comment ' + VAR_2.fullname)\n", "print('I will stop tracking this series: ' + FUNC_1(VAR_2.submission.title) +\n ' because of this comment ' + VAR_2.f...
[ "def replyToTrackRequest(comment, positive):...\n", "if positive == True:\n", "print('I will be tracking this series: ' + getTitle(comment.submission.\n title) + ' because of this comment ' + comment.fullname)\n", "print('I will stop tracking this series: ' + getTitle(comment.submission.\n title) + ' be...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_3(self, VAR_7='True', VAR_8='*'):...\n", "self.cursor.execute(self.SQL_QUERY_JSON % (VAR_8, self.name, VAR_7))\n", "VAR_9 = [item for item in self.cursor.fetchall()]\n", "return VAR_9\n" ]
[ "def query(self, query='True', columns='*'):...\n", "self.cursor.execute(self.SQL_QUERY_JSON % (columns, self.name, query))\n", "rows = [item for item in self.cursor.fetchall()]\n", "return rows\n" ]
[ 0, 4, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Return'" ]
[ "@staticmethod...\n", "return ' '.join(escape_path_argument(s) for s in (sys.executable, os.path.\n join(os.path.dirname(os.path.realpath(__file__)),\n 'run_shell_command_testfiles', VAR_0)))\n" ]
[ "@staticmethod...\n", "return ' '.join(escape_path_argument(s) for s in (sys.executable, os.path.\n join(os.path.dirname(os.path.realpath(__file__)),\n 'run_shell_command_testfiles', scriptname)))\n" ]
[ 0, 2 ]
[ "Condition", "Return'" ]
[ "def FUNC_38(self, VAR_40, VAR_41, VAR_42=None):...\n", "\"\"\"docstring\"\"\"\n", "self._names[VAR_40] = VAR_41, VAR_42\n", "if VAR_42 is None:\n", "setattr(self, VAR_40, self[VAR_41])\n", "setattr(self, VAR_40, CLASS_2(VAR_37=self[index:end]))\n" ]
[ "def set_name(self, name, index, end=None):...\n", "\"\"\"docstring\"\"\"\n", "self._names[name] = index, end\n", "if end is None:\n", "setattr(self, name, self[index])\n", "setattr(self, name, Namedlist(toclone=self[index:end]))\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_30():...\n", "if VAR_3 == 'text':\n", "print('Input file: %s' % VAR_75)\n", "VAR_52 = FUNC_2(VAR_15, VAR_2, VAR_3=output_mode, VAR_4=output_limit, VAR_5\n =spires, VAR_6=match_mode, VAR_7=no_cache, VAR_8=with_author_keywords,\n VAR_9=rebuild_cache, VAR_10=only_core_tags, VAR_11=extract_acronym...
[ "def process_lines():...\n", "if output_mode == 'text':\n", "print('Input file: %s' % source)\n", "output = get_keywords_from_text(text_lines, taxonomy_name, output_mode=\n output_mode, output_limit=output_limit, spires=spires, match_mode=\n match_mode, no_cache=no_cache, with_author_keywords=\n with...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Condition", "Return'", "Condition", "For", "Expr'" ]
[ "def FUNC_9(self):...\n", "self.test_strings = ('normal_string', 'string with spaces',\n 'string with quotes\"a', \"string with s-quotes'b\", 'bsn \\n A',\n 'unrecognized \\\\q escape')\n" ]
[ "def setUp(self):...\n", "self.test_strings = ('normal_string', 'string with spaces',\n 'string with quotes\"a', \"string with s-quotes'b\", 'bsn \\n A',\n 'unrecognized \\\\q escape')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def __init__(self, VAR_46=50, VAR_47=100):...\n", "\"\"\"docstring\"\"\"\n", "self.regex = re.compile(\n '((?P<value>.+)(?P=value){{{min_repeat},{max_repeat}}})$'.format(VAR_46\n =min_repeat - 1, VAR_47=max_repeat - 1))\n" ]
[ "def __init__(self, min_repeat=50, max_repeat=100):...\n", "\"\"\"docstring\"\"\"\n", "self.regex = re.compile(\n '((?P<value>.+)(?P=value){{{min_repeat},{max_repeat}}})$'.format(\n min_repeat=min_repeat - 1, max_repeat=max_repeat - 1))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'" ]
[ "def __init__(self, VAR_9, VAR_5, VAR_1, VAR_6, VAR_11={}, **VAR_12):...\n", "super().__init__(VAR_9, VAR_1, VAR_6, VAR_11={}, **kwargs)\n", "self.rev = 'HEAD'\n", "VAR_39 = VAR_5.fragment and CLASS_1._parse_fragment(VAR_5) or {}\n", "VAR_40 = VAR_39.get('rev', None)\n", "VAR_41 = VAR_39.get('branch', Non...
[ "def __init__(self, name, url, directory, options, conf={}, **kwargs):...\n", "super().__init__(name, directory, options, conf={}, **kwargs)\n", "self.rev = 'HEAD'\n", "fragment = url.fragment and Subproject._parse_fragment(url) or {}\n", "rev = fragment.get('rev', None)\n", "branch = fragment.get('branch...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_5(self):...\n", "VAR_8 = 'test_foo.py:FooTest.test_bar'\n", "VAR_7 = BokChoyTestSuite('', test_spec=spec)\n", "VAR_1 = 'tests/{}'.format(VAR_8)\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name))\n" ]
[ "def test_testcase_spec(self):...\n", "spec = 'test_foo.py:FooTest.test_bar'\n", "suite = BokChoyTestSuite('', test_spec=spec)\n", "name = 'tests/{}'.format(spec)\n", "self.assertEqual(suite.cmd, self._expected_command(name=name))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_1(VAR_2, VAR_3=False):...\n", "\"\"\"docstring\"\"\"\n", "if FUNC_0(VAR_2):\n", "VAR_0.error('Unable to read from file %s. (%s)' % (VAR_2, ex1.strerror))\n", "VAR_11 = [line.decode('utf-8', 'replace') for line in VAR_24]\n", "if not FUNC_4('pdftotext'):\n", "VAR_24 = open(VAR_2, 'r')\n", "re...
[ "def text_lines_from_local_file(document, remote=False):...\n", "\"\"\"docstring\"\"\"\n", "if is_pdf(document):\n", "log.error('Unable to read from file %s. (%s)' % (document, ex1.strerror))\n", "lines = [line.decode('utf-8', 'replace') for line in filestream]\n", "if not executable_exists('pdftotext'):\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Expr'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "For", "AugAssign'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def __init__(self, VAR_22):...\n", "self.prefix = VAR_22\n" ]
[ "def __init__(self, prefix):...\n", "self.prefix = prefix\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_1(VAR_0: DirectoryEntry, VAR_2=False) ->ScanResult:...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = url_to_domain(VAR_0.landing_page_url)\n", "VAR_1 = inspect_domains([VAR_12], {'timeout': 10})\n", "VAR_13 = FUNC_0(VAR_0, VAR_1[0])\n", "if VAR_2:\n", "VAR_13.securedrop = VAR_0\n", "return VAR_13...
[ "def scan(securedrop: DirectoryEntry, commit=False) ->ScanResult:...\n", "\"\"\"docstring\"\"\"\n", "securedrop_domain = url_to_domain(securedrop.landing_page_url)\n", "pshtt_results = inspect_domains([securedrop_domain], {'timeout': 10})\n", "result = pshtt_data_to_result(securedrop, pshtt_results[0])\n", ...
[ 0, 0, 6, 6, 6, 0, 6, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'" ]
[ "def FUNC_13(VAR_11, VAR_1, VAR_3, VAR_4):...\n", "VAR_12 = []\n", "for VAR_15 in range(VAR_11[1]):\n", "VAR_29 = VAR_1.pop()\n", "if len(VAR_12) == 1:\n", "if VAR_29 >= 0:\n", "if VAR_12[0] < 0:\n", "if VAR_12[0] >= 0 and VAR_12[1] >= 0:\n", "VAR_12.insert(0, int(VAR_29, 16))\n", "VAR_12.insert(0...
[ "def handleBoolOp(item, stack, symbols, symId):...\n", "params = []\n", "for i in range(item[1]):\n", "p = stack.pop()\n", "if len(params) == 1:\n", "if p >= 0:\n", "if params[0] < 0:\n", "if params[0] >= 0 and params[1] >= 0:\n", "params.insert(0, int(p, 16))\n", "params.insert(0, p)\n", "func ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Condition", "Condition", "Condition", "Condition", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "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'" ]
[ "def FUNC_3(self, VAR_3, VAR_4, VAR_9):...\n", "return VAR_4.is_course_staff or VAR_3.user.is_superuser\n" ]
[ "def has_object_permission(self, request, view, obj):...\n", "return view.is_course_staff or request.user.is_superuser\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "from flask import Flask, render_template, redirect, request\n", "import pg, markdown, time\n", "from time import strftime, localtime\n", "import pg, markdown, time\n", "from wiki_linkify import wiki_linkify\n", "VAR_0 = Flask('WikiApp')\n", "VAR_1 = pg.DB(dbname='wiki_db_redo')\n", "@VAR_0.route('/')...
[ "from flask import Flask, render_template, redirect, request\n", "import pg, markdown, time\n", "from time import strftime, localtime\n", "import pg, markdown, time\n", "from wiki_linkify import wiki_linkify\n", "app = Flask('WikiApp')\n", "db = pg.DB(dbname='wiki_db_redo')\n", "@app.route('/')...\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "Import'", "ImportFrom'", "Assign'", "Assign'", "Condition", "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'" ]
[ "def FUNC_5(VAR_17, VAR_16):...\n", "if FUNC_6(VAR_17):\n", "return FUNC_8(VAR_17, VAR_16)\n", "return FUNC_7(open(VAR_17).read(), VAR_16)\n", "VAR_28.error('%s', e)\n" ]
[ "def render_template(template, config):...\n", "if is_executable(template):\n", "return render_executable(template, config)\n", "return render_moustache(open(template).read(), config)\n", "logger.error('%s', e)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'", "Expr'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_35 = VAR_14.get_entries_query(**kwargs)\n", "if isinstance(VAR_25, list):\n", "VAR_35 = VAR_35.where(lambda g: g.metadata_type in VAR_25)\n", "VAR_35 = VAR_35.where(VAR_25=metadata_type)\n", "if VAR_27:\n", "VAR_35 = VAR_35.where(lambda g: g.status ...
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "pony_query = cls.get_entries_query(**kwargs)\n", "if isinstance(metadata_type, list):\n", "pony_query = pony_query.where(lambda g: g.metadata_type in metadata_type)\n", "pony_query = pony_query.where(metadata_type=metadata_type)\n", "if exclude_deleted:\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_1: neko.NekoBot):...\n", "\"\"\"docstring\"\"\"\n", "self.bot = VAR_1\n" ]
[ "def __init__(self, bot: neko.NekoBot):...\n", "\"\"\"docstring\"\"\"\n", "self.bot = bot\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = discord.Embed(VAR_2=\n 'Launcher for old flashcards (r4,m3,dstt,dsx,etc)', VAR_3=discord.Color\n (4387938))\n", "VAR_7.set_author(name='Apache Thunder', url=\n 'https://gbatemp.net/threads/r4-stage2-twl-flashcart-launcher-and-perhaps-oth...
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "embed = discord.Embed(title=\n 'Launcher for old flashcards (r4,m3,dstt,dsx,etc)', color=discord.Color\n (4387938))\n", "embed.set_author(name='Apache Thunder', url=\n 'https://gbatemp.net/threads/r4-stage2-twl-flashcart-launcher-and-perhaps-oth...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_3(self, VAR_2, VAR_6, VAR_7, *VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = []\n", "assert VAR_2 in self.SUBJECTS, 'Subject %s not in SUBJECTS' % VAR_2\n", "VAR_8 = [VAR_2, VAR_6, VAR_7] + list(VAR_8)\n", "self.observerLock.acquire()\n", "for VAR_12, osubject, ochangeTypes, oid, VAR_5 in...
[ "def notify(self, subject, changeType, obj_id, *args):...\n", "\"\"\"docstring\"\"\"\n", "tasks = []\n", "assert subject in self.SUBJECTS, 'Subject %s not in SUBJECTS' % subject\n", "args = [subject, changeType, obj_id] + list(args)\n", "self.observerLock.acquire()\n", "for ofunc, osubject, ochangeTypes...
[ 0, 0, 0, 0, 0, 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'", "Assert'", "Assign'", "Expr'", "For", "Expr'", "Condition", "Expr'", "For", "Condition", "Expr'", "Expr'", "Condition", "FunctionDef'", "Expr'", "Expr'", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Assign'...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_9 = {}\n", "if not VAR_5:\n", "VAR_5 = CLASS_0.get_report(VAR_1)['analysis']\n", "VAR_15 = CLASS_0.behavior_get_processes(VAR_1, VAR_5)\n", "for proc in VAR_15['data']:\n", "VAR_6 = proc['pid']\n", "return VAR_9\n", "VAR_22 = proc['process_name...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "data = {}\n", "if not report:\n", "report = AnalysisController.get_report(task_id)['analysis']\n", "procs = AnalysisController.behavior_get_processes(task_id, report)\n", "for proc in procs['data']:\n", "pid = proc['pid']\n", "return data\n", "pnam...
[ 0, 0, 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", "Assign'", "Condition", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'", "For", "Condition", "Condition", "Assign'", "Assign'", "For", "Condition", "Assign'", "Condition", "Assign'", "For", "Condition", "Assign'", "For...
[ "@abstractmethod...\n", "" ]
[ "@abstractmethod...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_0(self, VAR_0: str):...\n", "VAR_1 = get_email(self)\n", "self.write(api.survey.get_one(VAR_0, VAR_1=email))\n" ]
[ "def get(self, survey_id: str):...\n", "email = get_email(self)\n", "self.write(api.survey.get_one(survey_id, email=email))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_42(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 'TRUNCATE TABLE players;'\n", "tools.query(VAR_11)\n", "tournament.swissPairings()\n" ]
[ "def test_no_players(self):...\n", "\"\"\"docstring\"\"\"\n", "q = 'TRUNCATE TABLE players;'\n", "tools.query(q)\n", "tournament.swissPairings()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_12):...\n", "if self.etag != VAR_12.etag or self.etag is None:\n", "return cmp(self.mtime, VAR_12.mtime) > 0\n", "return False\n" ]
[ "def is_newer_than(self, other):...\n", "if self.etag != other.etag or self.etag is None:\n", "return cmp(self.mtime, other.mtime) > 0\n", "return False\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_36():...\n", "yield os.path.join(self.home, 'lib')\n", "if self.jdk:\n", "yield os.path.join(self.home, 'jre', 'lib')\n" ]
[ "def lib_paths():...\n", "yield os.path.join(self.home, 'lib')\n", "if self.jdk:\n", "yield os.path.join(self.home, 'jre', 'lib')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_5():...\n", "\"\"\"docstring\"\"\"\n", "VAR_32 = ['date', 'league', 'team1', 'team2']\n", "VAR_33 = ['Date', 'Div', 'HomeTeam', 'AwayTeam']\n", "VAR_34 = ['spi1', 'spi2', 'prob1', 'prob2', 'probtie', 'proj_score1',\n 'proj_score2', 'importance1', 'importance2', 'BbAvH', 'BbAvA', 'BbAvD',\n '...
[ "def create_modeling_tables():...\n", "\"\"\"docstring\"\"\"\n", "spi_keys = ['date', 'league', 'team1', 'team2']\n", "fd_keys = ['Date', 'Div', 'HomeTeam', 'AwayTeam']\n", "input_cols = ['spi1', 'spi2', 'prob1', 'prob2', 'probtie', 'proj_score1',\n 'proj_score2', 'importance1', 'importance2', 'BbAvH', '...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 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'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "For", "Assign'", "For", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "For", "Condition", "F...
[ "def __init__(self, VAR_1, VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "self.node_ip_address = VAR_3\n", "self.redis_client = redis.StrictRedis(host=redis_ip_address, port=\n redis_port, password=redis_password)\n", "self.log_files = {}\n", "self.log_file_handles = {}\n", "self.files...
[ "def __init__(self, redis_ip_address, redis_port, node_ip_address,...\n", "\"\"\"docstring\"\"\"\n", "self.node_ip_address = node_ip_address\n", "self.redis_client = redis.StrictRedis(host=redis_ip_address, port=\n redis_port, password=redis_password)\n", "self.log_files = {}\n", "self.log_file_handles...
[ 0, 0, 6, 6, 6, 6, 6 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_1(self):...\n", "settings.SSH_PRIVATE_KEY = ''\n" ]
[ "def tearDown(self):...\n", "settings.SSH_PRIVATE_KEY = ''\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_7(self, VAR_14):...\n", "if not VAR_14:\n", "return\n", "self.model.total_items = VAR_14['total']\n", "if self.num_search_results_label:\n", "self.num_search_results_label.setText('%d results' % VAR_14['total'])\n", "if VAR_14['first'] >= self.model.rowCount():\n", "self.model.add_items(VAR_...
[ "def on_search_results(self, response):...\n", "if not response:\n", "return\n", "self.model.total_items = response['total']\n", "if self.num_search_results_label:\n", "self.num_search_results_label.setText('%d results' % response['total'])\n", "if response['first'] >= self.model.rowCount():\n", "self...
[ 0, 0, 0, 0, 0, 0, 4, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "@staticmethod...\n", "VAR_7 = dbaseConn()\n", "VAR_9 = 'INSERT INTO `User` (`uid`, `email`, `name`) VALUES (%s, %s, %s)'\n", "VAR_7.db_conn_close()\n", "VAR_7.db.commit()\n", "cursor.execute(VAR_9, (VAR_3.uid, VAR_3.email, VAR_3.name))\n", "return False\n", "VAR_7.db_conn_close()\n", "return True\n...
[ "@staticmethod...\n", "dbConn = dbaseConn()\n", "sql = 'INSERT INTO `User` (`uid`, `email`, `name`) VALUES (%s, %s, %s)'\n", "dbConn.db_conn_close()\n", "dbConn.db.commit()\n", "cursor.execute(sql, (user.uid, user.email, user.name))\n", "return False\n", "dbConn.db_conn_close()\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'", "Expr'", "Return'" ]
[ "@VAR_8.command()...\n", "\"\"\"docstring\"\"\"\n", "if FUNC_0(VAR_9):\n", "pgsql.complete_quest(VAR_3, VAR_12, False)\n", "await VAR_9.send(\"You don't have permission to use this command\")\n" ]
[ "@bot.command()...\n", "\"\"\"docstring\"\"\"\n", "if whitelist_check(ctx):\n", "pgsql.complete_quest(pg_connection, quest_id, False)\n", "await ctx.send(\"You don't have permission to use this command\")\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_0(VAR_0):...\n", "return CLASS_0(VAR_0)\n" ]
[ "def connectToMySQL(db):...\n", "return MySQLConnection(db)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_28(self, VAR_18=False):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_45(VAR_25, VAR_39):...\n", "if self.parentfield:\n", "return '{} #{}: {}: {}'.format(_('Row'), self.idx, _(VAR_25.label), VAR_39)\n", "return '{}: {}'.format(_(VAR_25.label), VAR_39)\n" ]
[ "def get_invalid_links(self, is_submittable=False):...\n", "\"\"\"docstring\"\"\"\n", "def get_msg(df, docname):...\n", "if self.parentfield:\n", "return '{} #{}: {}: {}'.format(_('Row'), self.idx, _(df.label), docname)\n", "return '{}: {}'.format(_(df.label), docname)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "@api.public...\n", "self.response.write(api.get_peer_host() or '<none>')\n" ]
[ "@api.public...\n", "self.response.write(api.get_peer_host() or '<none>')\n" ]
[ 0, 0 ]
[ "Condition", "Expr'" ]
[ "def FUNC_11(self, VAR_9, VAR_10=None):...\n", "if isinstance(VAR_9, str) or callable(VAR_9):\n", "self.params.append(VAR_9)\n", "VAR_48 = len(self.params)\n", "if VAR_10:\n", "for VAR_51 in VAR_9:\n", "self.params.add_name(VAR_10)\n", "self._set_params_item(VAR_51)\n", "if VAR_10:\n", "self.param...
[ "def _set_params_item(self, item, name=None):...\n", "if isinstance(item, str) or callable(item):\n", "self.params.append(item)\n", "start = len(self.params)\n", "if name:\n", "for i in item:\n", "self.params.add_name(name)\n", "self._set_params_item(i)\n", "if name:\n", "self.params.set_name(name...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Condition", "For", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_1():...\n", "VAR_12 = sqlite3.connect(os.path.abspath(os.path.dirname(__file__)) +\n '\\\\theory.db')\n", "VAR_7 = VAR_12.cursor()\n", "for i in VAR_0:\n", "VAR_7.execute('create table ' + str(i) + ' (link STRING)')\n", "VAR_12.commit()\n", "VAR_12.close()\n" ]
[ "def create_theory_table():...\n", "theory = sqlite3.connect(os.path.abspath(os.path.dirname(__file__)) +\n '\\\\theory.db')\n", "conn = theory.cursor()\n", "for i in available_tags:\n", "conn.execute('create table ' + str(i) + ' (link STRING)')\n", "theory.commit()\n", "theory.close()\n" ]
[ 0, 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "Expr'" ]
[ "@user_passes_test(user_is_superuser)...\n", "VAR_4 = context_testcases()\n", "return render(VAR_0, 'testcases/testcases.html', VAR_4)\n" ]
[ "@user_passes_test(user_is_superuser)...\n", "context = context_testcases()\n", "return render(request, 'testcases/testcases.html', context)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_23(VAR_11):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ "def _fake_recv(ignore_arg):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(self, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = get_random_string(import_from_settings('OIDC_STATE_SIZE', 32))\n", "VAR_8 = import_from_settings('OIDC_REDIRECT_FIELD_NAME', 'next')\n", "VAR_9 = {'response_type': 'code', 'scope': 'openid', 'client_id': self.\n OIDC_RP_CLIENT_ID, 'redi...
[ "def get(self, request):...\n", "\"\"\"docstring\"\"\"\n", "state = get_random_string(import_from_settings('OIDC_STATE_SIZE', 32))\n", "redirect_field_name = import_from_settings('OIDC_REDIRECT_FIELD_NAME', 'next')\n", "params = {'response_type': 'code', 'scope': 'openid', 'client_id': self.\n OIDC_RP_CL...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_9(self, VAR_13):...\n", "if not VAR_13:\n" ]
[ "def p_error(self, p):...\n", "if not p:\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@VAR_0.route('/strip/<int:id>')...\n", "VAR_7 = get_db()\n", "VAR_15 = get_user(VAR_4)\n", "VAR_16 = None\n", "if VAR_15['admin'] != 1:\n", "VAR_16 = 'User has no admin rights.'\n", "if VAR_16 is None:\n", "VAR_7.execute('UPDATE user SET admin = 0 WHERE id = ?', (VAR_4,))\n", "flash(VAR_16)\n", "...
[ "@bp.route('/strip/<int:id>')...\n", "db = get_db()\n", "user = get_user(id)\n", "error = None\n", "if user['admin'] != 1:\n", "error = 'User has no admin rights.'\n", "if error is None:\n", "db.execute('UPDATE user SET admin = 0 WHERE id = ?', (id,))\n", "flash(error)\n", "db.commit()\n", "retu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Return'", "Return'" ]
[ "async def FUNC_1(self, VAR_1, VAR_2='', VAR_3=discord.Color.default()):...\n", "VAR_7 = discord.Embed(VAR_2=title, VAR_3=color)\n", "VAR_7.description = VAR_1\n", "await self.bot.say('', VAR_7=embed)\n" ]
[ "async def simple_embed(self, text, title='', color=discord.Color.default()):...\n", "embed = discord.Embed(title=title, color=color)\n", "embed.description = text\n", "await self.bot.say('', embed=embed)\n" ]
[ 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_18, VAR_19):...\n", "\"\"\"docstring\"\"\"\n", "self.auth = VAR_18\n", "self.data = None\n", "self.station_data = None\n", "self.station = VAR_19\n" ]
[ "def __init__(self, auth, station):...\n", "\"\"\"docstring\"\"\"\n", "self.auth = auth\n", "self.data = None\n", "self.station_data = None\n", "self.station = station\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_13(self, VAR_23, VAR_32):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_23.shape != (2, 2):\n", "if len(VAR_32) != 1:\n", "VAR_32 = VAR_32[0]\n", "VAR_38 = 2 ** VAR_32\n", "VAR_39 = 2 ** (self.wires - VAR_32 - 1)\n", "VAR_23 = np.kron(np.kron(np.eye(VAR_38), VAR_23), np.eye(VAR_39))\n", "retur...
[ "def expand_one(self, U, wires):...\n", "\"\"\"docstring\"\"\"\n", "if U.shape != (2, 2):\n", "if len(wires) != 1:\n", "wires = wires[0]\n", "before = 2 ** wires\n", "after = 2 ** (self.wires - wires - 1)\n", "U = np.kron(np.kron(np.eye(before), U), np.eye(after))\n", "return U\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_8(self, VAR_5):...\n", "VAR_5.setResponseCode(OK)\n", "return self._render_template(VAR_5)\n" ]
[ "def render_GET(self, request):...\n", "request.setResponseCode(OK)\n", "return self._render_template(request)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1):...\n", "VAR_8 = get_object_or_404(Hunt, id=pk)\n", "VAR_8.delete()\n", "return redirect('threat_hunter:index')\n" ]
[ "def hunt_del(request, pk):...\n", "hunt = get_object_or_404(Hunt, id=pk)\n", "hunt.delete()\n", "return redirect('threat_hunter:index')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_24(self, VAR_14):...\n", "" ]
[ "def is_pk(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_13(self, VAR_16):...\n", "return True\n" ]
[ "def does_intersect_rule(self, rulectx):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_11(self, VAR_0, *VAR_1, **VAR_2):...\n", "if not VAR_0.user.is_authenticated:\n", "return invalid_permission_redirect(VAR_0)\n", "self.request = VAR_0\n", "self.filter_data = VAR_2.pop('filter_data', {})\n", "return super().get(self, VAR_0, *VAR_1, **kwargs)\n" ]
[ "def get(self, request, *args, **kwargs):...\n", "if not request.user.is_authenticated:\n", "return invalid_permission_redirect(request)\n", "self.request = request\n", "self.filter_data = kwargs.pop('filter_data', {})\n", "return super().get(self, request, *args, **kwargs)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_0, VAR_1, VAR_2):...\n", "super(CLASS_1, self).__init__(VAR_0, VAR_1, VAR_2, 'HEAD')\n" ]
[ "def __init__(self, connection, args, logger):...\n", "super(HttpHead, self).__init__(connection, args, logger, 'HEAD')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_6(self, VAR_7):...\n", "VAR_8 = self.content\n", "while VAR_8:\n", "yield VAR_8[:VAR_7]\n", "VAR_8 = VAR_8[VAR_7:]\n" ]
[ "def iter_content(self, chunk_size):...\n", "c = self.content\n", "while c:\n", "yield c[:chunk_size]\n", "c = c[chunk_size:]\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_1(self, **VAR_34):...\n", "\"\"\"docstring\"\"\"\n", "for arg in VAR_34:\n", "if hasattr(self, arg):\n", "self._check_usage()\n", "if getattr(self, arg) is None:\n", "setattr(self, arg, VAR_34[arg])\n" ]
[ "def update_if_absent(self, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "for arg in kwargs:\n", "if hasattr(self, arg):\n", "self._check_usage()\n", "if getattr(self, arg) is None:\n", "setattr(self, arg, kwargs[arg])\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Expr'", "Condition", "Expr'" ]
[ "from bs4 import BeautifulSoup\n", "import requests\n", "import re\n", "from typing import Dict, TYPE_CHECKING\n", "from pshtt.pshtt import inspect_domains\n", "import tldextract\n", "from django.utils import timezone\n", "from directory.models import ScanResult, DirectoryEntry\n", "from scanner.uti...
[ "from bs4 import BeautifulSoup\n", "import requests\n", "import re\n", "from typing import Dict, TYPE_CHECKING\n", "from pshtt.pshtt import inspect_domains\n", "import tldextract\n", "from django.utils import timezone\n", "from directory.models import ScanResult, DirectoryEntry\n", "from scanner.uti...
[ 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6 ]
[ "ImportFrom'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Condition", "ImportFrom'", "FunctionDef'", "Docstring", "Assign'", "Return'", "Return'", "Assign'" ]
[ "def FUNC_6(self):...\n", "self.assertTrue({'name': 'DocField'} in DatabaseQuery('DocType').execute(\n filters={'name': 'DocField'}))\n" ]
[ "def test_filters_4(self):...\n", "self.assertTrue({'name': 'DocField'} in DatabaseQuery('DocType').execute(\n filters={'name': 'DocField'}))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_9(self, VAR_10, VAR_6=[], VAR_11=None, VAR_12=True):...\n", "return super().command(VAR_10, VAR_6, VAR_11, VAR_12, '\\r\\n', False)\n" ]
[ "def command(self, command, expected_output=[], error_message=None,...\n", "return super().command(command, expected_output, error_message, log_event,\n '\\r\\n', False)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_31(self, *VAR_79, **VAR_80):...\n", "def FUNC_39(VAR_101):...\n", "VAR_101.log = VAR_79, VAR_80\n", "return VAR_101\n" ]
[ "def log(self, *logs, **kwlogs):...\n", "def decorate(ruleinfo):...\n", "ruleinfo.log = logs, kwlogs\n", "return ruleinfo\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_8(self):...\n", "VAR_9 = fingerprint(VAR_0)\n", "self.assertEquals(VAR_9, '54:6d:da:1f:91:b5:2b:6f:a2:83:90:c4:f9:73:76:f5')\n" ]
[ "def test_rsa_key_fingerprint(self):...\n", "fp = fingerprint(RSA_PUBKEY)\n", "self.assertEquals(fp, '54:6d:da:1f:91:b5:2b:6f:a2:83:90:c4:f9:73:76:f5')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "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_9(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = block.sysfs_to_devpath(VAR_1)\n", "if block.is_extended_partition(VAR_11):\n", "LOG.info(\"extended partitions do not need wiping, so skipping: '%s'\", VAR_11)\n", "for bcache_path in ['bcache', 'bcache/set']:\n", "VAR_42 = os.path.join(VAR...
[ "def wipe_superblock(device):...\n", "\"\"\"docstring\"\"\"\n", "blockdev = block.sysfs_to_devpath(device)\n", "if block.is_extended_partition(blockdev):\n", "LOG.info(\"extended partitions do not need wiping, so skipping: '%s'\", blockdev)\n", "for bcache_path in ['bcache', 'bcache/set']:\n", "stop_pat...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'", "For", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "For", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Return'", "Expr'" ]