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 |
|---|---|---|---|---|---|---|---|
# Copyright (C) 2010 Google Inc.
#
# 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 applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81849 | 7 | 32 | 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_81849:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 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_81849:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81849:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81849:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81849:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# 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 applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81850 | 201 | 483 | 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_81850:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 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_81850:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81850:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81850:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81850:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# 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 applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81852 | 55 | 135 | 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_81852:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 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_81852:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81852:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81852:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81852:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# 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 applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81854 | 28 | 63 | 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_81854:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 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_81854:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81854:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81854:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81854:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# 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 applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81855 | 29 | 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_81855:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81855:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81855:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81855:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81855:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_81856 | 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_81856:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# 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 applicable l... | ajibawa-2023/Python-Code-Large/train/row_81857 | 154 | 385 | 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_81857:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 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_81857:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81857:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81857:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81857:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# 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 applicable l... | ajibawa-2023/Python-Code-Large/train/row_81858 | 56 | 123 | 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_81858:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 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_81858:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81858:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81858:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81858:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_81859 | 43 | 110 | 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_81859:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 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_81859:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81859:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81859:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81859:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_81861 | 213 | 438 | 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_81861:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 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_81861:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81861:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81861:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81861:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_81862 | 115 | 168 | 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_81862:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81862:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81862:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81862:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81862:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_81863 | 8 | 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_81863:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81863:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81863:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81863:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81863:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_81864 | 10 | 41 | 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_81864:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 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_81864:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81864:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81864:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81864:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_81865 | 9 | 40 | 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_81865:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 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_81865:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81865:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81865:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81865:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_81867 | 112 | 147 | 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_81867:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81867:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81867:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81867:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81867:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
'''
Module which prompts the user for translations and saves them.
TODO: implement
@author: Rodrigo Damazio
'''
class Translator(object):
'''
classdocs
'''
def __init__(self, language):
'''
Constructor
'''
self._language = language
def Translate(self, string_names):
print string_names | ajibawa-2023/Python-Code-Large/train/row_81868 | 8 | 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_81868:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 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_81868:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81868:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81868:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81868:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
'''
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_81869 | 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_81869: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_81869:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81869:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81869:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81869:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code... |
'''
Module which parses a string XML file.
@author: Rodrigo Damazio
'''
from xml.parsers.expat import ParserCreate
import re
#import xml.etree.ElementTree as ET
class StringsParser(object):
'''
Parser for string XML files.
This object is not thread-safe and should be used for parsing a single file at
a time... | ajibawa-2023/Python-Code-Large/train/row_81870 | 54 | 115 | 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_81870:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 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_81870:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81870:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81870:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81870:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
'''
Entry point for My Tracks i18n tool.
@author: Rodrigo Damazio
'''
import mytracks.files
import mytracks.translate
import mytracks.validate
import sys
def Usage():
print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0]
print 'Commands are:'
print ' cleanup'
print ' translate'
p... | ajibawa-2023/Python-Code-Large/train/row_81871 | 58 | 96 | 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_81871:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 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_81871:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81871:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81871:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81871:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Module which compares languague files to the master file and detects
issues.
@author: Rodrigo Damazio
'''
import os
from mytracks.parser import StringsParser
import mytracks.history
class Validator(object):
def __init__(self, languages):
'''
Builds a strings file validator.
Params:
@para... | ajibawa-2023/Python-Code-Large/train/row_81872 | 65 | 115 | 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_81872:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 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_81872:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81872:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81872:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81872:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
'''
Module for dealing with resource files (but not their contents).
@author: Rodrigo Damazio
'''
import os.path
from glob import glob
import re
MYTRACKS_RES_DIR = 'MyTracks/res'
ANDROID_MASTER_VALUES = 'values'
ANDROID_VALUES_MASK = 'values-*'
def GetMyTracksDir():
'''
Returns the directory in which the MyTrac... | ajibawa-2023/Python-Code-Large/train/row_81873 | 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_81873:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 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_81873:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81873:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81873:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81873:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code... |
from google.appengine.ext import db
class Proyecto(db.Model):
usuario = db.UserProperty(required=True, auto_current_user_add=True)
nombre = db.StringProperty(required=True, multiline=False)
descripcion = db.StringProperty(multiline=False)
mostrar = db.BooleanProperty(required=True, default=True)
fe... | ajibawa-2023/Python-Code-Large/train/row_81874 | 123 | 169 | 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_81874:ImportFrom_L1_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0059, 0.0059, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81874:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81874:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81874:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81874:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from google.appengine.api import users
from modelo import Tarea
from modelo import Proyecto
import webapp2
import datetime
import jinja2
import os
from sys import maxint
from cgi import escape
class BaseHandler(webapp2.RequestHandler):
@classmethod
def string_to_int(cls, s, i_min, i_max, default = 0):
... | ajibawa-2023/Python-Code-Large/train/row_81875 | 90 | 139 | 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_81875:ImportFrom_L1_C0", "label": "from google.appengine.api import users", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0072, 0.0072, 0, 0.66, 0.0, 279, 0, 1, 0, 0, 279, 0, 0], "semantic": {"name": "google.appengine.api", "arg_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81875:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81875:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81875:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81875:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.9.4'
setup(name="timesched",
version=version,
description="thread safe scheduler class to use with dateutil.rrule",
long_description="""\
""",
cla... | ajibawa-2023/Python-Code-Large/train/row_81876 | 5 | 36 | 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_81876:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0278, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
import doctest
#doctest.testfile("readme.txt")
suite = doctest.DocTestSuite('timesched')
| ajibawa-2023/Python-Code-Large/train/row_81878 | 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_81878:Import_L1_C0", "label": "doctest import doctest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"],... | [] |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.9.4'
setup(name="timesched",
version=version,
description="thread safe scheduler class to use with dateutil.rrule",
long_description="""\
""",
cla... | ajibawa-2023/Python-Code-Large/train/row_81881 | 5 | 36 | 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_81881:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0278, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| ajibawa-2023/Python-Code-Large/train/row_81883 | 4 | 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_81883:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81883:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81883:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81883:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81883:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| ajibawa-2023/Python-Code-Large/train/row_81884 | 4 | 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_81884:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81884:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81884:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81884:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81884:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
from al_earth.main.plugins import GenericEventLoader, Item
from dateutil import rrule
import glob
from os.path import getmtime, basename
class EventLoader(GenericEventLoader):
event_type = "FilesAndDir"
def __init__(self,config):
GenericEventLoader.__init__(self,config)
self.recursion=rrule.rru... | ajibawa-2023/Python-Code-Large/train/row_81885 | 35 | 55 | 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_81885:ImportFrom_L1_C0", "label": "from al_earth.main.plugins import GenericEventLoader, Item", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 639, 0, 2, 0, 0, 639, 0, 0], "semantic": {"name": "al_earth.main.p... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81885:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81885:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81885:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81885:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.plugin.files_and_dirs",
version=version,
description="files and dirs plugin for al_earth",
long_description="""\
""",
... | ajibawa-2023/Python-Code-Large/train/row_81886 | 5 | 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_81886:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.plugin.files_and_dirs",
version=version,
description="files and dirs plugin for al_earth",
long_description="""\
""",
... | ajibawa-2023/Python-Code-Large/train/row_81888 | 5 | 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_81888:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
import cherrypy
from cherrypy import Tool, tools
from mako.template import Template
from mako.lookup import TemplateLookup
import os.path
import urllib
#######################################
## design tool
#######################################
def transform(templatedir=None, templatecache=None, template=No... | ajibawa-2023/Python-Code-Large/train/row_81890 | 85 | 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_81890:Import_L1_C0", "label": "cherrypy import cherrypy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 639, 0, 1, 0, 0, 639, 0, 0], "semantic": {"name": "cherrypy", "arg_names": [], "import_names": ["cherrypy"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81890:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81890:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81890:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81890:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
from resource_packer import pack
if __name__=="__main__":
pack("static","static_res",exclude_dirs=[".svn"],recurse=True)
pack("templates","templates_res",exclude_dirs=[".svn"],recurse=True)
| ajibawa-2023/Python-Code-Large/train/row_81891 | 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_81891:ImportFrom_L1_C0", "label": "from resource_packer import pack", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 514, 0, 1, 0, 0, 514, 0, 0], "semantic": {"name": "resource_packer", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81891:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81891:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81891:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81891:Expr_L5_C4"}] |
import hashlib
from datetime import datetime
from dateutil import rrule
import sys
from sqlalchemy import *
from sqlalchemy.orm import relation, sessionmaker, scoped_session, mapper
import pkg_resources
from timesched import Scheduler
from plugins import GenericEventLoader, Item
hash_pass = hashlib.md5 #... | ajibawa-2023/Python-Code-Large/train/row_81892 | 192 | 361 | 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_81892:Import_L2_C0", "label": "hashlib import hashlib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0055, 0.0028, 0, 0.66, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "hashlib", "arg_names": [], "import_names": ["hashlib"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81892:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81892:Expr_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81892:ClassDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81892:FunctionDef_L85_C4"}, {"f": "ajibawa-2023/Python-Code-... |
from os.path import join, expanduser, isdir, isfile
from os import makedirs
from ConfigParser import RawConfigParser
from resource_packer import unpack
class AlEarthConfig(RawConfigParser):
defaultDir = join(expanduser("~"),".al_earth")
defaultConfig = """\
[server]
homedir = %s
port = 8000
"""
... | ajibawa-2023/Python-Code-Large/train/row_81893 | 40 | 51 | 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_81893:ImportFrom_L1_C0", "label": "from os.path import join, expanduser, isdir\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0196, 0, 0.66, 0.0, 79, 0, 4, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81893:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81893:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81893:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81893:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from collections import namedtuple
"""
sample plugins:
rss-feed
file/directory changed
svn, bazar, ... commit
web site changed
new mail
new process, load, ram, disk
log file
im message
ftp / sftp file changed
"""
########################################
## Abstract classes
########################################
Item... | ajibawa-2023/Python-Code-Large/train/row_81894 | 24 | 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_81894:ImportFrom_L1_C0", "label": "from collections import namedtuple", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 193, 0, 1, 0, 0, 193, 0, 0], "semantic": {"name": "collections", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81894:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81894:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81894:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81894:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
data = \
{ 'temp.mak': 'hello ${name}\r\n% for n in range(10):\r\n- ${n}\r\n% endfor'} | ajibawa-2023/Python-Code-Large/train/row_81895 | 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_81895:Assign_L1_C0", "label": "data =", "type": "assigned_variable", "loc": [1, 2], "level": 0, "parent": null, "vector": [14, 0, 0.75, 1.0, 0, 0.66, 0.0, 929, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "", "... | [] |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| ajibawa-2023/Python-Code-Large/train/row_81896 | 4 | 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_81896:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81896:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81896:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81896:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81896:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.main",
version=version,
description="event generator manager",
long_description="""\
""",
classifiers=['Development ... | ajibawa-2023/Python-Code-Large/train/row_81897 | 5 | 35 | 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_81897:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0857, 0.0286, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.main",
version=version,
description="event generator manager",
long_description="""\
""",
classifiers=['Development ... | ajibawa-2023/Python-Code-Large/train/row_81899 | 5 | 35 | 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_81899:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0857, 0.0286, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="resource_packer",
version=version,
description="tools and libs for pack/unpack files in a python module",
long_description="""\
""",
... | ajibawa-2023/Python-Code-Large/train/row_81901 | 5 | 36 | 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_81901:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0278, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
import doctest
suite = doctest.DocTestSuite('resource_packer')
| ajibawa-2023/Python-Code-Large/train/row_81903 | 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_81903:Import_L1_C0", "label": "doctest import doctest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest"], "rhs_... | [] |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="resource_packer",
version=version,
description="tools and libs for pack/unpack files in a python module",
long_description="""\
""",
... | ajibawa-2023/Python-Code-Large/train/row_81904 | 5 | 36 | 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_81904:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0278, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
#!/usr/bin/env python
"""
==============================
resource_packer documentation
==============================
Introduction
============================
This package provide a simple way to embed external files (even binary) into a python module.
To demostrate (and test :-)) the library I will use the filecmp.di... | ajibawa-2023/Python-Code-Large/train/row_81905 | 61 | 193 | 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_81905:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 118], "level": 0, "parent": null, "vector": [8, 0, 0.3109, 0.6062, 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_81905:FunctionDef_L127_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81905:For_L128_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81905:For_L128_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81905:If_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
from optparse import OptionParser
from resource_packer import pack, unpack
import sys
def main():
usage = """Pack files contained in a directory in a python module
usage: %prog [-u -r -i -e -d -x] directory module"""
parser = OptionParser(usage=usage, version="%prog 1.0")
parser.add_option("-u", "--un... | ajibawa-2023/Python-Code-Large/train/row_81906 | 28 | 52 | 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_81906:ImportFrom_L1_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0192, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81906:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81906:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81906:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81906:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/env python
"""
==============================
resource_packer documentation
==============================
Introduction
============================
This package provide a simple way to embed external files (even binary) into a python module.
To demostrate (and test :-)) the library I will use the filecmp.di... | ajibawa-2023/Python-Code-Large/train/row_81907 | 61 | 193 | 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_81907:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 118], "level": 0, "parent": null, "vector": [8, 0, 0.3109, 0.6062, 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_81907:FunctionDef_L127_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81907:For_L128_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81907:For_L128_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81907:If_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| ajibawa-2023/Python-Code-Large/train/row_81909 | 4 | 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_81909:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81909:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81909:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81909:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81909:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
from al_earth.main.plugins import GenericEventLoader, Item
from dateutil import rrule
import feedparser
class EventLoader(GenericEventLoader):
event_type = "RssFeed"
def __init__(self,config):
GenericEventLoader.__init__(self,config)
self.recursion = rrule.rrule(rrule.SECONDLY, interval=self.co... | ajibawa-2023/Python-Code-Large/train/row_81910 | 24 | 33 | 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_81910:ImportFrom_L1_C0", "label": "from al_earth.main.plugins import GenericEventLoader, Item", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0303, 0.0303, 0, 0.66, 0.0, 639, 0, 2, 0, 0, 639, 0, 0], "semantic": {"name": "al_earth.main.p... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81910:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81910:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81910:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81910:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| ajibawa-2023/Python-Code-Large/train/row_81911 | 4 | 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_81911:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81911:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81911:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81911:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81911:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.plugin.rssfeed",
version=version,
description="rss-feed plugin for al_earth",
long_description="""\
""",
classifiers=['D... | ajibawa-2023/Python-Code-Large/train/row_81912 | 5 | 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_81912:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.plugin.rssfeed",
version=version,
description="rss-feed plugin for al_earth",
long_description="""\
""",
classifiers=['D... | ajibawa-2023/Python-Code-Large/train/row_81914 | 5 | 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_81914:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| ajibawa-2023/Python-Code-Large/train/row_81916 | 4 | 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_81916:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81916:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81916:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81916:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81916:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
from al_earth.main.plugins import GenericEventLoader, Item
from dateutil import rrule
class EventLoader(GenericEventLoader):
event_type = "Note"
def __init__(self,config):
GenericEventLoader.__init__(self,config)
#config['date'][dtstart]['recursion'][]
self.recursion = rrule.rruleset()... | ajibawa-2023/Python-Code-Large/train/row_81917 | 15 | 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_81917:ImportFrom_L1_C0", "label": "from al_earth.main.plugins import GenericEventLoader, Item", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.05, 0, 0.66, 0.0, 639, 0, 2, 0, 0, 639, 0, 0], "semantic": {"name": "al_earth.main.plugi... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81917:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81917:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81917:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81917:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
| ajibawa-2023/Python-Code-Large/train/row_81918 | 4 | 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_81918:Try_L2_C0", "label": "try", "type": "try", "loc": [2, 6], "level": 0, "parent": null, "vector": [7, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81918:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81918:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81918:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81918:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.plugin.note",
version=version,
description="note plugin for al_earth",
long_description="""\
""",
classifiers=['Developm... | ajibawa-2023/Python-Code-Large/train/row_81919 | 5 | 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_81919:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
#!/usr/bin/env python
from ez_setup import use_setuptools
use_setuptools(version='0.6c7')
from setuptools import setup, find_packages
version = '0.1.0'
setup(name="al_earth.plugin.note",
version=version,
description="note plugin for al_earth",
long_description="""\
""",
classifiers=['Developm... | ajibawa-2023/Python-Code-Large/train/row_81921 | 5 | 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_81921:ImportFrom_L3_C0", "label": "from ez_setup import use_setuptools", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0294, 0, 0.66, 0.0, 650, 0, 1, 0, 0, 650, 0, 0], "semantic": {"name": "ez_setup", "arg_names": [], "import_na... | [] |
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_81923 | 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_81923: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_81923:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81923:Try_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81923:Try_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81923:Import_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81... |
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_81924 | 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_81924: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_81924:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81924:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81924:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81924:For_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!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_81925 | 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_81925: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_81925:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81925:ImportFrom_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81925:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81925:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/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_81926 | 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_81926: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_81926:If_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81926:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81926:If_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81926:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/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_81927 | 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_81927: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_81927:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81927:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81927:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81927:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/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_81928 | 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_81928: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_81928:If_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81928:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81928:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81928: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_81929 | 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_81929: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_81929:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81929:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81929:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81929:Return_L38_C4"}, {"f": "ajibawa-2023/Python-Co... |
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_81930 | 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_81930: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_81930:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81930:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81930:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81930:FunctionDef_L3_C8"}, {"f": "ajibawa-2023/Python... |
pass
| ajibawa-2023/Python-Code-Large/train/row_81931 | 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_81932 | 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_81932: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_81932:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81932:Expr_L4_C4"}] |
pass
| ajibawa-2023/Python-Code-Large/train/row_81933 | 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_81934 | 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_81934: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_81935 | 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_81935: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_81935:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81935:Expr_L4_C4"}] |
"""
Module without doctests.
"""
def foo():
pass
if __name__ == '__main__':
import doctest
doctest.testmod()
| ajibawa-2023/Python-Code-Large/train/row_81936 | 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_81936: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_81936:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81936:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81936:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81936:Expr_L9_C4"}] |
"""
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_81937 | 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_81937: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_81937:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81937:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81937:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81937:Expr_L12_C4"}] |
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_81938 | 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_81938: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_81938:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81938:Return_L2_C4"}] |
class Foo_Test:
def test_foo(self):
pass
def test_bar(self):
pass
| ajibawa-2023/Python-Code-Large/train/row_81939 | 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_81939: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_81939:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81939:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81939:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81939:FunctionDef_L6_C4"}] |
def setup():
pass
| ajibawa-2023/Python-Code-Large/train/row_81940 | 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_81940: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... | [] |
#!/usr/bin/env python
print "FAIL"
| ajibawa-2023/Python-Code-Large/train/row_81941 | 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_81941: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... | [] |
class D(dict):
def __getattr__(self, k):
return dict.__getitem__(self, k)
test = D()
| ajibawa-2023/Python-Code-Large/train/row_81942 | 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_81942: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_81942:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81942:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81942:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81942:Return_L3_C8"}] |
pass
| ajibawa-2023/Python-Code-Large/train/row_81943 | 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"] | [] | [] |
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_81944 | 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_81944: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_81944:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81944:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81944:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81944:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Co... |
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_81945 | 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_81945: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_81945:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81945:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81945:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81945:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
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_81946 | 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_81946: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_81946:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81946:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81946:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81946: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_81947 | 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_81947: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_81947:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81947:Try_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81947:Try_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81947:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
"""
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_81948 | 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_81948: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_81948:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81948:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81948:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81948:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
"""
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_81950 | 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_81950: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_81950:Try_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81950:ImportFrom_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81950:Try_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81950:ImportFrom_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
pass
| ajibawa-2023/Python-Code-Large/train/row_81951 | 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"] | [] | [] |
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_81952 | 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_81952: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_81952:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81952:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81952:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81952:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""
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_81953 | 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_81953: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_81953:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81953:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81953:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81953:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python... |
"""
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_81954 | 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_81954: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_81954:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81954:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81954:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81954:ImportFrom_L16_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_81955 | 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_81955: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_81955:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81955:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81955:Try_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81955: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_81956 | 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_81956: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_81956:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81956:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81956:If_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81956:Import_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_819... |
"""
Test Selection
--------------
Test selection is handled by a Selector. The test loader calls the
appropriate selector method for each object it encounters that it
thinks may be a test.
"""
import logging
import os
import unittest
from nose.config import Config
from nose.util import split_test_name, src, getfilenam... | ajibawa-2023/Python-Code-Large/train/row_81958 | 142 | 251 | 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_81958:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0179, 0.0319, 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_81958:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81958:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81958:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81958:FunctionDef_L34_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
External or vendor files
"""
| ajibawa-2023/Python-Code-Large/train/row_81960 | 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_81960: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... | [] |
"""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_81961 | 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_81961: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_81961:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81961:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81961:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81961:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""
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_81962 | 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_81962: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_81962:Try_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81962:ImportFrom_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81962:Try_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81962:Assign_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""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_81963 | 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_81963: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_81963:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81963:ImportFrom_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81963:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81963:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
This plugin provides assert introspection. When the plugin is enabled
and a test failure occurs, the traceback is displayed with extra context
around the line in which the exception was raised. Simple variable
substitution is also performed in the context output to provide more
debugging information.
"""
from... | ajibawa-2023/Python-Code-Large/train/row_81964 | 21 | 43 | 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_81964:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.093, 0.1628, 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_81964:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81964:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81964:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81964:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""This plugin will run tests using the hotshot profiler, which is part
of the standard library. To turn it on, use the ``--with-profile`` option
or set the NOSE_WITH_PROFILE environment variable. Profiler output can be
controlled with the ``--profile-sort`` and ``--profile-restrict`` options,
and the profiler output f... | ajibawa-2023/Python-Code-Large/train/row_81965 | 94 | 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_81965:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.039, 0.0714, 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_81965:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81965:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81965:Try_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81965:ImportFrom_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
This plugin bypasses the actual execution of tests, and instead just collects
test names. Fixtures are also bypassed, so running nosetests with the
collection plugin enabled should be very quick.
This plugin is useful in combination with the testid plugin (``--with-id``).
Run both together to get an indexed list ... | ajibawa-2023/Python-Code-Large/train/row_81966 | 49 | 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_81966:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0691, 0.1277, 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_81966:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81966:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81966:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81966:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""This plugin provides test results in the standard XUnit XML format.
It's designed for the `Jenkins`_ (previously Hudson) continuous build
system, but will probably work for anything else that understands an
XUnit-formatted XML representation of test results.
Add this shell command to your builder ::
nosetests... | ajibawa-2023/Python-Code-Large/train/row_81967 | 118 | 253 | 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_81967:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 38], "level": 0, "parent": null, "vector": [8, 0, 0.0771, 0.1502, 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_81967:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81967:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81967:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81967:Return_L59_C4"}, {"f": "ajibawa-2023/Python-Code... |
"""
Testing Plugins
===============
The plugin interface is well-tested enough to safely unit test your
use of its hooks with some level of confidence. However, there is also
a mixin for unittest.TestCase called PluginTester that's designed to
test plugins in their native runtime environment.
Here's a simple exampl... | ajibawa-2023/Python-Code-Large/train/row_81968 | 159 | 416 | 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_81968:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 96], "level": 0, "parent": null, "vector": [8, 0, 0.1166, 0.2308, 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_81968:Try_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81968:ImportFrom_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81968:Try_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81968:ImportFrom_L105_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
"""Use the AllModules plugin by passing ``--all-modules`` or setting the
NOSE_ALL_MODULES environment variable to enable collection and execution of
tests in all python modules. Normal nose behavior is to look for tests only in
modules that match testMatch.
More information: :doc:`../doc_tests/test_allmodules/test_all... | ajibawa-2023/Python-Code-Large/train/row_81969 | 16 | 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_81969:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2111, 0.4, 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_81969:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81969:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81969:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81969:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.