code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
"""The isolation plugin resets the contents of sys.modules after running each test module or package. Use it by setting ``--with-isolation`` or the NOSE_WITH_ISOLATION environment variable. The effects are similar to wrapping the following functions around the import and execution of each test module:: def setup(...
ajibawa-2023/Python-Code-Large/train/row_81970
40
103
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81970:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1796, 0.3495, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81970:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81970:Expr_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81970:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81970:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" ErrorClass Plugins ------------------ ErrorClass plugins provide an easy way to add support for custom handling of particular classes of exceptions. An ErrorClass plugin defines one or more ErrorClasses and how each is handled and reported on. Each error class is stored in a different attribute on the result, and...
ajibawa-2023/Python-Code-Large/train/row_81971
71
210
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81971:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 93], "level": 0, "parent": null, "vector": [8, 0, 0.2238, 0.4429, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81971:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81971:Expr_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81971:ClassDef_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81971:FunctionDef_L104_C4"}, {"f": "ajibawa-2023/Python-C...
""" This plugin provides ``--pdb`` and ``--pdb-failures`` options. The ``--pdb`` option will drop the test runner into pdb when it encounters an error. To drop into pdb on failure, use ``--pdb-failures``. """ import pdb from nose.plugins.base import Plugin class Pdb(Plugin): """ Provides --pdb and --pdb-failu...
ajibawa-2023/Python-Code-Large/train/row_81972
36
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81972:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0484, 0.0806, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81972:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81972:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81972:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81972:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""If you have Ned Batchelder's coverage_ module installed, you may activate a coverage report with the ``--with-coverage`` switch or NOSE_WITH_COVERAGE environment variable. The coverage report will cover any python source module imported after the start of the test run, excluding modules that match testMatch. If you ...
ajibawa-2023/Python-Code-Large/train/row_81973
187
330
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81973:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0197, 0.0364, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81973:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81973:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81973:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81973:Assign_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" This plugin captures stdout during test execution. If the test fails or raises an error, the captured output will be appended to the error or failure output. It is enabled by default but can be disabled with the options ``-s`` or ``--nocapture``. :Options: ``--nocapture`` Don't capture stdout (any stdout out...
ajibawa-2023/Python-Code-Large/train/row_81974
74
129
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81974:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0465, 0.0853, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81974:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81974:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81974:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81974:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" This plugin installs a DEPRECATED error class for the :class:`DeprecatedTest` exception. When :class:`DeprecatedTest` is raised, the exception will be logged in the deprecated attribute of the result, ``D`` or ``DEPRECATED`` (verbose) will be output, and the exception will not be counted as an error or failure. It ...
ajibawa-2023/Python-Code-Large/train/row_81976
20
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81976:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0889, 0.1556, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81976:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81976:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81976:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81976:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" This plugin installs a SKIP error class for the SkipTest exception. When SkipTest is raised, the exception will be logged in the skipped attribute of the result, 'S' or 'SKIP' (verbose) will be output, and the exception will not be counted as an error or failure. This plugin is enabled by default but may be disable...
ajibawa-2023/Python-Code-Large/train/row_81978
22
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81978:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0714, 0.125, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81978:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81978:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81978:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81978:ClassDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" This plugin adds a test id (like #1) to each test name output. After you've run once to generate test ids, you can re-run individual tests by activating the plugin and passing the ids (with or without the # prefix) instead of test names. For example, if your normal test run looks like:: % nosetests -v tests.t...
ajibawa-2023/Python-Code-Large/train/row_81980
135
306
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81980:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 94], "level": 0, "parent": null, "vector": [8, 0, 0.1552, 0.3072, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81980:Try_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81980:ImportFrom_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81980:Try_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81980:ImportFrom_L105_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" Writing Plugins --------------- nose supports plugins for test collection, selection, observation and reporting. There are two basic rules for plugins: * Plugin classes should subclass :class:`nose.plugins.Plugin`. * Plugins may implement any of the methods described in the class :doc:`IPluginInterface <interf...
ajibawa-2023/Python-Code-Large/train/row_81981
7
190
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81981:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 183], "level": 0, "parent": null, "vector": [8, 0, 0.4842, 0.9632, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81981:If_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81981:Import_L189_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81981:If_L188_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81981:Expr_L190_C4"}]
""" This plugin captures logging statements issued during test execution. When an error or failure occurs, the captured log messages are attached to the running test in the test.capturedLogging attribute, and displayed with the error failure output. It is enabled by default but can be turned off with the option ``--nol...
ajibawa-2023/Python-Code-Large/train/row_81982
127
236
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81982:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 16], "level": 0, "parent": null, "vector": [8, 0, 0.036, 0.0678, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81982:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81982:ImportFrom_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81982:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81982:ImportFrom_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" Plugin Manager -------------- A plugin manager class is used to load plugins, manage the list of loaded plugins, and proxy calls to those plugins. The plugin managers provided with nose are: :class:`PluginManager` This manager doesn't implement loadPlugins, so it can only work with a static list of plugi...
ajibawa-2023/Python-Code-Large/train/row_81983
252
445
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81983:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 46], "level": 0, "parent": null, "vector": [8, 0, 0.0528, 0.1034, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81983:Try_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81983:Import_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81983:Try_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81983:Import_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
"""Attribute selector plugin. Oftentimes when testing you will want to select tests based on criteria rather then simply by filename. For example, you might want to run all tests except for the slow ones. You can do this with the Attribute selector plugin by setting attributes on your test methods. Here is an example:...
ajibawa-2023/Python-Code-Large/train/row_81984
106
286
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81984:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 102], "level": 0, "parent": null, "vector": [8, 0, 0.1801, 0.3566, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81984:FunctionDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81984:Expr_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81984:FunctionDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81984:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Py...
""" Lists builtin plugins. """ plugins = [] builtins = ( ('nose.plugins.attrib', 'AttributeSelector'), ('nose.plugins.capture', 'Capture'), ('nose.plugins.logcapture', 'LogCapture'), ('nose.plugins.cover', 'Coverage'), ('nose.plugins.debug', 'Pdb'), ('nose.plugins.deprecated', 'Deprecated'), ...
ajibawa-2023/Python-Code-Large/train/row_81985
9
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81985:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0588, 0.0882, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81985:For_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81985:Try_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81985:Try_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81985:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
""" Twisted integration ------------------- This module provides a very simple way to integrate your tests with the Twisted_ event loop. You must import this module *before* importing anything from Twisted itself! Example:: from nose.twistedtools import reactor, deferred @deferred() def test_resolve(): ...
ajibawa-2023/Python-Code-Large/train/row_81986
56
167
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81986:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 29], "level": 0, "parent": null, "vector": [8, 0, 0.0898, 0.1737, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81986:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81986:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81986:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81986:Try_L49_C4"}, {"f": "ajibawa-2023/Python-Code-La...
from nose.core import collector, main, run, run_exit, runmodule # backwards compatibility from nose.exc import SkipTest, DeprecatedTest from nose.tools import with_setup __author__ = 'Jason Pellerin' __versioninfo__ = (1, 1, 3) __version__ = '.'.join(map(str, __versioninfo__)) __all__ = [ 'main', 'run', 'run_exit...
ajibawa-2023/Python-Code-Large/train/row_81987
7
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81987:ImportFrom_L1_C0", "label": "from nose.core import collector, main, run\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 764, 0, 5, 0, 0, 764, 0, 0], "semantic": {"name": "nose.core", "arg_names": ...
[]
"""Exceptions for marking tests as skipped or deprecated. This module exists to provide backwards compatibility with previous versions of nose where skipped and deprecated tests were core functionality, rather than being provided by plugins. It may be removed in a future release. """ from nose.plugins.skip import Skip...
ajibawa-2023/Python-Code-Large/train/row_81988
3
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81988:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.4444, 0.7778, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
""" Test Loader ----------- nose's test loader implements the same basic functionality as its superclass, unittest.TestLoader, but extends it by more liberal interpretations of what may be a test and how a test may be named. """ from __future__ import generators import logging import os import sys import unittest imp...
ajibawa-2023/Python-Code-Large/train/row_81989
327
595
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81989:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0076, 0.0134, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81989:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81989:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81989:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81989:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""Implements an importer that looks only in specific path (ignoring sys.path), and uses a per-path cache in addition to sys.modules. This is necessary because test modules in different directories frequently have the same names, which means that the first loaded would mask the rest when using the builtin importer. """...
ajibawa-2023/Python-Code-Large/train/row_81991
96
154
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81991:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0227, 0.039, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81991:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81991:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81991:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81991:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-...
from manpage import Writer from sphinx.builders.text import TextBuilder class ManBuilder(TextBuilder): name = 'manpage' format = 'man' out_suffix = '.man' def prepare_writing(self, docnames): self.writer = ManpageWriter(self) class ManpageWriter(Writer): def __init__(self, builder): ...
ajibawa-2023/Python-Code-Large/train/row_81993
14
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81993:ImportFrom_L1_C0", "label": "from manpage import Writer", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 648, 0, 1, 0, 0, 648, 0, 0], "semantic": {"name": "manpage", "arg_names": [], "import_names": ["Wr...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81993:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81993:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81993:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81993:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from docutils import nodes from docutils.statemachine import ViewList from nose.util import resolve_name def docstring_directive(dirname, arguments, options, content, lineno, content_offset, block_text, state, state_machine): obj_name = arguments[0] obj = resolve_name(obj_name) rst...
ajibawa-2023/Python-Code-Large/train/row_81994
20
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81994:ImportFrom_L1_C0", "label": "from docutils import nodes", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 976, 0, 1, 0, 0, 976, 0, 0], "semantic": {"name": "docutils", "arg_names": [], "import_names": ["nodes...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81994:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81994:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81994:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81994:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" Patch utility to apply unified diffs Brute-force line-by-line non-recursive parsing Copyright (c) 2008-2010 anatoly techtonik Available under the terms of MIT license NOTE: This version has been patched by Alex Stewart <alex@foogod.com> for Python 3.x support and other misc fixups. Proj...
ajibawa-2023/Python-Code-Large/train/row_81995
355
639
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81995:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 16], "level": 0, "parent": null, "vector": [8, 0, 0.0133, 0.025, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81995:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81995:ImportFrom_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81995:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81995:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
import sys try: import ez_setup ez_setup.use_setuptools() except ImportError: pass from setuptools import setup setup( name='Example html output plugin', version='0.1', author='Jason Pellerin', author_email = 'jpellerin+nose@gmail.com', description = 'Example nose html output plugin', ...
ajibawa-2023/Python-Code-Large/train/row_81996
6
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81996:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81996:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81996:Import_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81996:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81996:Expr_L4_C4"}]
"""This is a very basic example of a plugin that controls all test output. In this case, it formats the output as ugly unstyled html. Upgrading this plugin into one that uses a template and css to produce nice-looking, easily-modifiable html output is left as an exercise for the reader who would like to see his or her...
ajibawa-2023/Python-Code-Large/train/row_81997
55
92
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81997:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0435, 0.0761, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81997:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81997:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81997:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81997:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" Examples of test function/method attribute usage with patched nose Simple syntax (-a, --attr) examples: * nosetests -a status=stable => only test cases with attribute "status" having value "stable" * nosetests -a priority=2,status=stable => both attributes must match * nosetests -a tags=h...
ajibawa-2023/Python-Code-Large/train/row_81998
26
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81998:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 30], "level": 0, "parent": null, "vector": [8, 0, 0.189, 0.3659, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81998:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81998:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81998:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81998:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python...
""" An example of how to create a simple nose plugin. """ try: import ez_setup ez_setup.use_setuptools() except ImportError: pass from setuptools import setup setup( name='Example plugin', version='0.1', author='Jason Pellerin', author_email = 'jpellerin+nose@gmail.com', description =...
ajibawa-2023/Python-Code-Large/train/row_81999
6
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_81999:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0926, 0.1481, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81999:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81999:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81999:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81999:Expr_L7_C4"}]
from nose.plugins import Plugin class ExamplePlugin(Plugin): pass
ajibawa-2023/Python-Code-Large/train/row_82000
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82000:ImportFrom_L1_C0", "label": "from nose.plugins import Plugin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 23, 0, 1, 0, 0, 23, 0, 0], "semantic": {"name": "nose.plugins", "arg_names": [], "import_names": ...
[]
import unittest class Tests(unittest.TestCase): def setUp(self): self.value = 1 def test_value(self): self.assertEqual(self.value, 1)
ajibawa-2023/Python-Code-Large/train/row_82001
6
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82001:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82001:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82001:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82001:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82001:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
class base: @classmethod def setup_class(cls): cls.inited = 1 @classmethod def teardown_class(cls): cls.inited = 0 def test1(self): assert self.inited def test2(self): assert self.inited class testa(base): pass class testb(base): pass
ajibawa-2023/Python-Code-Large/train/row_82002
9
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82002:ClassDef_L1_C0", "label": "base", "type": "class", "loc": [1, 11], "level": 0, "parent": null, "vector": [3, 0, 0.375, 0.6875, 0, 0.66, 0.0, 47, 0, 4, 0, 0, 0, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82002:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82002:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82002:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82002:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code...
pass
ajibawa-2023/Python-Code-Large/train/row_82003
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82004
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82005
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82006
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
from nose.exc import SkipTest def test_a(): pass def test_b(): raise SkipTest("I'm not ready for test b")
ajibawa-2023/Python-Code-Large/train/row_82007
3
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82007:ImportFrom_L1_C0", "label": "from nose.exc import SkipTest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 447, 0, 1, 0, 0, 447, 0, 0], "semantic": {"name": "nose.exc", "arg_names": [], "import_names": ...
[]
test = 'the nose knows'
ajibawa-2023/Python-Code-Large/train/row_82008
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82008:Assign_L1_C0", "label": "test =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 224, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
ajibawa-2023/Python-Code-Large/train/row_82009
2
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82009:Import_L1_C0", "label": "pkgutil import pkgutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 670, 0, 1, 0, 0, 670, 0, 0], "semantic": {"name": "pkgutil", "arg_names": [], "import_names": ["pkgutil"], "rhs_...
[]
import unittest def test_a(): pass def test_b(): raise TypeError("I am typeless") def test_c(): assert False, "I am contrary" def test_gen(): def tryit(i): pass for i in range(0, 4): yield tryit, i class TestCase(unittest.TestCase): def test_a(self): pass d...
ajibawa-2023/Python-Code-Large/train/row_82010
18
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82010:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82010:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82010:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82010:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82010:For_L16_C4"}, {"f": "ajibawa-2023/Python-...
""" Module-level doctest >>> 1 1 >>> add_one(_) 2 """ def add_one(i): """ function doctest >>> add_one(1) 2 >>> add_one(2) 3 >>> add_one('steve') joe """ return i + 1
ajibawa-2023/Python-Code-Large/train/row_82011
4
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82011:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.381, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82011:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82011:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82011:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82011:Return_L21_C4"}]
def test(): print "something" a = 4 assert a == 2
ajibawa-2023/Python-Code-Large/train/row_82012
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82012:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 4], "level": 0, "parent": null, "vector": [2, 0, 0.625, 1.0, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82012:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82012:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82012:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82012:Assign_L3_C4"}]
def test(): raise Exception("do not run")
ajibawa-2023/Python-Code-Large/train/row_82013
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82013:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82014
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
print "1help imported" def help(): print "1help called" pass
ajibawa-2023/Python-Code-Large/train/row_82015
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82015:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.25, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "an...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82015:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82015:Expr_L3_C4"}]
import sys print 'ipthelp', sys.modules.get('ipthelp') import ipthelp print ipthelp def test1(): ipthelp.help()
ajibawa-2023/Python-Code-Large/train/row_82016
6
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82016:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82016:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82016:Expr_L7_C4"}]
print "2help imported" def help(a): print "2 help %s" % 1 pass
ajibawa-2023/Python-Code-Large/train/row_82017
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82017:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.2, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82017:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82017:Expr_L4_C4"}]
import sys print 'ipthelp', sys.modules.get('ipthelp') import ipthelp print ipthelp def test2(): ipthelp.help(1)
ajibawa-2023/Python-Code-Large/train/row_82018
6
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82018:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82018:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82018:Expr_L8_C4"}]
from nose.plugins import Plugin class SomePlugin(Plugin): pass
ajibawa-2023/Python-Code-Large/train/row_82019
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82019:ImportFrom_L1_C0", "label": "from nose.plugins import Plugin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 23, 0, 1, 0, 0, 23, 0, 0], "semantic": {"name": "nose.plugins", "arg_names": [], "import_names": ...
[]
from setuptools import setup, find_packages setup( name='Some plugin', packages = find_packages(), entry_points = { 'nose.plugins.0.10': [ 'someplugin = someplugin:SomePlugin' ] })
ajibawa-2023/Python-Code-Large/train/row_82020
2
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82020:ImportFrom_L1_C0", "label": "from setuptools import setup, find_packages", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 182, 0, 2, 0, 0, 182, 0, 0], "semantic": {"name": "setuptools", "arg_names": [], "impor...
[]
"""This test will fail if generators bind too early.""" from nose.tools import eq_ def test1(): def func(_l, _n): eq_(len(_l), _n) l = [] for i in xrange(5): yield func, l, i l.append(None)
ajibawa-2023/Python-Code-Large/train/row_82021
9
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82021:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82021:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82021:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82021:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82021:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Cod...
def add(a, b): return a + b def div(a, b): return a // b def minus(a, b): return a - b def mult(a, b): return a * b
ajibawa-2023/Python-Code-Large/train/row_82022
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82022:FunctionDef_L1_C0", "label": "add", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.1364, 0.1818, 0, 0.66, 0.0, 241, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "add", "arg_names": ["a", "b"], "import_names": [], "rhs_call_name": "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82022:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82022:Return_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82022:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82022:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-L...
def test(): pass
ajibawa-2023/Python-Code-Large/train/row_82023
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82023:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
def times_two(a): """ >>> times_two(2) 4 >>> times_two('bee') beebee """ return a * 2
ajibawa-2023/Python-Code-Large/train/row_82024
3
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82024:FunctionDef_L1_C0", "label": "times_two", "type": "function", "loc": [1, 8], "level": 0, "parent": null, "vector": [2, 0, 0.5625, 1.0, 0, 0.66, 0.0, 173, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "times_two", "arg_names": ["a"], "import_names": [], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82024:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82024:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82024:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82024:Return_L8_C4"}]
called = []
ajibawa-2023/Python-Code-Large/train/row_82025
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82025:Assign_L1_C0", "label": "called =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 30, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "called", "arg_names": [], "import_names": [], "rhs_call_name": "",...
[]
from nose import SkipTest def setup(): raise SkipTest("no thanks") def test_a(): raise AssertionError("test_a should not run") def test_b(): raise AssertionError("test_b should not run")
ajibawa-2023/Python-Code-Large/train/row_82026
4
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82026:ImportFrom_L1_C0", "label": "from nose import SkipTest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 874, 0, 1, 0, 0, 874, 0, 0], "semantic": {"name": "nose", "arg_names": [], "import_names": ["SkipTe...
[]
from nose import SkipTest raise SkipTest("Don't run me") def test(): assert False, "Should not be run" def test2(): assert False, "Should not be run"
ajibawa-2023/Python-Code-Large/train/row_82027
3
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82027:ImportFrom_L1_C0", "label": "from nose import SkipTest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 874, 0, 1, 0, 0, 874, 0, 0], "semantic": {"name": "nose", "arg_names": [], "import_names": ["SkipTe...
[]
def setup(): assert False, "Failure in mod setup" def test_a(): raise AssertionError("test_a should not run") def test_b(): raise AssertionError("test_b should not run")
ajibawa-2023/Python-Code-Large/train/row_82028
3
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82028:FunctionDef_L1_C0", "label": "setup", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.125, 0.1667, 0, 0.66, 0.0, 234, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "setup", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[]
def b(): pass
ajibawa-2023/Python-Code-Large/train/row_82029
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82029:FunctionDef_L1_C0", "label": "b", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 756, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "b", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
def a(): pass
ajibawa-2023/Python-Code-Large/train/row_82030
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82030:FunctionDef_L1_C0", "label": "a", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ...
[]
""" >>> True False """ """ >>> True False """
ajibawa-2023/Python-Code-Large/train/row_82031
2
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82031:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.3125, 0.5, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
""" >>> True False """ """ >>> True False """
ajibawa-2023/Python-Code-Large/train/row_82032
2
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82032:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.3125, 0.5, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82033
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
""" >>> True False """ """ >>> True False """
ajibawa-2023/Python-Code-Large/train/row_82034
2
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82034:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.3125, 0.5, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
""" >>> True False """ """ >>> True False """
ajibawa-2023/Python-Code-Large/train/row_82035
2
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82035:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.3125, 0.5, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82036
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82037
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82038
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82039
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
pass
ajibawa-2023/Python-Code-Large/train/row_82040
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin class Todo(Exception): pass class TodoPlugin(ErrorClassPlugin): todo = ErrorClass(Todo, label='TODO', isfailure=True)
ajibawa-2023/Python-Code-Large/train/row_82041
4
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82041:ImportFrom_L1_C0", "label": "from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 644, 0, 2, 0, 0, 644, 0, 0], "semantic": {"name": "nose.plug...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82041:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82041:Assign_L7_C4"}]
""" Top level --------- Let's run a test. >>> foo(1) 2 >>> 2 + 2 4 """ def foo(a): """ >>> foo(2) 3 """ return a + 1
ajibawa-2023/Python-Code-Large/train/row_82042
4
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82042:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.3529, 0.6471, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82042:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82042:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82042:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82042:Return_L17_C4"}]
def setup(): raise "KABOOM" def test_foo(): assert(1==1)
ajibawa-2023/Python-Code-Large/train/row_82043
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82043:FunctionDef_L1_C0", "label": "setup", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.3, 0.4, 0, 0.66, 0.0, 234, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "setup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[]
from setuptools import setup setup(name='issue191')
ajibawa-2023/Python-Code-Large/train/row_82044
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82044:ImportFrom_L1_C0", "label": "from setuptools import setup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "setuptools", "arg_names": [], "import_names":...
[]
def test(): pass
ajibawa-2023/Python-Code-Large/train/row_82045
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82045:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import sys, os, struct, gzip, hashlib, StringIO gzip.time = FakeTime() def binary_replace(data, newdata, offset): return data[0:offset] + newdata + data[offset+len(newdata):] def prx_compress(output, hdr, input, mod_name="", mod_a...
ajibawa-2023/Python-Code-Large/train/row_82046
56
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82046:ClassDef_L3_C0", "label": "FakeTime", "type": "class", "loc": [3, 5], "level": 0, "parent": null, "vector": [3, 0, 0.0488, 0.0366, 0, 0.66, 0.0, 425, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "FakeTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82046:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82046:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82046:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82046:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python import sys, hashlib def toNID(name): hashstr = hashlib.sha1(name.encode()).hexdigest().upper() return "0x" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + hashstr[0:2] if __name__ == "__main__": assert(toNID("sceKernelCpuSuspendIntr") == "0x092968F4") for name in sys.argv[1:]: print ("%s: %s"...
ajibawa-2023/Python-Code-Large/train/row_82047
7
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82047:Import_L3_C0", "label": "sys import sys, hashlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0769, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "hashli...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82047:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82047:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82047:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82047:Return_L7_C1"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python from hashlib import * import sys, struct def sha512(psid): if len(psid) != 16: return "".encode() for i in range(512): psid = sha1(psid).digest() return psid def get_psid(str): if len(str) != 32: return "".encode() b = "".encode() for i in range(0, len(str), 2): b += struct.pack('B...
ajibawa-2023/Python-Code-Large/train/row_82048
31
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82048:ImportFrom_L3_C0", "label": "from hashlib import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0652, 0.0217, 0, 0.66, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "hashlib", "arg_names": [], "import_names": ["*"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82048:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82048:If_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82048:If_L7_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_82048:Return_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/python """ pspbtcnf_editor: An script that add modules from pspbtcnf """ import sys, os, re from getopt import * from struct import * BTCNF_MAGIC=0x0F803001 verbose = False def print_usage(): print ("%s: pspbtcnf.bin [-o output.bin] [-a add_module_name:before_module_name:flag]" %(os.path...
ajibawa-2023/Python-Code-Large/train/row_82049
107
182
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82049:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.022, 0.0165, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82049:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82049:Expr_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82049:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82049:Assign_L19_C1"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python import os def main(): lists = [ "ISODrivers/Galaxy/galaxy.prx", "ISODrivers/March33/march33.prx", "ISODrivers/March33/march33_620.prx", "ISODrivers/Inferno/inferno.prx", "Popcorn/popcorn.prx", "Satelite/satelite.prx", "Stargate/stargate.prx", "SystemControl/systemctrl.prx", ...
ajibawa-2023/Python-Code-Large/train/row_82050
10
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82050:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82050:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82050:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82050:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82050:For_L20_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import os, gzip, StringIO gzip.time = FakeTime() def create_gzip(input, output): f_in=open(input, 'rb') temp=StringIO.StringIO() f=gzip.GzipFile(fileobj=temp, mode='wb') f.writelines(f_in) f.close() f_in.close() fout=open(out...
ajibawa-2023/Python-Code-Large/train/row_82051
30
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82051:ClassDef_L3_C0", "label": "FakeTime", "type": "class", "loc": [3, 5], "level": 0, "parent": null, "vector": [3, 0, 0.0909, 0.0682, 0, 0.66, 0.0, 425, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "FakeTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82051:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82051:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82051:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82051:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/env python # encoding: utf-8 # waf 1.6.2 VERSION='0.3.3' import sys APPNAME='p2t' top = '.' out = 'build' CPP_SOURCES = ['poly2tri/common/shapes.cc', 'poly2tri/sweep/cdt.cc', 'poly2tri/sweep/advancing_front.cc', 'poly2tri/sweep/sweep_context.cc', ...
ajibawa-2023/Python-Code-Large/train/row_82052
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82052:Assign_L5_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1111, 0.0222, 0, 0.66, 0.0, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82052:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82052:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82052:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82052:If_L25_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_820...
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
ajibawa-2023/Python-Code-Large/train/row_82053
53
90
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82053:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0111, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82053:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82053:ImportFrom_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82053:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82053:ImportFrom_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python2.4 '''Post a message to twitter''' __author__ = 'dewitt@google.com' import ConfigParser import getopt import os import sys import twitter USAGE = '''Usage: tweet [options] message This script posts a message to Twitter. Options: -h --help : print this help --consumer-key : the twit...
ajibawa-2023/Python-Code-Large/train/row_82056
82
141
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82056:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0213, 0.0071, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82056:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82056:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82056:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82056:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
ajibawa-2023/Python-Code-Large/train/row_82057
16
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82057:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 20], "level": 0, "parent": null, "vector": [8, 0, 0.2606, 0.0563, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82057:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82057:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82057:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82057:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
ajibawa-2023/Python-Code-Large/train/row_82058
19
73
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82058:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.2329, 0.0137, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82058:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82058:Return_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82058:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82058:Return_L56_C2"}, {"f": "ajibawa-2023/Python-Co...
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scan...
ajibawa-2023/Python-Code-Large/train/row_82060
48
65
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82060:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0231, 0.0308, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82060:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82060:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82060:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82060:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
"""Implementation of JSONEncoder """ import re try: from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ...
ajibawa-2023/Python-Code-Large/train/row_82061
230
434
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82061:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0046, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82061:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82061:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82061:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82061:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
ajibawa-2023/Python-Code-Large/train/row_82062
41
316
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82062:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1582, 0.3133, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82062:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82062:Expr_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82062:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82062:If_L164_C4"}, {"f": "ajibawa-2023/Python-Code...
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import glob import sys source_files = ["enet.pyx"] _enet_files = glob.glob("enet/*.c") if not _enet_files: print("You need to download and extract the enet 1.3 source to enet/") print("Download ...
ajibawa-2023/Python-Code-Large/train/row_82065
22
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82065:ImportFrom_L1_C0", "label": "from distutils.core import setup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82065:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82065:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82065:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82065:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_820...
from enet import *
ajibawa-2023/Python-Code-Large/train/row_82066
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82066:ImportFrom_L1_C0", "label": "from enet import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 525, 0, 1, 0, 0, 525, 0, 0], "semantic": {"name": "enet", "arg_names": [], "import_names": ["*"], "rhs_call_name...
[]
# Copyright (c) Mathias Kaerlev 2011-2012. # This file is part of pyspades. # pyspades is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
ajibawa-2023/Python-Code-Large/train/row_82068
72
167
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82068:Import_L18_C0", "label": "pyglet import pyglet", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.1078, 0.006, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "pyglet", "arg_names": [], "import_names": ["pyglet"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82068:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82068:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82068:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82068:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from distutils.core import setup import py2exe # just so we always get commands.py first, not the stdlib commands.py import sys sys.path.insert(0, '../feature_server') sys.path.append('..') setup( console = ['../feature_server/run.py'], zipfile = None, options = { 'py2exe' : { 'compres...
ajibawa-2023/Python-Code-Large/train/row_82069
6
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82069:ImportFrom_L1_C0", "label": "from distutils.core import setup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.05, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_nam...
[]
from distutils.core import setup import py2exe # just so we always get commands.py first, not the stdlib commands.py import sys sys.path.append('..') setup( console = ['../tools/editor/run.py'], zipfile = None, options = { 'py2exe' : { 'compressed' : 1, 'optimize' : 2, ...
ajibawa-2023/Python-Code-Large/train/row_82070
5
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82070:ImportFrom_L1_C0", "label": "from distutils.core import setup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import...
[]
from commands import add, admin from pyspades.contained import BlockAction, SetColor from pyspades.constants import * from math import * EAST = 0 SOUTH = 1 WEST = 2 NORTH = 3 def make_color(r, g, b, a): return b | (g << 8) | (r << 16) | (int((a / 255.0) * 128) << 24) def make_color_tuple(color): ...
ajibawa-2023/Python-Code-Large/train/row_82071
279
314
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82071:ImportFrom_L1_C0", "label": "from commands import add, admin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 760, 0, 2, 0, 0, 760, 0, 0], "semantic": {"name": "commands", "arg_names": [], "import_names"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82071:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82071:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82071:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82071:Return_L15_C4"}, {"f": "ajibawa-2023/Python-Co...
# Script by Tocksman made for Goon Haven # Short bit of documentation: # # This script will hopefully give server owners some control over what # spectators do on there server. As of now since the release of v0.75, # Goon Haven has had issues with spectators idling and using global chat # to send information to...
ajibawa-2023/Python-Code-Large/train/row_82072
45
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82072:ImportFrom_L32_C0", "label": "from math import ceil, floor", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.3765, 0.0118, 0, 0.66, 0.0, 526, 0, 2, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82072:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82072:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82072:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82072:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Co...
# Tower of Babel created by Yourself, modified by izzy # how to install: # set game_mode to ctf in config.txt # add babel to script list in config.txt # add to map .txt files: extensions = { 'babel' : True } # additional suggestions: # add onectf to script list in config.txt http://pyspades.googlecode.com/h...
ajibawa-2023/Python-Code-Large/train/row_82073
103
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82073:ImportFrom_L10_C0", "label": "from pyspades.constants import *", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0699, 0.007, 0, 0.66, 0.0, 96, 0, 1, 0, 0, 96, 0, 0], "semantic": {"name": "pyspades.constants", "arg_names": [], "im...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82073:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82073:If_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82073:If_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82073:Return_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
from twisted.internet.task import LoopingCall from pyspades.constants import * from math import sqrt, cos, acos, pi, tan from commands import add, admin, get_player from twisted.internet import reactor import re DISABLED, KICK, BAN, WARN_ADMIN = xrange(4) # This is an option for data collection. Data is outp...
ajibawa-2023/Python-Code-Large/train/row_82074
296
414
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82074:ImportFrom_L1_C0", "label": "from twisted.internet.task import LoopingCall", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0024, 0.0024, 0, 0.66, 0.0, 85, 0, 1, 0, 0, 85, 0, 0], "semantic": {"name": "twisted.internet.task", "arg_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82074:FunctionDef_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82074:Return_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82074:FunctionDef_L98_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82074:If_L99_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# Free for all script written by Yourself from random import randint # If ALWAYS_ENABLED is False, free for all can still be enabled in the map # metadata by setting the key 'free_for_all' to True in the extensions dictionary ALWAYS_ENABLED = True # If WATER_SPANS is True, then players can spawn in water WA...
ajibawa-2023/Python-Code-Large/train/row_82075
58
83
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82075:ImportFrom_L3_C0", "label": "from random import randint", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0361, 0.012, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["rand...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82075:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82075:ClassDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82075:ClassDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82075:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Cod...
SMARTNADE_DELAY = 0.5 def apply_script(protocol, connection, config): class SmartNadeProtocol(protocol): def on_world_update(self): for player in self.players.values(): for nade in player.smart_nades: if nade.fuse > SMARTNADE_DELAY: ...
ajibawa-2023/Python-Code-Large/train/row_82076
22
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82076:Assign_L1_C0", "label": "SMARTNADE_DELAY =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.037, 0, 0.66, 0.0, 651, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "SMARTNADE_DELAY", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82076:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82076:ClassDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82076:ClassDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82076:FunctionDef_L5_C8"}, {"f": "ajibawa-2023/Python-Co...
from pyspades.constants import * from commands import add, admin from pyspades.collision import vector_collision CENTER_X = 256 CENTER_Y = 256 HIDE_X = 0 HIDE_Y = 0 HIDE_Z = 63 # 1CTF and R1CTF can be enabled via the map metadata. Enable it by setting # 'game_script_mode' to '1CTF' or 'R1CTF' in the exte...
ajibawa-2023/Python-Code-Large/train/row_82077
102
136
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82077:ImportFrom_L1_C0", "label": "from pyspades.constants import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0074, 0.0074, 0, 0.66, 0.0, 96, 0, 1, 0, 0, 96, 0, 0], "semantic": {"name": "pyspades.constants", "arg_names": [], "impo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82077:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82077:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82077:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82077:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code...
# READ THE INSTRUCTIONS BELOW BEFORE YOU ASK QUESTIONS # Arena game mode written by Yourself # A game of team survival. The last team standing scores a point. # A map that uses arena needs to be modified to have a starting area for # each team. A starting area is enclosed and has a gate on it. Each block of a ...
ajibawa-2023/Python-Code-Large/train/row_82080
344
464
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82080:ImportFrom_L33_C0", "label": "from pyspades.server import block_action, set_color, block_line", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.0711, 0.0022, 0, 0.66, 0.0, 254, 0, 3, 0, 0, 254, 0, 0], "semantic": {"name": "pyspade...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82080:If_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82080:Assign_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82080:If_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82080:Assign_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
import commands def apply_script(protocol, connection, config): class FogProtocol(protocol): default_fog = (128, 232, 255) def on_map_change(self, name): self.set_fog_color(getattr(self.map_info.info, 'fog', self.default_fog)) protocol.on_map_change(self, name) ...
ajibawa-2023/Python-Code-Large/train/row_82081
8
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82081:Import_L1_C0", "label": "commands import commands", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 760, 0, 1, 0, 0, 760, 0, 0], "semantic": {"name": "commands", "arg_names": [], "import_names": ["command...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82081:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82081:ClassDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_82081:ClassDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_82081:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-La...
import sys from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext from Cython.Build import cythonize ext_modules = [] names = [ 'pyspades.vxl', 'pyspades.compressedvxl', 'pyspades.bytes', 'pyspades.packet', 'pyspades.contained...
ajibawa-2023/Python-Code-Large/train/row_82082
10
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_82082:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_82082:For_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_82082:Expr_L22_C4"}]