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 # encoding: utf-8 import sys import os import time from pyfann import libfann def main(): connection_rate = 1 learning_rate = 0.7 num_output = 1 max_iterations = 5000 iterations_between_reports = 100 parameters = [{"title": "Abalone", "train_file": "abalone_trai...
ajibawa-2023/Python-Code-Large/train/row_4844
40
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4844:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0513, 0.0128, 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_4844:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4844:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4844:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4844:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # encoding: utf-8 import sys import os import time from pyfann import libfann def main(): learning_rate = 0.7 num_output = 1 max_iterations = 5000 iterations_between_reports = 100 parameters = [{"title": "Abalone", "train_file": "abalone_train.data", "t...
ajibawa-2023/Python-Code-Large/train/row_4845
39
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4845:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0421, 0.0105, 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_4845:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4845:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4845:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4845:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # encoding: utf-8 import sys import os import time from pyfann import libfann def main(): learning_rate = 0.7 num_output = 1 max_iterations = 5000 iterations_between_reports = 100 parameters = [{"title": "Abalone", "train_file": "abalone_train.data", "t...
ajibawa-2023/Python-Code-Large/train/row_4846
39
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4846:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0421, 0.0105, 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_4846:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4846:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4846:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4846:Assign_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # encoding: utf-8 import sys import os import time from pyfann import libfann def main(): connection_rate = 1 learning_rate = 0.7 num_output = 1 max_iterations = 5000 iterations_between_reports = 100 parameters = [{"title": "Abalone", "train_file": "abalone_trai...
ajibawa-2023/Python-Code-Large/train/row_4847
40
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4847:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0513, 0.0128, 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_4847:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4847:Assign_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4847:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4847:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python import sys, hashlib def write_file(fn, buf): fp = open(fn, "wb") fp.write(buf) fp.close() def usage(): print ("Usage: " + sys.argv[0] + " infile outfile label") def main(): if( len(sys.argv) != 4): usage() sys.exit() fp = open( sys.argv[1] , "rb") hash_str = has...
ajibawa-2023/Python-Code-Large/train/row_4848
23
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_4848:Import_L3_C0", "label": "sys import sys, hashlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0238, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "hashlib...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4848:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4848:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4848:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4848:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python import sys, re, os def write_file(fn, buf): fp = open(fn, "wb") fp.write(buf) fp.close() def usage(): print ("Usage: " + os.path.split(__file__)[1] + " version outfile") def crete_version_str(ver): base = list("0.00") version = str(ver) ret = [] base[0] = version[0] base...
ajibawa-2023/Python-Code-Large/train/row_4849
38
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4849:Import_L3_C0", "label": "sys import sys, re, os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0577, 0.0192, 0, 0.66, 0.0, 509, 0, 3, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "re", "os...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4849:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4849:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4849:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4849:Expr_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import sys, os, struct, gzip, hashlib, StringIO gzip.time = FakeTime() def binary_replace(data, newdata, offset): return data[0:offset] + newdata + data[offset+len(newdata):] def prx_compress(output, hdr, input, mod_name="", mod_a...
ajibawa-2023/Python-Code-Large/train/row_4850
56
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_4850:ClassDef_L3_C0", "label": "FakeTime", "type": "class", "loc": [3, 5], "level": 0, "parent": null, "vector": [3, 0, 0.0488, 0.0366, 0, 0.66, 0.0, 425, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "FakeTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4850:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4850:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4850:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4850:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python import sys, hashlib def toNID(name): hashstr = hashlib.sha1(name.encode()).hexdigest().upper() return "0x" + hashstr[6:8] + hashstr[4:6] + hashstr[2:4] + hashstr[0:2] if __name__ == "__main__": assert(toNID("sceKernelCpuSuspendIntr") == "0x092968F4") for name in sys.argv[1:]: print ("%s: %s"...
ajibawa-2023/Python-Code-Large/train/row_4851
7
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4851:Import_L3_C0", "label": "sys import sys, hashlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0769, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "hashlib...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4851:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4851:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4851:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4851:Return_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python from hashlib import * import sys, struct def sha512(psid): if len(psid) != 16: return "".encode() for i in range(512): psid = sha1(psid).digest() return psid def get_psid(str): if len(str) != 32: return "".encode() b = "".encode() for i in range(0, len(str), 2): b += struct.pack('B...
ajibawa-2023/Python-Code-Large/train/row_4852
31
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4852:ImportFrom_L3_C0", "label": "from hashlib import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0652, 0.0217, 0, 0.66, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "hashlib", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4852:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4852:If_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4852:If_L7_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_4852:Return_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_48...
#!/usr/bin/python """ pspbtcnf_editor: An script that add modules from pspbtcnf """ import sys, os, re from getopt import * from struct import * BTCNF_MAGIC=0x0F803001 verbose = False def print_usage(): print ("%s: pspbtcnf.bin [-o output.bin] [-a add_module_name:before_module_name:flag]" %(os.path...
ajibawa-2023/Python-Code-Large/train/row_4853
107
182
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4853:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.022, 0.0165, 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_4853:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4853:Expr_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4853:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4853:Assign_L19_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python import os def main(): lists = [ "ISODrivers/Galaxy/galaxy.prx", "ISODrivers/March33/march33.prx", "ISODrivers/March33/march33_620.prx", "ISODrivers/Inferno/inferno.prx", "Popcorn/popcorn.prx", "Satelite/satelite.prx", "Stargate/stargate.prx", "SystemControl/systemctrl.prx", ...
ajibawa-2023/Python-Code-Large/train/row_4854
10
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4854:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 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_4854:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4854:Assign_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4854:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4854:For_L20_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/python class FakeTime: def time(self): return 1225856967.109 import os, gzip, StringIO gzip.time = FakeTime() def create_gzip(input, output): f_in=open(input, 'rb') temp=StringIO.StringIO() f=gzip.GzipFile(fileobj=temp, mode='wb') f.writelines(f_in) f.close() f_in.close() fout=open(out...
ajibawa-2023/Python-Code-Large/train/row_4855
30
44
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4855:ClassDef_L3_C0", "label": "FakeTime", "type": "class", "loc": [3, 5], "level": 0, "parent": null, "vector": [3, 0, 0.0909, 0.0682, 0, 0.66, 0.0, 425, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "FakeTime", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4855:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4855:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4855:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4855:Return_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python import os, sys, getopt def usage(): print ("Usage: %s [-l size ] basefile input output" % (sys.argv[0])) def write_file(fn, buf): fp = open(fn, "wb") fp.write(buf) fp.close() def main(): inputsize = 0 try: optlist, args = getopt.getopt(sys.argv[1:], 'l:h') except getopt.GetoptError: us...
ajibawa-2023/Python-Code-Large/train/row_4856
37
56
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4856:Import_L3_C0", "label": "os import os, sys, getopt", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0536, 0.0179, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4856:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4856:Expr_L6_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4856:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4856:Assign_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python from distutils.core import setup import os def get_build(): path = "./.build" if os.path.exists(path): fp = open(path, "r") build = eval(fp.read()) if os.path.exists("./.increase_build"): build += 1 fp.close() else: build = 1 fp = open(path, "w") fp.write(str(build)) fp.cl...
ajibawa-2023/Python-Code-Large/train/row_4857
15
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_4857:ImportFrom_L3_C0", "label": "from distutils.core import setup", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0312, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4857:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4857:Assign_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4857:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4857:If_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
# -*- coding: utf-8 -*- # # pylast - A Python interface to Last.fm (and other API compatible social networks) # # Copyright 2008-2010 Amr Hassan # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License a...
ajibawa-2023/Python-Code-Large/train/row_4858
2,028
3,849
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4858:Assign_L21_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [21, 21], "level": 0, "parent": null, "vector": [14, 0, 0.0055, 0.0003, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4858:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4858:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4858:If_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4858:ImportFrom_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
# Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
ajibawa-2023/Python-Code-Large/train/row_4859
32
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4859:Import_L15_C0", "label": "os import os", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2586, 0.0172, 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_4859:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4859:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4859:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4859:Expr_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
import os, sys import Tkinter as tk import tkFileDialog import bootloader class bootloadergui: def __init__(self): self.flash = [] self.importingfile=None for i in range(0x6000): self.flash.append(0xFF) self.eeprom = [] for i in range(0x100): ...
ajibawa-2023/Python-Code-Large/train/row_4861
428
518
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4861:Import_L2_C0", "label": "os import os, sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.0019, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4861:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4861:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4861:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4861:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-La...
import ctypes import sys if len(sys.argv) != 2: print "Usage: %s <duty>\n" % sys.argv[0] sys.exit(-1) duty = int(sys.argv[1]) if (duty < 0) or (duty > 255): print "Illegal duty cycle (%d) specified.\n" % duty sys.exit(-1) SET_RA1 = 1 CLR_RA1 = 2 GET_RA2 = 3 SET_DUTY = 4 usb = ctypes...
ajibawa-2023/Python-Code-Large/train/row_4862
23
30
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4862:Import_L2_C0", "label": "ctypes import ctypes", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0333, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4862:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4862:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4862:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4862:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4862:If_L9_...
import ctypes SET_RA1 = 1 CLR_RA1 = 2 GET_RA2 = 3 SET_DUTY = 4 usb = ctypes.cdll.LoadLibrary('usb.dll') usb.initialize() buffer = ctypes.c_buffer(8) dev = usb.open_device(0x6666, 0x0003, 0) if dev<0: print "No matching device found...\n" else: ret = usb.control_transfer(dev, 0x40, CLR_RA1,...
ajibawa-2023/Python-Code-Large/train/row_4864
15
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_4864:Import_L2_C0", "label": "ctypes import ctypes", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0476, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4864:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4864:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4864:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4864:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4864:...
"""Wrapper classes for use with tkinter. This module provides the following classes: Gui: a sublass of Tk that provides wrappers for most of the widget-creating methods from Tk. The advantages of these wrappers is that they use Python's optional argument capability to provide appropriate default values, and that the...
ajibawa-2023/Python-Code-Large/train/row_4865
401
728
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4865:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 62], "level": 0, "parent": null, "vector": [8, 0, 0.0433, 0.0852, 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_4865:ClassDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4865:Expr_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4865:ClassDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4865:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
from Tkinter import * import math import ctypes SET_SERVO = 1 KILL_CREEPA = 2 TOWERTIMEARRAY = 3 KILL_CREEPB = 4 GET_RA0 = 5 FIRING = 6 GET_TOWERTYPE = 7 GET_TOWERPOS = 8 GET_TICK = 9 #[(32, 16, math.pi/4),(29, 24, 13*math.pi/12),(29, 33, math.pi/24),(9, 34, 23*math.pi/24),(17, 21.5, 13*math.pi/12),(9...
ajibawa-2023/Python-Code-Large/train/row_4866
114
159
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4866:ImportFrom_L2_C0", "label": "from Tkinter import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0126, 0.0063, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4866:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4866:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4866:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4866:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from Tkinter import * import ctypes SET_SERVO = 1 KILL_CREEPA = 2 KILL_CREEPB = 3 SET_DUTY = 4 global servospot servospot=0 print "set servospot" opponentpin = [] playerpin = [] usb = ctypes.cdll.LoadLibrary('usb.dll') usb.initialize() print "hey o" buffer = ctypes.c_buffer(8) player=True de...
ajibawa-2023/Python-Code-Large/train/row_4867
67
129
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4867:ImportFrom_L2_C0", "label": "from Tkinter import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0155, 0.0078, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4867:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4867:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4867:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4867:If_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import ctypes SET_RA1 = 1 CLR_RA1 = 2 GET_RA2 = 3 SET_DUTY = 4 usb = ctypes.cdll.LoadLibrary('usb.dll') usb.initialize() buffer = ctypes.c_buffer(8) dev = usb.open_device(0x6666, 0x0003, 0) if dev<0: print "No matching device found...\n" else: ret = usb.control_transfer(dev, 0xC0, GET_RA2,...
ajibawa-2023/Python-Code-Large/train/row_4868
16
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_4868:Import_L2_C0", "label": "ctypes import ctypes", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0435, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4868:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4868:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4868:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4868:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4868:...
import ctypes SET_RA1 = 1 CLR_RA1 = 2 GET_RA2 = 3 SET_DUTY = 4 usb = ctypes.cdll.LoadLibrary('usb.dll') usb.initialize() buffer = ctypes.c_buffer(8) dev = usb.open_device(0x6666, 0x0003, 0) if dev<0: print "No matching device found...\n" else: ret = usb.control_transfer(dev, 0x00, 0x09, 1,...
ajibawa-2023/Python-Code-Large/train/row_4869
15
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_4869:Import_L2_C0", "label": "ctypes import ctypes", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0476, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4869:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4869:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4869:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4869:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4869:...
import ctypes SET_RA1 = 1 CLR_RA1 = 2 GET_RA2 = 3 SET_DUTY = 4 usb = ctypes.cdll.LoadLibrary('usb.dll') usb.initialize() buffer = ctypes.c_buffer(8) dev = usb.open_device(0x6666, 0x0003, 0) if dev<0: print "No matching device found...\n" else: ret = usb.control_transfer(dev, 0x40, SET_RA1,...
ajibawa-2023/Python-Code-Large/train/row_4870
15
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_4870:Import_L2_C0", "label": "ctypes import ctypes", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0476, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4870:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4870:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4870:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4870:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4870:...
#!/usr/bin/python from decimal import Decimal, getcontext getcontext.prec = 10 from copy import copy import os import random import time import tkFileDialog import tkMessageBox import tkSimpleDialog import pickle import math import generate import graphmath from copy import deepcopy from math import ...
ajibawa-2023/Python-Code-Large/train/row_4871
1,488
2,131
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4871:ImportFrom_L3_C0", "label": "from decimal import Decimal, getcontext", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0014, 0.0005, 0, 0.66, 0.0, 349, 0, 2, 0, 0, 349, 0, 0], "semantic": {"name": "decimal", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4871:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4871:Import_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4871:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4871:Import_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4...
#!/usr/bin/python from decimal import Decimal, getcontext getcontext.prec = 10 from copy import copy import os import random import time import tkFileDialog import tkMessageBox import tkSimpleDialog import pickle import math import generate import graphmath from copy import deepcopy from math import ...
ajibawa-2023/Python-Code-Large/train/row_4872
1,488
2,131
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4872:ImportFrom_L3_C0", "label": "from decimal import Decimal, getcontext", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0014, 0.0005, 0, 0.66, 0.0, 349, 0, 2, 0, 0, 349, 0, 0], "semantic": {"name": "decimal", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4872:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4872:Import_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4872:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4872:Import_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4...
"""Wrapper classes for use with tkinter. This module provides the following classes: Gui: a sublass of Tk that provides wrappers for most of the widget-creating methods from Tk. The advantages of these wrappers is that they use Python's optional argument capability to provide appropriate default values, and that the...
ajibawa-2023/Python-Code-Large/train/row_4873
401
728
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4873:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 62], "level": 0, "parent": null, "vector": [8, 0, 0.0433, 0.0852, 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_4873:ClassDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4873:Expr_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4873:ClassDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4873:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
import math def delimeters(gear_pos): g1 = gear_pos[-1] g2 = gear_pos[0] dist = 0 d = [] for i in range(len(gear_pos)): gear = gear_pos[i-1] to_gear = gear_pos[i] from_gear = gear_pos[i-2] (t1,t2) = cctangent(from_gear, gear) (t3, t4)...
ajibawa-2023/Python-Code-Large/train/row_4875
57
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_4875:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0125, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4875:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4875:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4875:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4875:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from Tkinter import * import ctypes SET_SERVO = 1 ##CLR_RA1 = 2 ##GET_RA2 = 3 ##SET_DUTY = 4 global servospot servospot=0 print "set servospot" usb = ctypes.cdll.LoadLibrary('usb.dll') usb.initialize() print "hey o" buffer = ctypes.c_buffer(8) ##def set_ra1_callback(): ## usb.control_transf...
ajibawa-2023/Python-Code-Large/train/row_4877
31
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4877:ImportFrom_L2_C0", "label": "from Tkinter import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.018, 0.009, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4877:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4877:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4877:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4877:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# explore the mouse wheel with the Tkinter GUI toolkit # Windows and Linux generate different events # tested with Python25 import Tkinter as tk def mouse_wheel(event): global count # respond to Linux or Windows wheel event if event.num == 5 or event.delta == -120: count -= 1 if e...
ajibawa-2023/Python-Code-Large/train/row_4878
15
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4878:Import_L5_C0", "label": "Tkinter import tk", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1515, 0.0303, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["tk"], "rhs_call_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4878:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4878:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4878:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4878:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
from visual import * from Blokus import * from PieceTest import * def draw_piece(piece,n): color_index = [color.red,color.blue,color.green,color.yellow] for (x,y) in piece.geometry: box (pos = (-100 + x+n,y,0),size = (2,2,1), color = color_index[piece.color]) selected = display(title = ...
ajibawa-2023/Python-Code-Large/train/row_4879
20
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4879:ImportFrom_L1_C0", "label": "from visual import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0303, 0.0303, 0, 0.66, 0.0, 548, 0, 1, 0, 0, 548, 0, 0], "semantic": {"name": "visual", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4879:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4879:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4879:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4879:For_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
from Gui import * import ctypes import threading import math import time ##usb = ctypes.cdll.LoadLibrary('usb.dll') ##usb.initialize() ##buffer = ctypes.c_buffer(8) ##def set_ra1_callback(): ## usb.control_transfer(dev, 0x40, SET_RA1, 0, 0, 0, buffer) ## ##def clr_ra1_callback(): ## usb.control_transf...
ajibawa-2023/Python-Code-Large/train/row_4880
183
426
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4880:ImportFrom_L1_C0", "label": "from Gui import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0023, 0.0023, 0, 0.66, 0.0, 55, 0, 1, 0, 0, 55, 0, 0], "semantic": {"name": "Gui", "arg_names": [], "import_names": ["*"], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4880:ClassDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4880:FunctionDef_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4880:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4880:Expr_L90_C8"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.1.0 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
ajibawa-2023/Python-Code-Large/train/row_4881
90
165
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4881:ImportFrom_L13_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0788, 0.0061, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4881:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4881:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4881:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4881:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.1.0 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appe...
ajibawa-2023/Python-Code-Large/train/row_4882
90
165
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4882:ImportFrom_L13_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0788, 0.0061, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4882:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4882:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4882:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4882:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from sys import stdin a, b, c = map(int, stdin.readline().strip().split()) print "%.3lf" % ((a+b+c)/3.0)
ajibawa-2023/Python-Code-Large/train/row_4883
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4883:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin from math import * r, h = map(float, stdin.readline().strip().split()) print "Area = %.3lf" % (pi*r*r*2 + 2*pi*r*h)
ajibawa-2023/Python-Code-Large/train/row_4884
4
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4884:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca...
[]
from sys import stdin from math import * n, = map(int, stdin.readline().strip().split()) rad = radians(n) print "%.3lf %.3lf" % (sin(rad), cos(rad))
ajibawa-2023/Python-Code-Large/train/row_4885
5
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_4885:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
from sys import stdin n, = map(int, stdin.readline().strip().split()) print n*(n+1)/2
ajibawa-2023/Python-Code-Large/train/row_4886
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4886:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin a, b = map(int, stdin.readline().strip().split()) print b, a
ajibawa-2023/Python-Code-Large/train/row_4887
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4887:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca...
[]
from sys import stdin n, m = map(int, stdin.readline().strip().split()) a = (4*n-m)/2 b = n-a if m % 2 == 1 or a < 0 or b < 0: print "No answer" else: print a, b
ajibawa-2023/Python-Code-Large/train/row_4888
4
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4888:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
from sys import stdin n, = map(int, stdin.readline().strip().split()) money = n * 95 if money >= 300: money *= 0.85 print "%.2lf" % money
ajibawa-2023/Python-Code-Large/train/row_4889
5
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_4889:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
from sys import stdin n, = map(int, stdin.readline().strip().split()) print ["yes", "no"][n % 2]
ajibawa-2023/Python-Code-Large/train/row_4890
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4890:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin from math import * x1, y1, x2, y2 = map(float, stdin.readline().strip().split()) print "%.3lf" % hypot((x1-x2), (y1-y2))
ajibawa-2023/Python-Code-Large/train/row_4891
4
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4891:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca...
[]
from sys import stdin n = stdin.readline().strip().split()[0] print '%c%c%c' % (n[2], n[1], n[0])
ajibawa-2023/Python-Code-Large/train/row_4892
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4892:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_ca...
[]
from sys import stdin x, = map(float, stdin.readline().strip().split()) print abs(x)
ajibawa-2023/Python-Code-Large/train/row_4893
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4893:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin from calendar import isleap year, = map(int, stdin.readline().strip().split()) if isleap(year): print "yes" else: print "no"
ajibawa-2023/Python-Code-Large/train/row_4894
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4894:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin f, = map(float, stdin.readline().strip().split()) print "%.3lf" % (5*(f-32)/9)
ajibawa-2023/Python-Code-Large/train/row_4895
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4895:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin a, b, c = map(int, stdin.readline().strip().split()) if a*a + b*b == c*c or a*a + c*c == b*b or b*b + c*c == a*a: print "yes" elif a + b <= c or a + c <= b or b + c <= a: print "not a triangle" else: print "no"
ajibawa-2023/Python-Code-Large/train/row_4896
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4896:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
from sys import stdin a = map(int, stdin.readline().strip().split()) a.sort() print a[0], a[1], a[2]
ajibawa-2023/Python-Code-Large/train/row_4897
4
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4897:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
s = i = 0 while True: term = 1.0 / (i*2+1) s += term * ((-1)**i) if term < 1e-6: break i += 1 print "%.6lf" % s
ajibawa-2023/Python-Code-Large/train/row_4898
5
7
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4898:Assign_L1_C0", "label": "s =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 553, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "an...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4898:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4898:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4898:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4898:If_L5_C2"}]
from sys import stdin from decimal import * a, b, c = map(int, stdin.readline().strip().split()) getcontext().prec = c print Decimal(a) / Decimal(b)
ajibawa-2023/Python-Code-Large/train/row_4899
5
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_4899:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
from sys import stdin n = int(stdin.readline().strip()) print "%.3lf" % sum([1.0/x for x in range(1,n+1)])
ajibawa-2023/Python-Code-Large/train/row_4900
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4900:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin print len(stdin.readline().strip())
ajibawa-2023/Python-Code-Large/train/row_4901
2
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4901:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
from itertools import product from math import * def issqrt(n): s = int(floor(sqrt(n))) return s*s == n aabb = [a*1100+b*11 for a,b in product(range(1,10),range(10))] print ' '.join(map(str, filter(issqrt, aabb)))
ajibawa-2023/Python-Code-Large/train/row_4902
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_4902:ImportFrom_L1_C0", "label": "from itertools import product", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "itertools", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4902:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4902:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4902:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4902:Return_L6_C2"}]
from sys import stdin a = map(int, stdin.readline().strip().split()) print "%d %d %.3lf" % (min(a), max(a), float(sum(a)) / len(a))
ajibawa-2023/Python-Code-Large/train/row_4903
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4903:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin def cycle(n): if n == 1: return 0 elif n % 2 == 1: return cycle(n*3+1) + 1 else: return cycle(n/2) + 1 n = int(stdin.readline().strip()) print cycle(n)
ajibawa-2023/Python-Code-Large/train/row_4904
9
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_4904:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4904:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4904:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4904:If_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_4904:Return_L4_C13"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4...
from sys import stdin n = int(stdin.readline().strip()) count = n*2-1 for i in range(n): print ' '*i + '#'*count count -= 2
ajibawa-2023/Python-Code-Large/train/row_4905
5
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4905:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4905:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4905:Expr_L5_C2"}]
for abc in range(123, 329): big = str(abc) + str(abc*2) + str(abc*3) if(''.join(sorted(big)) == '123456789'): print abc, abc*2, abc*3
ajibawa-2023/Python-Code-Large/train/row_4906
2
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4906:For_L1_C0", "label": "for abc", "type": "for", "loc": [1, 2], "level": 0, "parent": null, "vector": [6, 0, 0.75, 1.0, 0, 0.66, 0.0, 38, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "abc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "s...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4906:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4906:Assign_L2_C2"}]
from sys import stdin n, m = map(int, stdin.readline().strip().split()) print "%.5lf" % sum([1.0/i/i for i in range(n,m+1)])
ajibawa-2023/Python-Code-Large/train/row_4907
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4907:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[]
from sys import stdin data = map(int, stdin.readline().strip().split()) n, m = data[0], data[-1] data = data[1:-1] print len(filter(lambda x: x < m, data))
ajibawa-2023/Python-Code-Large/train/row_4908
5
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_4908:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
from sys import stdin def solve(a, b, c): for i in range(10, 101): if i % 3 == a and i % 5 == b and i % 7 == c: print i return print 'No answer' a, b, c = map(int, stdin.readline().strip().split()) solve(a, b, c)
ajibawa-2023/Python-Code-Large/train/row_4909
9
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_4909:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4909:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4909:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4909:For_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_4909:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4909...
from itertools import product sol = [a*100+b*10+c for a,b,c in product(range(1,10), range(10), range(10)) if a**3+b**3+c**3 == a*100+b*10+c] print '\n'.join(map(str, sol))
ajibawa-2023/Python-Code-Large/train/row_4910
3
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4910:ImportFrom_L1_C0", "label": "from itertools import product", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 808, 0, 1, 0, 0, 808, 0, 0], "semantic": {"name": "itertools", "arg_names": [], "import_names": ...
[]
from sys import stdin from math import * n = int(stdin.readline().strip()) print sum(map(factorial, range(1,n+1))) % (10**6)
ajibawa-2023/Python-Code-Large/train/row_4911
4
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4911:ImportFrom_L1_C0", "label": "from sys import stdin", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["stdin"], "rhs_call...
[]
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
ajibawa-2023/Python-Code-Large/train/row_4912
63
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4912:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4912:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4912:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4912:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4912:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
ajibawa-2023/Python-Code-Large/train/row_4913
42
149
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4913:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4913:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4913:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4913:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4913:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
ajibawa-2023/Python-Code-Large/train/row_4914
50
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4914:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4914:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4914:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4914:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4914:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
ajibawa-2023/Python-Code-Large/train/row_4915
20
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4915:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4915:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4915:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4915:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4915:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_49...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
ajibawa-2023/Python-Code-Large/train/row_4916
44
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4916:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4916:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4916:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4916:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4916:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Alessandro Presta # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the...
ajibawa-2023/Python-Code-Large/train/row_4917
180
470
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4917:Expr_L25_C0", "label": "expression", "type": "expression", "loc": [25, 83], "level": 0, "parent": null, "vector": [8, 0, 0.1149, 0.1255, 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_4917:ClassDef_L91_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4917:Expr_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4917:ClassDef_L91_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4917:FunctionDef_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Alessandro Presta # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the...
ajibawa-2023/Python-Code-Large/train/row_4919
180
470
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4919:Expr_L25_C0", "label": "expression", "type": "expression", "loc": [25, 83], "level": 0, "parent": null, "vector": [8, 0, 0.1149, 0.1255, 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_4919:ClassDef_L91_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4919:Expr_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4919:ClassDef_L91_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4919:FunctionDef_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# -*- coding: utf8 -*- from fuzzywuzzy import fuzz from fuzzywuzzy import process from fuzzywuzzy import utils import itertools import unittest class UtilsTest(unittest.TestCase): def setUp(self): self.s1 = "new york mets" self.s1a = "new york mets" self.s2 = "new YORK mets" self....
ajibawa-2023/Python-Code-Large/train/row_4922
148
285
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4922:ImportFrom_L3_C0", "label": "from fuzzywuzzy import fuzz", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0035, 0, 0.66, 0.0, 720, 0, 1, 0, 0, 720, 0, 0], "semantic": {"name": "fuzzywuzzy", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4922:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4922:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4922:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4922:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code...
import string bad_chars='' for i in range(128,256): bad_chars+=chr(i) table_from=string.punctuation+string.ascii_uppercase table_to=' '*len(string.punctuation)+string.ascii_lowercase trans_table=string.maketrans(table_from, table_to) def asciionly(s): return s.translate(None, bad_chars) # remove non-ASCII c...
ajibawa-2023/Python-Code-Large/train/row_4923
26
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_4923:Import_L1_C0", "label": "string import string", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4923:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4923:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4923:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4923:If_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python # encoding: utf-8 """ process.py Copyright (c) 2011 Adam Cohen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
ajibawa-2023/Python-Code-Large/train/row_4924
27
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_4924:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 26], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2759, 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_4924:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4924:If_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4924:If_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4924:Return_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/env python # encoding: utf-8 """ score.py Copyright (c) 2011 Adam Cohen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to ...
ajibawa-2023/Python-Code-Large/train/row_4925
105
220
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4925:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 26], "level": 0, "parent": null, "vector": [8, 0, 0.0659, 0.1091, 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_4925:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4925:ImportFrom_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4925:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4925:ImportFrom_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/env python # encoding: utf-8 """ StringMatcher.py ported from python-Levenshtein [https://github.com/miohtama/python-Levenshtein] """ from Levenshtein import * from warnings import warn class StringMatcher: """A SequenceMatcher-like class built on the top of Levenshtein""" def _reset_cache(self):...
ajibawa-2023/Python-Code-Large/train/row_4926
53
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4926:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0705, 0.0769, 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_4926:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4926:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4926:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4926:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python # encoding: utf-8 """ process.py Copyright (c) 2011 Adam Cohen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
ajibawa-2023/Python-Code-Large/train/row_4927
27
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_4927:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 26], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2759, 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_4927:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4927:If_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4927:If_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4927:Return_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/env python # encoding: utf-8 """ StringMatcher.py ported from python-Levenshtein [https://github.com/miohtama/python-Levenshtein] """ from Levenshtein import * from warnings import warn class StringMatcher: """A SequenceMatcher-like class built on the top of Levenshtein""" def _reset_cache(self):...
ajibawa-2023/Python-Code-Large/train/row_4928
53
78
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4928:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0705, 0.0769, 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_4928:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4928:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4928:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4928:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python # encoding: utf-8 """ score.py Copyright (c) 2011 Adam Cohen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to ...
ajibawa-2023/Python-Code-Large/train/row_4929
105
220
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4929:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 26], "level": 0, "parent": null, "vector": [8, 0, 0.0659, 0.1091, 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_4929:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4929:ImportFrom_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4929:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4929:ImportFrom_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
from distutils.core import setup setup(name='fuzzywuzzy', version='0.1', description='Fuzzy string matching in python', author='Adam Cohen', author_email='adam@seatgeek.com', url='https://github.com/seatgeek/fuzzywuzzy/', packages=['fuzzywuzzy'])
ajibawa-2023/Python-Code-Large/train/row_4930
2
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4930:ImportFrom_L1_C0", "label": "from distutils.core import setup", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
# -*- coding: utf8 -*- from timeit import timeit from fuzzywuzzy import utils iterations=100000 cirque_strings = [ "cirque du soleil - zarkana - las vegas", "cirque du soleil ", "cirque du soleil las vegas", "zarkana las vegas", "las vegas cirque du soleil at the bellagio", "zarakana - cirque...
ajibawa-2023/Python-Code-Large/train/row_4931
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4931:ImportFrom_L1_C0", "label": "from timeit import timeit", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 200, 0, 1, 0, 0, 200, 0, 0], "semantic": {"name": "timeit", "arg_names": [], "import_names": ["timei...
[]
#!/opt/ActivePython-2.7/bin/python ##################################################################################################### # Nicholas Harner # CSE411 # Homework 7 # 11/19/2012 # This program is an exact mimic of Coelacanth: a simple password generator. It is a very simple # application for ...
ajibawa-2023/Python-Code-Large/train/row_4932
116
256
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4932:Import_L28_C0", "label": "os import os, sys", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.1094, 0.0039, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4932:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4932:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4932:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4932:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python # Sean Hill # Fall 2012 # CSE 411 # Homework 7 # # Description: Translates the image segmentation code from the following website from C++ to Python: # http://www.cs.brown.edu/~pff/segment/ # # Instructions: The command-line usage is as follows, where "sigma" and "k" and "min" are # algori...
ajibawa-2023/Python-Code-Large/train/row_4933
228
378
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4933:Import_L21_C0", "label": "sys import sys, math, random\u2026", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0026, 0, 0.66, 0.0, 509, 0, 4, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4933:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4933:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4933:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4933:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#! /usr/bin/python from optparse import OptionParser import os.path import sys parser = OptionParser() parser.add_option("-L", "--line", dest="stripLine", action="store_true", default=False, help="strip single-line comments //...\\n") parser.add_option("-C", "--cstyle", dest="s...
ajibawa-2023/Python-Code-Large/train/row_4934
97
130
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4934:ImportFrom_L3_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0231, 0.0077, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4934:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4934:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4934:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4934:For_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4934:For...
#!/opt/ActivePython-2.7/bin/python ##################################################################################################### # Nicholas Harner # CSE411 # Homework 7 # 11/19/2012 # This program is an exact mimic of Coelacanth: a simple password generator. It is a very simple # application for ...
ajibawa-2023/Python-Code-Large/train/row_4935
116
256
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4935:Import_L28_C0", "label": "os import os, sys", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.1094, 0.0039, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4935:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4935:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4935:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4935:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#!/usr/bin/python # Sean Hill # Fall 2012 # CSE 411 # Homework 7 # # Description: Translates the image segmentation code from the following website from C++ to Python: # http://www.cs.brown.edu/~pff/segment/ # # Instructions: The command-line usage is as follows, where "sigma" and "k" and "min" are # algori...
ajibawa-2023/Python-Code-Large/train/row_4936
228
378
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4936:Import_L21_C0", "label": "sys import sys, math, random\u2026", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0026, 0, 0.66, 0.0, 509, 0, 4, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4936:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4936:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4936:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4936:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
#! /usr/bin/python from optparse import OptionParser import os.path import sys parser = OptionParser() parser.add_option("-L", "--line", dest="stripLine", action="store_true", default=False, help="strip single-line comments //...\\n") parser.add_option("-C", "--cstyle", dest="s...
ajibawa-2023/Python-Code-Large/train/row_4937
97
130
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4937:ImportFrom_L3_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0231, 0.0077, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4937:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4937:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4937:If_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4937:For_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4937:For...
#!/opt/ActivePython-2.7/bin/python # Mad Lib # Create a story based on user input from Tkinter import * class Application(Frame): """ GUI application that creates a story based on user input. """ def __init__(self, master): Frame.__init__(self, master) self.grid() self.create_widgets(...
ajibawa-2023/Python-Code-Large/train/row_4942
53
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_4942:ImportFrom_L6_C0", "label": "from Tkinter import *", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0414, 0.0069, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4942:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4942:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4942:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4942:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/opt/ActivePython-2.7/bin/python # labeler.py from Tkinter import * root = Tk() root.title("Labeler") # root.geometry("200x100") app = Frame(root) app.grid() lbl = Label(app, text = "I'm a label!") lbl.grid() root.mainloop()
ajibawa-2023/Python-Code-Large/train/row_4943
8
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_4943:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[]
#!/opt/ActivePython-2.7/bin/python # Mad Lib # Create a story based on user input from Tkinter import * class Application(Frame): """ GUI application that creates a story based on user input. """ def __init__(self, master): Frame.__init__(self, master) self.grid() self.create_widgets(...
ajibawa-2023/Python-Code-Large/train/row_4946
53
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_4946:ImportFrom_L6_C0", "label": "from Tkinter import *", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0414, 0.0069, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4946:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4946:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4946:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4946:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/opt/ActivePython-2.7/bin/python # lazy_buttons.py from Tkinter import * root = Tk() root.title("Lazy Buttons") root.geometry("200x100") app = Frame(root) app.grid() bttn1 = Button(app, text = "I do nothing!") bttn1.grid() bttn2 = Button(app) bttn2.grid() bttn2.configure(text = "Me too!") bttn3 = Button(app) b...
ajibawa-2023/Python-Code-Large/train/row_4948
15
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4948:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.04, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs_cal...
[]
#!/opt/ActivePython-2.7/bin/python # click_counter.py from Tkinter import * class Application(Frame): def __init__(self, master): Frame.__init__(self, master) self.grid() self.bttn_clicks = 0 # number clicks self.create_widget() def create_widget(self): self.bttn =...
ajibawa-2023/Python-Code-Large/train/row_4950
19
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4950:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4950:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4950:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4950:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4950:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/opt/ActivePython-2.7/bin/python # simple_gui.py from Tkinter import * root = Tk() root.title("Simple GUI") root.geometry("200x100") root.mainloop()
ajibawa-2023/Python-Code-Large/train/row_4952
5
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_4952:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.4545, 0.0909, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[]
#!/opt/ActivePython-2.7/bin/python # labeler.py from Tkinter import * root = Tk() root.title("Labeler") # root.geometry("200x100") app = Frame(root) app.grid() lbl = Label(app, text = "I'm a label!") lbl.grid() root.mainloop()
ajibawa-2023/Python-Code-Large/train/row_4954
8
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_4954:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0588, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[]
#!/opt/ActivePython-2.7/bin/python # simple_gui.py from Tkinter import * root = Tk() root.title("Simple GUI") root.geometry("200x100") root.mainloop()
ajibawa-2023/Python-Code-Large/train/row_4956
5
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_4956:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.4545, 0.0909, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[]
#!/opt/ActivePython-2.7/bin/python # lazy_buttons.py from Tkinter import * root = Tk() root.title("Lazy Buttons") root.geometry("200x100") app = Frame(root) app.grid() bttn1 = Button(app, text = "I do nothing!") bttn1.grid() bttn2 = Button(app) bttn2.grid() bttn2.configure(text = "Me too!") bttn3 = Button(app) b...
ajibawa-2023/Python-Code-Large/train/row_4958
15
25
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4958:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.04, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs_cal...
[]
#!/opt/ActivePython-2.7/bin/python # click_counter.py from Tkinter import * class Application(Frame): def __init__(self, master): Frame.__init__(self, master) self.grid() self.bttn_clicks = 0 # number clicks self.create_widget() def create_widget(self): self.bttn =...
ajibawa-2023/Python-Code-Large/train/row_4959
19
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4959:ImportFrom_L5_C0", "label": "from Tkinter import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4959:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4959:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4959:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4959:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
# graphics.py """Simple object oriented graphics library The library is designed to make it very easy for novice programmers to experiment with computer graphics in an object oriented fashion. It is written by John Zelle for use with the book "Python Programming: An Introduction to Computer Science" (Franklin, Beedl...
ajibawa-2023/Python-Code-Large/train/row_4960
511
889
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4960:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 61], "level": 0, "parent": null, "vector": [8, 0, 0.0354, 0.0675, 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_4960:Try_L150_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4960:Import_L151_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4960:Try_L150_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4960:Import_L153_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
''' Created on 2012-10-15 @author: wangxin ''' import sys import os import re import time import md5 import random import thread from sets import Set import socket import traceback from Tkinter import * #record the path #action: # DELETE=0 # INSERT=1 # SUBSTITUTION=2 #...
ajibawa-2023/Python-Code-Large/train/row_4961
276
374
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4961:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.008, 0.0134, 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_4961:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4961:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4961:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4961:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code...
import sys import os import re import time import md5 import random import thread from sets import Set import socket import traceback from Tkinter import * #record the path #action: # DELETE=0 # INSERT=1 # SUBSTITUTION=2 # SAMEVALUE=3 class Path: def __init__(self,...
ajibawa-2023/Python-Code-Large/train/row_4962
250
367
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4962:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0027, 0.0027, 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_4962:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4962:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4962:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4962:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code...