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
__author__="Sergey Karakovskiy, sergey at idsia fullstop ch" __date__ ="$May 2, 2009 7:54:12 PM$" class MarioAgent: # class MarioAgent(Agent): """ An agent is an entity capable of producing actions, based on previous observations. Generally it will also learn from experience. It can interact directly wi...
ajibawa-2023/Python-Code-Large/train/row_1757
20
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1757:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1757:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1757:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1757:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1757:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/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_1758
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_1758: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_1758:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1758:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1758:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1758: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_1759
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_1759: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_1759:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1759:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1759:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1759: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_1760
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_1760: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_1760:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1760:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1760:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1760: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_1761
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_1761: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_1761:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1761:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1761:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1761:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_17...
#!/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_1762
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_1762: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_1762:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1762:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1762:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1762:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colombianCrush.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ajibawa-2023/Python-Code-Large/train/row_1763
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_1763: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": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1763:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1763:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1763:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1763:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1763:...
""" Django settings for prueba 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, ...) imp...
ajibawa-2023/Python-Code-Large/train/row_1764
22
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_1764:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 9], "level": 0, "parent": null, "vector": [8, 0, 0.0532, 0.0957, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
''' Created on 2/12/2013 @author: Juanpa y Yami ''' from colombianCrush.core import * class Figura(object): """Clase que representa a una figura que se puede ver en pantalla""" def __init__(self, imagen): self.id = imagen self.imagen = Generador.cargarImagen(imagen) def dibujar(s...
ajibawa-2023/Python-Code-Large/train/row_1765
212
291
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1765:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0103, 0.0172, 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_1765:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1765:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1765:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1765:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
from elementos import Figura, Controlador
ajibawa-2023/Python-Code-Large/train/row_1766
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_1766:ImportFrom_L1_C0", "label": "from elementos import Figura, Controlador", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 711, 0, 2, 0, 0, 711, 0, 0], "semantic": {"name": "elementos", "arg_names": [], "import_na...
[]
from django.conf.urls import patterns, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('colombianCrush.views', # Examples: # url(r'^$', 'prueba.views.home', name='home'), # url(r'^blog/', include('blog.urls')), # url(r'^admin/', include(admin.site.urls)), url(r'^$'...
ajibawa-2023/Python-Code-Large/train/row_1767
4
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_1767:ImportFrom_L1_C0", "label": "from django.conf.urls import patterns, url", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 528, 0, 2, 0, 0, 528, 0, 0], "semantic": {"name": "django.conf.urls", "arg_names": ...
[]
import os from pyswip import Prolog from random import randint from django.conf import settings #CONSTANTES DE IDENTIFICACION DE LOS ESTADOS DEL JUEGO PASIVO = 0 #Estado en el que el jugador puede hacer su movimiento ACTIVO = 1 #Estado en el que se reacomodan las fichas DESTRUCCION = 2 #Estado en el que se consul...
ajibawa-2023/Python-Code-Large/train/row_1768
111
160
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1768:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 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_1768:ClassDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1768:Expr_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1768:ClassDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1768:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
from constantes import * del(Prolog) del(os) del(randint) del(settings)
ajibawa-2023/Python-Code-Large/train/row_1769
1
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_1769:ImportFrom_L1_C0", "label": "from constantes import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 59, 0, 1, 0, 0, 59, 0, 0], "semantic": {"name": "constantes", "arg_names": [], "import_names": ["*"], "rhs_...
[]
""" WSGI config for prueba 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", "colombianCrush.settings") from django....
ajibawa-2023/Python-Code-Large/train/row_1770
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_1770: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": "", "annotati...
[]
''' Created on 23/11/2013 @author: Juanpa y Yami ''' from django.template import Context, RequestContext from django.template.loader import get_template from django.http import HttpResponse, HttpResponseRedirect from colombianCrush.crush import Controlador, Figura from django.views.decorators.csrf import csrf_protect ...
ajibawa-2023/Python-Code-Large/train/row_1771
29
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1771:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0658, 0.1053, 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_1771:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1771:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1771:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1771:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "colombianCrush.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ajibawa-2023/Python-Code-Large/train/row_1772
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_1772: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": "", "anno...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1772:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1772:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1772:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1772:ImportFrom_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1772:...
import sys import numpy as np import tree import node import cplex #from cplex.exceptions import CplexError def branchbound(c): c.parameters.output.writelevel.set(0) c.parameters.simplex.display.set(0) rt = node.root(c) tr = tree.tree(rt) #tr.setup() iter = 0 while True: #-- ...
ajibawa-2023/Python-Code-Large/train/row_1775
62
145
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1775:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0069, 0.0069, 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_1775:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1775:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1775:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1775:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr...
#This example shows how to formulate the wyndor glass co. problem #The way that we model this problem can be altered to use modeling language #But We still need to be clear about the model to be able to manipulate it import cplex from cplex.exceptions import CplexError import sys import numpy as np c = cplex.Cplex() ...
ajibawa-2023/Python-Code-Large/train/row_1776
15
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1776:Import_L5_C0", "label": "cplex import cplex", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0962, 0.0192, 0, 0.66, 0.0, 287, 0, 1, 0, 0, 287, 0, 0], "semantic": {"name": "cplex", "arg_names": [], "import_names": ["cplex"], "rhs_cal...
[]
#This example shows how to formulate the wyndor glass co. problem #The way that we model this problem can be altered to use modeling language #But We still need to be clear about the model to be able to manipulate it import cplex from cplex.exceptions import CplexError import sys import numpy as np c = cplex.Cplex() ...
ajibawa-2023/Python-Code-Large/train/row_1777
15
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1777:Import_L5_C0", "label": "cplex import cplex", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0962, 0.0192, 0, 0.66, 0.0, 287, 0, 1, 0, 0, 287, 0, 0], "semantic": {"name": "cplex", "arg_names": [], "import_names": ["cplex"], "rhs_cal...
[]
import cplex import sys def cpxsol(c): c.parameters.mip.display.set(0) c.parameters.preprocessing.presolve.set(0) c.solve() return c.solution.get_objective_value() #cpxsol(c)
ajibawa-2023/Python-Code-Large/train/row_1778
7
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1778:Import_L1_C0", "label": "cplex import cplex", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 287, 0, 1, 0, 0, 287, 0, 0], "semantic": {"name": "cplex", "arg_names": [], "import_names": ["cplex"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1778:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1778:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1778:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1778:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import heapq import cplex import node class tree: def __init__(self, root): self.global_up_bnd = 0 self.global_z = 0 # store the nodes in a priority queue self.nodeq = [] heapq.heappush(self.nodeq, root) def pop(self): # pop the node with least priority...
ajibawa-2023/Python-Code-Large/train/row_1779
18
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1779:Import_L1_C0", "label": "heapq import heapq", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0303, 0.0303, 0, 0.66, 0.0, 251, 0, 1, 0, 0, 251, 0, 0], "semantic": {"name": "heapq", "arg_names": [], "import_names": ["heapq"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1779:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1779:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1779:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1779:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import sys import numpy as np import heapq from copy import copy, deepcopy from math import ceil, floor import cplex class root: def __init__(self, mip = None): #need to organize the attributes self.lp = mip self.rootlp = cplex.Cplex( mip ) # convert the mip problem to lp...
ajibawa-2023/Python-Code-Large/train/row_1780
122
244
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1780:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0041, 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_1780:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1780:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1780:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1780:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-La...
import sys import cplex import numpy as np from cplex.exceptions import CplexError # c.variables.set_lower_bounds to fix values at 0 or 1 # c.solution.get_status() to know the status for logical control # 1. optimal # 2. unbounded # 3. infeasible # This function is going to be called over again #-- def backtrack...
ajibawa-2023/Python-Code-Large/train/row_1781
95
243
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1781:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0041, 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_1781:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1781:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1781:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1781:If_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
import sys import cplex import numpy as np from cplex.exceptions import CplexError ca = cplex.Cplex() ca.read(sys.argv[1]) #ca.read("bell5.mps") #copy ca to c for self processing c = cplex.Cplex(ca) # change the type from MILP into LP (0:LP, 1:MILP) c.set_problem_type(type=0) # c.solve() # d.solve() # three vector...
ajibawa-2023/Python-Code-Large/train/row_1783
63
165
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1783:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0061, 0.0061, 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_1783:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1783:If_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1783:If_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1783:Return_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
import sys import cplex import numpy as np from cplex.exceptions import CplexError ca = cplex.Cplex() ca.read(sys.argv[1]) #copy ca to c for self processing c = cplex.Cplex(ca) c.parameters.output.writelevel.set(0) # record index of binary variables int_var_idx = [] con_var_idx = [] for i in range(c.variables.get_...
ajibawa-2023/Python-Code-Large/train/row_1784
37
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1784:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0185, 0.0185, 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_1784:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1784:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1784:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1784:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
from numpy import * import randgraph # n = 200 rho = 0.6 adj_mat = randgraph.randgraph(n, rho) adj_mat_new = zeros([n,n]) for i in range(n-1): adj_mat_new[i+1, 0:i+1] = adj_mat[0:i+1, i] adj_mat_new[0:i+1, i+1] = adj_mat[0:i+1, i] print adj_mat print adj_mat_new nodes = [[i] for i in range(n)] S = [] S_b...
ajibawa-2023/Python-Code-Large/train/row_1786
55
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_1786:ImportFrom_L1_C0", "label": "from numpy import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.009, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["*"], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1786:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1786:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1786:For_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1786:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
from numpy import * from random import choice import itertools import sys n = 50 rho = 0.4 def randgraph(n, rho): int_lb = 1 int_ub = 10 adj_mat = zeros( (n-1, n-1) ) # Start from i to j+1 up_tri_ind = [(i,j) for j in range(n-1) for i in range(j+1)] # Init the list of degrees at each node ...
ajibawa-2023/Python-Code-Large/train/row_1787
30
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1787:ImportFrom_L1_C0", "label": "from numpy import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["*"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1787:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1787:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1787:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1787:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#This module is for applying subgradient algorithm #input: tolerance #output: the list of primal solution, dual solution #it internally calls the solvelr function with different lambda values #to get primal and dual solutions import sys from lagrange import * #print getidx(1,2,5) iter = 0 N = 10 b = 40 t = 1 #report =...
ajibawa-2023/Python-Code-Large/train/row_1788
88
147
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1788:Import_L6_C0", "label": "sys import sys", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0408, 0.0068, 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_1788:If_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1788:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1788:If_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1788:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1788:Fo...
from lagrange import * bat_dual_rows = [] #for i in bat_dual_row_names: #do subgradient for each case iter = 0 N = 20 b = 100 #t = 1 #report = True #rho = 0.8 eps = 1 def subgrad(prob, dual_rows): A, b, sen, c = initlr(prob, dual_rows) # set initial value of l l = 0 * np.ones( len(dual_rows) ) z ...
ajibawa-2023/Python-Code-Large/train/row_1789
89
140
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1789:ImportFrom_L1_C0", "label": "from lagrange import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0071, 0.0071, 0, 0.66, 0.0, 377, 0, 1, 0, 0, 377, 0, 0], "semantic": {"name": "lagrange", "arg_names": [], "import_names": ["*"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1789:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1789:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1789:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1789:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import cplex import random import numpy as np from cplex.exceptions import CplexError #The ideal case is that # createld(prob, rownames) # solveld (prob, lambda, A, b) def getidx(i,j,N): return j*N + i + 1 def initip(seed=10, N=20, b=100): random.seed(seed) prob = cplex.Cplex() prob.objective.se...
ajibawa-2023/Python-Code-Large/train/row_1790
82
159
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1790:Import_L1_C0", "label": "cplex import cplex", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 287, 0, 1, 0, 0, 287, 0, 0], "semantic": {"name": "cplex", "arg_names": [], "import_names": ["cplex"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1790:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1790:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1790:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1790:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#read uflp problem as MIP import sys def get_words(line): """Return a list of the tokens in line.""" line = line.replace("\t", " ") line = line.replace("\v", " ") line = line.replace("\r", " ") line = line.replace("\n", " ") while line.count(" "): line = line.replace(" ", " ") lin...
ajibawa-2023/Python-Code-Large/train/row_1791
33
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_1791:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0351, 0.0175, 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_1791:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1791:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1791:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1791:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import cplex import readuflp import sys import os def get_ind(i,j,N): return j*N + i + 1 #stub def gen_uflp(filename): prob = cplex.Cplex() num_fac, num_cty, fx_cost, cn_cost = readuflp.read_uflp(filename) # add x_ij variables for j in range(num_cty): varnames = ["x" + str( get_ind(i,j, ...
ajibawa-2023/Python-Code-Large/train/row_1792
33
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1792:Import_L1_C0", "label": "cplex import cplex", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 0, 0.66, 0.0, 287, 0, 1, 0, 0, 287, 0, 0], "semantic": {"name": "cplex", "arg_names": [], "import_names": ["cplex"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1792:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1792:Return_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1792:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1792:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#This is a file that generate a gap instances solved by cplex import cplex import random import readgap import os def getidx(i,j,N): return j*N + i + 1 def gengap(filename): prob = cplex.Cplex() nr, nj, c, a, b = readgap.readgap(filename) print nr, nj, b prob.objective.set_sense(prob.objective.se...
ajibawa-2023/Python-Code-Large/train/row_1793
29
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1793:Import_L3_C0", "label": "cplex import cplex", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0208, 0, 0.66, 0.0, 287, 0, 1, 0, 0, 287, 0, 0], "semantic": {"name": "cplex", "arg_names": [], "import_names": ["cplex"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1793:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1793:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1793:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1793:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
def get_words(line): """Return a list of the tokens in line.""" line = line.replace("\t", " ") line = line.replace("\v", " ") line = line.replace("\r", " ") line = line.replace("\n", " ") while line.count(" "): line = line.replace(" ", " ") line = line.strip() return [word + " ...
ajibawa-2023/Python-Code-Large/train/row_1794
38
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_1794:FunctionDef_L1_C0", "label": "get_words", "type": "function", "loc": [1, 10], "level": 0, "parent": null, "vector": [2, 0, 0.1078, 0.1961, 0, 0.66, 0.0, 917, 0, 1, 1, 0, 0, 0, 8], "semantic": {"name": "get_words", "arg_names": ["line"], "import_names": [], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1794:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1794:Expr_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1794:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1794:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#This is a file that generate a random instance of knapsack problem import cplex import random # Thinking of design the covers and cover classes # covers(A, b) # covers.set_inequalities(prob) # covers.update_inequalities(prob) # construct the min_covers from A and b # cover.ind # cover.val # cover.max_val # cover.ism...
ajibawa-2023/Python-Code-Large/train/row_1795
98
207
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1795:Import_L3_C0", "label": "cplex import cplex", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0048, 0, 0.66, 0.0, 287, 0, 1, 0, 0, 287, 0, 0], "semantic": {"name": "cplex", "arg_names": [], "import_names": ["cplex"], "rhs_cal...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1795:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1795:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1795:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1795:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Created on 11/07/2014 @author: Juanpa y Yami ''' from cx_Freeze import setup, Executable #includes = ["atexit", "PyQt4.QtGui", "numpy", "PIL", "pyfftw.builders"] packages = ["GUI", "core"] setup( options={"build_exe":{"packages":packages, "excludes":["Tkinter"]}}, name="Transformada de Fourier", ...
ajibawa-2023/Python-Code-Large/train/row_1796
4
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_1796:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1765, 0.2941, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
''' Created on 1/05/2014 @author: Juan Pablo Moreno - 20111020059 ''' import sys from PyQt4.QtGui import QApplication from GUI import VentanaMenu def main(): app = QApplication(sys.argv) ventana = VentanaMenu() sys.exit(app.exec_()) if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_1797
10
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_1797:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1562, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1797:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1797:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1797:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1797:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Created on 3/06/2014 @author: Juan Pablo Moreno - 20111020059 @author: @author: @author: ''' from __future__ import print_function import os from PIL import Image import numpy as np import pyfftw as pFT _FORMATOS = ['PNG', 'JPEG', 'GIF', 'BMP'] def _abrirImagen(_ruta): imagenes = [] if isinstance(_ru...
ajibawa-2023/Python-Code-Large/train/row_1798
95
140
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1798:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0286, 0.05, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1798:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1798:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1798:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1798:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from implementacion import transformar, filtrar, invertir, NoCorrespondenError
ajibawa-2023/Python-Code-Large/train/row_1799
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_1799:ImportFrom_L1_C0", "label": "from implementacion import transformar, filtrar, invertir\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 253, 0, 4, 0, 0, 253, 0, 0], "semantic": {"name": "implementacion", ...
[]
''' Created on 3/06/2014 @author: Juan Pablo Moreno - 20111020059 @author: @author: @author: ''' from PyQt4.QtGui import QMainWindow, QDialog, QFileDialog, QSizePolicy from PyQt4.QtGui import QComboBox, QPushButton, QMessageBox, QLabel class VentanaMenu(QMainWindow): def __init__(self): super(VentanaMenu, ...
ajibawa-2023/Python-Code-Large/train/row_1800
105
144
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1800:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0278, 0.0486, 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_1800:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1800:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1800:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1800:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L...
from interfaz import VentanaMenu
ajibawa-2023/Python-Code-Large/train/row_1801
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_1801:ImportFrom_L1_C0", "label": "from interfaz import VentanaMenu", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 206, 0, 1, 0, 0, 206, 0, 0], "semantic": {"name": "interfaz", "arg_names": [], "import_names": ["Ve...
[]
#==================================================================== # 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_1802
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_1802: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_1802:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1802:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1802:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1802:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python from bottle import route,run,get,post,response,static_file,request import cv2,cv import thread import base64 #import carcontrol module from controlServer import * cam=cv2.VideoCapture(0) if(cam.isOpened()==False): print("cant open cam") exit() cam.set(cv.CV_CAP_PROP_FRAME_WIDTH,320) cam.set(cv.CV_C...
ajibawa-2023/Python-Code-Large/train/row_1803
36
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_1803:ImportFrom_L2_C0", "label": "from bottle import route, run, get\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0392, 0.0196, 0, 0.66, 0.0, 591, 0, 7, 0, 0, 591, 0, 0], "semantic": {"name": "bottle", "arg_names": [], "import_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1803:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1803:Expr_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1803:If_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1803:Expr_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1803:Fu...
# -*- coding: utf-8 -*- """ Created on Mon May 05 14:51:22 2014 @author: JuanMed """ lectura = 0 inp = raw_input("Ingrese la conversion ADC obtenida (de 0 a 4096): ") lectura = int(inp) lectura = (lectura*2.5)/4096 print "Voltaje en ADC: ",lectura lectura = (lectura * 2) print "Voltaje en Paneles (a ...
ajibawa-2023/Python-Code-Large/train/row_1805
8
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_1805:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1026, 0.1282, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
#!/usr/bin/python3 #coding=utf-8 import os #读取文件列表 f=open('etc/list') clist=[] for line in f: if len(line.strip('\n').strip('\r'))>0: clist.append(line.strip('\n').strip('\r')) #生成文档 docCommand='java -jar lib/jsdoc/jsrun.jar lib/jsdoc/app/run.js \ -a -v -p -t=lib/jsdoc/templates/CodeView -D="title:Castle API" -D...
ajibawa-2023/Python-Code-Large/train/row_1806
22
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_1806:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0256, 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_1806:For_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1806:If_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1806:If_L10_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1806:Expr_L11_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1806:If_L...
#!/usr/bin/python3 #coding=utf-8 import os #读取文件列表 f=open('etc/list') clist=[] for line in f: if len(line.strip('\n').strip('\r'))>0: clist.append(line.strip('\n').strip('\r')) #生成文档 docCommand='java -jar lib/jsdoc/jsrun.jar lib/jsdoc/app/run.js \ -a -v -p -t=lib/jsdoc/templates/CodeView -D="title:Castle API" -D...
ajibawa-2023/Python-Code-Large/train/row_1807
22
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_1807:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0256, 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_1807:For_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1807:If_L10_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1807:If_L10_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_1807:Expr_L11_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1807:If_L...
__version__ = '1.3.0' from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, OptionProperty, ObjectProperty from kivy.graphics import Color, BorderImage from kivy.clock import Clock from kivy.vector import Vector from kivy.metrics import dp from kivy.animation import A...
ajibawa-2023/Python-Code-Large/train/row_1808
337
485
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1808:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1808:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1808:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1808:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1808:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_180...
# Game services for Android from jnius import autoclass, PythonJavaClass, java_method from android.runnable import run_on_ui_thread import android import android.activity PythonActivity = autoclass('org.renpy.android.PythonActivity') GameHelper = autoclass('com.google.example.games.basegameutils.GameHelper') Games = au...
ajibawa-2023/Python-Code-Large/train/row_1809
49
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_1809:ImportFrom_L2_C0", "label": "from jnius import autoclass, PythonJavaClass, java_method", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0132, 0, 0.66, 0.0, 497, 0, 3, 0, 0, 497, 0, 0], "semantic": {"name": "jnius", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1809:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1809:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1809:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1809:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
__version__ = '1.3.0' from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, OptionProperty, ObjectProperty from kivy.graphics import Color, BorderImage from kivy.clock import Clock from kivy.vector import Vector from kivy.metrics import dp from kivy.animation import A...
ajibawa-2023/Python-Code-Large/train/row_1810
337
485
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1810:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1810:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1810:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1810:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1810:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_181...
# Game services for Android from jnius import autoclass, PythonJavaClass, java_method from android.runnable import run_on_ui_thread import android import android.activity PythonActivity = autoclass('org.renpy.android.PythonActivity') GameHelper = autoclass('com.google.example.games.basegameutils.GameHelper') Games = au...
ajibawa-2023/Python-Code-Large/train/row_1811
49
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_1811:ImportFrom_L2_C0", "label": "from jnius import autoclass, PythonJavaClass, java_method", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0132, 0, 0.66, 0.0, 497, 0, 3, 0, 0, 497, 0, 0], "semantic": {"name": "jnius", "arg_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1811:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1811:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1811:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1811:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
import sqlite3 #import time #conn = sqlite3.connect("mydatabase.db") #cursor=conn.cursor() #cursor.execute('CREATE TABLE mytable (Id INTEGER PRIMARY KEY, Date TEXT, Entry TEXT)') #today="monday" #cursor.execute('INSERT INTO mytable VALUES(null, ?, ?)', (today, "This entry could be the first item on a To-Do List...
ajibawa-2023/Python-Code-Large/train/row_1812
52
80
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1812:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0125, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1812:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1812:FunctionDef_L21_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1812:FunctionDef_L21_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1812:Assign_L22_C10"}, {"f": "ajibawa-2023/Python-Cod...
class Cage(): def __init__(self, cageName, cageDescription, numDoors = 2, doorsOpen = False): self.cageName = cageName self.cageDescription = cageDescription self.numDoors = numDoors self.doorsOpen = doorsOpen def openDoor(self): print("hello") ...
ajibawa-2023/Python-Code-Large/train/row_1813
8
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_1813:ClassDef_L1_C0", "label": "Cage", "type": "class", "loc": [1, 10], "level": 0, "parent": null, "vector": [3, 0, 0.4583, 0.8333, 0, 0.66, 0.0, 616, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Cage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1813:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1813:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1813:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1813:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
class Cage(): cageID = "" doorNumber = 1 cageMaxPopCap = 1 currentCap = 1 doorStatus = True numberOfDoors = 1 cageDescription = "" exhibitOccupied = True cageSize = "" def main(): lionCage = Cage("Lion", True, 21, 10, "A real environment", 2, True) lionCage.clo...
ajibawa-2023/Python-Code-Large/train/row_1814
59
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_1814:ClassDef_L1_C0", "label": "Cage", "type": "class", "loc": [1, 100], "level": 0, "parent": null, "vector": [3, 0, 0.443, 0.8772, 0, 0.66, 0.0, 616, 0, 18, 0, 0, 0, 0, 6], "semantic": {"name": "Cage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1814:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1814:Assign_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1814:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1814:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
import unittest import zooMonitoring import zoo class CageTests(unittest.TestCase): def testNoCagesPresent(self): zoo1 = zoo.Zoo() #Test to check no cages are initially present self.assertEqual(zoo1.getNumCages(), 1) print zoo1.cages def testAddPresent(sel...
ajibawa-2023/Python-Code-Large/train/row_1816
14
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1816:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1816:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1816:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1816:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1816:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import zoo import cage class ZooMonitoring(): def __init__(self): jcu = zoo.Zoo() jcu.addCage("lion", "the lion lives here") jcu.addCage("tim", "timmy lives here") print jcu.getNumCages() jcu.cages[0].openDoor() def main(): pri...
ajibawa-2023/Python-Code-Large/train/row_1817
12
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1817:Import_L1_C0", "label": "zoo import zoo", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0556, 0, 0.66, 0.0, 270, 0, 1, 0, 0, 270, 0, 0], "semantic": {"name": "zoo", "arg_names": [], "import_names": ["zoo"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1817:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1817:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1817:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1817:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
from turtle import * import forest import os f = forest() x = 1 t = Turtle() t.write("home =", True, align="center") t.showturtle() speed("fastest") while x < 100: pd() sety(121) setx(66) c = ["red","green","yellow","blue","purple","cyan","pink"] color(c[x%7]) forward(45) rig...
ajibawa-2023/Python-Code-Large/train/row_1818
62
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1818:ImportFrom_L1_C0", "label": "from turtle import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0149, 0.0149, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "turtle", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1818:While_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1818:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1818:While_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1818:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
import zooMonitoring import database import zoo if __name__ == '__main__': z = zoo.Zoo() db = database.dataBase() choice = None menuNotChosen = True choice = raw_input("Please Choose Option \ncage \nadmin\n Choose: ") while choice: if choice == "cage": ...
ajibawa-2023/Python-Code-Large/train/row_1819
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_1819:Import_L1_C0", "label": "zooMonitoring import zooMonitoring", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 867, 0, 1, 0, 0, 867, 0, 0], "semantic": {"name": "zooMonitoring", "arg_names": [], "import_names":...
[]
import sqlite3 #import time #conn = sqlite3.connect("mydatabase.db") #cursor=conn.cursor() #cursor.execute('CREATE TABLE mytable (Id INTEGER PRIMARY KEY, Date TEXT, Entry TEXT)') #today="monday" #cursor.execute('INSERT INTO mytable VALUES(null, ?, ?)', (today, "This entry could be the first item on a To-Do List, or it...
ajibawa-2023/Python-Code-Large/train/row_1820
117
182
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1820:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0055, 0.0055, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1820:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1820:FunctionDef_L22_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1820:FunctionDef_L22_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_1820:Assign_L23_C10"}, {"f": "ajibawa-2023/Python-Cod...
class Cage(): def __init__(self, cageName, cageDescription, numDoors = 2, doorsOpen = False, humanInside = False): self.cageName = cageName self.cageDescription = cageDescription self.numDoors = numDoors self.doorsOpen = doorsOpen self.humanInside = humanInside ...
ajibawa-2023/Python-Code-Large/train/row_1821
11
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1821:ClassDef_L1_C0", "label": "Cage", "type": "class", "loc": [1, 16], "level": 0, "parent": null, "vector": [3, 0, 0.4722, 0.8889, 0, 0.66, 0.0, 616, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "Cage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1821:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1821:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1821:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1821:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import cage import database class Zoo: def __init__(self): self.cages = [] print self.cages #dont USE!! def addCage(self, cageName, cageDescription): cageName = cage.Cage(cageName, cageDescription) self.cages.append(cageName) def addCag...
ajibawa-2023/Python-Code-Large/train/row_1822
69
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_1822:Import_L1_C0", "label": "cage import cage", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.009, 0, 0.66, 0.0, 275, 0, 1, 0, 0, 275, 0, 0], "semantic": {"name": "cage", "arg_names": [], "import_names": ["cage"], "rhs_call_name...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1822:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1822:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1822:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1822:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
def tree(tlist, size, level, widthfactor, branchlists, angledist=10, sizedist=5): # benutzt Liste von turtles und Liste von Zweiglisten, # fuer jede turtle eine! if level > 0: lst = [] brs = [] for t, branchlist in list(zip(tlist,branchlists)): t.pensize( size * wi...
ajibawa-2023/Python-Code-Large/train/row_1823
17
22
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1823:FunctionDef_L1_C0", "label": "tree", "type": "function", "loc": [1, 22], "level": 0, "parent": null, "vector": [2, 0, 0.5227, 1.0, 0, 0.66, 0.0, 613, 0, 7, 0, 0, 0, 0, 15], "semantic": {"name": "tree", "arg_names": ["tlist", "size", "level", "widthfactor", "branchl...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1823:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1823:If_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1823:If_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1823:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_18...
import unittest #import zooMonitoring import zoo class CageTests(unittest.TestCase): def testNoCagesPresent(self): emptyZoo = zoo.Zoo() #emptyZoo.cages = [] #Test to check no cages are initially present #emptyZoo.addCage("Monkey", "Chimpanzee lives here") self.assertEqu...
ajibawa-2023/Python-Code-Large/train/row_1824
70
92
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1824:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0109, 0.0109, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1824:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1824:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1824:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1824:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
from turtle import * from random import randrange from time import clock def writeZoo(): width(10) color("blue") penup() setx(-300) sety(300) pendown() pendown() forward(75) right(135) forward(100) left(135) forward(75) penup() setx(-180...
ajibawa-2023/Python-Code-Large/train/row_1825
112
142
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1825:ImportFrom_L1_C0", "label": "from turtle import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.007, 0.007, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "turtle", "arg_names": [], "import_names": ["*"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1825:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1825:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1825:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1825:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() # Create table #c.execute('''CREATE TABLE cages # (cageName, cageDescription, numDoors, doorsOpen)''') # Insert a row of data c.execute("INSERT INTO cages VALUES ('bear','this is the bears houese','2','False')") # Save (co...
ajibawa-2023/Python-Code-Large/train/row_1826
9
22
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1826:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0455, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1826:For_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1826:Expr_L19_C8"}]
import zoo import cage class ZooMonitoring: def __init__(self): jcu = zoo.Zoo() #jcu.addCageList("lion", "1") #jcu.addCageList("moose", "2") #jcu.addCageList("panda", "3") #jcu.addCageList("bird", "4") # print jcu.getNumCages() # print jcu...
ajibawa-2023/Python-Code-Large/train/row_1827
8
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1827:Import_L1_C0", "label": "zoo import zoo", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 270, 0, 1, 0, 0, 270, 0, 0], "semantic": {"name": "zoo", "arg_names": [], "import_names": ["zoo"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1827:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1827:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1827:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1827:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
#-*- coding: utf-8 -*- #! /usr/bin/python ####################################################################################### # # # File: online_keeper.py # # Pa...
ajibawa-2023/Python-Code-Large/train/row_1828
382
649
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1828:Import_L37_C0", "label": "time import time", "type": "import", "loc": [37, 37], "level": 0, "parent": null, "vector": [1, 0, 0.057, 0.0015, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1828:Try_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1828:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1828:Try_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1828:Assign_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
#This contains global definition of Browser class and other useful thing ####################################################################################### # # # File: browser_bogus.py ...
ajibawa-2023/Python-Code-Large/train/row_1829
11
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1829:Import_L32_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.7442, 0.0233, 0, 0.66, 0.0, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1829:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1829:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1829:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1829:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
ajibawa-2023/Python-Code-Large/train/row_1830
6
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1830:ImportFrom_L5_C0", "label": "from distutils.core import setup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server # print get_random_ntp_server() # Script to set Linux hardware clock (/usr/sbin/hwclock) from an NTP # time server. Run as "setclock.py" to simply print the time from # the NTP ...
ajibawa-2023/Python-Code-Large/train/row_1831
16
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1831:ImportFrom_L2_C0", "label": "from socket import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0208, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1831:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1831:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1831:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1831:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#-*- coding: utf-8 -*- #! /usr/bin/python import urllib import urllib2 import time import socket from browser_bogus import Browser def logd(content,fname = "sysrun.log",dolog = True): if dolog: try: if fname == None: fname = "sysrun.log" fp = open(fnam...
ajibawa-2023/Python-Code-Large/train/row_1832
53
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_1832:Import_L4_C0", "label": "urllib import urllib", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.0135, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1832:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1832:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1832:If_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1832:Try_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
import random NS_NTP = ["132.163.4.101", "132.163.4.102", "132.163.4.103", "128.138.140.44", "69.25.96.13", "64.236.96.53"] #print len(UA_MSIE10) #print len(UA_MSIE9) #print len(UA_MSIE8) #print len(UA_MSIE7) #print len(UA_MSIE6) def get_random_ntp_server(): random.seed() i = random.randra...
ajibawa-2023/Python-Code-Large/train/row_1834
8
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1834:Import_L2_C0", "label": "random import random", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0417, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1834:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1834:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1834:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1834:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
####################################################################################### # # File: user_agent_lib # Part of pcbeta-cheater # Home: http://pcbeta-cheater.googlecode.com # # ...
ajibawa-2023/Python-Code-Large/train/row_1835
16
4,010
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1835:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0082, 0.0012, 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_1835:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1835:Expr_L3999_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1835:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1835:Assign_L4000_C4"}, {"f": "ajibawa-2023/Python-...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
ajibawa-2023/Python-Code-Large/train/row_1836
6
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1836:ImportFrom_L5_C0", "label": "from distutils.core import setup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server # print get_random_ntp_server() # Script to set Linux hardware clock (/usr/sbin/hwclock) from an NTP # time server. Run as "setclock.py" to simply print the time from # the NTP ...
ajibawa-2023/Python-Code-Large/train/row_1837
16
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1837:ImportFrom_L2_C0", "label": "from socket import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0208, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1837:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1837:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1837:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1837:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- ####################################################################################### # # # File: Core.py # # Part of stage1st_cheater ...
ajibawa-2023/Python-Code-Large/train/row_1838
318
472
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1838:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0699, 0.0106, 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_1838:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1838:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1838:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1838:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainDialog.ui' # # Created: Mon Feb 17 23:47:19 2014 # by: PyQt4 UI code generator 4.10.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf...
ajibawa-2023/Python-Code-Large/train/row_1839
182
216
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1839:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0463, 0.0046, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1839:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1839:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1839:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1839:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
#This contains global definition of Browser class and other useful thing ####################################################################################### # # # File: browser_bogus.py ...
ajibawa-2023/Python-Code-Large/train/row_1841
11
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1841:Import_L32_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.7442, 0.0233, 0, 0.66, 0.0, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1841:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1841:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1841:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1841:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
ajibawa-2023/Python-Code-Large/train/row_1842
6
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1842:ImportFrom_L5_C0", "label": "from distutils.core import setup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server print get_random_ntp_server() # Script to set Linux hardware clock (/usr/sbin/hwclock) from an NTP # time server. Run as "setclock.py" to simply print the time from # the NTP se...
ajibawa-2023/Python-Code-Large/train/row_1843
17
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1843:ImportFrom_L2_C0", "label": "from socket import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0208, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1843:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1843:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1843:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1843:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import random NS_NTP = ["132.163.4.101", "132.163.4.102", "132.163.4.103", "128.138.140.44", "69.25.96.13", "64.236.96.53"] #print len(UA_MSIE10) #print len(UA_MSIE9) #print len(UA_MSIE8) #print len(UA_MSIE7) #print len(UA_MSIE6) def get_random_ntp_server(): random.seed() i = random.randra...
ajibawa-2023/Python-Code-Large/train/row_1845
8
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1845:Import_L2_C0", "label": "random import random", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0417, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1845:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1845:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1845:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1845:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
####################################################################################### # # File: user_agent_lib # Part of pcbeta-cheater # Home: http://pcbeta-cheater.googlecode.com # # ...
ajibawa-2023/Python-Code-Large/train/row_1846
16
4,010
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1846:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.0082, 0.0012, 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_1846:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1846:Expr_L3999_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1846:FunctionDef_L3998_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1846:Assign_L4000_C4"}, {"f": "ajibawa-2023/Python-...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
ajibawa-2023/Python-Code-Large/train/row_1847
6
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1847:ImportFrom_L5_C0", "label": "from distutils.core import setup", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1724, 0.0345, 0, 0.66, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_...
[]
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server print get_random_ntp_server() # Script to set Linux hardware clock (/usr/sbin/hwclock) from an NTP # time server. Run as "setclock.py" to simply print the time from # the NTP se...
ajibawa-2023/Python-Code-Large/train/row_1848
17
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1848:ImportFrom_L2_C0", "label": "from socket import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0208, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["*"], "rhs_...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1848:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1848:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1848:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1848:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# -*- coding: utf-8 -*- ####################################################################################### # # # File: Core.py # # Part of stage1st_cheater ...
ajibawa-2023/Python-Code-Large/train/row_1849
146
273
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1849:Expr_L31_C0", "label": "expression", "type": "expression", "loc": [31, 35], "level": 0, "parent": null, "vector": [8, 0, 0.1209, 0.0183, 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_1849:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1849:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1849:Try_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1849:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainDialog.ui' # # Created: Sun May 29 21:22:32 2011 # by: PyQt4 UI code generator 4.8.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8...
ajibawa-2023/Python-Code-Large/train/row_1850
82
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1850:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0855, 0.0085, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1850:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1850:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1850:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1850:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
""" FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/license...
ajibawa-2023/Python-Code-Large/train/row_1851
80
160
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1851:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0719, 0.1375, 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_1851:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1851:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1851:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1851:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import pygame, sys, math class Glass(): def __init__(self, speed = [2,2], size = [100,100], pos = (0,0)): """ self.images = [] for image in images: newimage = pygame.image.load(image) newimage = pygame.transform.scale(newimage, size) self.images += [newim...
ajibawa-2023/Python-Code-Large/train/row_1852
80
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_1852:Import_L1_C0", "label": "pygame import pygame, sys, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0087, 0.0087, 0, 0.66, 0.0, 87, 0, 3, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1852:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1852:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1852:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1852:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
import pygame, sys, math class Enlarge(): def __init__(self, speed = [2,2], pos = (0,0)): self.type = "Enlarge" self.image = pygame.image.load("Resources/Cow/U.png") self.rect = self.image.get_rect() self.radius = self.rect.width/2 self.place(pos) self.speedx = speed...
ajibawa-2023/Python-Code-Large/train/row_1853
26
32
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1853:Import_L1_C0", "label": "pygame import pygame, sys, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 87, 0, 3, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1853:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1853:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1853:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1853:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import pygame, sys, math class Ball(): def __init__(self, image, speed = [2,2], size = [100,100], pos = (0,0)): self.image = pygame.image.load(image) self.image = pygame.transform.scale(self.image, size) self.rect = self.image.get_rect() self.speedx = speed[0] self.speedy = ...
ajibawa-2023/Python-Code-Large/train/row_1854
54
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1854:Import_L1_C0", "label": "pygame import pygame, sys, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0159, 0.0159, 0, 0.66, 0.0, 87, 0, 3, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1854:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1854:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1854:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1854:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import pygame, sys, math, random pygame.init() from Ball import Ball from PlayerBall import PlayerBall clock = pygame.time.Clock() width = 640 height = 480 size = width, height screen = pygame.display.set_mode(size) bgImage = pygame.image.load("rsc/bg/startbg.png") bgRect = bgImage.get_rect() bgColor = r,g,b = 0...
ajibawa-2023/Python-Code-Large/train/row_1855
76
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1855:Import_L1_C0", "label": "pygame import pygame, sys, math\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0092, 0, 0.66, 0.0, 87, 0, 4, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1855:While_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1855:While_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1855:While_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1855:For_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
import pygame, sys, math class PlayerBall(): def __init__(self, images, speed = [2,2], size = [100,100], pos = (0,0)): self.images = [] for image in images: newimage = pygame.image.load(image) newimage = pygame.transform.scale(newimage, size) self.images += [newi...
ajibawa-2023/Python-Code-Large/train/row_1856
79
95
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1856:Import_L1_C0", "label": "pygame import pygame, sys, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0105, 0, 0.66, 0.0, 87, 0, 3, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1856:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1856:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1856:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1856:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import pygame, sys, math class Milk(): def __init__(self, speed = [2,2], size = [100,100], pos = (0,0)): self.image = pygame.image.load("Resources/Milk/MILK3.png") self.image = pygame.transform.scale(self.image, size) self.rect = self.image.get_rect() self.speedx = speed[0] ...
ajibawa-2023/Python-Code-Large/train/row_1857
32
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1857:Import_L1_C0", "label": "pygame import pygame, sys, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 87, 0, 3, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["pygam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1857:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1857:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1857:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1857:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import pygame, sys, math, random pygame.init() from Ball import Ball from PlayerBall import PlayerBall clock = pygame.time.Clock() width = 640 height = 480 size = width, height screen = pygame.display.set_mode(size) bgImage = pygame.image.load("rsc/bg/startbg.png") bgRect = bgImage.get_rect() bgColor = r,g,b = 0...
ajibawa-2023/Python-Code-Large/train/row_1858
76
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1858:Import_L1_C0", "label": "pygame import pygame, sys, math\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0092, 0, 0.66, 0.0, 87, 0, 4, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1858:While_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1858:While_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1858:While_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1858:For_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1...
import pygame, os, sys, math from pygame.locals import * pygame.init() #From https://code.google.com/p/pong-drew-liam-nate/source/browse/Scoreboard.py class ScoreBoard(): def __init__(self, pos = (0,0)): self.baseimage = pygame.image.load("Resources/scoreboard.png") self.image = self.baseimage.cop...
ajibawa-2023/Python-Code-Large/train/row_1859
38
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1859:Import_L1_C0", "label": "pygame import pygame, os, sys\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 87, 0, 4, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": ["p...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1859:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1859:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1859:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1859:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
import pygame, sys, math, random pygame.init() pygame.joystick.init() joysticks = [pygame.joystick.Joystick(x) for x in range(pygame.joystick.get_count())] for joystick in joysticks: joystick.init() print joystick.get_name() from Milk import Milk from Glass import Glass from ScoreBoard import ScoreBoard fro...
ajibawa-2023/Python-Code-Large/train/row_1860
92
128
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1860:Import_L1_C0", "label": "pygame import pygame, sys, math\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0078, 0.0078, 0, 0.66, 0.0, 87, 0, 4, 0, 0, 87, 0, 0], "semantic": {"name": "pygame", "arg_names": [], "import_names": [...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1860:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1860:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1860:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1860:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1860:Whil...
__author__ = 'Binary_Ninja' from tkinter import * import tkinter.messagebox import Board from BoardSquare import * class GUI(Frame): def __init__(self, master=NONE): Frame.__init__(self, master) self.__init_color_dict() self.board = Board.Board() self.create_labels() ...
ajibawa-2023/Python-Code-Large/train/row_1861
65
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_1861:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0122, 0.0122, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1861:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1861:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1861:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_1861:Expr_L11_C8"}, {"f": "ajibawa-2023/Python-Code-La...
__author__ = 'Binary Ninja' from BoardSquare import * import random class Board: size = 4 def __init__(self): self.__squares = self.__generate_board_squares() self.__set_empty_square() self.game_over = False def __generate_board_squares(self): squares = [] ...
ajibawa-2023/Python-Code-Large/train/row_1862
77
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_1862:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0097, 0.0097, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1862:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1862:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1862:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1862:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
__author__ = 'Binary Ninja' class BoardSquare: empty_value = -1 def __init__(self, x, y, value): assert isinstance(value, int) assert isinstance(x, int) assert isinstance(y, int) self.value = value self.x = x self.y = y def get_coordinates(se...
ajibawa-2023/Python-Code-Large/train/row_1863
14
23
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1863:Assign_L1_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0435, 0.0435, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_c...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1863:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1863:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1863:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1863:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
# -*- coding: UTF-8 -*- # MISSING-DOCSTRING: pylint: disable=C0111 """ Based on ``behave tutorial`` Feature: Fight or Flight (Natural Language) In order to increase the ninja survival rate, #< Business goal As a ninja commander #< Role I want my ninjas to decide whether to take...
ajibawa-2023/Python-Code-Large/train/row_1864
28
93
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1864:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 21], "level": 0, "parent": null, "vector": [8, 0, 0.129, 0.2043, 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_1864:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1864:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1864:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1864:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
""" This is the "example" module. The example module supplies one function, factorial(). For example, >>> factorial(5) 120 """ def factorial(n): """Return the factorial of n, an exact integer >= 0. If the result is small enough to fit in an int, return an int. Else return a long. >>> [factorial(n...
ajibawa-2023/Python-Code-Large/train/row_1865
14
62
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_1865:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0726, 0.129, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_1865:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1865:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_1865:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_1865:Import_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...