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 2014 Google Inc. All rights reserved.
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_88989 | 0 | 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"] | [] | [] |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | ajibawa-2023/Python-Code-Large/train/row_88990 | 19 | 73 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88990:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.2329, 0.0137, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88990:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88990:Return_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88990:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88990:Return_L56_C2"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | ajibawa-2023/Python-Code-Large/train/row_88991 | 53 | 90 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88991:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0111, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88991:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88991:ImportFrom_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88991:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88991:ImportFrom_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""Implementation of JSONEncoder
"""
import re
try:
from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii
except ImportError:
c_encode_basestring_ascii = None
try:
from simplejson._speedups import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
... | ajibawa-2023/Python-Code-Large/train/row_88992 | 230 | 434 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88992:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0046, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88992:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88992:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88992:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88992:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained
version of ... | ajibawa-2023/Python-Code-Large/train/row_88994 | 41 | 316 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88994:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1582, 0.3133, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88994:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88994:Expr_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88994:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88994:If_L164_C4"}, {"f": "ajibawa-2023/Python-Code... |
"""JSON token scanner
"""
import re
try:
from simplejson._speedups import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
(re.VERBOSE | re.MULTILINE | re.DOTALL))
def py_make_scan... | ajibawa-2023/Python-Code-Large/train/row_88996 | 48 | 65 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88996:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0231, 0.0308, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88996:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88996:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88996:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88996:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/python2.4
'''Post a message to twitter'''
__author__ = 'dewitt@google.com'
import ConfigParser
import getopt
import os
import sys
import twitter
USAGE = '''Usage: tweet [options] message
This script posts a message to Twitter.
Options:
-h --help : print this help
--consumer-key : the twit... | ajibawa-2023/Python-Code-Large/train/row_88998 | 82 | 141 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88998:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0213, 0.0071, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88998:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88998:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88998:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88998:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python2.4
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | ajibawa-2023/Python-Code-Large/train/row_88999 | 16 | 71 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_88999:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 20], "level": 0, "parent": null, "vector": [8, 0, 0.2606, 0.0563, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_88999:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88999:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_88999:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_88999:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#! /usr/bin/env python
# encoding: utf-8
# waf 1.6.10
VERSION='0.3.3'
import sys
APPNAME='p2t'
top = '.'
out = 'build'
CPP_SOURCES = ['poly2tri/common/shapes.cc',
'poly2tri/sweep/cdt.cc',
'poly2tri/sweep/advancing_front.cc',
'poly2tri/sweep/sweep_context.cc',
... | ajibawa-2023/Python-Code-Large/train/row_89002 | 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_89002:Assign_L5_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1111, 0.0222, 0, 0.66, 0.0, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89002:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89002:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89002:If_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89002:If_L25_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_890... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | ajibawa-2023/Python-Code-Large/train/row_89003 | 218 | 605 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89003:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89003:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89003:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89003:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89003:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright (C) 2012 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 ... | ajibawa-2023/Python-Code-Large/train/row_89004 | 133 | 305 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89004:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89004:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89004:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89004:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89004:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# 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_89006 | 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_89006: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_89006:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89006:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89006:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89006: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_89007 | 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_89007: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_89007:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89007:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89007:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89007:FunctionDef_L32_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_89008 | 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_89008: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_89008:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89008:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89008:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89008:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_89010 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89010:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 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_89010:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89010:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89010:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89010:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# 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_89011 | 396 | 1,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_89011:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 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_89011:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89011:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89011:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89011:ImportFrom_L39_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_89012 | 46 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89012:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 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_89012:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89012:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89012:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89012:FunctionDef_L35_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_89013 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89013:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 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_89013:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89013:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89013:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89013:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 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 ... | ajibawa-2023/Python-Code-Large/train/row_89015 | 86 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89015:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89015:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89015:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89015:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89015:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2011 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_89016 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89016:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 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_89016:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89016:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89016:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89016:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_89018 | 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_89018: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... | [] |
# 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_89019 | 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_89019: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_89019:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89019:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89019:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89019:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
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_89020 | 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_89020: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_89020:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89020:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89020:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_89020:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_89021 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89021:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 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_89021:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89021:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89021:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89021:Assign_L42_C4"}, {"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_89023 | 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_89023: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_89023:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89023:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89023:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89023:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/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_89024 | 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_89024: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_89024:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89024:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89024:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89024:FunctionDef_L53_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_89026 | 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_89026: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_89026:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89026:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89026:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89026: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_89027 | 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_89027: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_89027:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89027:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89027:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89027:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# 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_89028 | 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_89028: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_89028:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89028:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89028:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89028:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/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_89030 | 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_89030: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_89030:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89030:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89030:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89030:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_89031 | 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_89031: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... | [] |
# 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_89032 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89032:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 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_89032:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89032:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89032:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89032:FunctionDef_L71_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_89033 | 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_89033: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_89033:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89033:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89033:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89033:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# 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_89034 | 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_89034: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_89034:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89034:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89034:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_89034:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_89035 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89035:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 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_89035:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89035:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89035:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89035:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""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_89036 | 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_89036: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_89036:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89036:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89036:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89036:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
"""
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_89037 | 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_89037: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_89037:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89037:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89037:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89037:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python2.6
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_89040 | 88 | 214 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89040:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0841, 0.0047, 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_89040:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89040:Expr_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89040:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89040:Assign_L67_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
"gui2py application example using a resource & controller"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
class MyController(gui.Controller):
def on_load(self, evt):
print "initialized!"... | ajibawa-2023/Python-Code-Large/train/row_89041 | 23 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89041:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0789, 0.0263, 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_89041:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89041:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89041:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89041:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Experimental sample gui2py application demo of sizer usage"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import datetime
import decimal
import os
# disable ubuntu unified menu
os.enviro... | ajibawa-2023/Python-Code-Large/train/row_89042 | 18 | 42 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89042:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0952, 0.0238, 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_89042:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89042:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89042:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89042:Expr_L42_C4"}] |
[{'bgcolor': u'#E5E5E5',
'components': [{'left': '10',
'name': 'field1',
'top': '10',
'type': 'TextBox',
'value': u'Hello gui2py',
'width': '288'},
{'bgcolor': u'#E5E5E5',
'components': [{'id':... | ajibawa-2023/Python-Code-Large/train/row_89043 | 1 | 48 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89043:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 48], "level": 0, "parent": null, "vector": [8, 0, 0.5104, 1.0, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py resource (python lists/dicts ui definition) support"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Implementation resembles PythonCard's resource file structure (resource and
# ... | ajibawa-2023/Python-Code-Large/train/row_89044 | 179 | 298 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89044:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0134, 0.0034, 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_89044:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89044:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89044:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89044:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Font facilities (encapsulate wx.Font)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's font module, altought
# most of it was ... | ajibawa-2023/Python-Code-Large/train/row_89045 | 97 | 149 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89045:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0268, 0.0067, 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_89045:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89045:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89045:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89045:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-... |
#----------------------------------------------------------------------------
# Name: flowsizer.py
# Purpose: Implements a Flow Sizer
#
# Author: Peter Damoc (peter at gmail.com)
#
# Created: January 2006
# Version: 0.1
# Licence: wxWindows license
import wx
class... | ajibawa-2023/Python-Code-Large/train/row_89046 | 72 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89046:Import_L11_C0", "label": "wx import wx", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.1122, 0.0102, 0, 0.66, 0.0, 666, 0, 1, 0, 0, 666, 0, 0], "semantic": {"name": "wx", "arg_names": [], "import_names": ["wx"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89046:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89046:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89046:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89046:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Shell, Namespace viewer and other debugging facilities"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# inspired byPythonCard debug module, but completely rewritten
import wx
import wx... | ajibawa-2023/Python-Code-Large/train/row_89048 | 18 | 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_89048:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1111, 0.0278, 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_89048:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89048:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89048:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89048:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"PythonCard to gui2py resources conversion tool"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
CTRL_MAP = {
'Widget': None,
'Button': gui.Button,
'CheckBox': gui.C... | ajibawa-2023/Python-Code-Large/train/row_89050 | 60 | 246 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89050:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0163, 0.0041, 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_89050:FunctionDef_L149_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89050:Expr_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89050:FunctionDef_L149_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89050:Assign_L151_C4"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Visual Toolbox to drag & drop gui2py's components (using wx AuiToolbar)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# some parts where inspired or borrowed from wxPython examples
impo... | ajibawa-2023/Python-Code-Large/train/row_89051 | 145 | 255 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89051:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0157, 0.0039, 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_89051:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89051:ImportFrom_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89051:Try_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89051:ImportFrom_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#from .inspector import InspectorPanel
#from .propeditor import PropertyEditorPanel
#from .designer import BasicDesigner
#from .toolbox import ToolBox, ToolBoxDropTarget
| ajibawa-2023/Python-Code-Large/train/row_89053 | 0 | 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"] | [] | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's generic Top Level Window (uses wx.Frame)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's model.Background component,
# but ... | ajibawa-2023/Python-Code-Large/train/row_89054 | 101 | 228 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89054:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0175, 0.0044, 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_89054:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89054:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89054:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89054:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Top Level Windows package"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Window is a fork of PythonCard's model.Background
from .window import Window
from .htmlwin... | ajibawa-2023/Python-Code-Large/train/row_89055 | 6 | 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_89055:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.3077, 0.0769, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's HTML Top Level Window (uses wx.Frame and gui.HtmlBox)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# This is an experimental approach to show rich internet application... | ajibawa-2023/Python-Code-Large/train/row_89056 | 34 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89056:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.069, 0.0172, 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_89056:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89056:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89056:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89056:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic HTML control (uses wx.HtmlWindow)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
__license__ = "LGPL 3.0"
# Initial implementation was based on PythonCard's HtmlWindow component... | ajibawa-2023/Python-Code-Large/train/row_89059 | 77 | 127 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89059:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0315, 0.0079, 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_89059:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89059:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89059:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89059:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's RadioButton for mutual exclusive options (uses wx.RadioButton)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Note: Pythoncard didn't implemented this, so the code is almost... | ajibawa-2023/Python-Code-Large/train/row_89060 | 27 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89060:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0741, 0.0185, 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_89060:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89060:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89060:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89060:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's line separator control (uses wx.StaticLine)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's StaticLine component,
# but red... | ajibawa-2023/Python-Code-Large/train/row_89061 | 18 | 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_89061:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.0294, 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_89061:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89061:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89061:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89061:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's List Model-View-Controller control (uses wx.ListCtrl & mixins)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's MultiColumnLis... | ajibawa-2023/Python-Code-Large/train/row_89062 | 299 | 498 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89062:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.008, 0.002, 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_89062:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89062:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89062:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89062:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's ComboBox control (uses wx.ComboBox - wx.Choice is not used by now)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's ComboBox c... | ajibawa-2023/Python-Code-Large/train/row_89063 | 32 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89063:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.069, 0.0172, 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_89063:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89063:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89063:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89063:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Gauge (a.k.a. progress bar) control (uses wx.Gauge)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Gauge component,
# but ... | ajibawa-2023/Python-Code-Large/train/row_89064 | 14 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89064:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1053, 0.0263, 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_89064:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89064:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89064:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89064:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic ListBox control (uses wx.ListBox), defines ItemContainerControl"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's List co... | ajibawa-2023/Python-Code-Large/train/row_89065 | 136 | 214 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89065:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0187, 0.0047, 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_89065:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89065:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89065:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89065:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic Label control (uses wx.StaticText)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's StaticText component,
# but redesi... | ajibawa-2023/Python-Code-Large/train/row_89066 | 42 | 72 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89066:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0556, 0.0139, 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_89066:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89066:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89066:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89066:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Tree Model-View-Controller control (uses wx.TreeCtrl)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Tree component,
# but... | ajibawa-2023/Python-Code-Large/train/row_89067 | 147 | 252 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89067:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0159, 0.004, 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_89067:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89067:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89067:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89067:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Notebook control and TabPanel (uses wx.Notebook and wx.Panel)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Notebook compon... | ajibawa-2023/Python-Code-Large/train/row_89069 | 78 | 144 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89069:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0278, 0.0069, 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_89069:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89069:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89069:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89069:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's basic Image control (uses wx.StaticBitmap)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
# Initial implementation was based on PythonCard's Image component,
# but redesigned and overhauled a l... | ajibawa-2023/Python-Code-Large/train/row_89070 | 108 | 196 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89070:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0204, 0.0051, 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_89070:If_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89070:ImportFrom_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89070:If_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89070:If_L23_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Panel control + optional label/frame (uses wx.StatixBox & wx.Panel)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's StatixBox... | ajibawa-2023/Python-Code-Large/train/row_89071 | 61 | 109 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89071:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0367, 0.0092, 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_89071:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89071:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89071:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89071:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Button control (uses wx.Button and wx.BitmapButton)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's Button component,
# but... | ajibawa-2023/Python-Code-Large/train/row_89072 | 45 | 90 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89072:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0444, 0.0111, 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_89072:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89072:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89072:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89072:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's CheckBox control (uses wx.CheckBox)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's CehckBox component,
# but redesigned an... | ajibawa-2023/Python-Code-Large/train/row_89073 | 23 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89073:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0851, 0.0213, 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_89073:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89073:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89073:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89073:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Grid Model-View-Controller control (uses wx.Grid & PyGridBaseTable)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicables
# Initial implementation was based on PythonCard's Grid com... | ajibawa-2023/Python-Code-Large/train/row_89074 | 286 | 538 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89074:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0074, 0.0019, 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_89074:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89074:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89074:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89074:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Controls package"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Most controls where forked from PythonCard's components package, altought
# most of they were redesign... | ajibawa-2023/Python-Code-Large/train/row_89075 | 21 | 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_89075:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1143, 0.0286, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Slider control, similar to a scrollbar in other libs (uses wx.Slider)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was based on PythonCard's List co... | ajibawa-2023/Python-Code-Large/train/row_89076 | 27 | 59 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89076:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0678, 0.0169, 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_89076:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89076:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89076:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89076:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Common dialogs (function wrappers for wxPython dialogs)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
import wx
from wx.lib import dialogs
from .font import Font
def alert(message, title="", par... | ajibawa-2023/Python-Code-Large/train/row_89077 | 98 | 152 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89077:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0263, 0.0066, 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_89077:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89077:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89077:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89077:If_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's miscellaneous utility functions (frozen, path, caller module, etc.)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart" # where applicable
# Initial implementation was stripped down from PythonCard's util mod... | ajibawa-2023/Python-Code-Large/train/row_89078 | 34 | 66 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89078:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0606, 0.0152, 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_89078:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89078:If_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89078:If_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89078:Return_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's Event Model (encapsulates wx.Event)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Initial implementation was inspired on PythonCard's event module, altought
# it was... | ajibawa-2023/Python-Code-Large/train/row_89080 | 114 | 188 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89080:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0213, 0.0053, 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_89080:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89080:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89080:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89080:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py's StatusBar (encapsulates wx.StatusBar)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Initial implementation was based on PythonCard's statusbar module, altought
# som... | ajibawa-2023/Python-Code-Large/train/row_89081 | 28 | 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_89081:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0727, 0.0182, 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_89081:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89081:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89081:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89081:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py: Simple and powerful GUI framework for agile development - Main Package"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
__version__ = "0.9.3"
# some parts where inspired or borrowed... | ajibawa-2023/Python-Code-Large/train/row_89083 | 32 | 70 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89083:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0571, 0.0143, 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_89083:If_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89083:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89083:If_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89083:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
import sys
import os
import inspect
# Events
from sphinx.ext.autodoc import MethodDocumenter, ModuleDocumenter
class EventDocumenter(MethodDocumenter):
objtype = "event"
member_order = 45
priority = 5
@classmethod
def can_document_member(cls, member, membername, isattr, parent):
... | ajibawa-2023/Python-Code-Large/train/row_89084 | 67 | 100 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89084:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.01, 0.01, 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_89084:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89084:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89084:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89084:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# -*- coding: utf-8 -*-
#
# gui2py documentation build configuration file, created by
# Txema Vicente <txema@nabla.net>
#
import os
import sys
import time
import datetime
import pprint
_PrettyPrinter = pprint.PrettyPrinter(indent=4)
def pretty(text):
_PrettyPrinter.pprint(text)
return _PrettyPrinter.pformat(t... | ajibawa-2023/Python-Code-Large/train/row_89087 | 63 | 119 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89087:Import_L7_C0", "label": "os import os", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0084, 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_89087:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89087:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89087:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89087:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Maintains a regstry of the components that have been loaded into the system"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# Initial implementation was inspired on PythonCard's r... | ajibawa-2023/Python-Code-Large/train/row_89088 | 10 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89088:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0455, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
import wx
import wx.html
from . import GetParam
FormSubmitEventType = wx.NewEventType()
EVT_FORM_SUBMIT = wx.PyEventBinder(FormSubmitEventType)
class FormSubmitEvent(wx.PyEvent):
"""
Event indication a form was submitted.
form is the form object being submitted
args is a dict of form ar... | ajibawa-2023/Python-Code-Large/train/row_89089 | 133 | 205 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89089:Import_L1_C0", "label": "wx import wx", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0049, 0, 0.66, 0.0, 666, 0, 1, 0, 0, 666, 0, 0], "semantic": {"name": "wx", "arg_names": [], "import_names": ["wx"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89089:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89089:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89089:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89089:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
Implementations of form input controls
"""
from . import GetParam, form
from .input import FormControlMixin
from ..controls import Label
import wx
import wx.html
class FormLabel(Label, FormControlMixin):
def __init__(self, parent, form, tag, parser, *args, **kwargs):
label ... | ajibawa-2023/Python-Code-Large/train/row_89090 | 19 | 30 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89090:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 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_89090:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89090:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89090:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89090:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-... |
from . import GetParam, input
from .input import FormControlMixin
from ..controls import ComboBox
class SingleSelectControl(ComboBox, FormControlMixin):
def __init__(self, parent, form, tag, parser, option_list, **kwargs):
kwargs["name"] = GetParam(tag, "NAME", "")
ComboBox.__init__(sel... | ajibawa-2023/Python-Code-Large/train/row_89091 | 21 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89091:ImportFrom_L1_C0", "label": "from import GetParam, input", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 0, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": ["GetParam", "i... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89091:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89091:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89091:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89091:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Experimental HTML Form support using wx.Html"
# Initial implementation was based on a form example found in the wxPython wiki,
# altought some of it was redesigned and overhauled a lot.
# Note: there is no need to use this package, as gui2py works completely without
... | ajibawa-2023/Python-Code-Large/train/row_89093 | 22 | 42 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89093:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0952, 0.0238, 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_89093:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89093:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89093:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89093:If_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""
Implementations of form input controls
"""
from . import GetParam, form
from ..controls import TextBox, Button, CheckBox
from .. import registry
import wx
import wx.html
def TypeHandler(type_name):
""" A metaclass generator. Returns a metaclass which
will register it's class as the class... | ajibawa-2023/Python-Code-Large/train/row_89094 | 112 | 142 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89094:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0141, 0.0211, 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_89094:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89094:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89094:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89094:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Sample gui2py application"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
# images were taken from Pythoncard's proof and widgets demos
# for more complete examples, see each control modul... | ajibawa-2023/Python-Code-Large/train/row_89095 | 139 | 258 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89095:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0155, 0.0039, 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_89095:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89095:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89095:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89095:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
# By R.Suzi rnd@onego.ru
# Extended and expanded by Andy Todd <andy47@halfcooked.com>
# Simplified & adapted for gui2py by Mariano Reingart <reingart@gmail.com>
"""
This script is setup.py of the gui2py package.
You need to have wxPython to run gui2py
"""
WIN_DEFAULT_COMMAND = "insta... | ajibawa-2023/Python-Code-Large/train/row_89096 | 11 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89096:Expr_L6_C0", "label": "expression", "type": "expression", "loc": [6, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.0625, 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_89096:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89096:Expr_L28_C4"}] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"gui2py application example using a resource"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
def on_load(evt):
print "initializing!"
window['mypanel']['mybutton'].labe... | ajibawa-2023/Python-Code-Large/train/row_89097 | 23 | 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_89097:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.025, 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_89097:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89097:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89097:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89097:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Minimal gui2py application (to be used as skeleton)"
__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2013- Mariano Reingart"
__license__ = "LGPL 3.0"
import gui
# --- here goes your event hand... | ajibawa-2023/Python-Code-Large/train/row_89098 | 15 | 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_89098:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.0294, 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_89098:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89098:Import_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89098:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89098:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | ajibawa-2023/Python-Code-Large/train/row_89099 | 51 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89099:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89099:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89099:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89099:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_89099:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_89100 | 6 | 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_89100:Import_L15_C0", "label": "os import os", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.4545, 0.0303, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name":... | [] |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_89101 | 31 | 48 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89101:Import_L15_C0", "label": "datetime import datetime", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.3125, 0.0208, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["date... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89101:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89101:Expr_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89101:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89101:Assign_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#
# 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 writing, software
# distributed under... | ajibawa-2023/Python-Code-Large/train/row_89102 | 640 | 1,152 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89102:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 32], "level": 0, "parent": null, "vector": [8, 0, 0.0208, 0.0148, 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_89102:ClassDef_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89102:Expr_L96_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89102:ClassDef_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89102:FunctionDef_L98_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_89103 | 172 | 294 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89103:Import_L15_C0", "label": "logging import logging, json", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.051, 0.0034, 0, 0.66, 0.0, 715, 0, 2, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["lo... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89103:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89103:FunctionDef_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89103:FunctionDef_L27_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_89103:Assign_L29_C6"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_89104 | 75 | 126 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89104:Import_L15_C0", "label": "os import os, logging", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.119, 0.0079, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "logging"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89104:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89104:Assign_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_89104:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89104:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import time
t = time.time()
u = time.gmtime(t)
s = time.strftime('%a, %e %b %Y %T GMT', u)
print 'Content-Type: text/javascript'
print 'Cache-Control: no-cache'
print 'Date: ' + s
print 'Expires: ' + s
print ''
print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
| ajibawa-2023/Python-Code-Large/train/row_89105 | 10 | 11 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89105:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [] |
def foobar():
print 'yes'
foobar()
| ajibawa-2023/Python-Code-Large/train/row_89106 | 3 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89106:FunctionDef_L1_C0", "label": "foobar", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.375, 0.5, 0, 0.66, 0.0, 139, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "foobar", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89106:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89106:Expr_L2_C4"}] |
print 4
| ajibawa-2023/Python-Code-Large/train/row_89107 | 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_89107:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
for i in range(10):
print i
| ajibawa-2023/Python-Code-Large/train/row_89108 | 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_89108:For_L1_C0", "label": "for i", "type": "for", "loc": [1, 2], "level": 0, "parent": null, "vector": [6, 0, 0.5, 0.6667, 0, 0.66, 0.0, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_89108:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_89108:Expr_L2_C4"}] |
class X: pass
| ajibawa-2023/Python-Code-Large/train/row_89109 | 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_89109:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 783, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": "... | [] |
import goog.math as gm
v0 = gm.Vec2(10, 12)
print "ctor", v0
v1 = gm.Vec2.randomUnit()
print "randomunit", gm.nearlyEquals(v1.magnitude(), 1.0);
v2 = gm.Vec2.random()
# todo; attr access
#print v2.x >= -1 and v2.x <= 1, v2.y >= -1 and v2.y <= 1
v3 = gm.Vec2.fromCoordinate(gm.Coordinate(4, 5))
print "fromcoord", v3
... | ajibawa-2023/Python-Code-Large/train/row_89110 | 34 | 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_89110:Import_L1_C0", "label": "goog.math import gm", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0204, 0, 0.66, 0.0, 190, 0, 1, 0, 0, 190, 0, 0], "semantic": {"name": "goog.math", "arg_names": [], "import_names": ["gm"], "rhs_... | [] |
import goog.json
print goog.json.parse
# random sample from json.org
obj = goog.json.parse("""
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortA... | ajibawa-2023/Python-Code-Large/train/row_89111 | 4 | 29 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89111:Import_L1_C0", "label": "goog.json import goog.json", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0345, 0, 0.66, 0.0, 575, 0, 1, 0, 0, 575, 0, 0], "semantic": {"name": "goog.json", "arg_names": [], "import_names": ["goog... | [] |
from goog.json import parse as jparse
print jparse('''
{"x":5, "y":6, "z":[3.1, 4.7, 5.6]}
''')
| ajibawa-2023/Python-Code-Large/train/row_89112 | 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_89112:ImportFrom_L1_C0", "label": "from goog.json import jparse", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 575, 0, 1, 0, 0, 575, 0, 0], "semantic": {"name": "goog.json", "arg_names": [], "import_names": ["jpar... | [] |
import goog.math as gm
c1 = gm.Coordinate()
c2 = gm.Coordinate(1)
c3 = gm.Coordinate(1, 2)
print c1.toString()
print c2.toString()
print c3.toString()
c4 = gm.Coordinate(1, 2)
c5 = gm.Coordinate(3, 4)
print gm.Coordinate.equals(c3, c4)
print gm.Coordinate.equals(c3, c5)
c6 = c4.clone()
c7 = c6.clone()
print gm.Coordi... | ajibawa-2023/Python-Code-Large/train/row_89113 | 19 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_89113:Import_L1_C0", "label": "goog.math import gm", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0455, 0, 0.66, 0.0, 190, 0, 1, 0, 0, 190, 0, 0], "semantic": {"name": "goog.math", "arg_names": [], "import_names": ["gm"], "rhs_... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.