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
""" 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_81498
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_81498: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_81498:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81498:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81498:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81498: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_81499
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_81499: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_81499:Try_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81499:ImportFrom_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81499:Try_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81499:ImportFrom_L105_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" Result Proxy ------------ The result proxy wraps the result instance given to each test. It performs two functions: enabling extended error/failure reporting and calling plugins. As each result event is fired, plugins are called with the same event; however, plugins are called with the nose.case.Test instance tha...
ajibawa-2023/Python-Code-Large/train/row_81500
114
191
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_81500:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0471, 0.089, 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_81500:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81500:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81500:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81500:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python...
""" Adds a sphinx directive that can be used to automatically document a plugin. this:: .. autoplugin :: nose.plugins.foo :plugin: Pluggy produces:: .. automodule :: nose.plugins.foo Options ------- .. cmdoption :: --foo=BAR, --fooble=BAR Do the foo thing to the new thing. Plugin ----...
ajibawa-2023/Python-Code-Large/train/row_81502
113
186
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_81502:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 32], "level": 0, "parent": null, "vector": [8, 0, 0.0887, 0.172, 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_81502:Try_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81502:ImportFrom_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81502:Try_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81502:ImportFrom_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
pass
ajibawa-2023/Python-Code-Large/train/row_81503
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"]
[]
[]
""" nosetests setuptools command ---------------------------- The easiest way to run tests with nose is to use the `nosetests` setuptools command:: python setup.py nosetests This command has one *major* benefit over the standard `test` command: *all nose plugins are supported*. To configure the `nosetests` comman...
ajibawa-2023/Python-Code-Large/train/row_81504
59
146
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_81504:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 61], "level": 0, "parent": null, "vector": [8, 0, 0.2123, 0.4178, 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_81504:Try_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81504:ImportFrom_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81504:Try_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81504:Assign_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
"""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_81505
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_81505: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...
[]
"""nose unittest.TestCase subclasses. It is not necessary to subclass these classes when writing tests; they are used internally by nose.loader.TestLoader to create test cases from test functions and methods in test classes. """ import logging import sys import unittest from inspect import isfunction from nose.config i...
ajibawa-2023/Python-Code-Large/train/row_81506
202
397
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_81506:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0063, 0.0101, 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_81506:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81506:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81506:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81506:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" This module contains fixups for using nose under different versions of Python. """ import sys import os import types import inspect import nose.util __all__ = ['make_instancemethod', 'cmp_to_key', 'sort_list', 'ClassType', 'TypeType', 'UNICODE_STRINGS', 'unbound_method', 'ismethod', 'bytes_']...
ajibawa-2023/Python-Code-Large/train/row_81507
78
130
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_81507:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0154, 0.0231, 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_81507:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81507:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81507:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81507:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
""" Test Suites ----------- Provides a LazySuite, which is a suite whose test list is a generator function, and ContextSuite,which can run fixtures (setup/teardown functions or methods) for the context that contains its tests. """ from __future__ import generators import logging import sys import unittest from nose....
ajibawa-2023/Python-Code-Large/train/row_81508
382
607
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_81508:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0082, 0.0148, 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_81508:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81508:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81508:If_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81508:Import_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_815...
"""Utility functions and classes used by nose internally. """ import inspect import itertools import logging import os import re import sys import types import unittest from nose.pyversion import ClassType, TypeType try: from compiler.consts import CO_GENERATOR except ImportError: # IronPython doesn't have a c...
ajibawa-2023/Python-Code-Large/train/row_81509
345
663
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_81509:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0023, 0.003, 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_81509:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81509:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81509:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81509:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import logging import unittest from traceback import format_tb log = logging.getLogger(__name__) __all__ = ['Failure'] class Failure(unittest.TestCase): """Unloadable or unexecutable test. A Failure case is placed in a test suite to indicate the presence of a test that could not be loaded or executed....
ajibawa-2023/Python-Code-Large/train/row_81510
21
37
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_81510:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81510:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81510:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81510:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81510:Assign_L19_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_81511
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_81511: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_81511:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81511:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81511:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81511:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" 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_81512
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_81512: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_81512:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81512:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81512:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81512:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" Tools for testing ----------------- nose.tools provides a few convenience functions to make writing tests easier. You don't have to use them; nothing in the rest of nose depends on any of these methods. """ import re import time import unittest __all__ = ['ok_', 'eq_', 'make_decorator', 'raises', 'set_trace', 't...
ajibawa-2023/Python-Code-Large/train/row_81513
95
194
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_81513:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0232, 0.0412, 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_81513:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81513:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81513:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81513:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-L...
""" External or vendor files """
ajibawa-2023/Python-Code-Large/train/row_81515
1
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_81515:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.6667, 1.0, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[]
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_81516
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_81516: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": ...
[]
""" Test Result ----------- Provides a TextTestResult that extends unittest's _TextTestResult to provide support for error classes (such as the builtin skip and deprecated classes), and hooks for plugins to take over or extend reporting. """ import logging try: # 2.7+ from unittest.runner import _TextTestResu...
ajibawa-2023/Python-Code-Large/train/row_81517
130
200
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_81517:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.025, 0.045, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81517:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81517:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81517:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81517:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" 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_81520
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_81520: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_81520:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81520:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81520:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81520:Try_L49_C4"}, {"f": "ajibawa-2023/Python-Code-La...
import sys from setuptools import setup as _setup py3_args = ['use_2to3', 'convert_2to3_doctests', 'use_2to3_fixers', 'test_dirs', 'test_build_dir', 'doctest_exts', 'pyversion_patching'] if sys.version_info < (3,): # Remove any Python-3.x-only arguments (so they don't generate complaints # from 2.x setuptools...
ajibawa-2023/Python-Code-Large/train/row_81521
108
140
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_81521:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0071, 0.0071, 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_81521:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81521:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81521:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81521:For_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python """Test the copy of nose in this directory, by running that nose against itself. You can test nose using nose in other ways, but if you don't use this script, you might have one installation of nose testing another installation, which is not supported. """ # More detail: # In the absence of so...
ajibawa-2023/Python-Code-Large/train/row_81522
21
60
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_81522:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0917, 0.1, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81522:If_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81522:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81522:If_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81522:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
ajibawa-2023/Python-Code-Large/train/row_81523
313
485
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_81523:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0175, 0.0289, 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_81523:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81523:ImportFrom_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81523:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81523:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
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_81524
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_81524: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_81524:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81524:Import_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81524:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81524: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_81525
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_81525: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_81525:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81525:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81525:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81525: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_81526
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_81526: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_81526:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81526:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81526:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81526: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_81527
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_81527: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_81527:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81527:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81527:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81527:Expr_L7_C4"}]
from nose.plugins import Plugin class ExamplePlugin(Plugin): pass
ajibawa-2023/Python-Code-Large/train/row_81528
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_81528: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": ...
[]
#!/usr/bin/env python2.6 # # # create and upload a release import os import sys import urllib from urllib2 import urlopen from commands import getstatusoutput success = 0 sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) import nose version = nose.__version__ SIMULATE = 'exec' not in sys.argv if SIMULAT...
ajibawa-2023/Python-Code-Large/train/row_81529
43
79
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_81529:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0633, 0.0127, 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_81529:If_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81529:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81529:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81529:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
#!/usr/bin/env python from commands import getstatusoutput from docutils.core import publish_string, publish_parts from docutils.nodes import SparseNodeVisitor from docutils.readers.standalone import Reader from docutils.writers import Writer from nose.config import Config import nose.plugins from nose.plugins.manager...
ajibawa-2023/Python-Code-Large/train/row_81530
254
379
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_81530:ImportFrom_L3_C0", "label": "from commands import getstatusoutput", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0079, 0.0026, 0, 0.66, 0.0, 760, 0, 1, 0, 0, 760, 0, 0], "semantic": {"name": "commands", "arg_names": [], "import_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81530:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81530:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81530:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81530:Return_L38_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/env python from docutils.core import publish_string, publish_parts from docutils.readers.standalone import Reader from nose.config import Config from nose.plugins.manager import BuiltinPluginManager import nose import nose.commands import nose.tools import os import re import time def doc_word(node): p...
ajibawa-2023/Python-Code-Large/train/row_81531
51
79
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_81531:ImportFrom_L3_C0", "label": "from docutils.core import publish_string, publish_parts", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.038, 0.0127, 0, 0.66, 0.0, 219, 0, 2, 0, 0, 219, 0, 0], "semantic": {"name": "docutils.core", "ar...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81531:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81531:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81531:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81531:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code...
""" 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_81532
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_81532: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_81532:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81532:ImportFrom_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81532:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81532:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
import sys import os VERSION = '1.1.3' py_vers_tag = '-%s.%s' % sys.version_info[:2] test_dirs = ['functional_tests', 'unit_tests', os.path.join('doc','doc_tests'), 'nose'] if sys.version_info >= (3,): try: import setuptools except ImportError: from distribute_setup import use_setuptools ...
ajibawa-2023/Python-Code-Large/train/row_81533
30
121
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_81533:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0083, 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_81533:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81533:Try_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81533:Try_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81533:Import_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81...
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_81535
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_81535: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_81535:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81535:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81535:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81535: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_81536
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_81536: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_81536:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81536:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81536:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81536:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import imp import sys from nose.config import Config from nose import proxy from nose.plugins.manager import NoPlugins from nose.util import odict def mod(name): m = imp.new_module(name) sys.modules[name] = m return m class ResultProxyFactory: def __call__(self, result, test): return Resu...
ajibawa-2023/Python-Code-Large/train/row_81537
85
107
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_81537:Import_L1_C0", "label": "imp import imp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 201, 0, 1, 0, 0, 201, 0, 0], "semantic": {"name": "imp", "arg_names": [], "import_names": ["imp"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81537:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81537:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81537:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81537:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code...
def iter_compat(suite): try: suite.__iter__ return suite except AttributeError: return suite._tests
ajibawa-2023/Python-Code-Large/train/row_81538
5
6
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_81538:FunctionDef_L1_C0", "label": "iter_compat", "type": "function", "loc": [1, 6], "level": 0, "parent": null, "vector": [2, 0, 0.5833, 1.0, 0, 0.66, 0.0, 515, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "iter_compat", "arg_names": ["suite"], "import_names": [], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81538:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81538:Try_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81538:Try_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81538:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
class Test1(object): def test_nested_generator(self): def func(): pass yield func, def test_nested_generator_mult(self): def f2(a): pass for b in range(1, 4): yield f2, b def try_something(self, a): pass def test_normal_gener...
ajibawa-2023/Python-Code-Large/train/row_81539
12
19
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_81539:ClassDef_L1_C0", "label": "Test1", "type": "class", "loc": [1, 18], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.9474, 0, 0.66, 0.0, 472, 0, 6, 0, 0, 186, 0, 1], "semantic": {"name": "Test1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81539:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81539:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81539:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81539:FunctionDef_L3_C8"}, {"f": "ajibawa-2023/Python...
pass
ajibawa-2023/Python-Code-Large/train/row_81540
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"]
[]
[]
# test file in test dir in a package def test_foo(): pass
ajibawa-2023/Python-Code-Large/train/row_81541
1
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_81541:FunctionDef_L2_C0", "label": "test_foo", "type": "function", "loc": [2, 3], "level": 0, "parent": null, "vector": [2, 0, 0.8333, 0.6667, 0, 0.66, 0.0, 834, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "test_foo", "arg_names": [], "import_names": [], "rhs_call_name":...
[]
boodle = True def somefunc(): """This is a doctest in somefunc. >>> 'a' 'a' """
ajibawa-2023/Python-Code-Large/train/row_81542
3
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_81542:Assign_L1_C0", "label": "boodle =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 762, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "boodle", "arg_names": [], "import_names": [], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81542:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81542:Expr_L4_C4"}]
pass
ajibawa-2023/Python-Code-Large/train/row_81543
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 foo import boodle def afunc(): """This is a doctest >>> 2 + 3 5 """ pass
ajibawa-2023/Python-Code-Large/train/row_81544
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_81544:ImportFrom_L1_C0", "label": "from foo import boodle", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 528, 0, 1, 0, 0, 528, 0, 0], "semantic": {"name": "foo", "arg_names": [], "import_names": ["boodle"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81544:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81544:Expr_L4_C4"}]
import unittest class Something(unittest.TestCase): def test_something(self): pass class TestTwo: def __repr__(self): return 'TestTwo' def test_whatever(self): pass
ajibawa-2023/Python-Code-Large/train/row_81545
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_81545:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 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_81545:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81545:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81545:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81545:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Co...
""" Module with errors in doctest formatting. >>> 1 'this is\n an error' """ def foo(): pass if __name__ == '__main__': import doctest doctest.testmod()
ajibawa-2023/Python-Code-Large/train/row_81546
5
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_81546:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2917, 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...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81546:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81546:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81546:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81546:Expr_L12_C4"}]
""" Module without doctests. """ def foo(): pass if __name__ == '__main__': import doctest doctest.testmod()
ajibawa-2023/Python-Code-Large/train/row_81547
5
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_81547:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.2222, 0.3333, 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_81547:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81547:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81547:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81547:Expr_L9_C4"}]
#!/usr/bin/env python print "FAIL"
ajibawa-2023/Python-Code-Large/train/row_81548
1
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_81548:Expr_L3_C0", "label": "print()", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.3333, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "a...
[]
def my_decor(func): return lambda: func() def test_decor(): pass def test_decor1(): pass test_decor1 = my_decor(test_decor1)
ajibawa-2023/Python-Code-Large/train/row_81549
5
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_81549:FunctionDef_L1_C0", "label": "my_decor", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.1667, 0.2222, 0, 0.66, 0.0, 697, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "my_decor", "arg_names": ["func"], "import_names": [], "rhs_call_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81549:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81549:Return_L2_C4"}]
pass
ajibawa-2023/Python-Code-Large/train/row_81550
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"]
[]
[]
class D(dict): def __getattr__(self, k): return dict.__getitem__(self, k) test = D()
ajibawa-2023/Python-Code-Large/train/row_81551
4
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_81551:ClassDef_L1_C0", "label": "D", "type": "class", "loc": [1, 3], "level": 0, "parent": null, "vector": [3, 0, 0.4, 0.6, 0, 0.66, 0.0, 939, 0, 1, 0, 0, 827, 0, 1], "semantic": {"name": "D", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81551:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81551:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81551:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81551:Return_L3_C8"}]
class Foo_Test: def test_foo(self): pass def test_bar(self): pass
ajibawa-2023/Python-Code-Large/train/row_81552
3
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_81552:ClassDef_L1_C0", "label": "Foo_Test", "type": "class", "loc": [1, 7], "level": 0, "parent": null, "vector": [3, 0, 0.5714, 1.0, 0, 0.66, 0.0, 746, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "Foo_Test", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81552:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81552:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81552:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81552:FunctionDef_L6_C4"}]
def setup(): pass
ajibawa-2023/Python-Code-Large/train/row_81553
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_81553:FunctionDef_L1_C0", "label": "setup", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.75, 1.0, 0, 0.66, 0.0, 234, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "setup", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]
from nose import tools def test_z(): """(1) test z""" pass def test_a(): """(2) test a""" pass def test_rz(): """(3) Test with raises decorator""" raise TypeError("err") test_rz = tools.raises(TypeError)(test_rz) def decorate(func): func.attr = 1 return func def dec_replace(func): ...
ajibawa-2023/Python-Code-Large/train/row_81554
30
49
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_81554:ImportFrom_L1_C0", "label": "from nose import tools", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0204, 0, 0.66, 0.0, 874, 0, 1, 0, 0, 874, 0, 0], "semantic": {"name": "nose", "arg_names": [], "import_names": ["tools"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81554:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81554:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81554:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81554:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
def test(): pass
ajibawa-2023/Python-Code-Large/train/row_81555
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_81555: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...
[]
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_81556
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_81556: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_81556:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81556:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81556:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81556:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code...
def b(): pass
ajibawa-2023/Python-Code-Large/train/row_81557
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_81557: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_81558
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_81558: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": ...
[]
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_81559
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_81559: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_81559:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81559:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81559:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81559: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_81560
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_81560: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_81560:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81560:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81560:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81560:Return_L21_C4"}]
"""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_81561
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_81561: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_81561:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81561:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81561:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81561:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Cod...
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_81562
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_81562: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": ...
[]
def times_two(a): """ >>> times_two(2) 4 >>> times_two('bee') beebee """ return a * 2
ajibawa-2023/Python-Code-Large/train/row_81563
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_81563: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_81563:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81563:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81563:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81563:Return_L8_C4"}]
""" >>> True False """ """ >>> True False """
ajibawa-2023/Python-Code-Large/train/row_81564
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_81564: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_81565
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_81565: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_81566
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_81567
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_81567: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_81568
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_81569
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_81569: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...
[]
""" 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_81570
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_81570: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_81570:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81570:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81570:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81570:Return_L17_C4"}]
def test(): raise Exception("do not run")
ajibawa-2023/Python-Code-Large/train/row_81571
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_81571: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_81572
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"]
[]
[]
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_81573
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_81573: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_81573:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81573:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81573:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81573:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code...
def test(): pass
ajibawa-2023/Python-Code-Large/train/row_81574
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_81574: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...
[]
from setuptools import setup setup(name='issue191')
ajibawa-2023/Python-Code-Large/train/row_81575
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_81575: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":...
[]
print "2help imported" def help(a): print "2 help %s" % 1 pass
ajibawa-2023/Python-Code-Large/train/row_81576
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_81576: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_81576:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81576: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_81577
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_81577: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_81577:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81577:Expr_L8_C4"}]
print "1help imported" def help(): print "1help called" pass
ajibawa-2023/Python-Code-Large/train/row_81578
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_81578: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_81578:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81578: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_81579
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_81579: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_81579:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81579:Expr_L7_C4"}]
test = 'the nose knows'
ajibawa-2023/Python-Code-Large/train/row_81580
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_81580: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_81581
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_81581: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_...
[]
def setup(): raise "KABOOM" def test_foo(): assert(1==1)
ajibawa-2023/Python-Code-Large/train/row_81582
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_81582: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 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_81583
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_81583: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_81583:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81583:Assign_L7_C4"}]
def test(): print "something" a = 4 assert a == 2
ajibawa-2023/Python-Code-Large/train/row_81584
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_81584: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_81584:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81584:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81584:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81584:Assign_L3_C4"}]
pass
ajibawa-2023/Python-Code-Large/train/row_81585
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_81586
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_81587
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_81588
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 import Plugin class SomePlugin(Plugin): pass
ajibawa-2023/Python-Code-Large/train/row_81589
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_81589: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_81590
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_81590: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...
[]
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_81591
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_81591: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_81591:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81591:Return_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81591:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81591:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-L...
called = []
ajibawa-2023/Python-Code-Large/train/row_81592
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_81592: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": "",...
[]
pass
ajibawa-2023/Python-Code-Large/train/row_81593
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_81594
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_81595
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_81596
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 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_81597
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_81597: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_81598
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_81598: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_81599
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_81599: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...
[]
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
ajibawa-2023/Python-Code-Large/train/row_81600
98
256
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_81600:Expr_L46_C0", "label": "expression", "type": "expression", "loc": [46, 47], "level": 0, "parent": null, "vector": [8, 0, 0.1816, 0.0078, 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_81600:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81600:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81600:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81600:If_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
# albumtagger_amarok by kunal kerkar (aka tsudot) # # simple script which fetches album tag and inserts in the ID3 metadata __module_name__ = "albumtagger_amarok" __module_version__ = "0.1" import urllib import time import commands from ID3 import * from xml.dom import minidom basic_url = "http://ws.audioscrobbler....
ajibawa-2023/Python-Code-Large/train/row_81601
48
75
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_81601:Assign_L5_C0", "label": "__module_name__ =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0667, 0.0133, 0, 0.66, 0.0, 845, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__module_name__", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_81601:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81601:Return_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81601:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81601:Expr_L22_C1"}, {"f": "ajibawa-2023/Python-Code...
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
ajibawa-2023/Python-Code-Large/train/row_81602
38
94
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_81602:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 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_81602:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81602:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81602:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81602:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code...