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
""" A dynamic class loader. Returns any object from a desired module, including within nested modules. Based on concepts from v1.3 of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/223972 by Robert Brewer. """ import sys, types class ClassloaderObjectNotFound(Exception): """Exception raised when we fa...
ajibawa-2023/Python-Code-Large/train/row_79672
14
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_79672:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.2273, 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_79672:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79672:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79672:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79672:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
"""idigi_data idigi_data provides an easy way for Digi device based python apps to push up data files to the iDigi server the device belongs to. See idigi_pc.py to run on a PC. """ import sys sys.path.append("WEB/python/idigi_data.zip") # iDigi is built into Digi devices. You need to be running python on a Digi # ...
ajibawa-2023/Python-Code-Large/train/row_79676
57
200
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79676:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.015, 0.025, 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_79676:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79676:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79676:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79676:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code...
''' Created on Sep 18, 2010 @author: jordanh ''' """ """ import threading import time import sys from socket import * class SocketPairEmulation(threading.Thread): def __init__(self): # We go through this rigamarole because Windows does not natively # support socketpair(): ...
ajibawa-2023/Python-Code-Large/train/row_79677
31
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79677:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0556, 0.0926, 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_79677:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79677:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79677:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79677:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-...
''' Created on Jan 19, 2012 @author: jordanh ''' import time def _local_time_offset(t=None): """Return offset of local zone from GMT, either at present or at time t.""" # python2.3 localtime() can't take None # ConnectPort Xs don't have an RTC, so we need to check for that # functionality first. ...
ajibawa-2023/Python-Code-Large/train/row_79678
21
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79678:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0536, 0.0893, 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_79678:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79678:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79678:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79678:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" XIG Session Common Code Library """ __version__ = '1.0.0' __author__ = 'Jordan Husney' __license__ = 'LGPL'
ajibawa-2023/Python-Code-Large/train/row_79679
4
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79679:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.2857, 0.4286, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
"""\ A simple parser for XBee I/O samples. This file offers a helper function to decode the response for the user. """ import struct _IO_MAP = { 'AD0': 0, 'DIO0': 0, 'D0': 0, 'AD1': 1, 'DIO1': 1, 'D1': 1, 'AD2': 2, 'DIO2': 2, 'D2': ...
ajibawa-2023/Python-Code-Large/train/row_79681
38
107
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79681:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0327, 0.0561, 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_79681:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79681:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79681:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79681:If_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# Modified from original element tree to run on a ConnectPort.# # # ElementTree # $Id: ElementTree.py 2326 2005-03-17 07:45:21Z fredrik $ # # light-weight XML support for Python 1.5.2 and later. # # history: # 2001-10-20 fl created (from various sources) # 2001-11-01 fl return root from parse method # 200...
ajibawa-2023/Python-Code-Large/train/row_79682
470
1,232
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79682:Assign_L76_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [76, 90], "level": 0, "parent": null, "vector": [14, 0, 0.0674, 0.0122, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79682:ClassDef_L115_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79682:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79682:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79682:If_L118_C8"}, {"f": "ajibawa-2023/Python-...
""" XigSession implementation. Handles all xig:// control commands. """ from abstract import AbstractSession from library import helpers class XigSession(AbstractSession): """\ XigSession is the default session. UART data sent to the gateway forming complete URLs will be attempted to be hangl...
ajibawa-2023/Python-Code-Large/train/row_79687
46
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_79687:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0247, 0.037, 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_79687:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79687:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79687:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79687:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" XIG Services Library """ __version__ = '1.3.0' __author__ = 'Jordan Husney' __license__ = 'LGPL' import sys from abstract import AbstractSession from abstract_autostart import AbstractAutostartSession from library.classloader import classloader # XigSession is required and is always imported: from xi...
ajibawa-2023/Python-Code-Large/train/row_79688
17
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79688:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0556, 0.0833, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79688:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79688:Import_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79688:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79688:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ I/O Sample Autostart Session Include this session in your configuration to have the XIG call remote URLs for each and every I/O sample packet it receives. """ import logging from urllib import urlencode from exceptions import OverflowError from abstract_autostart import AbstractAutostartSession ...
ajibawa-2023/Python-Code-Large/train/row_79690
51
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_79690:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0517, 0.092, 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_79690:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79690:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79690:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79690:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79693
8
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_79693:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0404, 0.0707, 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_79693:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79693:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79693:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79693:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.4.1" print "%s v%s starting." % (NAME, VERSI...
ajibawa-2023/Python-Code-Large/train/row_79694
126
247
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79694:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0202, 0.0364, 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_79694:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79694:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79694:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79694:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79695
7
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79695:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0421, 0.0737, 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_79695:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79695:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79695:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79695:Assign_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.3.2" print "%s v%s starting." % (NAME, VERSI...
ajibawa-2023/Python-Code-Large/train/row_79696
105
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79696:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0229, 0.0413, 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_79696:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79696:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79696:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79696:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79697
8
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_79697:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0404, 0.0707, 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_79697:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79697:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79697:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79697:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.4.2b3" print "%s v%s starting." % (NAME, VER...
ajibawa-2023/Python-Code-Large/train/row_79698
130
252
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79698:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0198, 0.0357, 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_79698:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79698:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79698:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79698:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by commenting # them out. Di...
ajibawa-2023/Python-Code-Large/train/row_79699
7
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_79699:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.037, 0.0617, 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_79699:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79699:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79699:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79699:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh See XIG README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.3.0b2" print "%s v%s starting." % (NAME, VERSION) print 'Unzipping and loading modules...' import sys, traceback ...
ajibawa-2023/Python-Code-Large/train/row_79700
105
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_79700:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0185, 0.0324, 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_79700:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79700:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79700:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79700:Import_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79701
8
97
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79701:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0412, 0.0722, 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_79701:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79701:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79701:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79701:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79704
8
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_79704:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0404, 0.0707, 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_79704:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79704:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79704:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79704:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.4.0b1" print "%s v%s starting." % (NAME, VER...
ajibawa-2023/Python-Code-Large/train/row_79705
126
247
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79705:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0202, 0.0364, 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_79705:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79705:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79705:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79705:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79706
8
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_79706:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0404, 0.0707, 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_79706:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79706:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79706:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79706:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.4.0" print "%s v%s starting." % (NAME, VERSI...
ajibawa-2023/Python-Code-Large/train/row_79707
126
247
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79707:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0202, 0.0364, 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_79707:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79707:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79707:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79707:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79708
7
83
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79708:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0482, 0.0843, 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_79708:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79708:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79708:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79708:Assign_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.3.0b2" print "%s v%s starting." % (NAME, VER...
ajibawa-2023/Python-Code-Large/train/row_79709
105
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79709:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0229, 0.0413, 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_79709:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79709:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79709:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79709:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by commenting # them out. Di...
ajibawa-2023/Python-Code-Large/train/row_79711
7
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_79711:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.037, 0.0617, 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_79711:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79711:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79711:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79711:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh See XIG README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.3.0b1" print "%s v%s starting." % (NAME, VERSION) print 'Unzipping and loading modules...' import sys, traceback ...
ajibawa-2023/Python-Code-Large/train/row_79712
104
215
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79712:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0186, 0.0326, 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_79712:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79712:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79712:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79712:Import_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79713
7
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79713:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0421, 0.0737, 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_79713:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79713:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79713:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79713:Assign_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.3.1" print "%s v%s starting." % (NAME, VERSI...
ajibawa-2023/Python-Code-Large/train/row_79714
105
218
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79714:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0229, 0.0413, 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_79714:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79714:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79714:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79714:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79716
8
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_79716:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0404, 0.0707, 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_79716:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79716:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79716:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79716:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.4.2b2" print "%s v%s starting." % (NAME, VER...
ajibawa-2023/Python-Code-Large/train/row_79717
126
247
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79717:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0202, 0.0364, 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_79717:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79717:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79717:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79717:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
"""\ XIG Configuration File Modify the contents of the below XigConfig object in order to change the configuration of the Xig. Each option is commented as to what it does. """ class XigConfig(object): ## Session Types # Enable/disable session types; disable sessions by c...
ajibawa-2023/Python-Code-Large/train/row_79718
8
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_79718:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0404, 0.0707, 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_79718:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79718:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79718:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79718:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Created on Sep 17, 2010 @author: jordanh XBee Internet Gateway executable scripts. See http://code.google.com/p/xig/ or README.txt for more information. ''' ## Global String Constants NAME = "XBee Internet Gateway (XIG)" SHORTNAME = "xig" VERSION = "1.4.2" print "%s v%s starting." % (NAME, VERSI...
ajibawa-2023/Python-Code-Large/train/row_79719
130
252
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79719:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0198, 0.0357, 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_79719:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79719:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79719:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79719:Import_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
''' $Revision: 485 $ $Date: 2007-07-12 15:23:15 -0700 (Thu, 12 Jul 2007) $ ''' from distutils.core import setup setup (name='pexpect', version='2.3', py_modules=['pexpect', 'pxssh', 'fdpexpect', 'FSM', 'screen', 'ANSI'], description='Pexpect is a pure Python Expect. It allows easy control of other applicati...
ajibawa-2023/Python-Code-Large/train/row_79721
3
39
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79721:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0641, 0.1026, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
"""This implements an ANSI terminal emulator as a subclass of screen. $Id: ANSI.py 491 2007-12-16 20:04:57Z noah $ """ # references: # http://www.retards.org/terminals/vt102.html # http://vt100.net/docs/vt102-ug/contents.html # http://vt100.net/docs/vt220-rm/ # http://www.termsys.demon.co.uk/vtansi.htm...
ajibawa-2023/Python-Code-Large/train/row_79722
198
334
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79722:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0075, 0.012, 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_79722:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79722:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79722:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79722:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code...
"""This class extends pexpect.spawn to specialize setting up SSH connections. This adds methods for login, logout, and expecting the shell prompt. $Id: pxssh.py 487 2007-08-29 22:33:29Z noah $ """ from pexpect import * import pexpect import time __all__ = ['ExceptionPxssh', 'pxssh'] # Exception classes used by this...
ajibawa-2023/Python-Code-Large/train/row_79723
120
307
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79723:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0098, 0.0163, 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_79723:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79723:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79723:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79723:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""This implements a virtual screen. This is used to support ANSI terminal emulation. The screen representation and state is implemented in this class. Most of the methods are inspired by ANSI screen control codes. The ANSI class extends this class to add parsing of ANSI escape codes. $Id: screen.py 486 2007-07-13 01:...
ajibawa-2023/Python-Code-Large/train/row_79724
215
380
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79724:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0105, 0.0184, 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_79724:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79724:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79724:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79724:If_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python """This displays uptime information using uptime. This is redundant, but it demonstrates expecting for a regular expression that uses subgroups. $Id: uptime.py 489 2007-11-28 23:40:34Z noah $ """ import pexpect import re # There are many different styles of uptime results. I try to parse them ...
ajibawa-2023/Python-Code-Large/train/row_79730
21
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79730:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0877, 0.0877, 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_79730:If_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79730:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79730:If_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79730:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#!/usr/bin/env python """This collects filesystem capacity info using the 'df' command. Tuples of filesystem name and percentage are stored in a list. A simple report is printed. Filesystems over 95% capacity are highlighted. Note that this does not parse filesystem names after the first space, so names with spaces in...
ajibawa-2023/Python-Code-Large/train/row_79731
14
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_79731:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1719, 0.1875, 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_79731:For_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79731:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79731:For_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79731:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_7...
#!/usr/bin/env python """This is a very simple client for the backdoor daemon. This is intended more for testing rather than normal use. See bd_serv.py """ import socket import sys, time, select def recv_wrapper(s): r,w,e = select.select([s.fileno()],[],[], 2) if not r: return '' #cols = int(s.re...
ajibawa-2023/Python-Code-Large/train/row_79735
18
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79735:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0921, 0.0526, 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_79735:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79735:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79735:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79735:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python """This starts the python interpreter; captures the startup message; then gives the user interactive control over the session. Why? For fun... """ # Don't do this unless you like being John Malkovich # c = pexpect.spawn ('/usr/bin/env python ./python.py') import pexpect c = pexpect.spawn ('/usr...
ajibawa-2023/Python-Code-Large/train/row_79738
12
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79738:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.175, 0.1, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[]
# # Eric S. Raymond # # Greatly modified by Nigel W. Moriarty # April 2003 # from pexpect import * import os, sys import getpass import time class ssh_session: "Session with extra state including the password to be used." def __init__(self, user, host, password=None, verbose=0): self.user = user...
ajibawa-2023/Python-Code-Large/train/row_79742
55
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79742:ImportFrom_L7_C0", "label": "from pexpect import *", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0745, 0.0106, 0, 0.66, 0.0, 291, 0, 1, 0, 0, 291, 0, 0], "semantic": {"name": "pexpect", "arg_names": [], "import_names": ["*"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79742:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79742:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79742:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79742:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/env python """This demonstrates an FTP "bookmark". This connects to an ftp site; does a few ftp stuff; and then gives the user interactive control over the session. In this case the "bookmark" is to a directory on the OpenBSD ftp server. It puts you in the i386 packages directory. You can easily modify this...
ajibawa-2023/Python-Code-Large/train/row_79747
28
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_79747:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1064, 0.1064, 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_79747:If_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79747:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79747:If_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79747:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_797...
from pexpect import *
ajibawa-2023/Python-Code-Large/train/row_79748
1
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79748:ImportFrom_L2_C0", "label": "from pexpect import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.6667, 0.3333, 0, 0.66, 0.0, 291, 0, 1, 0, 0, 291, 0, 0], "semantic": {"name": "pexpect", "arg_names": [], "import_names": ["*"], "r...
[]
#!/usr/bin/python2.7 ''' A test tool to generate a stream of idigi_data test samples. ''' import sys import random import time sys.path.insert(0, "../../src/library/ext") import serial def idigi_data_generator(num_channels=1, generations=-1): CHANNEL_TEMPLATE="test_channel_%d" UNIT_TEMPLATE="unit_%d" wh...
ajibawa-2023/Python-Code-Large/train/row_79749
24
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_79749:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0682, 0.0682, 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_79749:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79749:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79749:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79749:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Co...
import httplib import base64 class iDigiClient(object): def __init__(self, username, password, server="developer.idigi.com"): self.username = username self.password = password self.server = server self.__auth = base64.encodestring("%s:%s"%(username,password))[:-1] def post_re...
ajibawa-2023/Python-Code-Large/train/row_79750
28
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79750:Import_L2_C0", "label": "httplib import httplib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0488, 0.0244, 0, 0.66, 0.0, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "httplib", "arg_names": [], "import_names": ["httplib"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79750:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79750:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79750:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79750:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code...
import os.path os.chdir(os.path.dirname(__file__)) from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name="AKToolbox", version="0.1.0", packages=find_packages(), entry_points={ "console_scripts": [ ...
ajibawa-2023/Python-Code-Large/train/row_79751
6
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_79751:Import_L1_C0", "label": "os.path import os.path", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "...
[]
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
ajibawa-2023/Python-Code-Large/train/row_79752
313
485
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79752:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0175, 0.0289, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79752:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79752:ImportFrom_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79752:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79752:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
"""Discriminating wrapper for grep. We ignore the following: - Files/directories that start with a dot - Files that end with ~ - Files of the type py[co] """ import subprocess import os.path import optparse import sys import aktoolbox def _error(message): sys.stderr.write("%s\n" % message) ...
ajibawa-2023/Python-Code-Large/train/row_79753
58
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79753:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0421, 0.0737, 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_79753:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79753:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79753:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79753:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-L...
__version__ = "0.1.0"
ajibawa-2023/Python-Code-Large/train/row_79755
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79755:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call...
[]
""" xbee.py By Paul Malmsten, 2010 Inspired by code written by Amit Synderman and Marco Sangalli pmalmsten@gmail.com XBee superclass module This class defines data and methods common to all XBee modules. This class should be subclassed in order to provide series-specific functionality. """ import struct, threading,...
ajibawa-2023/Python-Code-Large/train/row_79756
142
415
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79756:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0169, 0.0313, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79756:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79756:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79756:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79756:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" zigbee.py By Greg Rapp, 2010 Inspired by code written by Paul Malmsten, 2010 Inspired by code written by Amit Synderman and Marco Sangalli gdrapp@gmail.com This module implements an XBee ZB (ZigBee) API library. """ import struct from xbee.base import XBeeBase from xbee.python2to3 import byteToInt, intToByte cla...
ajibawa-2023/Python-Code-Large/train/row_79757
49
257
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79757:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0214, 0.0389, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79757:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79757:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79757:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79757:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" dispatch.py By Paul Malmsten, 2010 pmalmsten@gmail.com Provides the Dispatch class, which allows one to filter incoming data packets from an XBee device and call an appropriate method when one arrives. """ from xbee import XBee class Dispatch(object): def __init__(self, ser=None, xbee=None): self.xb...
ajibawa-2023/Python-Code-Large/train/row_79758
27
75
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79758:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0733, 0.1333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79758:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79758:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79758:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79758:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-...
""" fake.py By Paul Malmsten, 2010 pmalmsten@gmail.com Provides fake objects for testing the dispatch package. """ class FakeXBee(object): """ Represents an XBee device from which data can be read. """ def __init__(self, data): self.data = data def wait_read_frame(self): ...
ajibawa-2023/Python-Code-Large/train/row_79759
7
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79759:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.4444, 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_79759:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79759:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79759:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79759:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-...
from xbee.helpers.dispatch.dispatch import Dispatch
ajibawa-2023/Python-Code-Large/train/row_79760
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79760:ImportFrom_L1_C0", "label": "from xbee.helpers.dispatch.dispatch import Dispatch", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 12, 0, 1, 0, 0, 12, 0, 0], "semantic": {"name": "xbee.helpers.dispatch.dispatch...
[]
""" python2to3.py By Paul Malmsten, 2011 Helper functions for handling Python 2 and Python 3 datatype shenanigans. """ def byteToInt(byte): """ byte -> int Determines whether to use ord() or not to get a byte's value. """ if hasattr(byte, 'bit_length'): # This is already an int return byte return ord(byt...
ajibawa-2023/Python-Code-Large/train/row_79761
12
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79761:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.2059, 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_79761:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79761:Expr_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79761:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79761:If_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
""" frame.py By Paul Malmsten, 2010 pmalmsten@gmail.com Represents an API frame for communicating with an XBee """ import struct from xbee.python2to3 import byteToInt, intToByte class APIFrame: """ Represents a frame of data to be sent to or which was received from an XBee device """ START_...
ajibawa-2023/Python-Code-Large/train/row_79762
68
179
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79762:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0251, 0.0447, 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_79762:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79762:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79762:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79762:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#! /usr/bin/python """ Fake.py By Paul Malmsten, 2010 pmalmsten@gmail.com Provides fake device objects for other unit tests. """ import sys class FakeDevice(object): """ Represents a fake serial port for testing purposes """ def __init__(self): self.data = b'' def w...
ajibawa-2023/Python-Code-Large/train/row_79763
25
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79763:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0982, 0.1429, 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_79763:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79763:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79763:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79763:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-...
""" ieee.py By Paul Malmsten, 2010 Inspired by code written by Amit Synderman and Marco Sangalli pmalmsten@gmail.com This module provides an XBee (IEEE 802.15.4) API library. """ import struct from xbee.base import XBeeBase class XBee(XBeeBase): """ Provides an implementation of the XBee API for IEEE 802.15....
ajibawa-2023/Python-Code-Large/train/row_79764
9
148
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79764:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0338, 0.0608, 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_79764:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79764:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79764:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79764:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
""" XBee package initalization file By Paul Malmsten, 2010 pmalmsten@gmail.com """ from xbee.ieee import XBee from xbee.zigbee import ZigBee
ajibawa-2023/Python-Code-Large/train/row_79765
3
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79765:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.3889, 0.6667, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#! /usr/bin/python """ receive_samples_async.py By Paul Malmsten, 2010 pmalmsten@gmail.com This example reads the serial port and asynchronously processes IO data received from a remote XBee. """ from xbee import XBee import time import serial PORT = '/dev/ttyUSB0' BAUD_RATE = 9600 # Open serial port ser = serial...
ajibawa-2023/Python-Code-Large/train/row_79766
15
39
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79766:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.1795, 0.2308, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79766:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79766:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79766:While_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79766:Try_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#! /usr/bin/python """ dispatch_async.py By Paul Malmsten, 2010 pmalmsten@gmail.com This example continuously reads the serial port and dispatches packets which arrive to appropriate methods for processing in a separate thread. """ from xbee import XBee from xbee.helpers.dispatch import Dispatch import time import ...
ajibawa-2023/Python-Code-Large/train/row_79767
21
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_79767:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0946, 0.1216, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79767:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79767:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79767:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79767:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#! /usr/bin/python from xbee import XBee import serial """ serial_example.py By Paul Malmsten, 2010 Demonstrates reading the low-order address bits from an XBee Series 1 device over a serial port (USB) in API-mode. """ def main(): """ Sends an API AT command to read the lower-order address bits from an...
ajibawa-2023/Python-Code-Large/train/row_79768
23
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79768:ImportFrom_L3_C0", "label": "from xbee import XBee", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0492, 0.0164, 0, 0.66, 0.0, 633, 0, 1, 0, 0, 633, 0, 0], "semantic": {"name": "xbee", "arg_names": [], "import_names": ["XBee"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79768:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79768:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79768:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79768:Try_L19_C4"}, {"f": "ajibawa-2023/Python-Code-La...
#! /usr/bin/python """ receive_samples.py By Paul Malmsten, 2010 pmalmsten@gmail.com This example continuously reads the serial port and processes IO data received from a remote XBee. """ from xbee import XBee import serial PORT = '/dev/ttyUSB0' BAUD_RATE = 9600 # Open serial port ser = serial.Serial(PORT, BAUD_R...
ajibawa-2023/Python-Code-Large/train/row_79769
12
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79769:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.2121, 0.2727, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79769:While_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79769:Try_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79769:Try_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79769:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#! /usr/bin/python """ dispatch.py By Paul Malmsten, 2010 pmalmsten@gmail.com This example continuously reads the serial port and dispatches packets which arrive to appropriate methods for processing. """ from xbee.helpers.dispatch import Dispatch import serial PORT = '/dev/ttyUSB0' BAUD_RATE = 9600 # Open serial...
ajibawa-2023/Python-Code-Large/train/row_79770
16
65
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79770:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.1077, 0.1385, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79770:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79770:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79770:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79770:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#! /usr/bin/python """ alarm.py By Paul Malmsten, 2010 pmalmsten@gmail.com This module will communicate with a remote XBee device in order to implement a simple alarm clock with bed occupancy detection. """ import serial from xbee import XBee class DataSource(object): """ Represents a source from which ala...
ajibawa-2023/Python-Code-Large/train/row_79771
100
253
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79771:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0277, 0.0356, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79771:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79771:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79771:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79771:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-...
#! /usr/bin/python """ led_adc_example.py By Paul Malmsten, 2010 pmalmsten@gmail.com A simple example which sets up a remote device to read an analog value on ADC0 and a digital output on DIO1. It will then read voltage measurements and write an active-low result to the remote DIO1 pin. """ from xbee import XBee i...
ajibawa-2023/Python-Code-Large/train/row_79772
18
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_79772:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0708, 0.0943, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79772:While_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79772:Try_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79772:Try_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79772:Assign_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
""" distutils_extensions.py By Paul Malmsten, 2010 pmalmsten@gmail.com Provides distutils extension code for running tests """ from distutils.core import Command from distutils.command.build_py import build_py as _build_py import sys class TestCommand(Command): description = "Runs automated tests" user_optio...
ajibawa-2023/Python-Code-Large/train/row_79773
32
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79773:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0738, 0.1311, 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_79773:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79773:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79773:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79773:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from distutils.core import setup packages=[ 'xbee', 'xbee.tests', 'xbee.helpers', 'xbee.helpers.dispatch', 'xbee.helpers.dispatch.tests', ] setup( name='XBee', version='2.0.0', author='Paul Malmsten', author_email='pmalmsten@gmail.com', packages=packages, scripts=[], ...
ajibawa-2023/Python-Code-Large/train/row_79775
3
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_79775:ImportFrom_L1_C0", "label": "from distutils.core import setup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import...
[]
import os # Django settings for scw project. PROJECT_ROOT = os.path.dirname(__file__) DEBUG = True TEMPLATE_DEBUG = DEBUG AUTH_PROFILE_MODULE = 'userprofile.userprofile' ADMINS = ( ('Robert Schiemann', 'bobbyrj3d@gmail.com'), ('Alan Joyce', 'amjoyce@gmail.com') # ('Your Name', 'your_email@domai...
ajibawa-2023/Python-Code-Large/train/row_79776
24
127
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79776:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0079, 0.0079, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""...
[]
from django.db import models from django.contrib.auth.models import User GENDER_CHOICES = ( ('', 'Decline'), ('M', 'Male'), ('F', 'Female'), ) class userprofile(models.Model): user = models.ForeignKey(User, unique=True) #User accessable/settable attributes only image = models.ImageField(upload...
ajibawa-2023/Python-Code-Large/train/row_79777
17
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_79777:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79777:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79777:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79777:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79777:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.conf.urls.defaults import * urlpatterns = patterns('userprofile.views', (r'^$', 'profile'), (r'^staff/(?P<user_id>\d+)/$', 'staffEdit'), (r'^edit/$', 'editProfile'), (r'^privacy/$', 'privacySettings'), (r'^view/(?P<user_id>\d+)/$', 'viewProfile'), )
ajibawa-2023/Python-Code-Large/train/row_79778
2
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79778:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_names":...
[]
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll ha...
ajibawa-2023/Python-Code-Large/train/row_79780
8
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79780:ImportFrom_L2_C0", "label": "from django.core.management import execute_manager", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79780:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79780:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79780:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79780:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_7...
from django.db import models
ajibawa-2023/Python-Code-Large/train/row_79781
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79781:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["models...
[]
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): ...
ajibawa-2023/Python-Code-Large/train/row_79782
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79782:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 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_79782:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79782:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79782:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79782:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.conf.urls.defaults import * urlpatterns = patterns('accounts.views', (r'^$', 'register'), (r'^logout/$', 'logoutView'), (r'^profile/$', 'loginView'), )
ajibawa-2023/Python-Code-Large/train/row_79783
2
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79783:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_n...
[]
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django import forms from django.contrib.auth.models import User from userprofile.models import userprofile from django.core.context_processors import csrf from django.contrib.auth import logout from django.contrib.a...
ajibawa-2023/Python-Code-Large/train/row_79784
60
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_79784:ImportFrom_L1_C0", "label": "from django.http import HttpResponseRedirect", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0112, 0.0112, 0, 0.66, 0.0, 779, 0, 1, 0, 0, 779, 0, 0], "semantic": {"name": "django.http", "arg_names": []...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79784:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79784:Assign_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79784:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79784:Assign_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.db import models import datetime class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __unicode__(self): return self.question def was_published_today(self): return self.pub_date.date() == datet...
ajibawa-2023/Python-Code-Large/train/row_79785
15
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79785:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79785:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79785:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79785:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79785:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): ...
ajibawa-2023/Python-Code-Large/train/row_79786
7
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79786:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1522, 0.2609, 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_79786:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79786:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79786:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79786:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.conf.urls.defaults import * urlpatterns = patterns('polls.views', (r'^$', 'index'), (r'^(?P<poll_id>\d+)/$', 'detail'), (r'^(?P<poll_id>\d+)/results/$', 'results'), (r'^(?P<poll_id>\d+)/vote/$', 'vote'), )
ajibawa-2023/Python-Code-Large/train/row_79787
2
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79787:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_nam...
[]
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll def index(request): latest_poll_list = Poll.objects.all(...
ajibawa-2023/Python-Code-Large/train/row_79788
21
36
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79788:ImportFrom_L1_C0", "label": "from django.shortcuts import get_object_or_404, render_to_response", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0278, 0.0278, 0, 0.66, 0.0, 852, 0, 2, 0, 0, 852, 0, 0], "semantic": {"name": "django....
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79788:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79788:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79788:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79788:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from polls.models import Poll from django.contrib import admin from polls.models import Choice class ChoiceInline(admin.StackedInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): list_display = ('question', 'pub_date', 'was_published_today') list_filter = ['pub_date'] d...
ajibawa-2023/Python-Code-Large/train/row_79789
14
20
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79789:ImportFrom_L1_C0", "label": "from polls.models import Poll", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.05, 0, 0.66, 0.0, 716, 0, 1, 0, 0, 716, 0, 0], "semantic": {"name": "polls.models", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79789:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79789:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79789:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79789:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from django.db import models from django.contrib.auth.models import User class UsageProfile(models.Model): user = models.ForeignKey(User, unique=True) pickle = models.TextField() timestamp = models.DateTimeField(auto_now_add=True) class UsageProfileSettings(models.Model): user = models.ForeignKey(User, unique=Tru...
ajibawa-2023/Python-Code-Large/train/row_79790
10
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_79790:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79790:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79790:Assign_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79790:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79790:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
ajibawa-2023/Python-Code-Large/train/row_79791
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79791:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 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_79791:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79791:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79791:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79791:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.conf.urls.defaults import * urlpatterns = patterns('social.views', (r'^$', 'viewSimilar'), (r'^search/$', 'renderUsageSearch'), (r'^compare/(?P<comparing_id>\d+)/$', 'compareUsage'), (r'^heatmap/$', 'compareHeatmapRequest'), )
ajibawa-2023/Python-Code-Large/train/row_79792
2
8
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79792:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.125, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_nam...
[]
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^', include('dashboard.urls')), (r'^accounts/login/$', 'django.contrib.auth.views.login'), ...
ajibawa-2023/Python-Code-Large/train/row_79794
6
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_79794:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_n...
[]
from django.db import models from django.contrib.auth.models import User #TODO Enforce priority being positive class Attribute(models.Model): name = models.CharField(unique=True, max_length=50) priority = models.IntegerField(unique=True) class UserAttribute(models.Model): user = models.ForeignKey(User, r...
ajibawa-2023/Python-Code-Large/train/row_79795
10
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79795:ImportFrom_L2_C0", "label": "from django.db import models", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0667, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79795:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79795:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79795:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79795:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
ajibawa-2023/Python-Code-Large/train/row_79796
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79796:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 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_79796:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79796:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79796:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79796:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.conf.urls.defaults import * urlpatterns = patterns('userattributes.views', (r'^(?P<user_id>\d+)/$', 'modifyAttrs'), (r'^list/(?P<user_id>\d+)/$', 'listAttrs'), (r'^edit/$', 'editAttrs'), )
ajibawa-2023/Python-Code-Large/train/row_79797
2
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_79797:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_n...
[]
from django.shortcuts import render_to_response from django import forms from django.contrib.auth.models import User from userprofile.models import userprofile from userprofile.views import renderProfile from django.template import RequestContext from django.core.context_processors import csrf from django.contrib.auth....
ajibawa-2023/Python-Code-Large/train/row_79798
92
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79798:ImportFrom_L1_C0", "label": "from django.shortcuts import render_to_response", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0084, 0.0084, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79798:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79798:Assign_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79798:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79798:FunctionDef_L15_C1"}, {"f": "ajibawa-2023/Python-Cod...
__author__="robert" __date__ ="$Jun 6, 2011 10:44:32 PM$" from setuptools import setup,find_packages setup ( name = 'scw', version = '0.1', packages = find_packages(), # Declare your packages' dependencies here, for eg: install_requires=['foo>=3'], # Fill in these to make your Egg ready for upload to ...
ajibawa-2023/Python-Code-Large/train/row_79799
4
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_79799:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.037, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_ca...
[]
from django.db import models # Create your models here.
ajibawa-2023/Python-Code-Large/train/row_79800
1
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79800:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[]
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
ajibawa-2023/Python-Code-Large/train/row_79801
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79801:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 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_79801:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79801:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79801:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79801:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.conf.urls.defaults import * urlpatterns = patterns('usersearch.views', (r'^$', 'renderSearch'), )
ajibawa-2023/Python-Code-Large/train/row_79802
2
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79802:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_names":...
[]
from django.shortcuts import render_to_response from django import forms from django.contrib.auth.models import User from django.core.context_processors import csrf from django.contrib.auth.decorators import login_required from django.template import RequestContext class SearchForm(forms.Form): query = forms.CharF...
ajibawa-2023/Python-Code-Large/train/row_79803
41
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_79803:ImportFrom_L1_C0", "label": "from django.shortcuts import render_to_response", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0196, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79803:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79803:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79803:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79803:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from django.db import models from django.contrib.auth.models import User EVENT_CHOICES = ( ('I', 'Checkin'), ('O', 'Checkout'), ) class Event(models.Model): user = models.ForeignKey(User) timestamp = models.DateTimeField(auto_now_add=True) eventType = models.TextField(max_length=1, choices=EVENT_CHOICES)
ajibawa-2023/Python-Code-Large/train/row_79804
7
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79804:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_79804:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79804:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79804:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79804:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
ajibawa-2023/Python-Code-Large/train/row_79805
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79805:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.375, 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_79805:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79805:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79805:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_79805:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Co...
from django.conf.urls.defaults import * urlpatterns = patterns('checkin.views', (r'^$', 'checkin'), (r'^lookup/$', 'lookup'), (r'name_lookup/$', 'name_lookup'), )
ajibawa-2023/Python-Code-Large/train/row_79806
2
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79806:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_n...
[]
''' Need one view for this module: Check in a user search for user by barcode or name check in user without reloading page ''' from django.http import HttpResponse from django.utils import simplejson from django import forms from django.http import HttpResponseRedirect from django.shortcuts import render_to_respon...
ajibawa-2023/Python-Code-Large/train/row_79807
122
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_79807:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.023, 0.0408, 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_79807:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79807:Assign_L32_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_79807:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_79807:Assign_L33_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
from django.db import models # Create your models here.
ajibawa-2023/Python-Code-Large/train/row_79808
1
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_79808:ImportFrom_L1_C0", "label": "from django.db import models", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["...
[]