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/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
ajibawa-2023/Python-Code-Large/train/row_4963
51
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4963:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4963:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4963:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4963:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4963:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code...
#!/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_4964
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_4964: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_4964:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4964:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4964:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4964: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_4965
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_4965: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_4965:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4965:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4965:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4965: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_4966
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_4966: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_4966:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4966:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4966:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4966: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_4967
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_4967: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_4967:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4967:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4967:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4967: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_4968
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_4968: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_4968:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4968:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4968:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4968:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/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_4969
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_4969: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_4969:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4969:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4969:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4969: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_4970
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_4970: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_4970:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4970:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4970:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4970: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_4971
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_4971: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_4971:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4971:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4971:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4971: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_4972
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_4972: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_4972:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4972:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4972:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4972: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_4973
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_4973: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_4973:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4973:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4973:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4973:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python from distutils.core import setup from crawle import VERSION setup(name='CRAWL-E', version=VERSION, description='Highly distributed web crawling framework', author='Bryce Boe', author_email='bboe (_at_) cs.ucsb.edu', url='http://code.google.com/p/crawl-e', py_mo...
ajibawa-2023/Python-Code-Large/train/row_4976
3
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4976:ImportFrom_L2_C0", "label": "from distutils.core import setup", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.0833, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
print("输入:") year=int(input()) print(year) for i in range(1,100): if (year%400==0 or (year%4==0 and year%100!=0)): print('year') else: print("平年!")
ajibawa-2023/Python-Code-Large/train/row_4978
7
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_4978:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0909, 0.0909, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4978:For_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4978:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4978:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4978:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4978:If_L7_C...
#!/usr/bin/python # Filename: using_file.py import re i=1000 poem="" f = open('poem.txt', 'w') # open for 'w'riting while i>0: poem=poem+"B" i=i-1 f.write(poem) # write text to file f.close() # close the file
ajibawa-2023/Python-Code-Large/train/row_4979
9
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_4979:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0833, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_4979:While_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4979:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4979:While_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4979:Assign_L10_C4"}]
bigFile= open("big.txt", 'w') bigFile.seek(28132) #大小自己定,需要几个G, fileSize就是几,速度绝对快 bigFile.write('\x00') bigFile.close()
ajibawa-2023/Python-Code-Large/train/row_4981
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_4981:Assign_L1_C0", "label": "bigFile = open()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 846, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "bigFile", "arg_names": [], "import_names": [], "rhs_c...
[]
import os def DirFile(rootDir): list_dirs = os.walk(rootDir) for root,dirs,files in list_dirs: for d in dirs: print (os.path.join(root,d)) for f in files: print (os.path.join(root,f)) DirFile('c:')
ajibawa-2023/Python-Code-Large/train/row_4982
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_4982:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 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_4982:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4982:Assign_L3_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4982:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4982:For_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
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_4983
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_4983: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_4984
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_4984: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_4985
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_4985: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_4986
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_4986: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_4987
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_4987: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_4988
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_4988: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_4989
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_4989: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_4990
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_4990: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_4991
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_4991: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_4992
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_4992: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_4993
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_4993: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_4994
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_4994: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_4995
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_4995: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_4996
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_4996: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_4997
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_4997: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_4998
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_4998: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_4998:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4998:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4998:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4998: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_4999
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_4999: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_5000
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_5000: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_5001
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_5001: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_5002
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_5002: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_5002:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5002:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5002:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5002: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_5003
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_5003: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_5004
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_5004: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_5004:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5004:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5004:If_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5004:Return_L4_C13"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
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_5005
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_5005: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_5005:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5005: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_5006
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_5006: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_5006:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5006: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_5007
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_5007: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_5008
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_5008: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_5009
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_5009: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_5009:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5009:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5009:For_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5009:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5009...
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_5010
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_5010: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_5011
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_5011: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/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
ajibawa-2023/Python-Code-Large/train/row_5012
51
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5012:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5012:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5012:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5012:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5012:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-Code...
#print 'Content-Type: application/xml' #print '' # #f = open( 'voter-info-gadget.xml', 'r' ) #xml = f.read() #f.close() # #print xml #import re #from pprint import pformat, pprint from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app #def dumpRequest( req ):...
ajibawa-2023/Python-Code-Large/train/row_5013
17
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5013:ImportFrom_L13_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.2549, 0.0196, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5013:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5013:FunctionDef_L32_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5013:FunctionDef_L32_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5013:Assign_L33_C2"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python import math # z() and zz() are a quick and dirty hack to deal with the Aleutian Islands. # We should use a more correct algorithm for extendBounds like the one # in the Maps API, but this is good enough to fix the immediate problem. def z( n ): if n > 0.0: return n - 360.0 return n def zz( ...
ajibawa-2023/Python-Code-Large/train/row_5014
63
103
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5014:Import_L3_C0", "label": "math import math", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0291, 0.0097, 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_5014:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5014:If_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5014:If_L9_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5014:Return_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
#!/usr/bin/env python array = [ { 'abbr': 'AL', 'name': 'Alabama', 'parties': { 'dem': { 'date': '02-05' }, 'gop': { 'date': '02-05' } } }, { 'abbr': 'AK', 'name': 'Alaska', 'parties': { 'dem': { 'date': '02-05', 'type': 'caucus' }, 'gop': { 'date': '02-05', 'type': 'caucus' } } }, { ...
ajibawa-2023/Python-Code-Large/train/row_5015
7
435
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5015:Assign_L3_C0", "label": "array =", "type": "assigned_variable", "loc": [3, 427], "level": 0, "parent": null, "vector": [14, 0, 0.4943, 0.977, 0, 0.66, 0.0, 80, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "array", "arg_names": [], "import_names": [], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5015:For_L430_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5015:Assign_L431_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5015:For_L434_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5015:Assign_L435_C1"}]
#!/usr/bin/env python # shpUtils.py # Original version by Zachary Forest Johnson # http://indiemaps.com/blog/index.php/code/pyShapefile.txt # This version modified by Michael Geary from struct import unpack import dbfUtils XY_POINT_RECORD_LENGTH = 16 db = [] def loadShapefile( filename ): # open dbf file and get fe...
ajibawa-2023/Python-Code-Large/train/row_5016
140
190
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5016:ImportFrom_L8_C0", "label": "from struct import unpack", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0421, 0.0053, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["unpac...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5016:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5016:Assign_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5016:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5016:Assign_L17_C1"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python # makepolys.py import codecs import json import math import os import random import re import shutil import stat import sys import time from geo import Geo import shpUtils import states #states = json.load( open('states.json') ) jsonpath = 'json' shapespath = 'shapefiles' geo = Geo() keysep ...
ajibawa-2023/Python-Code-Large/train/row_5017
116
249
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5017:Import_L5_C0", "label": "codecs import codecs", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.004, 0, 0.66, 0.0, 220, 0, 1, 0, 0, 220, 0, 0], "semantic": {"name": "codecs", "arg_names": [], "import_names": ["codecs"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5017:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5017:Expr_L48_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5017:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5017:Assign_L49_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python # dbfUtils.py # By Raymond Hettinger # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715 import struct, datetime, decimal, itertools def dbfreader(f): """Returns an iterator over records in a Xbase DBF file. The first row returned contains the field names. The second row contai...
ajibawa-2023/Python-Code-Large/train/row_5018
64
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5018:Import_L7_C0", "label": "struct import struct, datetime, decimal\u2026", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0084, 0, 0.66, 0.0, 399, 0, 4, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5018:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5018:Expr_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5018:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5018:Assign_L23_C1"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/env python # get-strings.py # By Michael Geary - http://mg.to/ # See UNLICENSE or http://unlicense.org/ for public domain notice. # Reads the JSON feed for a Google Docs spreadsheet containing the # localized strings for the Google Election Center gadget, then writes # the strings for each language into a ...
ajibawa-2023/Python-Code-Large/train/row_5019
18
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5019:Import_L20_C0", "label": "json import json, re, urllib2", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.4878, 0.0244, 0, 0.66, 0.0, 463, 0, 3, 0, 0, 463, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": ["json...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5019:For_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5019:Assign_L29_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5019:For_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5019:For_L30_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5019...
#!/usr/bin/env python # coding: utf-8 # make-hi.py - special HI processing for 2010 # Copyright (c) 2010 Michael Geary - http://mg.to/ # Use under either the MIT or GPL license # http://www.opensource.org/licenses/mit-license.php # http://www.opensource.org/licenses/gpl-2.0.php import re def convert( input, output )...
ajibawa-2023/Python-Code-Large/train/row_5020
22
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5020:Import_L10_C0", "label": "re import re", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0294, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5020:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5020:Expr_L13_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5020:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5020:Assign_L14_C1"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python import codecs import re import jinja2 import markdown def process_slides(): with codecs.open('../../presentation-output.html', 'w', encoding='utf8') as outfile: md = codecs.open('slides.md', encoding='utf8').read() md_slides = md.split('\n---\n') print 'Compiled %s slides.' % len(m...
ajibawa-2023/Python-Code-Large/train/row_5021
41
57
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5021:Import_L3_C0", "label": "codecs import codecs", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0175, 0, 0.66, 0.0, 220, 0, 1, 0, 0, 220, 0, 0], "semantic": {"name": "codecs", "arg_names": [], "import_names": ["codecs"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5021:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5021:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5021:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5021:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. ## ## Use of this source code is governed by a BSD-style license ## that can be found in the LICENSE file in the root of the source ## tree. An additional intellectual property rights grant can be found ## in the file PATENT...
ajibawa-2023/Python-Code-Large/train/row_5022
76
127
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5022:Expr_L10_C0", "label": "expression", "type": "expression", "loc": [10, 10], "level": 0, "parent": null, "vector": [8, 0, 0.0787, 0.0079, 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_5022:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5022:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5022:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5022:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/env python ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. ## ## Use of this source code is governed by a BSD-style license ## that can be found in the LICENSE file in the root of the source ## tree. An additional intellectual property rights grant can be found ## in the file PATENT...
ajibawa-2023/Python-Code-Large/train/row_5023
25
70
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5023:Expr_L10_C0", "label": "expression", "type": "expression", "loc": [10, 30], "level": 0, "parent": null, "vector": [8, 0, 0.2857, 0.3, 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_5023:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5023:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5023:If_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5023:Return_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/env python ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. ## ## Use of this source code is governed by a BSD-style license ## that can be found in the LICENSE file in the root of the source ## tree. An additional intellectual property rights grant can be found ## in the file PATENT...
ajibawa-2023/Python-Code-Large/train/row_5025
41
76
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5025:Expr_L10_C0", "label": "expression", "type": "expression", "loc": [10, 15], "level": 0, "parent": null, "vector": [8, 0, 0.1645, 0.0789, 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_5025:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5025:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5025:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5025:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
""" * Copyright (c) 2012 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributi...
ajibawa-2023/Python-Code-Large/train/row_5027
43
106
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5027:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0472, 0.0849, 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_5027:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5027:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5027:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5027:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-L...
import csv, os, glob import sys import numpy class affycel: def _int_(self, filename, version, header, intensityCells, intensity, maskscells, masks, outlierCells, outliers, modifiedCells, modified): self.filename = filename self.version = version self.header = {} self.intensityCel...
ajibawa-2023/Python-Code-Large/train/row_5029
114
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5029:Import_L2_C0", "label": "csv import csv, os, glob", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.014, 0.007, 0, 0.66, 0.0, 312, 0, 3, 0, 0, 312, 0, 0], "semantic": {"name": "csv", "arg_names": [], "import_names": ["csv", "os", "gl...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5029:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5029:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5029:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5029:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import web import json from base import Base class XTask(Base): def GET(self): results = self.db.query("SELECT * FROM Pet") return self.query_serializer(results)
ajibawa-2023/Python-Code-Large/train/row_5030
7
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5030:Import_L1_C0", "label": "web import web", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 183, 0, 1, 0, 0, 183, 0, 0], "semantic": {"name": "web", "arg_names": [], "import_names": ["web"], "rhs_call_name": "", "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5030:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5030:FunctionDef_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5030:FunctionDef_L8_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5030:Assign_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
import web import json from datetime import datetime #thanks: http://stackoverflow.com/questions/11875770/how-to-overcome-datetime-datetime-not-json-serializable-in-python class DateTimeEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return obj.isoformat() return json.JSONEncod...
ajibawa-2023/Python-Code-Large/train/row_5031
15
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_5031:Import_L1_C0", "label": "web import web", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 183, 0, 1, 0, 0, 183, 0, 0], "semantic": {"name": "web", "arg_names": [], "import_names": ["web"], "rhs_call_name": "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5031:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5031:FunctionDef_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5031:FunctionDef_L7_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5031:If_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import web import time from base import Base class AddPet(Base): def POST(self): input = web.input() input["age"] = int(input["age"]) print(input) input = dict(input) results = self.db.query("INSERT into Pet(Shelter_Name, Age, Gender, Pet_Name) values ($shelter_name, $age, $gender, $pet_name)", vars=in...
ajibawa-2023/Python-Code-Large/train/row_5032
11
17
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5032:Import_L1_C0", "label": "web import web", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 183, 0, 1, 0, 0, 183, 0, 0], "semantic": {"name": "web", "arg_names": [], "import_names": ["web"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5032:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5032:FunctionDef_L7_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5032:FunctionDef_L7_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5032:Assign_L8_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
import web from addpet import AddPet from xtask import XTask urls = ( '/addpet', 'AddPet', '/xtask', 'XTask' #sample task ) app = web.application(urls, globals()) if __name__ == "__main__": app.run()
ajibawa-2023/Python-Code-Large/train/row_5033
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_5033:Import_L1_C0", "label": "web import web", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0769, 0, 0.66, 0.0, 183, 0, 1, 0, 0, 183, 0, 0], "semantic": {"name": "web", "arg_names": [], "import_names": ["web"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5033:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5033:Expr_L13_C4"}]
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_5034
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_5034: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_5035
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_5035: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_5036
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_5036: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_5037
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_5037: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_5038
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_5038: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_5039
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_5039: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_5040
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_5040: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_5041
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_5041: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_5042
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_5042: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_5043
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_5043: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_5044
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_5044: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_5045
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_5045: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_5046
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_5046: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_5047
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_5047: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_5048
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_5048: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_5049
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_5049: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_5049:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5049:Assign_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5049:While_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5049: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_5050
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_5050: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_5051
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_5051: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_5052
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_5052: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_5053
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_5053: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_5053:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5053:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5053:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5053: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_5054
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_5054: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_5055
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_5055: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_5055:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5055:If_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5055:If_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5055:Return_L4_C13"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5...
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_5056
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_5056: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_5056:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5056: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_5057
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_5057: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_5057:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5057: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_5058
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_5058: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_5059
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_5059: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_5060
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_5060: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_5060:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5060:For_L4_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5060:For_L4_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5060:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5060...
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_5061
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_5061: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_5062
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_5062: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...
[]
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
ajibawa-2023/Python-Code-Large/train/row_5063
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5063:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5063:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5063:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5063:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5063:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
ajibawa-2023/Python-Code-Large/train/row_5064
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5064:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5064:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5064:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5064:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5064:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_5065
8
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5065:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5065:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5065:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5065:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5065:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
ajibawa-2023/Python-Code-Large/train/row_5066
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5066:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5066:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5066:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5066:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_5066:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
ajibawa-2023/Python-Code-Large/train/row_5067
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5067:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5067:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5067:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5067:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5067:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
ajibawa-2023/Python-Code-Large/train/row_5068
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5068:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5068:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5068:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5068:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5068:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
import os, re, sys, urllib from time import sleep from shutil import move # Disable traceback sys.tracebacklimit = 0 # Global for finding images htmldl = '<a href="//images.4chan.org/' htmlboardfind = '[<a href="res/[0-9]+" class="replylink">Reply</a>]' # Dynamic Print Function def dynamic_print(msg): sys.stdou...
ajibawa-2023/Python-Code-Large/train/row_5069
130
184
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_5069:Import_L1_C0", "label": "os import os, re, sys\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0054, 0.0054, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "re", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_5069:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5069:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5069:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5069:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large...