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
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. import sys sys.path.insert(1, "..") from SOAPpy import * # Uncomment to see outgoing HTTP headers and SOAP and incoming #Config.debug = 1 Config.BuildWithNoType = 1 Config.BuildWithNoNamespacePrefix = 1 hd = headerType(data = {"mystr...
ajibawa-2023/Python-Code-Large/train/row_3202
9
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_3202:Import_L5_C0", "label": "sys import sys", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.2174, 0.0435, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":...
[]
#!/usr/bin/env python import time from SOAPpy import SOAP srv = SOAP.SOAPProxy('http://localhost:10080/') for p in ('good param', 'ok param'): ret = srv.badparam(p) if isinstance(ret, SOAP.faultType): print ret else: print 'ok' dt = SOAP.dateTimeType(time.localtime(time.time())) print sr...
ajibawa-2023/Python-Code-Large/train/row_3204
10
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_3204:Import_L3_C0", "label": "time import time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1579, 0.0526, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3204:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3204:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3204:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3204:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3204:If_...
""" ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (Gregory.R.Warnes@Pfizer.com) # Christopher Blunck (blunck@gst.com) # ##########################...
ajibawa-2023/Python-Code-Large/train/row_3208
24
79
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3208:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 41], "level": 0, "parent": null, "vector": [8, 0, 0.2658, 0.519, 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_3208:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3208:FunctionDef_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3208:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3208:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code...
"""This file is here for backward compatibility with versions <= 0.9.9 Delete when 1.0.0 is released! """ ident = '$Id: SOAP.py,v 1.38 2004/01/31 04:20:06 warnes Exp $' from version import __version__ from Client import * from Config import * from Errors import * from NS import * from Parser...
ajibawa-2023/Python-Code-Large/train/row_3213
16
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3213:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0625, 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"...
[]
__version__="0.12.0"
ajibawa-2023/Python-Code-Large/train/row_3214
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3214:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call_...
[]
"""Provide a class for loading data from URL's that handles basic authentication""" ident = '$Id: URLopener.py,v 1.2 2004/01/31 04:20:06 warnes Exp $' from version import __version__ from Config import Config from urllib import FancyURLopener class URLopener(FancyURLopener): username = None passwd = None ...
ajibawa-2023/Python-Code-Large/train/row_3216
14
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_3216:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0652, 0.087, 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_3216:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3216:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3216:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3216:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
ident = '$Id: __init__.py,v 1.9 2004/01/31 04:20:06 warnes Exp $' from version import __version__ from Client import * from Config import * from Errors import * from NS import * from Parser import * from SOAPBuilder import * from Server import * from Types import * from Utiliti...
ajibawa-2023/Python-Code-Large/train/row_3218
13
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_3218:Assign_L2_C0", "label": "ident =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.1333, 0.0667, 0, 0.66, 0.0, 977, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ident", "arg_names": [], "import_names": [], "rhs_call_name":...
[]
#! /usr/bin/env python """Logging""" import sys class ILogger: '''Logger interface, by default this class will be used and logging calls are no-ops. ''' level = 0 def __init__(self, msg): return def warning(self, *args): return def debug(self, *args): return def...
ajibawa-2023/Python-Code-Large/train/row_3219
61
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3219:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0235, 0.0118, 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_3219:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3219:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3219:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3219:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
""" A more or less complete user-defined wrapper around tuple objects. Adapted version of the standard library's UserList. Taken from Stefan Schwarzer's ftputil library, available at <http://www.ndh.net/home/sschwarzer/python/python_software.html>, and used under this license: Copyright (C) 1999, Stefan Schwarzer ...
ajibawa-2023/Python-Code-Large/train/row_3224
49
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_3224:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 42], "level": 0, "parent": null, "vector": [8, 0, 0.2172, 0.4242, 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_3224:ClassDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3224:FunctionDef_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3224:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3224:Assign_L56_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/env python """WSDL parsing services package for Web Services for Python.""" ident = "$Id: __init__.py,v 1.11 2004/12/07 15:54:53 blunck2 Exp $" import WSDLTools import XMLname import logging
ajibawa-2023/Python-Code-Large/train/row_3225
5
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3225:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 2], "level": 0, "parent": null, "vector": [8, 0, 0.2222, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
"""Translate strings to and from SOAP 1.2 XML name encoding Implements rules for mapping application defined name to XML names specified by the w3 SOAP working group for SOAP version 1.2 in Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft 17, December 2001, <http://www.w3.org/TR/soap12-part2/#namem...
ajibawa-2023/Python-Code-Large/train/row_3226
56
89
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3226:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0843, 0.1573, 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_3226:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3226:Return_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3226:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3226:Return_L26_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#! /usr/bin/env python """Namespace module, so you don't need PyXML """ try: from xml.ns import SOAP, SCHEMA, WSDL, XMLNS, DSIG, ENCRYPTION DSIG.C14N = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" except: class SOAP: ENV = "http://schemas.xmlsoap.org/soap/envelope/" ...
ajibawa-2023/Python-Code-Large/train/row_3227
99
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3227:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 3], "level": 0, "parent": null, "vector": [8, 0, 0.02, 0.016, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3227:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3227:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3227:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3227:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
#! /usr/bin/env python """wstools.WSDLTools.WSDLReader tests directory.""" import utils
ajibawa-2023/Python-Code-Large/train/row_3229
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_3229:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 2], "level": 0, "parent": null, "vector": [8, 0, 0.4, 0.2, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": "...
[]
"""Parse web services description language to get SOAP methods. Rudimentary support.""" ident = '$Id: WSDL.py,v 1.11 2005/02/21 20:16:15 warnes Exp $' from version import __version__ import wstools from Client import SOAPProxy, SOAPAddress from Config import Config import urllib class Proxy: """WSDL Proxy. ...
ajibawa-2023/Python-Code-Large/train/row_3230
59
116
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3230:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0172, 0.0259, 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_3230:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3230:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3230:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3230:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
""" GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov> ################################################################################ # # SOAPpy - Cayce Ullman (cayce@actzero.com) # Brian Matthews (blm@actzero.com) # Gregory Warnes (Gregory.R.Warnes@Pfizer.com) # ...
ajibawa-2023/Python-Code-Large/train/row_3231
59
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3231:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 44], "level": 0, "parent": null, "vector": [8, 0, 0.1573, 0.3077, 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_3231:Try_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3231:ImportFrom_L67_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3231:FunctionDef_L77_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3231:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python import string import cgi ident = '$Id: interop2html.py,v 1.1.1.1 2001/06/27 21:36:14 cullman Exp $' lines = open('output.txt').readlines() #preserve the tally tally = lines[-6:] #whack the tally from lines lines = lines[:-6] table={} for line in lines: if line[:3] == ' ' or line == '>\n' : ...
ajibawa-2023/Python-Code-Large/train/row_3232
68
76
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3232:Import_L3_C0", "label": "string import string", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0395, 0.0132, 0, 0.66, 0.0, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3232:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3232:If_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3232:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3232:Assign_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3232:...
""" ------------------------------------------------------------------ Author: Gregory R. Warnes <Gregory.R.Warnes@Pfizer.com> Date: 2005-02-24 Version: 0.7.2 Copyright: (c) 2003-2005 Pfizer, Licensed to PSF under a Contributor Agreement License: Licensed under the Apache License, Version 2.0 (the"License")...
ajibawa-2023/Python-Code-Large/train/row_3233
5
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_3233:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 20], "level": 0, "parent": null, "vector": [8, 0, 0.2692, 0.5128, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
"""Utilities for handling IEEE 754 floating point special values This python module implements constants and functions for working with IEEE754 double-precision special values. It provides constants for Not-a-Number (NaN), Positive Infinity (PosInf), and Negative Infinity (NegInf), as well as functions to test for th...
ajibawa-2023/Python-Code-Large/train/row_3234
63
178
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3234:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 37], "level": 0, "parent": null, "vector": [8, 0, 0.1067, 0.2079, 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_3234:If_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3234:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3234:If_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3234:Assign_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323...
from sys import stdin, stdout #fin = stdin fin = open('input.txt') fout = stdout #fout = open('output.txt', 'w') s = list(fin.read().strip().split()) n = list(map(len, s)) dp = [[0] * (n[1] + 1) for i in range(n[0] + 1)] fr = [[(0, 0)] * (n[1] + 1) for i in range(n[0] + 1)] for i in range(n[0]): f...
ajibawa-2023/Python-Code-Large/train/row_3235
21
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_3235:ImportFrom_L1_C0", "label": "from sys import stdin, stdout", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdi...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3235:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3235:For_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3235:For_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3235:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3235...
from sys import stdin, stdout fin = stdin #fin = open('input.txt') fout = stdout #fout = open('output.txt', 'w') n = int(fin.readline()) ans = [[] for i in range(n)] for i in range(n): for j in range(n): ans[(i + j) % n].append(i * n + j + 1) for i in range(n): print(' '.join(map(str, ans[i]))...
ajibawa-2023/Python-Code-Large/train/row_3236
10
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3236:ImportFrom_L1_C0", "label": "from sys import stdin, stdout", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdi...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3236:For_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3236:For_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3236:For_L13_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3236:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3236:F...
''' Created on 21-03-2011 @author: maciek ''' def formatString(format, **kwargs): ''' ''' if not format: return '' for arg in kwargs.keys(): format = format.replace("{" + arg + "}", "##" + arg + "##") format = format.replace ("{", "{{") format = format.replace("}", "}}") for...
ajibawa-2023/Python-Code-Large/train/row_3237
15
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_3237:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1304, 0.2174, 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_3237:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3237:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3237:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3237:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
''' Created on 21-03-2011 @author: maciek ''' from IndexGenerator import IndexGenerator from optparse import OptionParser import os import tempfile import shutil import logging logging.basicConfig(level = logging.DEBUG) parser = OptionParser() parser.add_option('-n', '--app-name', action='store', dest='appName', hel...
ajibawa-2023/Python-Code-Large/train/row_3238
69
88
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3238:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0341, 0.0568, 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_3238:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3238:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3238:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3238:If_L28_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3238:If_L...
''' Created on 21-03-2011 @author: maciek ''' from formater import formatString import os class IndexGenerator(object): ''' Generates Index.html for iOS app OTA distribution ''' basePath = os.path.dirname(__file__) templateFile = os.path.join(basePath,"templates/index.tmpl") releaseUrls = "" ...
ajibawa-2023/Python-Code-Large/train/row_3239
31
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_3239:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0526, 0.0877, 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_3239:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3239:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3239:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3239:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
from math import sqrt, sin, cos, tan, pi from numpy import * # linear interp between key frames startKey and endKey, returns a list of frames # includes startKey's time exclude endKey's time def lerpt(startKey, endKey): step = 1 / 30.0 #assuming 30 frames a second #key format is [time, pose] i have th...
ajibawa-2023/Python-Code-Large/train/row_3240
140
261
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3240:ImportFrom_L1_C0", "label": "from math import sqrt, sin, cos\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0038, 0.0038, 0, 0.66, 0.0, 526, 0, 5, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3240:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3240:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3240:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3240:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python from random import uniform def find_xIndex(x, array): i = 0 for value in array: if x < value: return i i += 1 return 0 func = lambda x:x**2. weight = lambda x:x**1. x = [.001*(i+1.) for i in range(1000)] # create the weight prob. boundary and name as norm_w weightList = [weight(i) for i in...
ajibawa-2023/Python-Code-Large/train/row_3241
24
37
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3241:ImportFrom_L2_C0", "label": "from random import uniform", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.027, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["unifo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3241:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3241:Assign_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3241:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3241:For_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python import time from random import uniform # position : [up, down, left, right] moveList = { 1 : (4, 0, 0, 2), 2 : (5, 0, 1, 3), 3 : (6, 0, 2, 0), 4 : (7, 1, 0, 5), 5 : (8, 2, 4, 6), 6 : (9, 3, 5, 0), 7 : (0, 4, 0, 8), 8 : (0, 5, 7, 9), 9 : (0, 6, 8, 0) } Nhits = { 1 : 0, 2 : 0, 3 : 0, 4 : 0, 5 : 0, 6 : ...
ajibawa-2023/Python-Code-Large/train/row_3242
25
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_3242:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0206, 0.0103, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3242:For_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3242:Assign_L50_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3242:For_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3242:Assign_L51_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
#!/usr/bin/python import Gnuplot import math from random import uniform def markov_throw(delta, x, y): return x + uniform(-delta, delta), y + uniform(-delta, delta) def direct_throw(start, end): return uniform(start, end), uniform(start, end) def IsInSquare(x, y): if abs(x) < 1. and abs(y) < 1.: return True...
ajibawa-2023/Python-Code-Large/train/row_3243
58
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_3243:Import_L2_C0", "label": "Gnuplot import Gnuplot", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0202, 0.0101, 0, 0.66, 0.0, 580, 0, 1, 0, 0, 580, 0, 0], "semantic": {"name": "Gnuplot", "arg_names": [], "import_names": ["Gnuplot"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3243:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3243:Return_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3243:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3243:Return_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
from random import uniform def cont_integral(a, b, N): summ = 0.0 summ_n = 0.0 for i in range(N): x = uniform(0, 1)**(1./(a+1.)) area = x**(b-a) summ += area return summ/float(N) a = 2. b = 3. N = 1000 print cont_integral(a, b, N)
ajibawa-2023/Python-Code-Large/train/row_3244
12
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_3244:ImportFrom_L1_C0", "label": "from random import uniform", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["unif...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3244:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3244:Assign_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3244:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3244:Assign_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
from random import uniform class ThrowMethod: def Throw(self): return 0. class DirectPyThrow(ThrowMethod): def __init__(self, start = 0., end = 1.): self.start = start self.end = end def Throw(self): return uniform(self.start, self.end), uniform(self.start, self.end) class DirectNaiveThrow(ThrowMethod):...
ajibawa-2023/Python-Code-Large/train/row_3246
138
204
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3246:ImportFrom_L1_C0", "label": "from random import uniform", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0049, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["unif...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3246:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3246:FunctionDef_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3246:FunctionDef_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3246:Return_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
import numpy as np from random import uniform class record(object): def __init__(self): self.summ = 0. # summation f self.sumSquare = 0. # summation f^2 self.count = 0 def Clear(self): self.summ = 0. self.sumSquare = 0. self.count = 0 def Add(self, value): self.count += 1 self.summ += value se...
ajibawa-2023/Python-Code-Large/train/row_3247
136
244
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3247:Import_L1_C0", "label": "numpy import np", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0041, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3247:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3247:FunctionDef_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3247:FunctionDef_L6_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3247:Assign_L7_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
import csv import numpy as np a = csv.reader(open('test.txt', 'r'), delimiter='\t') a.next() # skip a column data = [] for row in a: data.append(row[:-1]) print np.array(data, dtype='float')
ajibawa-2023/Python-Code-Large/train/row_3248
8
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_3248:Import_L1_C0", "label": "csv import csv", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 312, 0, 1, 0, 0, 312, 0, 0], "semantic": {"name": "csv", "arg_names": [], "import_names": ["csv"], "rhs_call_name": "", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3248:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3248:Expr_L8_C1"}]
import numpy as np from scipy.constants import codata from random import uniform class OneD_Ising: def __init__(self, n = 0, J = 1., T = 0., B = 0.): self.up = 1. self.down = -1. self.J = J self.n = n self.B = B self.chain = np.zeros(self.n) self.currH = 0. self.sumH = 0. self.beta = 1/float(T) def...
ajibawa-2023/Python-Code-Large/train/row_3249
56
69
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3249:Import_L1_C0", "label": "numpy import np", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3249:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3249:FunctionDef_L5_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3249:FunctionDef_L5_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_3249:Assign_L6_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
from matplotlib.pylab import * import numpy as np t = np.arange(0, 10, 1) y1 = np.e**(-t/2.) y2 = np.e**(-t/5.) ion() #title("This is test title") #xlabel("Hello", fontsize=28) #ylabel("$\Delta$R/R", fontsize=28, weight='bold') #grid(True) """ marker marker +, o, <, >, ^, ., s, v, x ...etc. ms markersize mew markere...
ajibawa-2023/Python-Code-Large/train/row_3250
18
50
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3250:ImportFrom_L1_C0", "label": "from matplotlib.pylab import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.02, 0, 0.66, 0.0, 607, 0, 1, 0, 0, 607, 0, 0], "semantic": {"name": "matplotlib.pylab", "arg_names": [], "import_name...
[]
from pylab import * from scipy import optimize from numpy import * class Parameter: def __init__(self, value): self.value = value def set(self, value): self.value = value def __call__(self): return self.value def fit(function, parameters, y, x = None): def f(param...
ajibawa-2023/Python-Code-Large/train/row_3251
31
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3251:ImportFrom_L1_C0", "label": "from pylab import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0238, 0.0238, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "pylab", "arg_names": [], "import_names": ["*"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3251:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3251:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3251:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3251:Assign_L7_C12"}, {"f": "ajibawa-2023/Python-Code-La...
from pylab import * from scipy import * from scipy import optimize # if you experience problem "optimize not found", try to uncomment the following line. The problem is present at least at Ubuntu Lucid python scipy package # from scipy import optimize # Generate data points with noise num_points = 500 Tx = linspace(0...
ajibawa-2023/Python-Code-Large/train/row_3252
20
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3252:ImportFrom_L1_C0", "label": "from pylab import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "pylab", "arg_names": [], "import_names": ["*"], "rhs_call...
[]
#!/usr/bin/python2.4 # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
ajibawa-2023/Python-Code-Large/train/row_3253
12
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3253:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 32], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.0156, 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_3253:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3253:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3253:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3253:Assign_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python2.4 # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
ajibawa-2023/Python-Code-Large/train/row_3254
78
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_3254:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 32], "level": 0, "parent": null, "vector": [8, 0, 0.1481, 0.0046, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3254:ClassDef_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3254:Expr_L96_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3254:ClassDef_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3254:FunctionDef_L98_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python2.4 # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
ajibawa-2023/Python-Code-Large/train/row_3255
84
195
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3255:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 32], "level": 0, "parent": null, "vector": [8, 0, 0.1641, 0.0051, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3255:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3255:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3255:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3255:Assign_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python2.4 # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
ajibawa-2023/Python-Code-Large/train/row_3256
50
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3256:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 32], "level": 0, "parent": null, "vector": [8, 0, 0.256, 0.008, 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_3256:ClassDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3256:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3256:ClassDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3256:FunctionDef_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python2.4 # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
ajibawa-2023/Python-Code-Large/train/row_3257
44
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3257:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 32], "level": 0, "parent": null, "vector": [8, 0, 0.2581, 0.0081, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3257:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3257:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3257:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3257:Assign_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python2.4 # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
ajibawa-2023/Python-Code-Large/train/row_3258
3
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_3258:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 32], "level": 0, "parent": null, "vector": [8, 0, 0.5926, 0.0185, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[]
import os import sys from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES #install data file in the same way as *.py for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] def fullsplit(path, result=None): """ Split a pathname into components (the op...
ajibawa-2023/Python-Code-Large/train/row_3259
28
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3259:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0122, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3259:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3259:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3259:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3259:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
import os import sys from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES #install data file in the same way as *.py for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] def fullsplit(path, result=None): """ Split a pathname into components (the op...
ajibawa-2023/Python-Code-Large/train/row_3260
28
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3260:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0122, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3260:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3260:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3260:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3260:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/env python from bots import webserver if __name__ == '__main__': webserver.start()
ajibawa-2023/Python-Code-Large/train/row_3261
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3261:ImportFrom_L2_C0", "label": "from bots import webserver", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["webserver"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3261:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3261:Expr_L5_C4"}]
import unittest import bots.botsglobal as botsglobal import bots.inmessage as inmessage import bots.botslib as botslib import bots.transform as transform import pickle import bots.botsinit as botsinit import utilsunit '''plugin unittranslateutils.zip ''' #as the max length is class TestTranslate(unittest.TestCase): ...
ajibawa-2023/Python-Code-Large/train/row_3262
99
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3262:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3262:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3262:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3262:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3262:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Co...
import unittest import filecmp import glob import shutil import os import subprocess import logging import utilsunit import bots.botslib as botslib import bots.botsinit as botsinit import bots.botsglobal as botsglobal from bots.botsconfig import * ''' plugin unitconfirm.zip before each run: clear transactions! ''' b...
ajibawa-2023/Python-Code-Large/train/row_3263
77
191
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3263:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0052, 0.0052, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3263:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3263:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3263:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3263:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python from bots import grammarcheck if __name__=='__main__': grammarcheck.start()
ajibawa-2023/Python-Code-Large/train/row_3264
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3264:ImportFrom_L2_C0", "label": "from bots import grammarcheck", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["grammarch...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3264:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3264:Expr_L5_C4"}]
import os import unittest import shutil import bots.inmessage as inmessage import bots.outmessage as outmessage import filecmp try: import json as simplejson except ImportError: import simplejson import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit ''' pluging unitinisout.zip''' c...
ajibawa-2023/Python-Code-Large/train/row_3265
104
150
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3265:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0067, 0.0067, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3265:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3265:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3265:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3265:Import_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3265...
import unittest import bots.botslib as botslib import bots.botsinit as botsinit import bots.inmessage as inmessage import bots.outmessage as outmessage from bots.botsconfig import * import utilsunit ''' plugin unitformats ''' #python 2.6 treats -0 different. in outmessage this is adapted, for inmessage: python 2.6 do...
ajibawa-2023/Python-Code-Large/train/row_3266
888
1,046
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3266:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.001, 0.001, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3266:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3266:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3266:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3266:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code...
import copy import os import glob import bots.inmessage as inmessage import bots.outmessage as outmessage def comparenode(node1,node2org): node2 = copy.deepcopy(node2org) if node1.record is not None and node2.record is None: print 'node2 is "None"' return False if node1.record is None and ...
ajibawa-2023/Python-Code-Large/train/row_3267
64
81
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3267:Import_L1_C0", "label": "copy import copy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0123, 0.0123, 0, 0.66, 0.0, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3267:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3267:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3267:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3267:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#constants/definitions for Bots #to be used as from bots.config import * #for statust in ta: OPEN = 0 #Bots always closes transaction. OPEN is severe error ERROR = 1 #error in transaction. OK = 2 #successfull, result is 'save'. But processing has stopped: next step with error, or no next steps defined DONE ...
ajibawa-2023/Python-Code-Large/train/row_3269
43
60
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3269:Assign_L5_C0", "label": "OPEN =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0833, 0.0167, 0, 0.66, 0.0, 484, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "OPEN", "arg_names": [], "import_names": [], "rhs_call_name": "...
[]
""" sef2bots.py Command line params: sourcefile.sef targetfile.py Optional command line params: -seq, -struct Converts a SEF grammar into a Bots grammar. If targetfile exists (and is writeable), it will be overwritten. If -seq is specified, field names in record definitions will be sequential (TAG01, TAG...
ajibawa-2023/Python-Code-Large/train/row_3270
361
507
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3270:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 37], "level": 0, "parent": null, "vector": [8, 0, 0.0375, 0.073, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3270:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3270:Expr_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3270:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3270:Expr_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python import sys import os import logging from logging.handlers import TimedRotatingFileHandler from django.core.handlers.wsgi import WSGIHandler from django.utils.translation import ugettext as _ import cherrypy from cherrypy import wsgiserver import botslib import botsglobal import botsinit def showu...
ajibawa-2023/Python-Code-Large/train/row_3271
56
89
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3271:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0225, 0.0112, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3271:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3271:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3271:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3271:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# Django settings for bots project. import os import bots #*******settings for bots error reports********************************** MANAGERS = ( #bots will send error reports to the MANAGERS ('name_manager', 'manager@domain.org'), ) #~ EMAIL_HOST = 'smtp.gmail.com' #Default: 'localhost' #~ EMAIL...
ajibawa-2023/Python-Code-Large/train/row_3272
36
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3272:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0146, 0.0073, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[]
import time import django import models import viewlib import botslib import botsglobal django.contrib.admin.widgets.AdminSplitDateTime HiddenInput = django.forms.widgets.HiddenInput DEFAULT_ENTRY = ('',"---------") editypelist=[DEFAULT_ENTRY] + sorted(models.EDITYPES) confirmtypelist=[DEFAULT_ENTRY] + models.CONFIRMTY...
ajibawa-2023/Python-Code-Large/train/row_3273
197
216
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3273:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3273:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3273:Return_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3273:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3273:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from django.utils.translation import ugettext as _ #bots-modules import botslib import node from botsconfig import * class Message(object): ''' abstract class; represents a edi message. is subclassed as outmessage or inmessage object. ''' def __init__(self): self.recordnumber=0 ...
ajibawa-2023/Python-Code-Large/train/row_3274
142
231
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3274:ImportFrom_L1_C0", "label": "from django.utils.translation import _", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0043, 0.0043, 0, 0.66, 0.0, 389, 0, 1, 0, 0, 389, 0, 0], "semantic": {"name": "django.utils.translation", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3274:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3274:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3274:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3274:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import os import re import zipfile from django.utils.translation import ugettext as _ #bots-modules import botslib import botsglobal from botsconfig import * @botslib.log_session def preprocess(routedict,function, status=FILEIN,**argv): ''' for pre- and postprocessing of files. these are NOT translations; ...
ajibawa-2023/Python-Code-Large/train/row_3275
211
327
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3275:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0031, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3275:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3275:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3275:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3275:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#bots modules import botslib import botsglobal from botsconfig import * from django.utils.translation import ugettext as _ tavars = 'idta,statust,divtext,child,ts,filename,status,idroute,fromchannel,tochannel,frompartner,topartner,frommail,tomail,contenttype,nrmessages,editype,messagetype,errortext,script' def evalua...
ajibawa-2023/Python-Code-Large/train/row_3276
222
405
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3276:Import_L2_C0", "label": "botslib import botslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0025, 0, 0.66, 0.0, 484, 0, 1, 0, 0, 484, 0, 0], "semantic": {"name": "botslib", "arg_names": [], "import_names": ["botslib"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3276:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3276:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3276:Try_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3276:If_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
'''module contains the functions to be called from user scripts''' try: import cPickle as pickle except: import pickle import copy import collections from django.utils.translation import ugettext as _ #bots-modules import botslib import botsglobal import inmessage import outmessage from botsconfig import * #**...
ajibawa-2023/Python-Code-Large/train/row_3277
184
387
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3277:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0026, 0.0026, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3277:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3277:Import_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3277:Try_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3277:Import_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3277:...
from datetime import datetime from django.db import models from django.utils.translation import ugettext as _ ''' django is not excellent in generating db. But they have provided a way to customize the generated database using SQL. see bots/sql/*. ''' STATUST = [ (0, _(u'Open')), (1, _(u'Error')), (2, _(u'...
ajibawa-2023/Python-Code-Large/train/row_3278
302
439
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3278:ImportFrom_L1_C0", "label": "from datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0023, 0.0023, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3278:ClassDef_L107_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3278:Expr_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3278:ClassDef_L107_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3278:FunctionDef_L109_C4"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
ajibawa-2023/Python-Code-Large/train/row_3279
33
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3279:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0426, 0.0213, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3279:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3279:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3279:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3279:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python import os import optparse import subprocess import sys here = os.path.dirname(__file__) def main(): usage = "usage: %prog [file1..fileN]" description = """With no file paths given this script will automatically compress all jQuery-based files of the admin app. Requires the Google Closure...
ajibawa-2023/Python-Code-Large/train/row_3280
33
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3280:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0426, 0.0213, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3280:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3280:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3280:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3280:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
''' Base library for bots. Botslib should not import from other Bots-modules.''' import sys import os import codecs import traceback import subprocess import socket #to set a time-out for connections import string import urlparse import urllib import platform import django from django.utils.translation import ugettex...
ajibawa-2023/Python-Code-Large/train/row_3281
506
799
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3281:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0013, 0.0013, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3281:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3281:Return_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3281:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3281:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" Python Character Mapping Codec generated from CP1252.TXT with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. Adapted by Henk-Jan Ebbers for Bots open source EDI translator Regular UNOB: UNOB char, CR, LF and...
ajibawa-2023/Python-Code-Large/train/row_3283
20
189
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3283:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0291, 0.0529, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3283:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3283:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3283:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3283:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code...
""" Python Character Mapping Codec generated from CP1252.TXT with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. Adapted by Henk-Jan Ebbers for Bots open source EDI translator Regular UNOA: UNOA char, CR, LF and...
ajibawa-2023/Python-Code-Large/train/row_3284
20
189
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3284:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0291, 0.0529, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3284:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3284:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3284:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3284:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code...
codeconversions = { '351':'AAK', '35E':'AAK', '220':'ON', '224':'ON', '50E':'ON', '83':'IV', '380':'IV', '384':'IV', 'TESTIN':'TESTOUT', }
ajibawa-2023/Python-Code-Large/train/row_3285
1
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3285:Assign_L1_C0", "label": "codeconversions =", "type": "assigned_variable", "loc": [1, 11], "level": 0, "parent": null, "vector": [14, 0, 0.5455, 1.0, 0, 0.66, 0.0, 543, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "codeconversions", "arg_names": [], "import_names": []...
[]
import time import sys try: import cPickle as pickle except: import pickle import decimal NODECIMAL = decimal.Decimal(1) try: import cElementTree as ET #~ print 'imported cElementTree' except ImportError: try: import elementtree.ElementTree as ET #~ print 'imported elementtree.Elemen...
ajibawa-2023/Python-Code-Large/train/row_3286
501
801
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3286:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0012, 0.0012, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3286:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3286:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3286:Try_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3286:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3286:...
from django.conf.urls.defaults import * from django.contrib import admin,auth from django.views.generic.simple import redirect_to from django.contrib.auth.decorators import login_required,user_passes_test from bots import views admin.autodiscover() staff_required = user_passes_test(lambda u: u.is_staff) superuser_requ...
ajibawa-2023/Python-Code-Large/train/row_3287
10
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3287:ImportFrom_L1_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "arg_name...
[]
from django import template register = template.Library() @register.filter def url2path(value): if value.startswith('/admin/bots/'): value = value[12:] else: value = value[1:] if value: if value[-1] == '/': value = value[:-1] else: value = 'home' return ...
ajibawa-2023/Python-Code-Large/train/row_3288
11
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3288:ImportFrom_L1_C0", "label": "from django import template", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["tem...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3288:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3288:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3288:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3288:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_32...
import sys from django.utils.translation import ugettext as _ #bots-modules import communication import envelope import transform import botslib import botsglobal import preprocess from botsconfig import * @botslib.log_session def prepareretransmit(): ''' prepare the retransmittable files. Return: indication if fi...
ajibawa-2023/Python-Code-Large/train/row_3290
134
268
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3290:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3290:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3290:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3290:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3290:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import sys import os import botsinit import botslib import grammar def showusage(): print print " Usage: %s -c<directory> <editype> <messagetype>"%os.path.basename(sys.argv[0]) print print " Checks a Bots grammar." print " Same checks are used as in translations with bots-engine." pr...
ajibawa-2023/Python-Code-Large/train/row_3291
57
76
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3291:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0132, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3291:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3291:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3291:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3291:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import os import sys import atexit import traceback import logging #import bots-modules import bots.botslib as botslib import bots.botsglobal as botsglobal def showusage(): print ' Update existing bots database for new release 1.6.0' print ' Options:' print " -c<directory> directory for conf...
ajibawa-2023/Python-Code-Large/train/row_3292
71
104
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3292:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0096, 0.0096, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3292:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3292:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3292:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3292:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import decimal import copy from django.utils.translation import ugettext as _ import botslib import botsglobal from botsconfig import * comparekey=None def nodecompare(node): global comparekey return node.get(*comparekey) class Node(object): ''' Node class for building trees in inmessage and outmessage ...
ajibawa-2023/Python-Code-Large/train/row_3293
308
479
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3293:Import_L1_C0", "label": "decimal import decimal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 349, 0, 1, 0, 0, 349, 0, 0], "semantic": {"name": "decimal", "arg_names": [], "import_names": ["decimal"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3293:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3293:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3293:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3293:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
import django from django.contrib import admin from django.utils.translation import ugettext as _ from django.http import Http404, HttpResponse, HttpResponseRedirect from django.contrib.admin.util import unquote, flatten_fieldsets, get_deleted_objects, model_ngettext, model_format_dict from django.core.exceptions impor...
ajibawa-2023/Python-Code-Large/train/row_3294
143
199
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3294:Import_L1_C0", "label": "django import django", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.005, 0.005, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["django"], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3294:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3294:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3294:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3294:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import sys import os import encodings import codecs import ConfigParser import logging, logging.handlers from django.utils.translation import ugettext as _ #Bots-modules from botsconfig import * import botsglobal import botslib class BotsConfig(ConfigParser.SafeConfigParser): ''' See SafeConfigParser....
ajibawa-2023/Python-Code-Large/train/row_3295
130
196
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3295:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0051, 0.0051, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3295:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3295:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3295:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3295:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import shutil import time from django.utils.translation import ugettext as _ #bots-modules import botslib import botsglobal import grammar import outmessage from botsconfig import * @botslib.log_session def mergemessages(startstatus=TRANSLATED,endstatus=MERGED,idroute=''): ''' Merges en envelopes several messages ...
ajibawa-2023/Python-Code-Large/train/row_3297
289
515
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3297:Import_L1_C0", "label": "shutil import shutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0019, 0.0019, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3297:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3297:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3297:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3297:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# Django settings for bots project. import os import bots #*******settings for bots error reports********************************** MANAGERS = ( #bots will send error reports to the MANAGERS ('name_manager', 'manager@domain.org'), ) #~ EMAIL_HOST = 'smtp.gmail.com' #Default: 'localhost' #~ EMAIL...
ajibawa-2023/Python-Code-Large/train/row_3298
36
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3298:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0146, 0.0073, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[]
''' code found at code.djangoproject.com/ticket/3777 ''' from django import http class FilterPersistMiddleware(object): def _get_default(self, key): """ Gets any set default filters for the admin. Returns None if no default is set. """ default = None #~ default = settings.ADM...
ajibawa-2023/Python-Code-Large/train/row_3299
39
80
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3299:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.025, 0.0375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3299:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3299:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3299:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3299:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
try: from pysqlite2 import dbapi2 as sqlite #prefer external modules for pylite except ImportError: import sqlite3 as sqlite #works OK for python26 #~ #bots engine uses: #~ ''' SELECT * #~ FROM ta #~ WHERE idta=%(idta)s ''', #~ {'idta':12345}) #~ #SQLite wants: #~ ''' SELECT * #~ FROM ta...
ajibawa-2023/Python-Code-Large/train/row_3302
28
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3302:Try_L1_C0", "label": "try", "type": "try", "loc": [1, 4], "level": 0, "parent": null, "vector": [7, 0, 0.0472, 0.0755, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snip...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3302:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3302:ImportFrom_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3302:Try_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3302:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3...
''' Reading/lexing/parsing/splitting an edifile.''' import StringIO import time import sys try: import cPickle as pickle except: import pickle try: import cElementTree as ET except ImportError: try: import elementtree.ElementTree as ET except ImportError: try: from xml.et...
ajibawa-2023/Python-Code-Large/train/row_3304
758
1,145
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3304:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0009, 0.0009, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3304:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3304:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3304:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3304:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3304:...
import copy from django.utils.translation import ugettext as _ import botslib import botsglobal from botsconfig import * def grammarread(editype,grammarname): ''' dispatch function for class Grammar or subclass read whole grammar ''' try: classtocall = globals()[editype] except KeyError...
ajibawa-2023/Python-Code-Large/train/row_3305
249
855
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3305:Import_L1_C0", "label": "copy import copy", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0012, 0.0012, 0, 0.66, 0.0, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3305:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3305:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3305:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3305:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import os import glob import time import datetime import stat import shutil from django.utils.translation import ugettext as _ #bots modules import botslib import botsglobal from botsconfig import * def cleanup(): ''' public function, does all cleanup of the database and file system.''' try: _cleanups...
ajibawa-2023/Python-Code-Large/train/row_3306
82
125
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3306:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.008, 0.008, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3306:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3306:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3306:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3306:Try_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
#Globals used by Bots incommunicate = False #used to set all incommunication off db = None #db-object ini = None #ini-file-object that is read (bots.ini) routeid = '' #current route. This is used to set routeid for Processes. preprocessnumber = 0 #different preprocessnumbers ...
ajibawa-2023/Python-Code-Large/train/row_3307
7
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3307:Assign_L2_C0", "label": "incommunicate =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.2222, 0.1111, 0, 0.66, 0.0, 483, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "incommunicate", "arg_names": [], "import_names": [], ...
[]
#!/usr/bin/env python from bots import xml2botsgrammar if __name__=='__main__': xml2botsgrammar.start()
ajibawa-2023/Python-Code-Large/train/row_3308
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3308:ImportFrom_L2_C0", "label": "from bots import xml2botsgrammar", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["xml2bo...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3308:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3308:Expr_L5_C4"}]
import os import unittest import shutil import bots.inmessage as inmessage import bots.outmessage as outmessage import filecmp try: import json as simplejson except ImportError: import simplejson import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit try: import cElementTree as ET...
ajibawa-2023/Python-Code-Large/train/row_3309
177
250
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3309:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.004, 0.004, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3309:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3309:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3309:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3309:Import_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3309...
import os import unittest import shutil import bots.inmessage as inmessage import bots.outmessage as outmessage import filecmp import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit ''' pluging unitinmessagexml.zip''' class TestInmessage(unittest.TestCase): ''' Read messages; some shoul...
ajibawa-2023/Python-Code-Large/train/row_3310
217
274
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3310:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3310:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3310:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3310:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3310:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import os import unittest import shutil import filecmp import bots.inmessage as inmessage import bots.outmessage as outmessage import bots.botslib as botslib import bots.botsinit as botsinit '''plugin unitnode.zip''' class Testnode(unittest.TestCase): ''' test node.py and message.py. ''' def testedifact0...
ajibawa-2023/Python-Code-Large/train/row_3311
97
133
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3311:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3311:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3311:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3311:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3311:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python if __name__ == '__main__': import cProfile cProfile.run('from bots import engine; engine.start()','profile.tmp') import pstats p = pstats.Stats('profile.tmp') #~ p.sort_stats('cumulative').print_stats(25) p.sort_stats('time').print_stats(25) #~ p.print_callees('deepcop...
ajibawa-2023/Python-Code-Large/train/row_3312
7
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3312:If_L3_C0", "label": "if", "type": "if", "loc": [3, 11], "level": 0, "parent": null, "vector": [4, 0, 0.5, 0.6429, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3312:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3312:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3312:If_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3312:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3312:If_L...
import unittest import bots.inmessage as inmessage import bots.botslib as botslib import bots.botsinit as botsinit import utilsunit '''plugin unitinmessageedifact.zip''' class TestInmessage(unittest.TestCase): def testEdifact0401(self): ''' 0401 Errors in records''' self.assertRaises(botslib.InMe...
ajibawa-2023/Python-Code-Large/train/row_3313
69
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3313:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0115, 0.0115, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3313:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3313:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3313:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3313:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-L...
import filecmp import glob import shutil import os import sys import subprocess import logging import logging import bots.botslib as botslib import bots.botsinit as botsinit import bots.botsglobal as botsglobal from bots.botsconfig import * '''plugin unitretry.zip''' #!!!activate rotues ''' input: mime (complex struc...
ajibawa-2023/Python-Code-Large/train/row_3314
62
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3314:Import_L1_C0", "label": "filecmp import filecmp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 891, 0, 1, 0, 0, 891, 0, 0], "semantic": {"name": "filecmp", "arg_names": [], "import_names": ["filecmp"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3314:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3314:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3314:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3314:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import unittest import bots.botslib as botslib import bots.botsinit as botsinit import bots.grammar as grammar import bots.inmessage as inmessage import bots.outmessage as outmessage import utilsunit ''' plugin unitgrammar.zip ''' class TestGrammar(unittest.TestCase): def testgeneralgrammarerrors(self): ...
ajibawa-2023/Python-Code-Large/train/row_3315
175
227
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3315:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0044, 0.0044, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3315:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3315:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3315:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_3315:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python from bots import engine if __name__ == '__main__': engine.start()
ajibawa-2023/Python-Code-Large/train/row_3316
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3316:ImportFrom_L2_C0", "label": "from bots import engine", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.0, 261, 0, 1, 0, 0, 261, 0, 0], "semantic": {"name": "bots", "arg_names": [], "import_names": ["engine"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3316:If_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3316:Expr_L5_C4"}]
import sys import os import tarfile import glob import shutil import subprocess import traceback import bots.botsglobal as botsglobal def join(path,*paths): return os.path.normpath(os.path.join(path,*paths)) #****************************************************************************** #*** start ...
ajibawa-2023/Python-Code-Large/train/row_3317
18
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3317:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3317:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3317:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3317:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3317:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os import sys from distutils.core import setup def fullsplit(path, result=None): """ Split a pathname into components (the opposite of os.path.join) in a platform-neutral way. """ if result is None: result = [] head, tail = os.path.split(path) if head == '': ret...
ajibawa-2023/Python-Code-Large/train/row_3318
27
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3318:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0122, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3318:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3318:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3318:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3318:If_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_3319
8
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3319:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3319:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3319:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3319:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3319:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
ajibawa-2023/Python-Code-Large/train/row_3320
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3320:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3320:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3320:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3320:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3320:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
ajibawa-2023/Python-Code-Large/train/row_3321
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3321:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3321:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3321:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3321:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3321:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
ajibawa-2023/Python-Code-Large/train/row_3322
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3322:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3322:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3322:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3322:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3322:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
ajibawa-2023/Python-Code-Large/train/row_3323
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3323:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3323:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3323:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3323:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_3323:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
ajibawa-2023/Python-Code-Large/train/row_3324
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_3324:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_3324:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3324:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_3324:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_3324:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...