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 |
|---|---|---|---|---|---|---|---|
#
# Comment tests
#
import unittest
import PloneboardTestCase
from Products.Ploneboard.transforms.url_to_hyperlink import URLToHyperlink
class MockTransformData:
def setData(self, value):
self.data=value
class TestUrlTransform(PloneboardTestCase.PloneboardTestCase):
def runTest(self, testdata):
... | ajibawa-2023/Python-Code-Large/train/row_4028 | 29 | 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_4028:Import_L5_C0", "label": "unittest import unittest", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0806, 0.0161, 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_4028:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4028:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4028:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4028:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-... |
#
# Ploneboard tests
#
import unittest
from zExceptions import Unauthorized
from zope.interface.verify import verifyClass, verifyObject
from Products.Ploneboard.tests import PloneboardTestCase
from Products.Ploneboard.interfaces import IPloneboard, IForum
from Products.Ploneboard.content.Ploneboard import Ploneboard
f... | ajibawa-2023/Python-Code-Large/train/row_4029 | 115 | 158 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4029:Import_L5_C0", "label": "unittest import unittest", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0316, 0.0063, 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_4029:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4029:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4029:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4029:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
from Products.CMFCore import permissions
from Products.CMFCore.permissions import setDefaultRoles
# Add permissions differ for each type, and are imported by __init__.initialize
# so don't change their names!
ViewBoard = permissions.View
SearchBoard = 'Ploneboard: Search'
AddBoard = AddPloneboard = 'Ploneboard: Add P... | ajibawa-2023/Python-Code-Large/train/row_4030 | 35 | 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_4030:ImportFrom_L1_C0", "label": "from Products.CMFCore import permissions", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0132, 0, 0.66, 0.0, 396, 0, 1, 0, 0, 396, 0, 0], "semantic": {"name": "Products.CMFCore", "arg_names": []... | [] |
from zope.interface import implements
from Products.ATContentTypes.interface import ITextContent
class CommentTextContent(object):
implements(ITextContent)
def __init__(self, context):
self.context = context
def getText(self, **kwargs):
return self.context.getText()
def setText(self... | ajibawa-2023/Python-Code-Large/train/row_4031 | 14 | 21 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4031:ImportFrom_L1_C0", "label": "from zope.interface import implements", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 443, 0, 1, 0, 0, 443, 0, 0], "semantic": {"name": "zope.interface", "arg_names": [], "im... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_4031:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4031:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4031:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4031:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
"""Migrate from 0.1b1 to 1.0b.
"""
# Zope imports
from ZODB.PersistentMapping import PersistentMapping
from Acquisition import aq_base
# CMF imports
from Products.CMFCore.utils import getToolByName
# Product imports
class Migration(object):
"""Migrate from 0.1b1 to 1.0b.
"""
def __init__(self, site, ou... | ajibawa-2023/Python-Code-Large/train/row_4032 | 44 | 68 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4032:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0221, 0.0294, 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_4032:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4032:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4032:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4032:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
"""
$Id: __init__.py 53403 2007-11-08 09:54:35Z wichert $
"""
from Products.Archetypes.public import process_types, listTypes
from Products.CMFCore.DirectoryView import registerDirectory
from Products.Ploneboard.PloneboardTool import PloneboardTool
import sys
from Products.Ploneboard.config import SKINS_DIR, GLOBALS... | ajibawa-2023/Python-Code-Large/train/row_4033 | 25 | 59 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4033:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0339, 0.0508, 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_4033:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4033:Import_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4033:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4033:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Co... |
from zope.interface import implements
from zope.app.schema.vocabulary import IVocabularyFactory
from Products.CMFCore.utils import getToolByName
from zope.schema.vocabulary import SimpleVocabulary
class AvailableTransformsVocabulary(object):
"""Vocabulary for available Ploneboard transforms.
"""
implements... | ajibawa-2023/Python-Code-Large/train/row_4034 | 14 | 19 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4034:ImportFrom_L1_C0", "label": "from zope.interface import implements", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 443, 0, 1, 0, 0, 443, 0, 0], "semantic": {"name": "zope.interface", "arg_names": [], "im... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_4034:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4034:Expr_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4034:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4034:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
"""
$Id: config.py 55779 2007-12-18 14:26:49Z fschulze $
"""
PROJECTNAME = "Ploneboard"
SKINS_DIR = 'skins'
I18N_DOMAIN = PROJECTNAME.lower()
# Transform config
EMOTICON_TRANSFORM_ID = 'text_to_emoticons'
EMOTICON_TRANSFORM_MODULE = 'Products.Ploneboard.transforms.text_to_emoticons'
URL_TRANSFORM_MODULE = 'Products.Pl... | ajibawa-2023/Python-Code-Large/train/row_4035 | 17 | 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_4035:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.069, 0.1034, 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_4035:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4035:ImportFrom_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4035:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4035:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
from setuptools import setup, find_packages
version = '2.1b2'
setup(name='Products.Ploneboard',
version=version,
description="A discussion board for Plone.",
long_description=open("README.txt").read() + \
open("docs/INSTALL.txt").read() + \
open("docs/... | ajibawa-2023/Python-Code-Large/train/row_4036 | 3 | 37 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4036:ImportFrom_L1_C0", "label": "from setuptools import setup, find_packages", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 0, 0.66, 0.0, 182, 0, 2, 0, 0, 182, 0, 0], "semantic": {"name": "setuptools", "arg_names": [], "im... | [] |
##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... | ajibawa-2023/Python-Code-Large/train/row_4037 | 18 | 55 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4037:Expr_L14_C0", "label": "expression", "type": "expression", "loc": [14, 21], "level": 0, "parent": null, "vector": [8, 0, 0.3182, 0.1455, 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_4037:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4037:Import_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4037:Try_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4037:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4... |
#coding=utf8
__author__ = 'alex'
import datetime
import uuid
from sqlalchemy import Column,Integer,String,DateTime,Boolean,Text,UniqueConstraint,Table, MetaData,ForeignKey, Numeric
from sqlalchemy.ext.declarative import declarative_base, declared_attr
from sqlalchemy.orm import relationship,backref
from decimal import ... | ajibawa-2023/Python-Code-Large/train/row_4039 | 122 | 178 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4039:Assign_L2_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0112, 0.0056, 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_4039:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4039:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4039:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4039:Return_L21_C8"}, {"f": "ajibawa-2023/Python-Code... |
#coding=utf8
__author__ = 'alex'
DEBUG = True
LOCAL = True
MEDIA_ROOT = "/static/"
if LOCAL:
DB_URI = "mysql://root:123456@127.0.0.1:3306/315db?charset=utf8"
else:
DB_URI = "mysql://root:123456@127.0.0.1:3306/315db?charset=utf8"
TIMEOUT = 3600
SECRET_KEY = "11556666433221changge!" | ajibawa-2023/Python-Code-Large/train/row_4041 | 9 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4041:Assign_L2_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0833, 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_4041:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4041:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4041:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4041:Assign_L10_C4"}] |
#coding=utf8
__author__ = 'alex'
from flask import Blueprint, render_template, abort, g, request, redirect, url_for, session, flash, send_file
from utils import *
from biz import *
from models import *
index = Blueprint('index', __name__,template_folder='templates',url_prefix='/')
@index.app_template_filter(name="con... | ajibawa-2023/Python-Code-Large/train/row_4044 | 30 | 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_4044:Assign_L2_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0435, 0.0217, 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_4044:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4044:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4044:If_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4044:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/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_4045 | 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_4045: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_4045:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4045:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4045:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4045:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/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_4046 | 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_4046: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_4046:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4046:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4046:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4046:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_40... |
#!/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_4047 | 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_4047: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_4047:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4047:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4047:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4047:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/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_4048 | 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_4048: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_4048:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4048:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4048:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4048:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/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_4049 | 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_4049: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_4049:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4049:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4049:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4049:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4050 | 47 | 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_4050:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 23], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.0789, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_4050:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4050:Import_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4050:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4050:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
# Removes duplicate nicknames (issue99).
#
# To run this script:
# - Make sure App Engine library (incl. yaml) is in PYTHONPATH.
# - Make sure that the remote API is included in app.yaml.
# - Run "tools/appengine_console.py APP_ID".
# - Import this module.
# - update_accounts.run() updates accounts.
# - Use the o... | ajibawa-2023/Python-Code-Large/train/row_4051 | 36 | 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_4051:ImportFrom_L13_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.2097, 0.0161, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_4051:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4051:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4051:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4051:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
"""Configuration."""
import logging
import os
import re
from google.appengine.ext.appstats import recording
logging.info('Loading %s from %s', __name__, __file__)
# Custom webapp middleware to add Appstats.
def webapp_add_wsgi_middleware(app):
app = recording.appstats_wsgi_middleware(app)
return app
# Custom A... | ajibawa-2023/Python-Code-Large/train/row_4052 | 26 | 42 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4052:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0238, 0.0238, 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_4052:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4052:Assign_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4052:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4052:Return_L14_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4053 | 23 | 55 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4053:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.2727, 0.0182, 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_4053:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4053:Expr_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4053:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4053:FunctionDef_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | ajibawa-2023/Python-Code-Large/train/row_4056 | 66 | 119 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4056:Import_L16_C0", "label": "code import code", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.1345, 0.0084, 0, 0.66, 0.0, 44, 0, 1, 0, 0, 44, 0, 0], "semantic": {"name": "code", "arg_names": [], "import_names": ["code"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_4056:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4056:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4056:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4056:If_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright 2008-2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_4058 | 3 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4058:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.5357, 0.0357, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4059 | 22 | 60 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4059:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.0167, 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_4059:Try_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4059:Assign_L54_C4"}] |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4060 | 428 | 799 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4060:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0188, 0.0013, 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_4060:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4060:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4060:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4060:Assign_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4061 | 92 | 166 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4061:Import_L15_C0", "label": "datetime import datetime", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0904, 0.006, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["dateti... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_4061:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4061:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4061:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4061:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4062 | 215 | 695 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4062:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 43], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0417, 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_4062:FunctionDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4062:Expr_L93_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4062:FunctionDef_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4062:Assign_L105_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4063 | 146 | 259 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4063:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.0656, 0.0193, 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_4063:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4063:Expr_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4063:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4063:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4064 | 6 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4064:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.1546, 0.0103, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [] |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4065 | 12 | 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_4065:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.4545, 0.0303, 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_4065:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4065:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4065:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4065:FunctionDef_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | ajibawa-2023/Python-Code-Large/train/row_4066 | 141 | 257 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4066:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0584, 0.0039, 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_4066:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4066:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4066:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4066:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
import BasicEditor | ajibawa-2023/Python-Code-Large/train/row_4070 | 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_4070:Import_L1_C0", "label": "BasicEditor import BasicEditor", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 685, 0, 1, 0, 0, 685, 0, 0], "semantic": {"name": "BasicEditor", "arg_names": [], "import_names": ["Basic... | [] |
'''
Created on 2010-04-19
@author: Philippe Beaudoin
'''
from distutils.core import setup
import py2exe
setup(windows=['BasicEditor.py'],
options={
"py2exe": {
"includes": ["ctypes", "logging"],
"excludes": ["OpenGL"],
}
}
) | ajibawa-2023/Python-Code-Large/train/row_4071 | 4 | 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_4071:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1875, 0.3125, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
import MathLib
x = MathLib.Vector3d()
x.setValues(10,0.44,-132)
print "x = ",
x._print()
y = MathLib.Vector3d()
y.setValues(3,11,2)
print "y = ",
y._print()
x.addScaledVector(y,0.5)
print "x + 0.5y = ",
x._print()
| ajibawa-2023/Python-Code-Large/train/row_4072 | 12 | 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_4072:Import_L1_C0", "label": "MathLib import MathLib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 209, 0, 1, 0, 0, 209, 0, 0], "semantic": {"name": "MathLib", "arg_names": [], "import_names": ["MathLib"], ... | [] |
import Utils
Utils.test() | ajibawa-2023/Python-Code-Large/train/row_4073 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4073:Import_L1_C0", "label": "Utils import Utils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 842, 0, 1, 0, 0, 842, 0, 0], "semantic": {"name": "Utils", "arg_names": [], "import_names": ["Utils"], "rhs_cal... | [] |
'''
Created on 2009-09-29
@author: beaudoin
'''
import PyUtils
class Curve(PyUtils.Observable):
"""This class contains a named curve that can be observed."""
def __init__(self, name, trajectory1d, phiPtr = None):
"""Initializes a curve with the given name and attached to the given tr... | ajibawa-2023/Python-Code-Large/train/row_4074 | 22 | 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_4074:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0909, 0.1515, 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_4074:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4074:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4074:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4074:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
'''
Created on 2009-09-28
@author: beaudoin
'''
import PyUtils
class ObservableList(PyUtils.Observable):
"""An object that contains a list of observable objects of the application (i.e. controllers, characters...)"""
def __init__(self):
super(ObservableList,self).__init__()
... | ajibawa-2023/Python-Code-Large/train/row_4076 | 31 | 55 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4076:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0545, 0.0909, 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_4076:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4076:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4076:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4076:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
'''
Created on 2009-10-02
@author: beaudoin
'''
import PyUtils, Core, time, Physics, Utils, wx
class Snapshot(PyUtils.Observable):
"""This class contains a snapshot. That is, the entire state of the world, the controllers and the character."""
def __init__(self, parentBranch):
"""Tak... | ajibawa-2023/Python-Code-Large/train/row_4077 | 166 | 245 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4077:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0122, 0.0204, 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_4077:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4077:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4077:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4077:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
'''
Created on 2009-11-20
@author: beaudoin
'''
from OpenGL.GL import *
import wx, GLUtils, PyUtils, math, traceback, sys
import UI
class CharacterScaler(UI.GLUITools.WindowWithControlPoints):
"""Base class for a simple GL window that display a character with handles to scale its various elements."""
... | ajibawa-2023/Python-Code-Large/train/row_4078 | 251 | 304 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4078:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0099, 0.0164, 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_4078:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4078:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4078:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4078:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-11-20
@author: beaudoin
'''
import Core, Physics, PyUtils
from MathLib import Vector3d, Point3d
class CharacterDescription(object):
"""A simple description of a character
Be careful:
Left refer to the left-hand-side of the character (which is seen to the right from the... | ajibawa-2023/Python-Code-Large/train/row_4079 | 347 | 670 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4079:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0045, 0.0075, 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_4079:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4079:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4079:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4079:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-11-23
@author: beaudoin
'''
import wx, GLUtils, PyUtils, Core, Physics, Controllers
from CharacterDescription import CharacterDescription
from CharacterScaler import CharacterScalerFront
from ToolSet import ToolSet
class Model(object):
def __init__(self):
"""Creat... | ajibawa-2023/Python-Code-Large/train/row_4080 | 114 | 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_4080:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0182, 0.0303, 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_4080:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4080:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4080:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4080:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from Model import Model
from CharacterDescription import CharacterDescription
from CharacterScaler import CharacterScalerFront
from ToolSet import ToolSet | ajibawa-2023/Python-Code-Large/train/row_4081 | 4 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4081:ImportFrom_L1_C0", "label": "from Model import Model", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 929, 0, 1, 0, 0, 929, 0, 0], "semantic": {"name": "Model", "arg_names": [], "import_names": ["Model"], "rh... | [] |
'''
Created on 2009-11-23
@author: beaudoin
'''
import UI, wx
class ToolSet(UI.ToolSets.ToolsetBase):
def __init__(self, toolPanel, model):
"""Adds a tool set for the instant character to a toolpanel."""
super(ToolSet,self).__init__()
self._t... | ajibawa-2023/Python-Code-Large/train/row_4082 | 26 | 45 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4082:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_4082:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4082:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4082:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4082:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-09-02
@author: beaudoin
'''
import Proxy, Member
import App
cls = App.ObservableList
ObservableList = Proxy.create( cls,
members = [
Member.ObjectList( 'objects', None, cls.get, cls.getCount, cls.add, embedInParentNode = True ),
] )
cls = App.SnapshotBranch
Sn... | ajibawa-2023/Python-Code-Large/train/row_4083 | 9 | 31 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4083:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0968, 0.1613, 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 2009-09-22
@author: beaudoin
This module contains classes representing different possible type of data members within proxy object.
A member knows how to get/set itself from/to the wrapped object.
'''
import MathLib
import PyUtils
class TopLevel(object):
def __init__(self, type... | ajibawa-2023/Python-Code-Large/train/row_4084 | 174 | 218 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4084:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0206, 0.0367, 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_4084:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4084:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4084:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4084:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code... |
'''
Created on 2009-09-03
@author: beaudoin
'''
import Proxy
import Member
import Physics
def getArb(af, arbName):
if arbName is None : return None
arb = af.getARBByName( arbName )
if arb is None:
raise KeyError( "Articulated rigid body '"+arbName+"' not found in articulated fi... | ajibawa-2023/Python-Code-Large/train/row_4086 | 28 | 69 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4086:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0435, 0.0725, 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_4086:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4086:If_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4086:If_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4086:Return_L14_C25"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
'''
Created on 2009-09-24
@author: beaudoin
'''
import Utils, wx, PyUtils
import Member
from UI.InfoTree import getIconIndex
class NodeData(Utils.Observer):
"""
This class wraps one object presented in a node of the tree.
The wrapped object must be observable (either derived from Utils.O... | ajibawa-2023/Python-Code-Large/train/row_4087 | 157 | 247 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4087:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0121, 0.0202, 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_4087:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4087:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4087:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4087:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-09-03
@author: beaudoin
'''
import Proxy
import Member
from PyUtils import enum
import Controllers
import wx, Core
def getControlParams(controller, i):
if i == 0 :
return controller.getRootControlParams()
else :
return controller.getControlParams(i-1)
... | ajibawa-2023/Python-Code-Large/train/row_4088 | 78 | 192 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4088:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0156, 0.026, 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_4088:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4088:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4088:If_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4088:Return_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
'''
Created on 2009-09-22
@author: beaudoin
'''
import PyUtils
def create( wrappedClass = None, members = [], parent = None, caster = None, loader = None, verbose = True, icon = None, nameGetter = None ):
"""
Creates a new proxy class (NOT an instance).
This proxy class is meant as a wra... | ajibawa-2023/Python-Code-Large/train/row_4089 | 114 | 232 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4089:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0129, 0.0216, 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_4089:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4089:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4089:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4089:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
'''
Created on 2009-09-02
@author: beaudoin
'''
import Proxy
import Member
import Physics
cls = Physics.SphereCDP
SphereCDP = Proxy.create( cls, verbose = False, caster = Physics.castToSphereCDP,
members = [
Member.Point3d( 'center', (0.0,0.0,0.0), cls.getCenter, cls.setCenter ),
Me... | ajibawa-2023/Python-Code-Large/train/row_4090 | 12 | 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_4090:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0769, 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... | [] |
from SNMApp import ObservableList, SnapshotBranch, Snapshot
from CDPs import SphereCDP, BoxCDP, PlaneCDP, CapsuleCDP
from RigidBody import RigidBody, ArticulatedRigidBody
from ArticulatedFigure import ArticulatedFigure, Character
from Joints import BallInSocketJoint, UniversalJoint, HingeJoint, StiffJoint
from Sim... | ajibawa-2023/Python-Code-Large/train/row_4091 | 6 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4091:ImportFrom_L1_C0", "label": "from SNMApp import ObservableList, SnapshotBranch, Snapshot", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 323, 0, 3, 0, 0, 323, 0, 0], "semantic": {"name": "SNMApp", "arg_n... | [] |
'''
Created on 2009-09-03
@author: beaudoin
'''
import Proxy
import Member
import Physics, Core, wx
cls = Physics.ArticulatedFigure
ArticulatedFigure = Proxy.create( cls, loader = Physics.world().addArticulatedFigure,
members = [
Member.Basic( str, 'name', 'UnnamedArticulatedFigure', cls.g... | ajibawa-2023/Python-Code-Large/train/row_4092 | 8 | 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_4092:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1364, 0.2273, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
from SNMApp import SNMApp
from SnapshotTree import SnapshotBranch, Snapshot
from ObservableList import ObservableList
import Scenario
import InstantChar
import KeyframeEditor | ajibawa-2023/Python-Code-Large/train/row_4093 | 6 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4093:ImportFrom_L1_C0", "label": "from SNMApp import SNMApp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "SNMApp", "arg_names": [], "import_names": ["SNMAp... | [] |
'''
Created on 2009-10-06
@author: beaudoin
'''
import Scenario, PyUtils, Physics, MathLib, math
class Staircase(Scenario.Scenario):
"""A scenario that can be used to setup a staircase."""
def __init__(self, name = "Staircase scenario", staircaseWidth = 0.9, threadDepth = 0.2 , riserHeight = ... | ajibawa-2023/Python-Code-Large/train/row_4094 | 91 | 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_4094:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0201, 0.0336, 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_4094:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4094:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4094:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4094:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
'''
Created on 2009-10-06
@author: beaudoin
'''
import PyUtils
class Scenario(PyUtils.Observable):
"""The base class for a scenario. Each scenarios should have the following methods:
load()
Called when the scenario has been filled so that its resources can be created (like rigid... | ajibawa-2023/Python-Code-Large/train/row_4095 | 14 | 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_4095:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0938, 0.1562, 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_4095:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4095:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4095:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4095:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
from Staircase import Staircase | ajibawa-2023/Python-Code-Large/train/row_4096 | 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_4096:ImportFrom_L1_C0", "label": "from Staircase import Staircase", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 849, 0, 1, 0, 0, 849, 0, 0], "semantic": {"name": "Staircase", "arg_names": [], "import_names": ["St... | [] |
'''
Created on 2009-12-02
@author: beaudoin
'''
from OpenGL.GL import *
import UI, Core, GLUtils
from MathLib import Point3d, Vector3d, Quaternion
import math
class CheckBoxCallback(GLUtils.GLUICallback):
def __init__(self, editorWindow):
"""Private callback class."""
super(Ch... | ajibawa-2023/Python-Code-Large/train/row_4097 | 232 | 351 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4097:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0085, 0.0142, 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_4097:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4097:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4097:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4097:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-12-08
@author: beaudoin
'''
import Core
from MathLib import Vector3d, Point3d, Quaternion
import math
class PosableCharacter(object):
"""A character that can be posed and edited in the keyframe editor."""
def __init__(self, character, controller):
"""Initializes... | ajibawa-2023/Python-Code-Large/train/row_4098 | 117 | 183 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4098:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0164, 0.0273, 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_4098:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4098:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4098:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4098:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-12-02
@author: beaudoin
'''
import math, MathLib
class BaseHandle(object):
def __init__( self, trajectory, oppositeTrajectory = None, reverseOppositeJoint = False, minValue = -1000, maxValue = 1000 ):
"""
Creates a handle that can be manipulated and ... | ajibawa-2023/Python-Code-Large/train/row_4099 | 95 | 146 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4099:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0205, 0.0342, 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_4099:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4099:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4099:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4099:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-12-02
@author: beaudoin
'''
import wx, PyUtils, GLUtils
from Handle import BaseHandle, Handle
from PosableCharacter import PosableCharacter
from ToolSet import ToolSet
from EditorWindow import EditorWindow
from MathLib import Vector3d, Point3d, Trajectory3dv
class Model(object):
... | ajibawa-2023/Python-Code-Large/train/row_4100 | 137 | 209 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4100:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0144, 0.0239, 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_4100:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4100:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4100:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4100:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code... |
from Model import Model
| ajibawa-2023/Python-Code-Large/train/row_4101 | 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_4101:ImportFrom_L1_C0", "label": "from Model import Model", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 929, 0, 1, 0, 0, 929, 0, 0], "semantic": {"name": "Model", "arg_names": [], "import_names": ["Model"], "rhs_... | [] |
'''
Created on 2009-11-23
@author: beaudoin
'''
import UI, wx
class ToolSet(UI.ToolSets.ToolsetBase):
def __init__(self, toolPanel, model):
"""Adds a tool set for the keyframe editor to a toolpanel."""
super(ToolSet,self).__init__()
self._too... | ajibawa-2023/Python-Code-Large/train/row_4102 | 11 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4102:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1154, 0.1923, 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_4102:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4102:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4102:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4102:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-09-08
@author: beaudoin
Contains a abstract syntactic tree visitor for printing
nested function calls in a nice way. Used for cleaning-up
output of the serialize method.
See the python standard ast module for details.
'''
import ast
class Fancify( ast.NodeVisitor ):
de... | ajibawa-2023/Python-Code-Large/train/row_4103 | 61 | 99 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4103:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0606, 0.1111, 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_4103:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4103:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4103:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4103:Expr_L18_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-10-06
@author: beaudoin
A collection of useful functions for creating stock rigid bodies
'''
import Physics, MathLib, Mesh, PyUtils, math
from MathLib import Point3d, Vector3d
def createBox( size=(1,1,1), colour=(0.6,0.6,0.6), moiScale = 1, withMesh = True, **kwargs ):
"""
... | ajibawa-2023/Python-Code-Large/train/row_4104 | 181 | 371 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4104:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0108, 0.0189, 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_4104:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4104:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4104:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4104:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
'''
Created on 2009-09-16
@author: beaudoin
A Python version of the C++ Observable class found in Utils
'''
class Observable(object):
def __init__(self):
self._observers = []
self._hasChanged = False
self._batchChangeDepth = 0
def setChanged(self):
... | ajibawa-2023/Python-Code-Large/train/row_4105 | 45 | 78 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4105:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0513, 0.0897, 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_4105:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4105:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4105:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4105:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-... |
'''
Created on 2009-09-02
@author: beaudoin
'''
def callOnObjectOrList( objectOrList, function ):
"""Apply the specified function on :
- The single element passed as first parameter
- The list of elements passed as first parameter, if this is a list or tuple
- The list of values ... | ajibawa-2023/Python-Code-Large/train/row_4106 | 217 | 330 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4106:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0091, 0.0152, 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_4106:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4106:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4106:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4106:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
from Utils import *
from Enum import enum
from Observable import Observable
import Mesh
import RigidBody | ajibawa-2023/Python-Code-Large/train/row_4107 | 5 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4107:ImportFrom_L1_C0", "label": "from Utils import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 842, 0, 1, 0, 0, 842, 0, 0], "semantic": {"name": "Utils", "arg_names": [], "import_names": ["*"], "rhs_call_nam... | [] |
'''
Created on 2009-10-06
@author: beaudoin
A collection of useful functions for creating stock meshes
'''
import GLUtils, PyUtils, MathLib, math
from MathLib import Point3d, Vector3d
def create( vertices, faces, colour=(0.6,0.6,0.6) ):
"""
Creates a mesh having the specified vertices and faces... | ajibawa-2023/Python-Code-Large/train/row_4108 | 132 | 209 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4108:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0191, 0.0335, 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_4108:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4108:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4108:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4108:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on 2009-09-28
@author: beaudoin
'''
def enum( *args ):
"""
Creates an enum class.
Pass a dictionnary { choice : value, ... }
Here, choice needs to be a string and value is an integer
Can also pass a list or a tuple, then the values will be given automatically, starting a... | ajibawa-2023/Python-Code-Large/train/row_4109 | 67 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4109:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0283, 0.0472, 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_4109:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4109:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4109:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4109:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-11-27
@author: beaudoin
'''
import Core
import random, math
from MathLib import Point3d, Vector3d
class WalkController(Core.IKVMCController):
def __init__(self, character):
super(WalkController,self).__init__(character)
def typeName(self):
ret... | ajibawa-2023/Python-Code-Large/train/row_4110 | 59 | 89 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4110:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0337, 0.0562, 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_4110:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4110:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4110:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4110:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-11-27
@author: beaudoin
'''
import Core
import random, math
from MathLib import Point3d, Vector3d
class DanceController(Core.IKVMCController):
def __init__(self, character):
super(DanceController,self).__init__(character)
def typeName(self):
r... | ajibawa-2023/Python-Code-Large/train/row_4111 | 134 | 210 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4111:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0143, 0.0238, 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_4111:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4111:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4111:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4111:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from DanceController import DanceController
from WalkController import WalkController | ajibawa-2023/Python-Code-Large/train/row_4112 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4112:ImportFrom_L1_C0", "label": "from DanceController import DanceController", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 456, 0, 1, 0, 0, 456, 0, 0], "semantic": {"name": "DanceController", "arg_names": [], "i... | [] |
import Utils
Utils.test() | ajibawa-2023/Python-Code-Large/train/row_4113 | 2 | 3 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4113:Import_L1_C0", "label": "Utils import Utils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 842, 0, 1, 0, 0, 842, 0, 0], "semantic": {"name": "Utils", "arg_names": [], "import_names": ["Utils"], "rhs_cal... | [] |
'''
Created on 2009-09-26
@author: beaudoin
'''
import wx, UI
class Animation(object):
# Available speeds on the buttons
_buttonSpeeds = ( '1/16', '1/8', '1/4', '1/2', '1', '2', '4' )
def __init__(self, toolPanel):
"""Adds a tool set for animation information to a toolpanel.""... | ajibawa-2023/Python-Code-Large/train/row_4114 | 54 | 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_4114:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0366, 0.061, 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_4114:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4114:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4114:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4114:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-10-02
@author: beaudoin
'''
import wx, UI, PyUtils
class SnapshotTree(object):
def __init__(self, toolPanel):
"""Adds a tool set for animation information to a toolpanel."""
self._toolPanel = toolPanel
self._toolSet = toolPanel.createToolSet( "Snapsho... | ajibawa-2023/Python-Code-Large/train/row_4115 | 69 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4115:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0309, 0.0515, 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_4115:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4115:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4115:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4115:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-La... |
'''
Created on 2009-09-26
@author: beaudoin
'''
import UI, wx, math
class _OptionData(object):
def __init__(self, checkBox, getter, setter):
self.checkBox = checkBox
self.getter = getter
self.setter = setter
self.update()
def update(self):
... | ajibawa-2023/Python-Code-Large/train/row_4116 | 73 | 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_4116:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0291, 0.0485, 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_4116:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4116:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4116:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4116:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-... |
'''
Created on 2009-09-26
@author: beaudoin
'''
import UI, wx
from ToolsetBase import ToolsetBase
class Options(ToolsetBase):
def __init__(self, toolPanel):
"""Adds a tool set for various options information to a toolpanel."""
super(Options, self).__init__()
... | ajibawa-2023/Python-Code-Large/train/row_4117 | 15 | 30 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4117:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.1667, 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_4117:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4117:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4117:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4117:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-09-26
@author: beaudoin
'''
import UI, wx
from ToolsetBase import ToolsetBase
class Camera(ToolsetBase):
def __init__(self, toolPanel):
"""Adds a tool set for camera information to a toolpanel."""
super(Camera, self).__init__()
se... | ajibawa-2023/Python-Code-Large/train/row_4118 | 14 | 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_4118:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1034, 0.1724, 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_4118:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4118:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4118:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4118:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Created on 2009-09-26
@author: beaudoin
'''
import UI, wx, PyUtils, os, Core
class ControllerTree(object):
"""A toolset that can be used to display an editable tree of the loaded controllers."""
def __init__(self, toolPanel):
"""Adds a tool set that display a tree of controllers ... | ajibawa-2023/Python-Code-Large/train/row_4119 | 197 | 283 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4119:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0106, 0.0177, 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_4119:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4119:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4119:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4119:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
from ToolsetBase import ToolsetBase
from ControllerTree import ControllerTree
from Animation import Animation
from Options import Options
from Camera import Camera
from SnapshotTree import SnapshotTree | ajibawa-2023/Python-Code-Large/train/row_4120 | 6 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4120:ImportFrom_L1_C0", "label": "from ToolsetBase import ToolsetBase", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "ToolsetBase", "arg_names": [], "import_... | [] |
'''
Created on 2009-08-30
@author: beaudoin
Allows creation of a vertical collection of collapsible tool sets
'''
import wx
class ToolSet(wx.Panel):
"""A simple class that maintain tools and that can be hidden or showed."""
_triUp = None
_triDown = None
def __init__(sel... | ajibawa-2023/Python-Code-Large/train/row_4121 | 95 | 166 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4121:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0241, 0.0422, 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_4121:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4121:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4121:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4121:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
'''
Created on 2009-09-30
@author: beaudoin
'''
import wx, GLUtils, PyUtils
class CurveEditorCollection(GLUtils.GLUIContainer):
"""A collection of curve editor that observes the curve editors of the application."""
def __init__( self, parent, x=0, y=0, width=0, height=0, minWidth=-1, minHei... | ajibawa-2023/Python-Code-Large/train/row_4122 | 53 | 83 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4122:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0361, 0.0602, 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_4122:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4122:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4122:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4122:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-12-02
@author: beaudoin
'''
import GLUtils
from OpenGL.GL import *
class ControlPoint(object):
"""Base class for any type of control point.
Derived classes must implement:
getPos() returns the x, y position of the control point."""
def __init__( self ):... | ajibawa-2023/Python-Code-Large/train/row_4123 | 116 | 179 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4123:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0168, 0.0279, 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_4123:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4123:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4123:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4123:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
from CurveEditorCollection import CurveEditorCollection
from WindowWithControlPoints import WindowWithControlPoints, ControlPoint | ajibawa-2023/Python-Code-Large/train/row_4124 | 2 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4124:ImportFrom_L1_C0", "label": "from CurveEditorCollection import CurveEditorCollection", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 795, 0, 1, 0, 0, 795, 0, 0], "semantic": {"name": "CurveEditorCollection", "... | [] |
'''
Created on 2009-08-24
This module contains the main OpenGL application window that is used by all SNM applications
@author: beaudoin
'''
import wx
import UI
class MainWindow(wx.Frame):
"""The class for the main window."""
MIN_TOOLPANEL_WIDTH = 200
MIN_CONSOLE_HEIGHT = 100
... | ajibawa-2023/Python-Code-Large/train/row_4125 | 81 | 151 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4125:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0265, 0.0464, 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_4125:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4125:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4125:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4125:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
'''
Created on 2009-09-24
@author: beaudoin
'''
import Utils, wx
import PyUtils
class MemberDisplay(Utils.Observer):
"""
This class wraps an element and displays its content in a table with a grid sizer
"""
def __init__(self, table, sizer):
super(MemberDisplay,self).__i... | ajibawa-2023/Python-Code-Large/train/row_4126 | 80 | 100 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4126:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.03, 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_4126:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4126:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4126:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4126:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-10-08
@author: beaudoin
'''
import wx
class ToggleBitmapButton(wx.BitmapButton):
def __init__(self, parent, id=wx.ID_ANY, bitmap=wx.NullBitmap, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.BU_AUTODRAW, validator=wx.DefaultValidator, name=wx.ButtonNameStr, selected=Fals... | ajibawa-2023/Python-Code-Large/train/row_4127 | 36 | 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_4127:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0448, 0.0746, 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_4127:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4127:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4127:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4127:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-La... |
from ToggleBitmapButton import ToggleBitmapButton | ajibawa-2023/Python-Code-Large/train/row_4128 | 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_4128:ImportFrom_L1_C0", "label": "from ToggleBitmapButton import ToggleBitmapButton", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 45, 0, 1, 0, 0, 45, 0, 0], "semantic": {"name": "ToggleBitmapButton", "arg_names":... | [] |
import ToolSets
import GLUITools
import Ext
from InfoTree import InfoTreeBasic, InfoTree
from GLPanel import GLPanel
from PythonConsole import PythonConsole
from ToolPanel import ToolPanel
from MainWindow import MainWindow
| ajibawa-2023/Python-Code-Large/train/row_4129 | 8 | 9 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4129:Import_L1_C0", "label": "ToolSets import ToolSets", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 262, 0, 1, 0, 0, 262, 0, 0], "semantic": {"name": "ToolSets", "arg_names": [], "import_names": ["ToolSets... | [] |
'''
Created on 2009-09-14
@author: beaudoin
'''
import wx
import Utils
from MemberDisplay import MemberDisplay
# Unique list for all the images
_iconList = None
_iconDict = {}
_unknownIcon = '../data/ui/unknownIcon.png'
def _getIconList():
global _iconList
if _iconList is None :
_... | ajibawa-2023/Python-Code-Large/train/row_4130 | 125 | 204 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4130:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0147, 0.0245, 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_4130:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4130:If_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4130:If_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4130:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
'''
Created on 2009-08-30
@author: beaudoin
This file contains a class that can be used as a python interpreter console
'''
import wx
import sys
class PythonConsole(wx.Panel):
"""A console to output python and a command line interprete.
You should only have one of this as it seize the standard ... | ajibawa-2023/Python-Code-Large/train/row_4131 | 99 | 180 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4131:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0222, 0.0389, 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_4131:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4131:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4131:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4131:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
'''
Created on 2009-08-25
Basic controller editor
@author: beaudoin
'''
import sys
sys.path += ['.']
import wx, App, math
movieResolution = (1280,720)
movieSetup = False # True if we want a movie
glMovie = False # True if we're only interested in recording the GL canvas
# False ... | ajibawa-2023/Python-Code-Large/train/row_4133 | 40 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4133:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0408, 0.0714, 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_4133:If_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_4133:If_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4133:If_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_4133:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_4133:If... |
'''
Created on 2009-08-28
@author: beaudoin
'''
from App.Proxys import *
data = RigidBody(
name = "ground",
locked = True,
cdps = [ BoxCDP( (-50,-1,-50), (50,0,50) ),
PlaneCDP( (0,1,0), (0,-1,0) ) ],
frictionCoeff = 2.5,
restitutionCoeff = 0.35 ) | ajibawa-2023/Python-Code-Large/train/row_4134 | 3 | 15 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4134:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"... | [] |
'''
Created on 2009-08-28
@author: beaudoin
'''
from App.Proxys import *
data = RigidBody(
name = "ground",
locked = True,
cdps = [ PlaneCDP( (0,1,0), (0,0,0) ) ],
frictionCoeff = 2.5,
restitutionCoeff = 0.35 )
| ajibawa-2023/Python-Code-Large/train/row_4135 | 3 | 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_4135:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.3571, 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 2009-08-28
@author: beaudoin
'''
from App.Proxys import *
data = RigidBody(
name = "dodgeBall",
meshes = [ ("../data/models/sphere.obj",(0.8,0,0,1)) ],
mass = 2.0,
moi = ( 0.2,0.2,0.2 ),
cdps = [ SphereCDP( (0,0,0), 0.1 ) ],
pos = (1000, 1000, 0.2),
frictionC... | ajibawa-2023/Python-Code-Large/train/row_4136 | 3 | 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_4136: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 2009-08-28
@author: beaudoin
'''
from os import path
meshDir = path.join( path.dirname(__file__), "Meshes" )
colourDark = ( 0.5, 0.5, 0.5, 1 )
colourLight = ( 0.8, 0.8, 0.8, 1 )
from App.Proxys import *
data = Character(
name = "Bip",
... | ajibawa-2023/Python-Code-Large/train/row_4137 | 7 | 311 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4137:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0096, 0.0161, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
from App.Proxys import *
data = SimBiController(
name = 'Turning',
controlParamsList = [
ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ),
ControlParams( joint = 'pelvis_torso', kp = 200.0, kd = 30.0, tauMax = 10000.0, scale = ( 1... | ajibawa-2023/Python-Code-Large/train/row_4138 | 2 | 384 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4138:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0026, 0.0026, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"... | [] |
from App.Proxys import *
data = SimBiController(
name = 'Jumping',
controlParamsList = [
ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ),
ControlParams( joint = 'pelvis_torso', kp = 1000.0, kd = 100.0, tauMax = 10000.0, scale = (... | ajibawa-2023/Python-Code-Large/train/row_4139 | 2 | 421 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4139:ImportFrom_L1_C0", "label": "from App.Proxys import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0024, 0.0024, 0, 0.66, 0.0, 536, 0, 1, 0, 0, 536, 0, 0], "semantic": {"name": "App.Proxys", "arg_names": [], "import_names": ["*"... | [] |
'''
Created on 2009-09-09
@author: beaudoin
'''
from App.Proxys import *
data = SimBiController(
name = 'Walking',
startingState = 0,
controlParamsList = [
ControlParams( joint = 'root', kp = 3000, kd = 300, tauMax = 10000, scale = ( 1, 0.2, 1 ) ),
ControlParams( join... | ajibawa-2023/Python-Code-Large/train/row_4140 | 3 | 205 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_4140:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0146, 0.0244, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.