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 |
|---|---|---|---|---|---|---|---|
"""
Django settings for final_project project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, .... | ajibawa-2023/Python-Code-Large/train/row_96947 | 20 | 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_96947:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0521, 0.0938, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
__author__ = 'esraa'
from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
class MyRegistrationForm(UserCreationForm):
email = forms.EmailField(required=True)
class Meta:
model = User
fields = ('username','email','password1'... | ajibawa-2023/Python-Code-Large/train/row_96948 | 15 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96948:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.05, 0.05, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96948:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96948:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96948:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96948:ClassDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'final_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^sear... | ajibawa-2023/Python-Code-Large/train/row_96949 | 4 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96949:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns, include, url", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 528, 0, 3, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "ar... | [] |
"""
WSGI config for final_project project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "final_project.settings")
from d... | ajibawa-2023/Python-Code-Large/train/row_96950 | 5 | 14 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96950:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.3214, 0.5714, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
from django.shortcuts import render_to_response
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.contrib import auth
from django.core.context_processors import csrf
#from forms import MyRegistrationForm
from django.contrib.auth.forms import UserCreationForm
def index(reque... | ajibawa-2023/Python-Code-Large/train/row_96951 | 40 | 82 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96951:ImportFrom_L1_C0", "label": "from django.shortcuts import render_to_response", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0122, 0.0122, 0, 0.66, 0.0, 852, 0, 1, 0, 0, 852, 0, 0], "semantic": {"name": "django.shortcuts", "arg_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96951:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96951:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96951:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96951:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "final_project.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| ajibawa-2023/Python-Code-Large/train/row_96952 | 6 | 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_96952:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96952:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96952:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96952:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96952:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "final_project.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| ajibawa-2023/Python-Code-Large/train/row_96953 | 6 | 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_96953:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.1, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96953:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96953:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96953:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96953:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | ajibawa-2023/Python-Code-Large/train/row_96954 | 38 | 74 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96954:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96954:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96954:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96954:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96954:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/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_96955 | 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_96955: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_96955:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96955:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96955:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96955:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-... |
# San Angeles Observation
# Original C version Copyright 2004-2005 Jetro Lauha
# Web: http://iki.fi/jetro/
#
# BSD-license.
#
# Javascript version by Ken Waters
# Skulpt (Python) version by Scott Graham
import webgl
ShapeParams = [
# m a b n1 n2 n3 m a b n1 n2 n3 res1... | ajibawa-2023/Python-Code-Large/train/row_96956 | 270 | 500 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96956:Import_L10_C0", "label": "webgl import webgl", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.002, 0, 0.66, 0.0, 201, 0, 1, 0, 0, 201, 0, 0], "semantic": {"name": "webgl", "arg_names": [], "import_names": ["webgl"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96956:ClassDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96956:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96956:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96956:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-... |
# JSLint doesn't allow/support disabling the requirement for braces around
# blocks, and that's one uglification I refuse to perform in the service of a
# lint.
#
# There are of course lots of other intelligent things JSLint has to say
# because it's just too easy in JS to do something that (e.g.) IE won't like.
# So, ... | ajibawa-2023/Python-Code-Large/train/row_96957 | 42 | 77 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96957:ImportFrom_L14_C0", "label": "from subprocess import Popen, PIPE", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.013, 0, 0.66, 0.0, 394, 0, 2, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96957:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96957:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96957:If_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96957:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
# Pgen imports
import grammar, token, tokenize
class PgenGrammar(grammar.Grammar):
pass
class ParserGenerator(object):
def __init__(self, filename, stream=None):
close_stream = None
... | ajibawa-2023/Python-Code-Large/train/row_96958 | 273 | 384 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96958:Import_L5_C0", "label": "grammar import grammar, token, tokenize", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.0026, 0, 0.66, 0.0, 260, 0, 3, 0, 0, 260, 0, 0], "semantic": {"name": "grammar", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96958:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96958:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96958:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96958:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/env python
"""Token constants (from "token.h")."""
# Taken from Python (r53757) and modified to include some tokens
# originally monkeypatched in by pgen2.tokenize
#--start constants--
ENDMARKER = 0
NAME = 1
NUMBER = 2
STRING = 3
NEWLINE = 4
INDENT = 5
DEDENT = 6
LPAR = 7
RPAR = 8
LSQB = 9
RSQB = 10
C... | ajibawa-2023/Python-Code-Large/train/row_96959 | 69 | 82 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96959:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0366, 0.0122, 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_96959:For_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96959:If_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96959:If_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96959:Assign_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96... |
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.
# All rights reserved.
"""Tokenization help for Python programs.
generate_tokens(readline) is a generator that breaks a stream of
text into Python tokens. It accepts a readline-like method which is called
repeatedly to get the next line o... | ajibawa-2023/Python-Code-Large/train/row_96960 | 256 | 477 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96960:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 26], "level": 0, "parent": null, "vector": [8, 0, 0.0314, 0.0482, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96960:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96960:Return_L41_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96960:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96960:Return_L42_C19"}, {"f": "ajibawa-2023/Python-... |
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""This module defines the data structures used to represent a grammar.
These are a bit arcane because they are derived from the data
structures used by Python's 'pgen' parser generator.
There's also ... | ajibawa-2023/Python-Code-Large/train/row_96961 | 49 | 202 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96961:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 13], "level": 0, "parent": null, "vector": [8, 0, 0.0421, 0.0495, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96961:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96961:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96961:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96961:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#! /usr/bin/env python
"""Generate JS code from an ASDL description."""
# TO DO
# handle fields that have a type but no name
import os, sys
import asdl
TABSIZE = 4
MAX_COL = 80
def get_c_type(name):
"""Return a string for the C name of the type.
This function special cases the default types provided by as... | ajibawa-2023/Python-Code-Large/train/row_96963 | 251 | 391 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96963:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0051, 0.0026, 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_96963:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96963:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96963:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96963:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
s = """Gur Mra bs Clguba, ol Gvz Crgref
Ornhgvshy vf orggre guna htyl.
Rkcyvpvg vf orggre guna vzcyvpvg.
Fvzcyr vf orggre guna pbzcyrk.
Pbzcyrk vf orggre guna pbzcyvpngrq.
Syng vf orggre guna arfgrq.
Fcnefr vf orggre guna qrafr.
Ernqnovyvgl pbhagf.
Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf.
Nygubhtu cenpg... | ajibawa-2023/Python-Code-Large/train/row_96965 | 6 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96965:Assign_L1_C0", "label": "s =", "type": "assigned_variable", "loc": [1, 21], "level": 0, "parent": null, "vector": [14, 0, 0.3929, 0.75, 0, 0.66, 0.0, 553, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96965:For_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96965:For_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96965:For_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96965:Assign_L26_C8"}] |
__author__ = 'bmiller'
def testEqual(actual, expected):
if type(expected) == type(1):
if actual == expected:
print('Pass')
return True
elif type(expected) == type(1.11):
if abs(actual-expected) < 0.00001:
print('Pass')
return True
else:
... | ajibawa-2023/Python-Code-Large/train/row_96967 | 16 | 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_96967:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96967:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96967:If_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96967:If_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96967:If_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96... |
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import os
from django.utils import simplejson
from google.appengine.ext import db
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/html'
path = os.pat... | ajibawa-2023/Python-Code-Large/train/row_96968 | 46 | 61 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96968:ImportFrom_L1_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0164, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96968:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96968:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96968:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96968:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
import sys
import webgl
import webgl.primitives
import webgl.models
import webgl.matrix4 as m4
def main():
print "Starting up..."
gl = webgl.Context("canvas")
sh = webgl.Shader(gl, VertexShader, FragmentShader)
sh.use()
m = webgl.models.Model(sh, webgl.primitives.createCube(1), [])
eyePos... | ajibawa-2023/Python-Code-Large/train/row_96969 | 43 | 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_96969:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0118, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96969:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96969:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96969:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96969:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""
quick hack script to convert from quake2 .bsp to simple format to draw. drops
most information. keeps only raw polys and lightmaps.
makes .blv and .llv file (big and little endian level)
file format is
'BLV1' or 'LLV1'
int texwidth
int texheight
int numtris
float startx, starty, s... | ajibawa-2023/Python-Code-Large/train/row_96971 | 116 | 214 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96971:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0724, 0.1402, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96971:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96971:Return_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96971:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96971:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code... |
import goog.graphics as gfx
import goog.dom as dom
def main():
g = gfx.createSimpleGraphics(600, 200)
print g
fill = gfx.SolidFill('yellow')
stroke = gfx.Stroke(2, 'green')
g.drawRect(30, 10, 100, 80, stroke, fill)
stroke = gfx.Stroke(4, 'green')
g.drawImage(30, 110, 276, 110, 'http://www... | ajibawa-2023/Python-Code-Large/train/row_96972 | 28 | 39 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96972:Import_L1_C0", "label": "goog.graphics import gfx", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 78, 0, 1, 0, 0, 78, 0, 0], "semantic": {"name": "goog.graphics", "arg_names": [], "import_names": ["gfx"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96972:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96972:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96972:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96972:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
def f():
n = "OK"
print n
f()
| ajibawa-2023/Python-Code-Large/train/row_96973 | 4 | 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_96973:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 4], "level": 0, "parent": null, "vector": [2, 0, 0.4167, 0.6667, 0, 0.66, 0.0, 899, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96973:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96973:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96973:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96973:Expr_L4_C4"}] |
print '0"1'
print '2\'3'
print "4'5"
print "6\"7"
print '''8'9"0'''
| ajibawa-2023/Python-Code-Large/train/row_96974 | 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_96974:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.2, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
y = 1
| ajibawa-2023/Python-Code-Large/train/row_96975 | 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_96975:Assign_L1_C0", "label": "y =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 304, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "y", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
print x+2*3
| ajibawa-2023/Python-Code-Large/train/row_96976 | 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_96976:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
print 4-1
| ajibawa-2023/Python-Code-Large/train/row_96977 | 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_96977:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
class Stuff:
def __init__(self):
self.a = 0
self.b = 'b'
self.c = [1,2,3]
self.d = 100000000000000
s = Stuff()
s.a += 10
s.b += 'dog'
s.c += [9,10]
s.d += 10000
print s.a
print s.b
print s.c
print s.d
| ajibawa-2023/Python-Code-Large/train/row_96978 | 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_96978:ClassDef_L1_C0", "label": "Stuff", "type": "class", "loc": [1, 6], "level": 0, "parent": null, "vector": [3, 0, 0.2059, 0.3529, 0, 0.66, 0.0, 710, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "Stuff", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96978:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96978:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96978:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96978:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code... |
print [] or 5
| ajibawa-2023/Python-Code-Large/train/row_96979 | 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_96979:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
def f(n):
i = 0
while i < n:
yield i
i = 100
yield i
i += 1
for i in f(50):
print i
| ajibawa-2023/Python-Code-Large/train/row_96980 | 8 | 10 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96980:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 7], "level": 0, "parent": null, "vector": [2, 0, 0.4, 0.7, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": ["n"], "import_names": [], "rhs_call_name": "", "annotation"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96980:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96980:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96980:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96980:While_L3_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
def f(iter):
for v in iter:
print v
f(x*y for x in range(10) for y in range(x))
| ajibawa-2023/Python-Code-Large/train/row_96981 | 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_96981:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.75, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": ["iter"], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96981:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96981:For_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96981:For_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96981:Expr_L3_C8"}] |
X = "OK"
def test():
X = 4
print(X)
test()
print X
| ajibawa-2023/Python-Code-Large/train/row_96982 | 6 | 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_96982:Assign_L1_C0", "label": "X =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 783, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96982:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96982:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96982:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96982:Expr_L4_C4"}] |
def f():
y = 0
while y == 0:
y += 1
yield y
for i in f():
print i
| ajibawa-2023/Python-Code-Large/train/row_96983 | 6 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96983:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 5], "level": 0, "parent": null, "vector": [2, 0, 0.375, 0.625, 0, 0.66, 0.0, 899, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96983:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96983:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96983:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96983:While_L3_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
class X: pass
x = X()
methodName = "wee"
try:
stuff = getattr(x, methodName)
except AttributeError:
raise ValueError, "no such method in %s: %s" % (x.__class__, methodName)
| ajibawa-2023/Python-Code-Large/train/row_96984 | 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_96984:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 1.0, 1.0, 0, 0.66, 0.0, 783, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "s... | [] |
import pkga.pkgb.modc as c_me
print c_me.stuff
print c_me.things
| ajibawa-2023/Python-Code-Large/train/row_96985 | 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_96985:Import_L1_C0", "label": "pkga.pkgb.modc import c_me", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 812, 0, 1, 0, 0, 812, 0, 0], "semantic": {"name": "pkga.pkgb.modc", "arg_names": [], "import_names": ["c_m... | [] |
print(int)
print(str(int))
print(repr(int))
class X:
pass
x = X()
print(str(x))
print(repr(x))
print(str(x.__class__))
print(repr(x.__class__))
print(str(X))
print(repr(X))
| ajibawa-2023/Python-Code-Large/train/row_96986 | 11 | 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_96986:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print",... | [] |
def test():
def fnc():
print "OK"
print fnc()
test()
| ajibawa-2023/Python-Code-Large/train/row_96987 | 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_96987:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 4], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.8, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96987:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96987:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96987:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_96987:Expr_L3_C8"}, {"f": "ajibawa-2023/Python-Cod... |
z = 0
for x in [1,2,3]:
z += x
print z
| ajibawa-2023/Python-Code-Large/train/row_96988 | 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_96988:Assign_L1_C0", "label": "z =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 859, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "z", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
a = (1,2,3)
b = ('a', 'b', 'c')
for x in a+b:
print x
print "a:",a
print "b:",b
| ajibawa-2023/Python-Code-Large/train/row_96989 | 6 | 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_96989:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96989:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96989:Expr_L4_C4"}] |
import this
| ajibawa-2023/Python-Code-Large/train/row_96991 | 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_96991:Import_L1_C0", "label": "this import this", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 324, 0, 1, 0, 0, 324, 0, 0], "semantic": {"name": "this", "arg_names": [], "import_names": ["this"], "rhs_call_name": ... | [] |
v = [3,2,1]
v.sort()
print v[0]
| ajibawa-2023/Python-Code-Large/train/row_96992 | 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_96992:Assign_L1_C0", "label": "v =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 553, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "v", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
wee = lambda waa, woo=False, wii=True: ("OK", waa, woo, wii)
print wee("stuff")
print wee("stuff", "dog")
print wee("stuff", "dog", "cat")
print wee("stuff", wii="lamma")
print wee(wii="lamma", waa="pocky")
print wee(wii="lamma", waa="pocky", woo="blorp")
| ajibawa-2023/Python-Code-Large/train/row_96993 | 7 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96993:Assign_L1_C0", "label": "wee =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.125, 0.125, 0, 0.66, 0.0, 48, 9, 0, 0, 0, 0, 0, 0], "semantic": {"name": "wee", "arg_names": [], "import_names": [], "rhs_call_name": "", "... | [] |
def f(n):
i = 0
while i < n:
yield i
yield i * 10
i += 1
for i in f(10):
print i
| ajibawa-2023/Python-Code-Large/train/row_96994 | 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_96994:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 6], "level": 0, "parent": null, "vector": [2, 0, 0.3889, 0.6667, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": ["n"], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96994:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96994:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96994:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96994:While_L3_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
def f(*a):
print a
def g(x, *a):
print x, a
def h(x, y, *a):
print x, y, a
def i(x, y=4, *a):
print x, y, a
f()
f(1)
f(1, 2, 3)
g(1)
g(1, 2, 3)
h(1, 2)
h(1, 2, 3)
h(1, 2, 3, 4)
i(1)
i(1, 2, 3)
i(1, 2, 3, 4)
| ajibawa-2023/Python-Code-Large/train/row_96995 | 19 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_96995:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.0652, 0.087, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": ["a"], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96995:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96995:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96995:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96995:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
a = [1,2,3,4,5,6]
b = [9,9,9]
a[1:5] = b
print a
| ajibawa-2023/Python-Code-Large/train/row_96996 | 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_96996:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
def stuff(n):
print not n
for x in range(-5, 5):
stuff(x)
| ajibawa-2023/Python-Code-Large/train/row_96997 | 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_96997:FunctionDef_L1_C0", "label": "stuff", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.3, 0.4, 0, 0.66, 0.0, 686, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "stuff", "arg_names": ["n"], "import_names": [], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96997:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96997:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_96997:For_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96997:Expr_L5_C4"}] |
print False == 0
print True == 1
print True == 2
| ajibawa-2023/Python-Code-Large/train/row_96998 | 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_96998:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print",... | [] |
a = (1 for x in range(3))
print a
for i in a:
print i
| ajibawa-2023/Python-Code-Large/train/row_96999 | 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_96999:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 475, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_96999:For_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_96999:Expr_L4_C4"}] |
d = {}
d["__proto__"]="testing"
print d
| ajibawa-2023/Python-Code-Large/train/row_97000 | 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_97000:Assign_L1_C0", "label": "d =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 355, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "d", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
# Test the creation of sets
l = [1,2,3,4,1,1]
print l
s = set(l)
print s
print len(s)
| ajibawa-2023/Python-Code-Large/train/row_97001 | 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_97001:Assign_L2_C0", "label": "l =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.1667, 0, 0.66, 0.0, 810, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
print str(range(-4))[:5]
print len(range(-4))
| ajibawa-2023/Python-Code-Large/train/row_97002 | 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_97002:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.5, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
var1 = "foo"
if isinstance(var1, str):
print "var1 is a string"
| ajibawa-2023/Python-Code-Large/train/row_97003 | 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_97003:Assign_L1_C0", "label": "var1 =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 897, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "var1", "arg_names": [], "import_names": [], "rhs_call_name": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97003:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97003:Expr_L3_C4"}] |
def test(a,b):
return a+b
print test(1,1)+test(1,1)
| ajibawa-2023/Python-Code-Large/train/row_97004 | 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_97004:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.6667, 0, 0.66, 0.0, 224, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "test", "arg_names": ["a", "b"], "import_names": [], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97004:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97004:Return_L2_C4"}] |
a,b = 1,2
print a+b
| ajibawa-2023/Python-Code-Large/train/row_97005 | 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_97005:Assign_L1_C0", "label": "a, b =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 127, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "a, b", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
a = [100,101,102,103,104,105,106,107]
del a[2:6]
print a
| ajibawa-2023/Python-Code-Large/train/row_97006 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97006:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
x = [0]*10
for i in range(10):
x[i] += i
x[i] += i*2
print x
| ajibawa-2023/Python-Code-Large/train/row_97007 | 3 | 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_97007:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.1429, 0, 0.66, 0.0, 190, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
s = set([2,3,4])
t = set([3,4,5])
u = set([1,3,5])
a = s.difference(t)
b = u.difference(s)
c = u.difference(t)
print a
print b
print c
print a == set([2])
print b == set([1,5])
print c == set([1])
d = s.difference(t, u)
print d
print d == set([2])
| ajibawa-2023/Python-Code-Large/train/row_97008 | 15 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97008:Assign_L1_C0", "label": "s = set()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.05, 0.05, 0, 0.66, 0.0, 553, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "s... | [] |
print "%s:%r:%d:%x" % ("dog", "cat", 23456, 999999999999L)
| ajibawa-2023/Python-Code-Large/train/row_97009 | 0 | 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"] | [] | [] |
x=1
if x == 1:
print "yes"
| ajibawa-2023/Python-Code-Large/train/row_97010 | 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_97010:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97010:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97010:Expr_L3_C4"}] |
print 'Hello';
print "stuff"; print "things"
| ajibawa-2023/Python-Code-Large/train/row_97011 | 0 | 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"] | [] | [] |
for i in (i*2 for i in range(3)):
print i
| ajibawa-2023/Python-Code-Large/train/row_97012 | 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_97012:For_L1_C0", "label": "for i", "type": "for", "loc": [1, 2], "level": 0, "parent": null, "vector": [6, 0, 0.75, 1.0, 0, 0.66, 0.0, 826, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sni... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97012:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97012:Expr_L2_C4"}] |
print len("\\0")
| ajibawa-2023/Python-Code-Large/train/row_97013 | 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_97013:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
x = []
x.append(x)
print x<x
| ajibawa-2023/Python-Code-Large/train/row_97014 | 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_97014:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
print str((1,2,3))
print str([1,2,3])
print str({1:'ok', 2:'stuff'})
print str("weewaa")
| ajibawa-2023/Python-Code-Large/train/row_97015 | 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_97015:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.25, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "an... | [] |
a = range(30)
print a[-10::5]
print a[-10::-6]
a = tuple(range(30))
print a[-10::5]
print a[-10::-6]
| ajibawa-2023/Python-Code-Large/train/row_97016 | 6 | 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_97016:Assign_L1_C0", "label": "a = range()", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 475, 3, 1, 0, 0, 816, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_na... | [] |
print {1:'stuff', 'ok':4}
| ajibawa-2023/Python-Code-Large/train/row_97017 | 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_97017:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
def f(a, b, **c):
sortc = [(x,y) for x,y in c.items()]
sortc.sort()
print a, b, sortc
f(1, 2, d=4, e=5)
f(1, b=4, e=5)
f(a=1, b=4, e=5, f=6, g=7)
| ajibawa-2023/Python-Code-Large/train/row_97018 | 7 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97018:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 4], "level": 0, "parent": null, "vector": [2, 0, 0.3125, 0.5, 0, 0.66, 0.0, 899, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "f", "arg_names": ["a", "b", "c"], "import_names": [], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97018:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97018:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97018:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97018:Expr_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
a,b = "OK"
print a+b
| ajibawa-2023/Python-Code-Large/train/row_97019 | 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_97019:Assign_L1_C0", "label": "a, b =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 127, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "a, b", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
print " hello ".partition("x")
print " hello ".rpartition("x")
| ajibawa-2023/Python-Code-Large/train/row_97020 | 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_97020:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.5, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
print "".join(["O"]+["K"])
| ajibawa-2023/Python-Code-Large/train/row_97021 | 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_97021:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
print slice(1)
| ajibawa-2023/Python-Code-Large/train/row_97022 | 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_97022:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
print len([1,2,3])
| ajibawa-2023/Python-Code-Large/train/row_97023 | 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_97023:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
x = [v*v for v in range(0,5)]
print x[3]
| ajibawa-2023/Python-Code-Large/train/row_97024 | 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_97024:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.5, 0, 0.66, 0.0, 190, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
class X: pass
print type(X)
x = X()
print type(x)
print x
class Y(object): pass
print type(Y)
y = Y()
print type(y)
print y
| ajibawa-2023/Python-Code-Large/train/row_97025 | 10 | 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_97025:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 1], "level": 0, "parent": null, "vector": [3, 0, 0.1, 0.1, 0, 0.66, 0.0, 783, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "s... | [] |
print "a"*15
print "dog"*19
print 40*"weee"
| ajibawa-2023/Python-Code-Large/train/row_97026 | 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_97026:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print",... | [] |
def wee(waa, woo=True, wii=False):
print waa, woo, wii
wee("OK")
| ajibawa-2023/Python-Code-Large/train/row_97027 | 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_97027:FunctionDef_L1_C0", "label": "wee", "type": "function", "loc": [1, 2], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.6667, 0, 0.66, 0.0, 48, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "wee", "arg_names": ["waa", "woo", "wii"], "import_names": [], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97027:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97027:Expr_L2_C4"}] |
print "aa..bbb...ccc".replace("..", "X")
| ajibawa-2023/Python-Code-Large/train/row_97028 | 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_97028:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
x = {}
x['y'] = "test"
print x['y']
| ajibawa-2023/Python-Code-Large/train/row_97029 | 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_97029:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
def f(n):
yield 1
a, b = n, n + 1
yield 2
yield a
yield b
a = 9999
b = 9999
for i in f(20):
print i
| ajibawa-2023/Python-Code-Large/train/row_97030 | 10 | 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_97030:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 6], "level": 0, "parent": null, "vector": [2, 0, 0.35, 0.6, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "f", "arg_names": ["n"], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97030:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97030:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97030:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97030:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
x = 1
n = 0
while x < 10:
x = x + 1
if n == 2:
continue
n = n + 1
print n
| ajibawa-2023/Python-Code-Large/train/row_97031 | 7 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97031:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.125, 0.125, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97031:While_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97031:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97031:While_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97031:If_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
def f(n):
for i in range(n):
yield i
g = f(5)
print g.next()
print g.next()
print g.next()
print g.next()
| ajibawa-2023/Python-Code-Large/train/row_97032 | 8 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97032:FunctionDef_L1_C0", "label": "f", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.25, 0.375, 0, 0.66, 0.0, 899, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "f", "arg_names": ["n"], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97032:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97032:For_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97032:For_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97032:Expr_L3_C8"}] |
print "Yes" if True else "No"
print "Yes" if False else "No"
| ajibawa-2023/Python-Code-Large/train/row_97033 | 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_97033:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.5, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
print True and True
| ajibawa-2023/Python-Code-Large/train/row_97034 | 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_97034:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
xyzy = [100,101,102,103,104,105,106,107]
del xyzy
print xyzy
| ajibawa-2023/Python-Code-Large/train/row_97035 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97035:Assign_L1_C0", "label": "xyzy =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 100, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "xyzy", "arg_names": [], "import_names": [], "rhs_call_name": ... | [] |
def x():
y = lambda x,y,z: x*y+z
print y(5, 10, 15)
x()
| ajibawa-2023/Python-Code-Large/train/row_97036 | 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_97036:FunctionDef_L1_C0", "label": "x", "type": "function", "loc": [1, 3], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.75, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97036:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97036:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97036:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97036:Expr_L3_C4"}] |
x = []
x.append(x)
print({x:'OK'}[x])
| ajibawa-2023/Python-Code-Large/train/row_97037 | 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_97037:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
# Tests the list functions.
l = [1,1,2,3,5,8,13,21]
print l
print l.count(1)
print l.reverse()
print l
print l.count(1)
print l.count(0)
print l.count(3)
print l.index(5)
print l.remove(5)
print l.remove(1)
print l.count(1)
print l
| ajibawa-2023/Python-Code-Large/train/row_97038 | 13 | 14 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97038:Assign_L2_C0", "label": "l =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.1429, 0.0714, 0, 0.66, 0.0, 810, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
class X:
pass
y = X()
print "OK"
| ajibawa-2023/Python-Code-Large/train/row_97039 | 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_97039:ClassDef_L1_C0", "label": "X", "type": "class", "loc": [1, 2], "level": 0, "parent": null, "vector": [3, 0, 0.375, 0.5, 0, 0.66, 0.0, 783, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "X", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, ... | [] |
# using obj[token] in JS doesn't work as a generic string dict
# make sure to use *both* hasOwnProperty and then get it, otherwise object
# builtins will return existence.
def toString():
print "wee"
class stuff:
def toString(self):
return "waa"
def valueOf(self):
return "stuff"
toString()... | ajibawa-2023/Python-Code-Large/train/row_97040 | 11 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97040:FunctionDef_L4_C0", "label": "toString", "type": "function", "loc": [4, 5], "level": 0, "parent": null, "vector": [2, 0, 0.2812, 0.125, 0, 0.66, 0.0, 661, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "toString", "arg_names": [], "import_names": [], "rhs_call_name": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97040:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97040:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97040:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97040:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
print 1 in {1:2}
| ajibawa-2023/Python-Code-Large/train/row_97041 | 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_97041:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
for k in {'OK':0}: print k
| ajibawa-2023/Python-Code-Large/train/row_97042 | 0 | 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"] | [] | [] |
print str(range(-4,-8,-1))[:5]
print len(range(-4,-8,-1))
print range(-4,-8,-1)[0]
print range(-4,-8,-1)[1]
print range(-4,-8,-1)[-1]
| ajibawa-2023/Python-Code-Large/train/row_97043 | 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_97043:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.2, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
def test(): pass
x = 1
print test()
| ajibawa-2023/Python-Code-Large/train/row_97044 | 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_97044:FunctionDef_L1_C0", "label": "test", "type": "function", "loc": [1, 1], "level": 0, "parent": null, "vector": [2, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 224, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [] |
x = 444
def f(arg):
return "OK: " + arg + ", " + str(x)
| ajibawa-2023/Python-Code-Large/train/row_97045 | 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_97045:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97045:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97045:Return_L3_C4"}] |
x = [10] * 5
x[:3] += 100,100
print x
| ajibawa-2023/Python-Code-Large/train/row_97046 | 2 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97046:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.2, 0.2, 0, 0.66, 0.0, 190, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [] |
print [x*x for x in range(20) if x > 10 if x % 2 == 0]
| ajibawa-2023/Python-Code-Large/train/row_97047 | 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_97047:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
a = [1,2,3,4,5,6]
b = [9,9,9]
a[2] = b
print a
| ajibawa-2023/Python-Code-Large/train/row_97048 | 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_97048:Assign_L1_C0", "label": "a =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 475, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
class C:
def __init__(self, data):
self.data = data
def pr(self):
print self.data
C("OK").pr()
| ajibawa-2023/Python-Code-Large/train/row_97049 | 6 | 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_97049:ClassDef_L1_C0", "label": "C", "type": "class", "loc": [1, 5], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.8333, 0, 0.66, 0.0, 619, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "C", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""},... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_97049:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_97049:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_97049:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_97049:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code... |
big = 012345670123456701234567012345670L # 32 octal digits
print "'%o'" % big
print "'%o'" % -big
print "'%5o'" % -big
print "'%33o'" % -big
print "'%34o'" % -big
print "'%-34o'" % -big
print "'%034o'" % -big
print "'%-034o'" % -big
print "'%036o'" % -big
print "'%036o'" % big
print "'%0+36o'" % big
print "'%+36o'" % ... | ajibawa-2023/Python-Code-Large/train/row_97050 | 33 | 39 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_97050:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0256, 0.0256, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print",... | [] |
print "OKx"[:-1]
| ajibawa-2023/Python-Code-Large/train/row_97051 | 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_97051:Expr_L1_C0", "label": "print()", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 1.0, 1.0, 0, 0.66, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "anno... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.