code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
#This contains global definition of Browser class and other useful thing ####################################################################################### # # # File: browser_bogus.py ...
ajibawa-2023/Python-Code-Large/train/row_3590
11
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_3590:Import_L33_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.7333, 0.0222, 0, 0.66, 0.0, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3590:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3590:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3590:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3590:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/python ####################################################################################### # # # File: ad_auto.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3591
80
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3591:Import_L35_C0", "label": "time import time", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.2011, 0.0057, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3591:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3591:FunctionDef_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3591:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3591:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code...
####################################################################################### # # # File: gojuon.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3594
1
250
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3594:Assign_L34_C0", "label": "gojuon =", "type": "assigned_variable", "loc": [34, 250], "level": 0, "parent": null, "vector": [14, 0, 0.568, 0.868, 0, 0.66, 0.0, 833, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "gojuon", "arg_names": [], "import_names": [], "rhs_call_na...
[]
# -*- coding: utf-8 -*- ####################################################################################### # # # File: Core.py # # Part of 2dgal_cheater ...
ajibawa-2023/Python-Code-Large/train/row_3595
248
412
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3595:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0801, 0.0121, 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_3595:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3595:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3595:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3595:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainDialog.ui' # # Created: Sat Jul 02 23:35:22 2011 # by: PyQt4 UI code generator 4.8.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8...
ajibawa-2023/Python-Code-Large/train/row_3596
133
165
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3596:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0606, 0.0061, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3596:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3596:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3596:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3596:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
####################################################################################### # # File: user_agent_lib # Part of stage1st-cheater # Home: http://stage1st-cheater.googlecode.com # #...
ajibawa-2023/Python-Code-Large/train/row_3597
16
4,010
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3597:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0082, 0.0012, 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_3597:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3597:Expr_L3999_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3597:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3597:Assign_L4000_C4"}, {"f": "ajibawa-2023/Python-...
#! /usr/bin/python ####################################################################################### # # # File: ad_auto.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3598
80
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3598:Import_L35_C0", "label": "time import time", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.2011, 0.0057, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3598:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3598:FunctionDef_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3598:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3598:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/python ####################################################################################### # # # File: gojuon_gen.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3601
15
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_3601:Import_L35_C0", "label": "urllib import urllib", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.6364, 0.0182, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3601:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3601:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3601:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3601:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
#! /usr/bin/python from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\x86\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2,...
ajibawa-2023/Python-Code-Large/train/row_3602
6
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3602:ImportFrom_L3_C0", "label": "from distutils.core import setup", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1154, 0.0385, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
#! /usr/bin/python from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\x86\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2,...
ajibawa-2023/Python-Code-Large/train/row_3603
6
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3603:ImportFrom_L3_C0", "label": "from distutils.core import setup", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1154, 0.0385, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
#! /usr/bin/python ####################################################################################### # # # File: gojuon_gen.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3604
15
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_3604:Import_L35_C0", "label": "urllib import urllib", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.6364, 0.0182, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3604:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3604:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3604:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3604:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
#This contains global definition of Browser class and other useful thing ####################################################################################### # # # File: browser_bogus.py ...
ajibawa-2023/Python-Code-Large/train/row_3605
10
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3605:Import_L33_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.75, 0.0227, 0, 0.66, 0.0, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3605:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3605:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3605:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3605:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/python ####################################################################################### # # # File: ad_auto.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3606
67
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3606:Import_L35_C0", "label": "time import time", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.2448, 0.007, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3606:FunctionDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3606:Assign_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3606:FunctionDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3606:Assign_L72_C4"}, {"f": "ajibawa-2023/Python-Code-L...
####################################################################################### # # # File: gojuon.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3607
1
250
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3607:Assign_L34_C0", "label": "gojuon =", "type": "assigned_variable", "loc": [34, 250], "level": 0, "parent": null, "vector": [14, 0, 0.568, 0.868, 0, 0.66, 0.0, 833, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "gojuon", "arg_names": [], "import_names": [], "rhs_call_na...
[]
#! /usr/bin/python ####################################################################################### # # # File: ad_auto.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3609
67
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3609:Import_L35_C0", "label": "time import time", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.2448, 0.007, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3609:FunctionDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3609:Assign_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3609:FunctionDef_L63_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3609:Assign_L72_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#! /usr/bin/python ####################################################################################### # # # File: gojuon_gen.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3610
15
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_3610:Import_L35_C0", "label": "urllib import urllib", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.6364, 0.0182, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3610:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3610:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3610:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3610:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
#! /usr/bin/python ####################################################################################### # # # File: gojuon_gen.py # # Part of 2dgal-cheater ...
ajibawa-2023/Python-Code-Large/train/row_3612
15
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_3612:Import_L35_C0", "label": "urllib import urllib", "type": "import", "loc": [35, 35], "level": 0, "parent": null, "vector": [1, 0, 0.6364, 0.0182, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3612:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3612:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3612:For_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3612:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
import unittest import bots.inmessage as inmessage import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit '''plugin unitinmessageedifact.zip''' class TestInmessage(unittest.TestCase): def testEdifact0401(self): ''' 0401 Errors in records''' self.assertRaises(botslib.InMe...
ajibawa-2023/Python-Code-Large/train/row_3613
69
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3613:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0115, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3613:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3613:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3613:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3613:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python from bots import engine if __name__ == '__main__': engine.start()
ajibawa-2023/Python-Code-Large/train/row_3614
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3614:ImportFrom_L2_C0", "label": "from bots import engine", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["engine"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3614:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3614:Expr_L5_C4"}]
import os import sys from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES #install data file in the same way as *.py for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] def fullsplit(path, result=None): """ Split a pathname into components (the op...
ajibawa-2023/Python-Code-Large/train/row_3615
28
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3615:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0122, 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_3615:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3615:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3615:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3615:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
import os import sys from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES #install data file in the same way as *.py for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] def fullsplit(path, result=None): """ Split a pathname into components (the op...
ajibawa-2023/Python-Code-Large/train/row_3616
28
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3616:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0122, 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_3616:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3616:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3616:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3616:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/env python from bots import xml2botsgrammar if __name__=='__main__': xml2botsgrammar.start()
ajibawa-2023/Python-Code-Large/train/row_3617
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3617:ImportFrom_L2_C0", "label": "from bots import xml2botsgrammar", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["xml2bo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3617:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3617:Expr_L5_C4"}]
import os import unittest import shutil import bots.inmessage as inmessage import bots.outmessage as outmessage import filecmp try: import json as simplejson except ImportError: import simplejson import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit ''' pluging unitinisout.zip''' c...
ajibawa-2023/Python-Code-Large/train/row_3618
104
150
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3618:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0067, 0.0067, 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_3618:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3618:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3618:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3618:Import_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3618...
#!/usr/bin/env python from bots import grammarcheck if __name__=='__main__': grammarcheck.start()
ajibawa-2023/Python-Code-Large/train/row_3619
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3619:ImportFrom_L2_C0", "label": "from bots import grammarcheck", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["grammarch...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3619:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3619:Expr_L5_C4"}]
import os import sys from distutils.core import setup def fullsplit(path, result=None): """ Split a pathname into components (the opposite of os.path.join) in a platform-neutral way. """ if result is None: result = [] head, tail = os.path.split(path) if head == '': ret...
ajibawa-2023/Python-Code-Large/train/row_3620
27
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3620:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0122, 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_3620:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3620:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3620:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3620:If_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python if __name__ == '__main__': import cProfile cProfile.run('from bots import engine; engine.start()','profile.tmp') import pstats p = pstats.Stats('profile.tmp') #~ p.sort_stats('cumulative').print_stats(25) p.sort_stats('time').print_stats(25) #~ p.print_callees('deepcop...
ajibawa-2023/Python-Code-Large/train/row_3621
7
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3621:If_L3_C0", "label": "if", "type": "if", "loc": [3, 11], "level": 0, "parent": null, "vector": [4, 0, 0.5, 0.6429, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3621:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3621:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3621:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3621:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3621:If_L...
import os import unittest import shutil import bots.inmessage as inmessage import bots.outmessage as outmessage import filecmp import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit ''' pluging unitinmessagexml.zip''' class TestInmessage(unittest.TestCase): ''' Read messages; some shoul...
ajibawa-2023/Python-Code-Large/train/row_3622
217
274
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3622:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 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_3622:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3622:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3622:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3622:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python from bots import webserver if __name__ == '__main__': webserver.start()
ajibawa-2023/Python-Code-Large/train/row_3623
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3623:ImportFrom_L2_C0", "label": "from bots import webserver", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["webserver"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3623:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3623:Expr_L5_C4"}]
import filecmp import glob import shutil import os import sys import subprocess import logging import logging import bots.botslib as botslib import bots.botsinit as botsinit import bots.botsglobal as botsglobal from bots.botsconfig import * '''plugin unitretry.zip''' #!!!activate rotues ''' input: mime (complex struc...
ajibawa-2023/Python-Code-Large/train/row_3624
62
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_3624:Import_L1_C0", "label": "filecmp import filecmp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 891, 0, 1, 0, 0, 891, 0, 0], "semantic": {"name": "filecmp", "arg_names": [], "import_names": ["filecmp"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3624:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3624:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3624:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3624:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import unittest import bots.botslib as botslib import bots.botsinit as botsinit import bots.grammar as grammar import bots.inmessage as inmessage import bots.outmessage as outmessage import utilsunit ''' plugin unitgrammar.zip ''' class TestGrammar(unittest.TestCase): def testgeneralgrammarerrors(self): ...
ajibawa-2023/Python-Code-Large/train/row_3625
175
227
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3625:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0044, 0.0044, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3625:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3625:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3625:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3625:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
import unittest import bots.botsglobal as botsglobal import bots.inmessage as inmessage import bots.botslib as botslib import bots.transform as transform import pickle import bots.botsinit as botsinit import utilsunit '''plugin unittranslateutils.zip ''' #as the max length is class TestTranslate(unittest.TestCase): ...
ajibawa-2023/Python-Code-Large/train/row_3626
99
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_3626:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3626:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3626:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3626:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3626:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Co...
import unittest import filecmp import glob import shutil import os import subprocess import logging import utilsunit import bots.botslib as botslib import bots.botsinit as botsinit import bots.botsglobal as botsglobal from bots.botsconfig import * ''' plugin unitconfirm.zip before each run: clear transactions! ''' b...
ajibawa-2023/Python-Code-Large/train/row_3627
77
191
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3627:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0052, 0.0052, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3627:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3627:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3627:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3627:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code...
import unittest import bots.botslib as botslib import bots.botsinit as botsinit import bots.inmessage as inmessage import bots.outmessage as outmessage from bots.botsconfig import * import utilsunit ''' plugin unitformats ''' #python 2.6 treats -0 different. in outmessage this is adapted, for inmessage: python 2.6 do...
ajibawa-2023/Python-Code-Large/train/row_3628
888
1,046
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3628:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.001, 0.001, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3628:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3628:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3628:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3628:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code...
from datetime import datetime from django.db import models from django.utils.translation import ugettext as _ ''' django is not excellent in generating db. But they have provided a way to customize the generated database using SQL. see bots/sql/*. ''' STATUST = [ (0, _(u'Open')), (1, _(u'Error')), (2, _(u'...
ajibawa-2023/Python-Code-Large/train/row_3630
302
439
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3630:ImportFrom_L1_C0", "label": "from datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0023, 0.0023, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3630:ClassDef_L107_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3630:Expr_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3630:ClassDef_L107_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3630:FunctionDef_L109_C4"}, {"f": "ajibawa-2023/Python-Code-...
''' Reading/lexing/parsing/splitting an edifile.''' import StringIO import time import sys try: import cPickle as pickle except: import pickle try: import cElementTree as ET except ImportError: try: import elementtree.ElementTree as ET except ImportError: try: from xml.et...
ajibawa-2023/Python-Code-Large/train/row_3631
758
1,145
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3631:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0009, 0.0009, 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_3631:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3631:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3631:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3631:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3631:...
codeconversions = { '351':'AAK', '35E':'AAK', '220':'ON', '224':'ON', '50E':'ON', '83':'IV', '380':'IV', '384':'IV', 'TESTIN':'TESTOUT', }
ajibawa-2023/Python-Code-Large/train/row_3632
1
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_3632:Assign_L1_C0", "label": "codeconversions =", "type": "assigned_variable", "loc": [1, 11], "level": 0, "parent": null, "vector": [14, 0, 0.5455, 1.0, 0, 0.66, 0.0, 543, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "codeconversions", "arg_names": [], "import_names": []...
[]
""" Python Character Mapping Codec generated from CP1252.TXT with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. Adapted by Henk-Jan Ebbers for Bots open source EDI translator Regular UNOA: UNOA char, CR, LF and...
ajibawa-2023/Python-Code-Large/train/row_3633
20
189
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3633:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0291, 0.0529, 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_3633:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3633:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3633:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3633:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Python Character Mapping Codec generated from CP1252.TXT with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. Adapted by Henk-Jan Ebbers for Bots open source EDI translator Regular UNOB: UNOB char, CR, LF and...
ajibawa-2023/Python-Code-Large/train/row_3634
20
189
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3634:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0291, 0.0529, 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_3634:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3634:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3634:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3634:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code...
import shutil import time from django.utils.translation import ugettext as _ #bots-modules import botslib import botsglobal import grammar import outmessage from botsconfig import * @botslib.log_session def mergemessages(startstatus=TRANSLATED,endstatus=MERGED,idroute=''): ''' Merges en envelopes several messages ...
ajibawa-2023/Python-Code-Large/train/row_3635
289
515
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3635:Import_L1_C0", "label": "shutil import shutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0019, 0.0019, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3635:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3635:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3635:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3635:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# Django settings for bots project. import os import bots #*******settings for bots error reports********************************** MANAGERS = ( #bots will send error reports to the MANAGERS ('name_manager', 'manager@domain.org'), ) #~ EMAIL_HOST = 'smtp.gmail.com' #Default: 'localhost' #~ EMAIL...
ajibawa-2023/Python-Code-Large/train/row_3636
36
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3636:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0146, 0.0073, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[]
import sys from django.utils.translation import ugettext as _ #bots-modules import communication import envelope import transform import botslib import botsglobal import preprocess from botsconfig import * @botslib.log_session def prepareretransmit(): ''' prepare the retransmittable files. Return: indication if fi...
ajibawa-2023/Python-Code-Large/train/row_3637
134
268
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3637:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 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_3637:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3637:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3637:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3637:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import time import django import models import viewlib import botslib import botsglobal django.contrib.admin.widgets.AdminSplitDateTime HiddenInput = django.forms.widgets.HiddenInput DEFAULT_ENTRY = ('',"---------") editypelist=[DEFAULT_ENTRY] + sorted(models.EDITYPES) confirmtypelist=[DEFAULT_ENTRY] + models.CONFIRMTY...
ajibawa-2023/Python-Code-Large/train/row_3639
197
216
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3639:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3639:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3639:Return_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3639:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3639:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code-L...
'''module contains the functions to be called from user scripts''' try: import cPickle as pickle except: import pickle import copy import collections from django.utils.translation import ugettext as _ #bots-modules import botslib import botsglobal import inmessage import outmessage from botsconfig import * #**...
ajibawa-2023/Python-Code-Large/train/row_3640
184
387
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3640:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0026, 0.0026, 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_3640:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3640:Import_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3640:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3640:Import_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3640:...
import os import sys import atexit import traceback import logging #import bots-modules import bots.botslib as botslib import bots.botsglobal as botsglobal def showusage(): print ' Update existing bots database for new release 1.6.0' print ' Options:' print " -c<directory> directory for conf...
ajibawa-2023/Python-Code-Large/train/row_3641
71
104
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3641:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0096, 0.0096, 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_3641:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3641:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3641:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3641:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from django.conf.urls.defaults import * from django.contrib import admin,auth from django.views.generic.simple import redirect_to from django.contrib.auth.decorators import login_required,user_passes_test from bots import views admin.autodiscover() staff_required = user_passes_test(lambda u: u.is_staff) superuser_requ...
ajibawa-2023/Python-Code-Large/train/row_3642
10
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_3642:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_name...
[]
from django import template register = template.Library() @register.filter def url2path(value): if value.startswith('/admin/bots/'): value = value[12:] else: value = value[1:] if value: if value[-1] == '/': value = value[:-1] else: value = 'home' return ...
ajibawa-2023/Python-Code-Large/train/row_3643
11
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3643:ImportFrom_L1_C0", "label": "from django import template", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["tem...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3643:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3643:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3643:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3643:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_36...
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
ajibawa-2023/Python-Code-Large/train/row_3644
33
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_3644:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0426, 0.0213, 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_3644:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3644:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3644:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3644:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
ajibawa-2023/Python-Code-Large/train/row_3645
33
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_3645:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0426, 0.0213, 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_3645:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3645:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3645:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3645:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
''' code found at code.djangoproject.com/ticket/3777 ''' from django import http class FilterPersistMiddleware(object): def _get_default(self, key): """ Gets any set default filters for the admin. Returns None if no default is set. """ default = None #~ default = settings.ADM...
ajibawa-2023/Python-Code-Large/train/row_3649
39
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_3649:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.025, 0.0375, 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_3649:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3649:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3649:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3649:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
import time import sys try: import cPickle as pickle except: import pickle import decimal NODECIMAL = decimal.Decimal(1) try: import cElementTree as ET #~ print 'imported cElementTree' except ImportError: try: import elementtree.ElementTree as ET #~ print 'imported elementtree.Elemen...
ajibawa-2023/Python-Code-Large/train/row_3650
501
801
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3650:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0012, 0.0012, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3650:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3650:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3650:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3650:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3650:...
import os import glob import time import datetime import stat import shutil from django.utils.translation import ugettext as _ #bots modules import botslib import botsglobal from botsconfig import * def cleanup(): ''' public function, does all cleanup of the database and file system.''' try: _cleanups...
ajibawa-2023/Python-Code-Large/train/row_3651
82
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3651:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.008, 0.008, 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_3651:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3651:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3651:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3651:Try_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
#Globals used by Bots incommunicate = False #used to set all incommunication off db = None #db-object ini = None #ini-file-object that is read (bots.ini) routeid = '' #current route. This is used to set routeid for Processes. preprocessnumber = 0 #different preprocessnumbers ...
ajibawa-2023/Python-Code-Large/train/row_3652
7
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3652:Assign_L2_C0", "label": "incommunicate =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.2222, 0.1111, 0, 0.66, 0.0, 483, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "incommunicate", "arg_names": [], "import_names": [], ...
[]
import copy from django.utils.translation import ugettext as _ import botslib import botsglobal from botsconfig import * def grammarread(editype,grammarname): ''' dispatch function for class Grammar or subclass read whole grammar ''' try: classtocall = globals()[editype] except KeyError...
ajibawa-2023/Python-Code-Large/train/row_3653
249
855
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3653:Import_L1_C0", "label": "copy import copy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0012, 0.0012, 0, 0.66, 0.0, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3653:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3653:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3653:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3653:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/env python import sys import os import logging from logging.handlers import TimedRotatingFileHandler from django.core.handlers.wsgi import WSGIHandler from django.utils.translation import ugettext as _ import cherrypy from cherrypy import wsgiserver import botslib import botsglobal import botsinit def showu...
ajibawa-2023/Python-Code-Large/train/row_3654
56
89
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3654:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0225, 0.0112, 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_3654:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3654:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3654:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3654:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os import re import zipfile from django.utils.translation import ugettext as _ #bots-modules import botslib import botsglobal from botsconfig import * @botslib.log_session def preprocess(routedict,function, status=FILEIN,**argv): ''' for pre- and postprocessing of files. these are NOT translations; ...
ajibawa-2023/Python-Code-Large/train/row_3657
211
327
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3657:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0031, 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_3657:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3657:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3657:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3657:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.utils.translation import ugettext as _ #bots-modules import botslib import node from botsconfig import * class Message(object): ''' abstract class; represents a edi message. is subclassed as outmessage or inmessage object. ''' def __init__(self): self.recordnumber=0 ...
ajibawa-2023/Python-Code-Large/train/row_3658
142
231
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3658:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0043, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3658:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3658:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3658:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3658:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import decimal import copy from django.utils.translation import ugettext as _ import botslib import botsglobal from botsconfig import * comparekey=None def nodecompare(node): global comparekey return node.get(*comparekey) class Node(object): ''' Node class for building trees in inmessage and outmessage ...
ajibawa-2023/Python-Code-Large/train/row_3659
308
479
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3659:Import_L1_C0", "label": "decimal import decimal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 349, 0, 1, 0, 0, 349, 0, 0], "semantic": {"name": "decimal", "arg_names": [], "import_names": ["decimal"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3659:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3659:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3659:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3659:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
import sys import os import encodings import codecs import ConfigParser import logging, logging.handlers from django.utils.translation import ugettext as _ #Bots-modules from botsconfig import * import botsglobal import botslib class BotsConfig(ConfigParser.SafeConfigParser): ''' See SafeConfigParser....
ajibawa-2023/Python-Code-Large/train/row_3660
130
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_3660:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0051, 0.0051, 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_3660:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3660:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3660:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3660:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# Django settings for bots project. import os import bots #*******settings for bots error reports********************************** MANAGERS = ( #bots will send error reports to the MANAGERS ('name_manager', 'manager@domain.org'), ) #~ EMAIL_HOST = 'smtp.gmail.com' #Default: 'localhost' #~ EMAIL...
ajibawa-2023/Python-Code-Large/train/row_3661
36
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3661:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0146, 0.0073, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[]
''' Base library for bots. Botslib should not import from other Bots-modules.''' import sys import os import codecs import traceback import subprocess import socket #to set a time-out for connections import string import urlparse import urllib import platform import django from django.utils.translation import ugettex...
ajibawa-2023/Python-Code-Large/train/row_3662
506
799
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3662:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0013, 0.0013, 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_3662:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3662:Return_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3662:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3662:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" sef2bots.py Command line params: sourcefile.sef targetfile.py Optional command line params: -seq, -struct Converts a SEF grammar into a Bots grammar. If targetfile exists (and is writeable), it will be overwritten. If -seq is specified, field names in record definitions will be sequential (TAG01, TAG...
ajibawa-2023/Python-Code-Large/train/row_3663
361
507
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3663:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 37], "level": 0, "parent": null, "vector": [8, 0, 0.0375, 0.073, 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_3663:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3663:Expr_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3663:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3663:Expr_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#constants/definitions for Bots #to be used as from bots.config import * #for statust in ta: OPEN = 0 #Bots always closes transaction. OPEN is severe error ERROR = 1 #error in transaction. OK = 2 #successfull, result is 'save'. But processing has stopped: next step with error, or no next steps defined DONE ...
ajibawa-2023/Python-Code-Large/train/row_3664
43
60
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3664:Assign_L5_C0", "label": "OPEN =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0833, 0.0167, 0, 0.66, 0.0, 484, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "OPEN", "arg_names": [], "import_names": [], "rhs_call_name": "...
[]
import django from django.contrib import admin from django.utils.translation import ugettext as _ from django.http import Http404, HttpResponse, HttpResponseRedirect from django.contrib.admin.util import unquote, flatten_fieldsets, get_deleted_objects, model_ngettext, model_format_dict from django.core.exceptions impor...
ajibawa-2023/Python-Code-Large/train/row_3665
143
199
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3665:Import_L1_C0", "label": "django import django", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.005, 0.005, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["django"], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3665:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3665:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3665:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3665:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#bots modules import botslib import botsglobal from botsconfig import * from django.utils.translation import ugettext as _ tavars = 'idta,statust,divtext,child,ts,filename,status,idroute,fromchannel,tochannel,frompartner,topartner,frommail,tomail,contenttype,nrmessages,editype,messagetype,errortext,script' def evalua...
ajibawa-2023/Python-Code-Large/train/row_3666
222
405
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3666:Import_L2_C0", "label": "botslib import botslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0025, 0, 0.66, 0.0, 484, 0, 1, 0, 0, 484, 0, 0], "semantic": {"name": "botslib", "arg_names": [], "import_names": ["botslib"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3666:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3666:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3666:Try_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3666:If_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
try: from pysqlite2 import dbapi2 as sqlite #prefer external modules for pylite except ImportError: import sqlite3 as sqlite #works OK for python26 #~ #bots engine uses: #~ ''' SELECT * #~ FROM ta #~ WHERE idta=%(idta)s ''', #~ {'idta':12345}) #~ #SQLite wants: #~ ''' SELECT * #~ FROM ta...
ajibawa-2023/Python-Code-Large/train/row_3667
28
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3667:Try_L1_C0", "label": "try", "type": "try", "loc": [1, 4], "level": 0, "parent": null, "vector": [7, 0, 0.0472, 0.0755, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snip...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3667:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3667:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3667:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3667:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
import sys import os import botsinit import botslib import grammar def showusage(): print print " Usage: %s -c<directory> <editype> <messagetype>"%os.path.basename(sys.argv[0]) print print " Checks a Bots grammar." print " Same checks are used as in translations with bots-engine." pr...
ajibawa-2023/Python-Code-Large/train/row_3668
57
76
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3668:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0132, 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_3668:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3668:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3668:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3668:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import sys import os import tarfile import glob import shutil import subprocess import traceback import bots.botsglobal as botsglobal def join(path,*paths): return os.path.normpath(os.path.join(path,*paths)) #****************************************************************************** #*** start ...
ajibawa-2023/Python-Code-Large/train/row_3669
18
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3669:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 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_3669:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3669:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3669:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3669:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import copy import os import glob import bots.inmessage as inmessage import bots.outmessage as outmessage def comparenode(node1,node2org): node2 = copy.deepcopy(node2org) if node1.record is not None and node2.record is None: print 'node2 is "None"' return False if node1.record is None and ...
ajibawa-2023/Python-Code-Large/train/row_3670
64
81
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3670:Import_L1_C0", "label": "copy import copy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0123, 0.0123, 0, 0.66, 0.0, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3670:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3670:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3670:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3670:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
import os import unittest import shutil import bots.inmessage as inmessage import bots.outmessage as outmessage import filecmp try: import json as simplejson except ImportError: import simplejson import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit try: import cElementTree as ET...
ajibawa-2023/Python-Code-Large/train/row_3671
177
250
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3671:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.004, 0.004, 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_3671:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3671:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3671:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3671:Import_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3671...
import os import unittest import shutil import filecmp import bots.inmessage as inmessage import bots.outmessage as outmessage import bots.botslib as botslib import bots.botsinit as botsinit '''plugin unitnode.zip''' class Testnode(unittest.TestCase): ''' test node.py and message.py. ''' def testedifact0...
ajibawa-2023/Python-Code-Large/train/row_3672
97
133
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3672:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 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_3672:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3672:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3672:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3672:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
ajibawa-2023/Python-Code-Large/train/row_3673
63
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3673:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3673:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3673:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3673:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3673:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
ajibawa-2023/Python-Code-Large/train/row_3674
42
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_3674:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3674:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3674:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3674:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3674:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
ajibawa-2023/Python-Code-Large/train/row_3675
50
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3675:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 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_3675:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3675:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3675:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3675:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
ajibawa-2023/Python-Code-Large/train/row_3676
20
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_3676:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 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_3676:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3676:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3676:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3676:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_36...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
ajibawa-2023/Python-Code-Large/train/row_3677
44
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3677:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3677:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3677:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3677:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3677:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
ajibawa-2023/Python-Code-Large/train/row_3678
38
74
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3678:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 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_3678:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3678:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3678:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3678:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import time import pprint def fib6(x): if x==0 or x==1: return 1 else: return fib6(x-2)+fib6(x-1) def main(): beg = time.clock() print fib6(33) end = time.clock() return end - beg print __name__ print fib6, fib6.__code__ print fib6.__code__.co_c_function...
ajibawa-2023/Python-Code-Large/train/row_3679
20
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3679:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3679:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3679:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3679:If_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3679:Return_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_36...
# based on a Java version: # Based on original version written in BCPL by Dr Martin Richards # in 1981 at Cambridge University Computer Laboratory, England # and a C++ version derived from a Smalltalk version written by # L Peter Deutsch. # Java version: Copyright (C) 1995 Sun Microsystems, Inc. # Translation fr...
ajibawa-2023/Python-Code-Large/train/row_3681
280
444
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3681:Assign_L11_C0", "label": "I_IDLE =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.0248, 0.0023, 0, 0.66, 0.0, 616, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "I_IDLE", "arg_names": [], "import_names": [], "rhs_call_n...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3681:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3681:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3681:FunctionDef_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3681:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code...
import t_const FPS= t_const.FPS_SERVER
ajibawa-2023/Python-Code-Large/train/row_3684
2
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3684:Import_L1_C0", "label": "t_const import t_const", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 855, 0, 1, 0, 0, 855, 0, 0], "semantic": {"name": "t_const", "arg_names": [], "import_names": ["t_const"], "rhs_c...
[]
#! /usr/bin/env python #coding=utf-8 #游戏地图事件 data = { #类型 警告 "warn01":{ "type":"Warning", "pos":(915,3380), # 坐标 "size":(100), # 范围 "zbpos":(915,2900), #出现僵尸 "zbsize":(800,400), #随机范围 "time":5000, # 持续时间 "zbshow":30, # 僵尸出现机率 }, } def get_data(id): return data.get(id) ...
ajibawa-2023/Python-Code-Large/train/row_3685
3
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3685:Assign_L5_C0", "label": "data =", "type": "assigned_variable", "loc": [5, 16], "level": 0, "parent": null, "vector": [14, 0, 0.5526, 0.6316, 0, 0.66, 0.0, 929, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3685:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3685:Return_L19_C1"}]
#! /usr/bin/env python #coding=utf-8 import base_object import math import t_const,t_cmd import random,copy class CEvent(object): def __init__(self): self.time = 0 self.event = None pass class CMapEvent(base_object.CObject): def __init__(self, mapmgr): self.sizelist = {} self.timelist = ...
ajibawa-2023/Python-Code-Large/train/row_3686
60
99
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3686:Import_L4_C0", "label": "base_object import base_object", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0404, 0.0101, 0, 0.66, 0.0, 882, 0, 1, 0, 0, 882, 0, 0], "semantic": {"name": "base_object", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3686:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3686:FunctionDef_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3686:FunctionDef_L10_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3686:Assign_L11_C2"}, {"f": "ajibawa-2023/Python-Code-...
#! /usr/bin/env python #coding=utf-8 import base_object import math import t_const,t_cmd import random,copy class CEvent(object): def __init__(self): self.time = 0 self.event = None pass class CMapEvent(base_object.CObject): def __init__(self, mapmgr): self.sizelist = {} self.timelist = ...
ajibawa-2023/Python-Code-Large/train/row_3687
60
99
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3687:Import_L4_C0", "label": "base_object import base_object", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0404, 0.0101, 0, 0.66, 0.0, 882, 0, 1, 0, 0, 882, 0, 0], "semantic": {"name": "base_object", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3687:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3687:FunctionDef_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3687:FunctionDef_L10_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3687:Assign_L11_C2"}, {"f": "ajibawa-2023/Python-Code-...
#! /usr/bin/env python #coding=utf-8 #游戏地图事件 data = { #类型 警告 "warn01":{ "type":"Warning", "pos":(915,3380), # 坐标 "size":(100), # 范围 "zbpos":(915,2900), #出现僵尸 "zbsize":(800,400), #随机范围 "time":5000, # 持续时间 "zbshow":30, # 僵尸出现机率 }, } def get_data(id): return data.get(id) ...
ajibawa-2023/Python-Code-Large/train/row_3688
3
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3688:Assign_L5_C0", "label": "data =", "type": "assigned_variable", "loc": [5, 16], "level": 0, "parent": null, "vector": [14, 0, 0.5526, 0.6316, 0, 0.66, 0.0, 929, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3688:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3688:Return_L19_C1"}]
# -*- coding: utf-8 -*- import hall_callback import t_const, t_error, t_cmd, tgame_wizard #import tgame_struct #import tgame_factroy_s import game_player_s #import tgame_sprite_config, tgame_stage_config import tgame_room import random, cPickle import tgame_mapevent_s #游戏逻辑类,单局游戏的全局数据保存在这里 class CMap(obj...
ajibawa-2023/Python-Code-Large/train/row_3689
120
317
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3689:Import_L2_C0", "label": "hall_callback import hall_callback", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0032, 0, 0.66, 0.0, 380, 0, 1, 0, 0, 380, 0, 0], "semantic": {"name": "hall_callback", "arg_names": [], "import_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3689:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3689:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3689:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3689:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#-- coding: utf-8 -*- import t_const """巫师指令定义方面客户端和服务端公用,其他的函数为客户端专用""" WIZARD_CHANGE_SUN = 0x01 #改变阳光数量 WIZARD_END_GAME = 0x02 #立刻结束游戏 WIZARD_ADD_ZOMBIE = 0x03 #立刻刷新僵尸 #帮助文字字典 HELP_TEXT = {WIZARD_CHANGE_SUN : "改变阳光数量指令//change_sun:参数1:整数(可正负,代表阳光数量的改变值),示例://change_sun 100", \ WIZARD_END_GAM...
ajibawa-2023/Python-Code-Large/train/row_3690
65
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_3690:Import_L2_C0", "label": "t_const import t_const", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0189, 0.0094, 0, 0.66, 0.0, 855, 0, 1, 0, 0, 855, 0, 0], "semantic": {"name": "t_const", "arg_names": [], "import_names": ["t_const"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3690:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3690:Import_L17_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3690:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3690:Expr_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
# -*- coding: utf-8 -*- """以下是帧数相关配置""" FPS = 30 #客户端逻辑帧数 FPS_SERVER = 5 #服务端逻辑帧数 FPS_RATE = FPS / FPS_SERVER #客户端服务端帧率比 """以下是游戏模式相关配置""" GAME_MODE_SINGLE = 0x01 #单人模式 """以下是玩家个人数据相关的配置""" #存关卡完成情况的buff的key BUFF_COMPLETE = "buf0" #所有用到的buff的列表 ALL_USED_BUFF = (BUFF_COMPLETE, ) #存关卡完成信...
ajibawa-2023/Python-Code-Large/train/row_3691
160
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_3691:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0078, 0.0039, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
#! /usr/bin/env python #coding=utf-8 # 此方法用于生成寻路网格 import tgame_map import iworld2d class rect(object): def __init__(self, lu, ru, ld, rd): self.lu = lu self.ru = ru self.ld = ld self.rd = rd def init(): global g_allpos, g_allsize, possum, sizesum g_allpos = {} g_allsize = {} possum = ...
ajibawa-2023/Python-Code-Large/train/row_3692
53
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_3692:Import_L5_C0", "label": "tgame_map import tgame_map", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.051, 0.0102, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "tgame_map", "arg_names": [], "import_names": ["tgame_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3692:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3692:FunctionDef_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3692:FunctionDef_L9_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3692:Assign_L10_C2"}, {"f": "ajibawa-2023/Python-Code-La...
#! /usr/bin/env python #coding=utf-8 # 此方法用于生成寻路网格 import tgame_map import iworld2d class rect(object): def __init__(self, lu, ru, ld, rd): self.lu = lu self.ru = ru self.ld = ld self.rd = rd def init(): global g_allpos, g_allsize, possum, sizesum g_allpos = {} g_allsize = {} possum = ...
ajibawa-2023/Python-Code-Large/train/row_3693
53
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_3693:Import_L5_C0", "label": "tgame_map import tgame_map", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.051, 0.0102, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "tgame_map", "arg_names": [], "import_names": ["tgame_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3693:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3693:FunctionDef_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3693:FunctionDef_L9_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3693:Assign_L10_C2"}, {"f": "ajibawa-2023/Python-Code-La...
data = { "id0":{ "p1":(0,4099), "p2":(4099,4099), "p3":(1534,4096), "minwidth":3, "lj":["id12","id13"], }, "id1":{ "p1":(4099,4099), "p2":(4099,0), "p3":(1534,2196), "minwidth":2869, "lj":["id2","id8"], }, "id2":{ "p1":(4099,0), "p2":(0,0), "p3":(1534...
ajibawa-2023/Python-Code-Large/train/row_3694
3
326
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3694:Assign_L1_C0", "label": "data =", "type": "assigned_variable", "loc": [1, 324], "level": 0, "parent": null, "vector": [14, 0, 0.4985, 0.9939, 0, 0.66, 0.0, 929, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3694:FunctionDef_L325_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3694:Return_L326_C1"}]
data = { "id0":{ "p1":(-1,7200), "p2":(15300,7200), "p3":(6976,7190), "minwidth":11, "lj":["id8","id188"], }, "id1":{ "p1":(15300,7200), "p2":(15300,-1), "p3":(15217,3645), "minwidth":92, "lj":["id93","id189"], }, "id2":{ "p1":(15300,-1), "p2":(-1,-1), ...
ajibawa-2023/Python-Code-Large/train/row_3695
3
1,726
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3695:Assign_L1_C0", "label": "data =", "type": "assigned_variable", "loc": [1, 1724], "level": 0, "parent": null, "vector": [14, 0, 0.4997, 0.9988, 0, 0.66, 0.0, 929, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3695:FunctionDef_L1725_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3695:Return_L1726_C1"}]
#-- coding: utf-8 -*- #import tgame_stage_config, tgame_achieve_config import tgame_stage_config #房间内玩家对象类 class CPlayer(object): def __init__(self, objRoom, uid): super(CPlayer, self).__init__() self.objRoom = objRoom #房间对象的引用 self.iSide = -1 #玩家的唯一标识 self.hid = -1 #玩家的socket(其实客户端不知道) sel...
ajibawa-2023/Python-Code-Large/train/row_3696
90
154
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3696:Import_L3_C0", "label": "tgame_stage_config import tgame_stage_config", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0195, 0.0065, 0, 0.66, 0.0, 489, 0, 1, 0, 0, 489, 0, 0], "semantic": {"name": "tgame_stage_config", "arg_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3696:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3696:FunctionDef_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3696:FunctionDef_L6_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3696:Expr_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#! /usr/bin/env python #coding=utf-8 # tgame_entity import tgame_player import tgame_map import tgame_mapmgr g_builds = {} g_entitys = {} g_phys = {} g_items = {} ET_Player = 0x01 ET_Zombie = 0x02 ET_Barrier = 0x03 ET_Other = 0x04 def init(): pass def addentity(playerinfo, AItype = None): imp...
ajibawa-2023/Python-Code-Large/train/row_3697
41
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3697:Import_L4_C0", "label": "tgame_player import tgame_player", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0645, 0.0161, 0, 0.66, 0.0, 17, 0, 1, 0, 0, 17, 0, 0], "semantic": {"name": "tgame_player", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3697:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3697:Import_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3697:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3697:Assign_L24_C1"}, {"f": "ajibawa-2023/Python-Code-L...
#! /usr/bin/env python #coding=utf-8 import tgame_fsm class PlayerFSMClass(tgame_fsm.IFsmCallbackObj): TransitionMap = { ('stand', 'onMove'):'move', ('move', 'stopMove'):'stand', ('stand', 'Fire'):'atk', } MapState2Look = { 'move' : 'anim_stand_clip1', 'walk' : 'anim_walk_clip1', ...
ajibawa-2023/Python-Code-Large/train/row_3698
12
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_3698:Import_L3_C0", "label": "tgame_fsm import tgame_fsm", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0312, 0, 0.66, 0.0, 111, 0, 1, 0, 0, 111, 0, 0], "semantic": {"name": "tgame_fsm", "arg_names": [], "import_names": ["tgame...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3698:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3698:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3698:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3698:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
#! /usr/bin/env python #coding=utf-8 import math3d,math LEFT_SIDE = 0x01 RIGHT_SIDE = 0x02 NONE_SIDE = 0x03 def angle(o, s, e): cosfi = 0 fi = 0 norm = 0 dsx = s[0] - o[0] dsy = s[1] - o[1] dex = e[0] - o[0] dey = e[1] - o[1] cosfi = dsx * dex + dsy * dey norm = (dsx * dsx + dsy * dsy)...
ajibawa-2023/Python-Code-Large/train/row_3699
140
222
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3699:Import_L3_C0", "label": "math3d import math3d, math", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0045, 0, 0.66, 0.0, 679, 0, 2, 0, 0, 679, 0, 0], "semantic": {"name": "math3d", "arg_names": [], "import_names": ["math3d",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3699:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3699:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3699:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3699:Assign_L13_C1"}, {"f": "ajibawa-2023/Python-Code-L...
#! /usr/bin/env python #coding=utf-8 # -*- coding: utf-8 -*- import log # # transitionMap = { # (fromState, event):toState, # (fromState, event):toState, # ... # } # # # class IFsmCallbackObj(object): def __init__(self): pass def OnEnterState(self, state): pass def OnLeaveState(s...
ajibawa-2023/Python-Code-Large/train/row_3700
24
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3700:Import_L4_C0", "label": "log import log", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0784, 0.0196, 0, 0.66, 0.0, 432, 0, 1, 0, 0, 432, 0, 0], "semantic": {"name": "log", "arg_names": [], "import_names": ["log"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3700:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3700:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3700:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3700:FunctionDef_L19_C1"}, {"f": "ajibawa-2023/Python-Co...
#! /usr/bin/env python #coding=utf-8 # 道具类,道具使用,效果,影响
ajibawa-2023/Python-Code-Large/train/row_3701
0
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"]
[]
[]
#! /usr/bin/env python #coding=utf-8 # tgame_entity import tgame_player import tgame_map import tgame_mapmgr g_builds = {} g_entitys = {} g_phys = {} g_items = {} ET_Player = 0x01 ET_Zombie = 0x02 ET_Barrier = 0x03 ET_Other = 0x04 def init(): pass def addentity(playerinfo, AItype = None): imp...
ajibawa-2023/Python-Code-Large/train/row_3702
41
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3702:Import_L4_C0", "label": "tgame_player import tgame_player", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0645, 0.0161, 0, 0.66, 0.0, 17, 0, 1, 0, 0, 17, 0, 0], "semantic": {"name": "tgame_player", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3702:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3702:Import_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3702:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3702:Assign_L24_C1"}, {"f": "ajibawa-2023/Python-Code-L...
#! /usr/bin/env python #coding=utf-8 import tgame_fsm class PlayerFSMClass(tgame_fsm.IFsmCallbackObj): TransitionMap = { ('stand', 'onMove'):'move', ('move', 'stopMove'):'stand', ('stand', 'Fire'):'atk', } MapState2Look = { 'move' : 'anim_stand_clip1', 'walk' : 'anim_walk_clip1', ...
ajibawa-2023/Python-Code-Large/train/row_3703
12
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_3703:Import_L3_C0", "label": "tgame_fsm import tgame_fsm", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0312, 0, 0.66, 0.0, 111, 0, 1, 0, 0, 111, 0, 0], "semantic": {"name": "tgame_fsm", "arg_names": [], "import_names": ["tgame...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3703:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3703:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3703:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3703:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
#! /usr/bin/env python #coding=utf-8 # 道具类,道具使用,效果,影响
ajibawa-2023/Python-Code-Large/train/row_3704
0
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"]
[]
[]
# 战争迷雾系统 import iworld2d import math3d # 小迷雾块大小 fogsize = 30 # 累计器 visionsum = 0 # 迷雾数量 h = 768/fogsize+1 w = 1024/fogsize+1 # 视野 class tgame_vision(object): def __init__(self, vision = 20, pos = (0,0) , mode = "pos", name = ""): # 累计器加1 global visionsum visionsum += 1 # 视野范围 self....
ajibawa-2023/Python-Code-Large/train/row_3705
74
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3705:Import_L3_C0", "label": "iworld2d import iworld2d", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.021, 0.007, 0, 0.66, 0.0, 863, 0, 1, 0, 0, 863, 0, 0], "semantic": {"name": "iworld2d", "arg_names": [], "import_names": ["iworld2d"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3705:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3705:FunctionDef_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3705:FunctionDef_L18_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3705:Assign_L23_C2"}, {"f": "ajibawa-2023/Python-Code...