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 |
|---|---|---|---|---|---|---|---|
from crypto.aes import AESdecryptCBC
from firmware.img2 import IMG2
from firmware.img3 import Img3, extract_img3s
from firmware.scfg import parse_SCFG
from hfs.emf import EMFVolume
from hfs.hfs import HFSVolume
from image import NANDImageSplitCEs, NANDImageFlat
from keystore.effaceable import check_effaceable_he... | ajibawa-2023/Python-Code-Large/train/row_78431 | 335 | 423 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78431:ImportFrom_L1_C0", "label": "from crypto.aes import AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0024, 0.0024, 0, 0.66, 0.0, 692, 0, 1, 0, 0, 692, 0, 0], "semantic": {"name": "crypto.aes", "arg_names": [], "import... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78431:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78431:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78431:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78431:For_L28_C4"}, {"f": "ajibawa-2023/Python-Code-... |
from array import array
from construct.core import Struct, Union
from construct.macros import *
from structs import next_power_of_two, CEIL_DIVIDE, PAGETYPE_VFL
import struct
"""
https://github.com/iDroid-Project/openiBoot/blob/master/plat-s5l8900/includes/s5l8900/ftl.h
https://github.com/iDroid-Project/openiB... | ajibawa-2023/Python-Code-Large/train/row_78432 | 106 | 188 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78432:ImportFrom_L1_C0", "label": "from array import array", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0053, 0.0053, 0, 0.66, 0.0, 80, 0, 1, 0, 0, 80, 0, 0], "semantic": {"name": "array", "arg_names": [], "import_names": ["array"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78432:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78432:Assign_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78432:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78432:Assign_L66_C4"}, {"f": "ajibawa-2023/Python-Co... |
from construct.core import Struct, Union
from construct.macros import *
#hardcoded iOS keys
META_KEY = "92a742ab08c969bf006c9412d3cc79a5".decode("hex")
FILESYSTEM_KEY = "f65dae950e906c42b254cc58fc78eece".decode("hex")
def next_power_of_two(z):
i = 1
while i < z:
i <<= 1
return i
def ... | ajibawa-2023/Python-Code-Large/train/row_78433 | 37 | 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_78433:ImportFrom_L1_C0", "label": "from construct.core import Struct, Union", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.012, 0, 0.66, 0.0, 880, 0, 2, 0, 0, 880, 0, 0], "semantic": {"name": "construct.core", "arg_names": [], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78433:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78433:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78433:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78433:While_L10_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
from construct import *
from structs import next_power_of_two, PAGETYPE_VFL, CEIL_DIVIDE
from vfl import vfl_check_checksum, _vfl_vsvfl_spare_data
"""
https://github.com/iDroid-Project/openiBoot/blob/master/vfl-vsvfl/vsvfl.c
https://github.com/iDroid-Project/openiBoot/blob/master/vfl-vsvfl/includes/vfl/vsvfl.h
... | ajibawa-2023/Python-Code-Large/train/row_78434 | 128 | 193 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78434:ImportFrom_L1_C0", "label": "from construct import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0052, 0.0052, 0, 0.66, 0.0, 235, 0, 1, 0, 0, 235, 0, 0], "semantic": {"name": "construct", "arg_names": [], "import_names": ["*"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78434:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78434:FunctionDef_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78434:FunctionDef_L43_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78434:Assign_L44_C8"}, {"f": "ajibawa-2023/Python-... |
from optparse import OptionParser
from keystore.keybag import Keybag
from keychain import keychain_load
from keychain.managedconfiguration import bruteforce_old_pass
from util import readPlist
from keychain.keychain4 import Keychain4
import plistlib
def main():
parser = OptionParser(usage="%prog keychain.... | ajibawa-2023/Python-Code-Large/train/row_78435 | 56 | 72 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78435:ImportFrom_L1_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0139, 0.0139, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78435:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78435:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78435:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78435:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
from optparse import OptionParser
from hfs.emf import EMFVolume
from util.bdev import FileBlockDevice
import plistlib
def main():
parser = OptionParser(usage="emf_decrypter.py disk_image.bin")
parser.add_option("-w", "--nowrite", dest="write", action="store_false", default=True,
help=... | ajibawa-2023/Python-Code-Large/train/row_78436 | 30 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78436:ImportFrom_L1_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0294, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78436:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78436:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78436:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78436:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import sys, os
from PyQt4 import QtGui, QtCore
from backups.backup4 import MBDB
from keychain.keychain4 import Keychain4
from util.bplist import BPlistReader
from keystore.keybag import Keybag
from util import readPlist
class KeychainTreeWidget(QtGui.QTreeWidget):
def __init__(sel... | ajibawa-2023/Python-Code-Large/train/row_78437 | 109 | 156 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78437:Import_L3_C0", "label": "sys import sys, os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0064, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78437:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78437:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78437:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78437:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# usbmux.py - usbmux client library for Python
#
# Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Soft... | ajibawa-2023/Python-Code-Large/train/row_78438 | 180 | 246 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78438:Import_L21_C0", "label": "socket import socket, struct, select\u2026", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.0854, 0.0041, 0, 0.66, 0.0, 687, 0, 4, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78438:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78438:Import_L24_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78438:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78438:Assign_L25_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# tcprelay.py - TCP connection relay for usbmuxd
#
# Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free So... | ajibawa-2023/Python-Code-Large/train/row_78439 | 105 | 148 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78439:Import_L21_C0", "label": "usbmux import usbmux", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.1419, 0.0068, 0, 0.66, 0.0, 643, 0, 1, 0, 0, 643, 0, 0], "semantic": {"name": "usbmux", "arg_names": [], "import_names": ["usbmux"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78439:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78439:FunctionDef_L29_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78439:FunctionDef_L29_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_78439:Assign_L30_C2"}, {"f": "ajibawa-2023/Python-... |
devices = {
'z48': {'device_id':'\x5f', 'skip_replyspec': True},
's56k': {
'device_id':'\x5e',
'skip_replyspec': False,
'userref_type': 'aksy.devices.akai.sysex_types.S56K_USERREF'
}
}
| ajibawa-2023/Python-Code-Large/train/row_78442 | 1 | 8 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78442:Assign_L1_C0", "label": "devices =", "type": "assigned_variable", "loc": [1, 8], "level": 0, "parent": null, "vector": [14, 0, 0.5625, 1.0, 0, 0.66, 0.0, 416, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "devices", "arg_names": [], "import_names": [], "rhs_call_name... | [] |
#!/usr/bin/python
import sys, os, os.path, StringIO
import sysex_info
"""This hairy piece of code generates python modules from command
specifications (that once were extracted from the Akai sysex documentation
pdf)
Usage: generate_module.py command_spec_file skip_replyspec
command_spec_file: see data/z48 for example... | ajibawa-2023/Python-Code-Large/train/row_78443 | 19 | 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_78443:Import_L1_C0", "label": "sys import sys, os, os.path\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 509, 0, 4, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78443:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78443:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78443:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78443:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from lxml import etree
import os, os.path
dist_dir = "../dist"
build_dir = "../build"
def find_files(base, sub, ext):
d = os.path.join(base, sub)
for f in os.listdir(d):
if f.endswith(ext):
yield os.path.join(d, f)
def create_file(comp, path):
print path
e = etree.Element("File")
name = os... | ajibawa-2023/Python-Code-Large/train/row_78445 | 28 | 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_78445:ImportFrom_L1_C0", "label": "from lxml import etree", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 0, 0.66, 0.0, 123, 0, 1, 0, 0, 123, 0, 0], "semantic": {"name": "lxml", "arg_names": [], "import_names": ["etree"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78445:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78445:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78445:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78445:For_L9_C1"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
from pyftpdlib import ftpserver
from aksyfs import common
from aksy.config import create_option_parser
from aksy.device import Devices
from aksy import fileutils
import fnmatch
import os, time, errno
import logging
LOG = logging.getLogger("aksy.aksyfs.ftpd")
class AksyFtpFS(common.AksyFS, ftpse... | ajibawa-2023/Python-Code-Large/train/row_78446 | 123 | 200 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78446:ImportFrom_L2_C0", "label": "from pyftpdlib import ftpserver", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.01, 0.005, 0, 0.66, 0.0, 91, 0, 1, 0, 0, 91, 0, 0], "semantic": {"name": "pyftpdlib", "arg_names": [], "import_names": ["... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78446:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78446:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78446:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78446:Return_L16_C8"}, {"f": "ajibawa-2023/Python-... |
# package
| ajibawa-2023/Python-Code-Large/train/row_78448 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
import gtk
def match_func(model, iter, data):
column, key = data # data is a tuple containing column number, key
value = model.get_value(iter, column)
return value == key
def search(model, iter, func, data):
if not func:
func = match_func
while iter:
if func(model, iter, data):
... | ajibawa-2023/Python-Code-Large/train/row_78452 | 45 | 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_78452:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78452:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78452:Assign_L4_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78452:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78452:Assign_L5_C3"}, {"f": "ajibawa-2023/Python-Code-L... |
import os.path, os
def convert(filename):
if os.path.exists(filename):
[path, fileend] = os.path.split(filename)
[name, ext] = os.path.splitext(fileend)
src = filename
dest = path + "\\" + name + "_rs" + ext
cmd = "sox \"" + src + "\" -r 44100 \"" + dest + "\" resample -ql"
print cmd
os.system(cmd)
r... | ajibawa-2023/Python-Code-Large/train/row_78453 | 12 | 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_78453:Import_L1_C0", "label": "os.path import os.path, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 79, 0, 2, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78453:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78453:If_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78453:If_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_78453:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
# package | ajibawa-2023/Python-Code-Large/train/row_78454 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
import modelutils
# list of mpc pad -> notes, left -> right = 1 -> 16
mpcpads = [
37,36,42,82,40,38,46,44,48,47,45,43,49,55,51,53, # a
54,69,81,80,65,66,76,77,56,62,63,64,73,74,71,39, # b
52,57,58,59,60,61,67,68,70,72,75,78,79,35,41,50, # c
83,84,85,86,87,88,89,90,91,92,... | ajibawa-2023/Python-Code-Large/train/row_78455 | 22 | 155 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78455:Import_L1_C0", "label": "modelutils import modelutils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0065, 0.0065, 0, 0.66, 0.0, 63, 0, 1, 0, 0, 63, 0, 0], "semantic": {"name": "modelutils", "arg_names": [], "import_names": ["mod... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78455:For_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78455:For_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78455:For_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78455:If_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_7845... |
import samplerobject, program, keygroup, modulationmatrix, modulationpin
class Program(samplerobject.SamplerObject):
def __init__(self, s, name, handle = None):
samplerobject.SamplerObject.__init__(self, s, None, "programtools")
self.name = name
if handle:
self.handle = handle
... | ajibawa-2023/Python-Code-Large/train/row_78456 | 68 | 104 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78456:Import_L1_C0", "label": "samplerobject import samplerobject, program, keygroup\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0096, 0.0096, 0, 0.66, 0.0, 109, 0, 5, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78456:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78456:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78456:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78456:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from aksui.utils import modelutils
import program
class Programs:
programtypes = {0:"Keygroup", 1:"Drum"}
def __init__(self,s):
self.s = s
pt = s.programtools
self.no_items = pt.get_no_items()
self.handles_names = pt.get_handles_names()
self.names = pt.get_names()
... | ajibawa-2023/Python-Code-Large/train/row_78457 | 25 | 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_78457:ImportFrom_L1_C0", "label": "from aksui.utils import modelutils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 0, 0.66, 0.0, 132, 0, 1, 0, 0, 132, 0, 0], "semantic": {"name": "aksui.utils", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78457:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78457:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78457:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78457:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
class ModulationMatrix:
# should be a total of 36 (0 based) * marks sample + hold mods
sources = ['NONE','MODWHEEL','BEND UP','BEND DOWN',
'AFTERTOUCH','VELOCITY','BIPOLAR VELOCITY','OFF VELOCITY',
'KEYBOARD','LFO1','LFO2','AMP ENV',
'FILTER ENV',... | ajibawa-2023/Python-Code-Large/train/row_78458 | 4 | 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_78458:ClassDef_L1_C0", "label": "ModulationMatrix", "type": "class", "loc": [1, 28], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.9655, 0, 0.66, 0.0, 70, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "ModulationMatrix", "arg_names": [], "import_names": [], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78458:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78458:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78458:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78458:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
import samplerobject
class Zone(samplerobject.SamplerObject):
def __init__(self, kg, index):
samplerobject.SamplerObject.__init__(self, kg.s, kg, "zonetools", index)
self.samples = kg.samples
self.keygroup = kg
self.specialattrs = ["sample",]
self.keygroup_index = self.keygr... | ajibawa-2023/Python-Code-Large/train/row_78459 | 19 | 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_78459:Import_L1_C0", "label": "samplerobject import samplerobject", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 109, 0, 1, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78459:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78459:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78459:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78459:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import samplerobject, zone, envelope
keygroup_cache = {}
def get_keygroup_cached(p, index):
key = (p.handle, index)
if not key in keygroup_cache.keys():
keygroup_cache[key] = Keygroup(p, index)
keygroup = keygroup_cache[key]
return keygroup
class Keygroup(samplerobject.SamplerObject):
... | ajibawa-2023/Python-Code-Large/train/row_78460 | 83 | 118 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78460:Import_L1_C0", "label": "samplerobject import samplerobject, zone, envelope", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0085, 0.0085, 0, 0.66, 0.0, 109, 0, 3, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78460:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78460:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78460:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78460:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
class ModulationPin:
def __init__(self, s, pin_index, source, dest, level, keygroup_index):
self.s = s
self.pin_index = pin_index
self.source = source
self.dest = dest
self.level = level
self.keygroup_index = keygroup_index
self.min = -100
self.max = 1... | ajibawa-2023/Python-Code-Large/train/row_78461 | 21 | 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_78461:ClassDef_L1_C0", "label": "ModulationPin", "type": "class", "loc": [1, 30], "level": 0, "parent": null, "vector": [3, 0, 0.5167, 1.0, 0, 0.66, 0.0, 657, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "ModulationPin", "arg_names": [], "import_names": [], "rhs_call_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78461:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78461:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78461:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78461:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code... |
import samplerobject
class Multi(samplerobject.SamplerObject):
def __init__(self,s,name,handle=None):
samplerobject.SamplerObject.__init__(self,s,None,"multitools")
self.name = name
if handle:
self.handle = handle
else:
self.handle = self.s.multitool... | ajibawa-2023/Python-Code-Large/train/row_78462 | 21 | 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_78462:Import_L1_C0", "label": "samplerobject import samplerobject", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0303, 0.0303, 0, 0.66, 0.0, 109, 0, 1, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78462:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78462:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78462:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78462:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import samplerobject
from aksy import fileutils
class Recording(samplerobject.SamplerObject):
def __init__(self, s):
samplerobject.SamplerObject.__init__(self, s, None, "recordingtools")
self.attrs = ["status", "progress", "max_rec_time", "input", "mode",
"monitor", "rec_time", "pitch", "threshold... | ajibawa-2023/Python-Code-Large/train/row_78463 | 13 | 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_78463:Import_L1_C0", "label": "samplerobject import samplerobject", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 109, 0, 1, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78463:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78463:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78463:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78463:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import samplerobject
class Part(samplerobject.SamplerObject):
def __init__(self, s, m, index):
samplerobject.SamplerObject.__init__(self, s, m, "multitools", index)
self.attrs = ["multi_part_name", "part_midi_channel", "part_mute", "part_solo", "part_level", "part_output", "part_pan", "part_fx_chan... | ajibawa-2023/Python-Code-Large/train/row_78464 | 11 | 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_78464:Import_L1_C0", "label": "samplerobject import samplerobject", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 109, 0, 1, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78464:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78464:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78464:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78464:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
#import os,os.path,re,logging,sys,struct,math,traceback
import gtk,pygtk,gobject
import aksy
import aksui.utils
class SamplerObject(object):
def __init__(self, s, parent, whichtools, index = None):
self.parent = parent
self.s = s
self.index = index
self.whichtools = whichtools
... | ajibawa-2023/Python-Code-Large/train/row_78465 | 115 | 185 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78465:Import_L2_C0", "label": "gtk import gtk, pygtk, gobject", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0108, 0.0054, 0, 0.66, 0.0, 166, 0, 3, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78465:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78465:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78465:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78465:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
import samplerobject
class Envelope(samplerobject.SamplerObject):
def __init__(self, keygroup, index, xoffset=10, yoffset=10):
samplerobject.SamplerObject.__init__(self, keygroup.s, keygroup, "keygrouptools", index)
self.keygroup_index = keygroup.index
self.need_index_for_set = True
... | ajibawa-2023/Python-Code-Large/train/row_78466 | 26 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78466:Import_L1_C0", "label": "samplerobject import samplerobject", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 109, 0, 1, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78466:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78466:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78466:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78466:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import samplerobject
class LFO(samplerobject.SamplerObject):
def __init__(self, s, kg, index):
samplerobject.SamplerObject.__init__(self, s, kg, "keygrouptools", index)
self.attrs = ['lfo_rate','lfo_delay','lfo_depth','lfo_waveform','lfo_phase','lfo_shift','lfo_midi_sync','midi_clock_sync_div'... | ajibawa-2023/Python-Code-Large/train/row_78467 | 14 | 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_78467:Import_L1_C0", "label": "samplerobject import samplerobject", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0357, 0, 0.66, 0.0, 109, 0, 1, 0, 0, 109, 0, 0], "semantic": {"name": "samplerobject", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78467:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78467:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78467:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78467:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from aksui.utils import modelutils
class MultiFX:
fxlist = [ 'NO EFFECT', 'CHORUS>MONO', 'CHORUS>STEREO', 'CHORUS>XOVER', 'CHORUS+DELAY', 'COMPRESSOR/LIMITER', 'DELAY>MONO', 'DELAY>MULTI TAP', 'DELAY>PAN', 'DELAY>PING PONG', 'DELAY>STEREO', 'DELAY>XOVER', 'DIGITAL EQ', 'DISTORTION', 'ENHANCER', 'EXPANDER', 'FLANGE... | ajibawa-2023/Python-Code-Large/train/row_78468 | 138 | 194 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78468:ImportFrom_L1_C0", "label": "from aksui.utils import modelutils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0052, 0.0052, 0, 0.66, 0.0, 132, 0, 1, 0, 0, 132, 0, 0], "semantic": {"name": "aksui.utils", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78468:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78468:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78468:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78468:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
# package | ajibawa-2023/Python-Code-Large/train/row_78469 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
class Samples:
def __init__(self,s):
self.s = s
st = s.sampletools
self.allsamples = st.get_names()
| ajibawa-2023/Python-Code-Large/train/row_78470 | 5 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78470:ClassDef_L2_C0", "label": "Samples", "type": "class", "loc": [2, 6], "level": 0, "parent": null, "vector": [3, 0, 0.6667, 0.8333, 0, 0.66, 0.0, 863, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Samples", "arg_names": [], "import_names": [], "rhs_call_name": "", "an... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78470:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78470:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78470:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78470:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
import os,os.path,re,logging,sys,struct,math,traceback,getopt,inspect
import pygtk
pygtk.require('2.0')
import gtk,gtk.glade,gobject
# two panel browser
def get_selected_rows_from_treeview(treeview):
"""
will return a single value or a list depending on what the selection mode is
"""... | ajibawa-2023/Python-Code-Large/train/row_78471 | 118 | 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_78471:Import_L2_C0", "label": "os import os, os.path, re\u2026", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0121, 0.0061, 0, 0.66, 0.0, 688, 0, 10, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78471:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78471:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78471:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78471:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
#import hotshot, hotshot.stats
import os,os.path,re,logging,sys,struct,math,traceback,getopt,inspect
import types
import pygtk
pygtk.require('2.0')
import gtk,gtk.glade,gobject
import aksy
# our stuff
from ak import *
from ak.samplerobject import *
from UI import *
from utils import midiutils, ... | ajibawa-2023/Python-Code-Large/train/row_78472 | 193 | 287 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78472:Import_L3_C0", "label": "os import os, os.path, re\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0035, 0, 0.66, 0.0, 688, 0, 10, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78472:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78472:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78472:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78472:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import gtk
from aksui.UI import base, editors
class MultiEditorWindow(gtk.Window):
def __init__(self, s, m):
gtk.Window.__init__(self)
self.s = s
self.setup(m)
def setup(self, m):
self.set_default_size(600, 500)
self.editor = MultiEditor(self.s, m)
self... | ajibawa-2023/Python-Code-Large/train/row_78473 | 18 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78473:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0435, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78473:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78473:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78473:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78473:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import gobject
import base
"""
Recording interface(s)!
GOOD IDEA: Put a 'rec' button next to the ... in zone, popup a dialog, record stuff, hit 'OK' and the name of the new sample is returned, select in zone list. Maybe its possible to do this even while playing back??
GOOD IDEA: Chromatic recording of samples from ... | ajibawa-2023/Python-Code-Large/train/row_78474 | 51 | 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_78474:Import_L1_C0", "label": "gobject import gobject", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 0, 0.66, 0.0, 90, 0, 1, 0, 0, 90, 0, 0], "semantic": {"name": "gobject", "arg_names": [], "import_names": ["gobject"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78474:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78474:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78474:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78474:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Co... |
import base
class KeygroupFilter(base.Base):
def __init__(self, keygroup):
base.Base.__init__(self, keygroup, "tableFilter") | ajibawa-2023/Python-Code-Large/train/row_78475 | 4 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78475:Import_L1_C0", "label": "base import base", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["base"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78475:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78475:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78475:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78475:Expr_L5_C8"}] |
#!/usr/bin/env python
import gtk
import os.path
# our stuff
from aksui.utils import midiutils, modelutils
from aksui.ak import envelope, keygroup, part
import rangewidget
__author__ = 'Joseph Misra'
__version__ = '0.71'
class EnvelopeHBox(gtk.HBox):
def __init__(self, kg, index):
gtk.HBox.__init__(self... | ajibawa-2023/Python-Code-Large/train/row_78476 | 152 | 212 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78476:Import_L2_C0", "label": "gtk import gtk", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0047, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78476:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78476:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78476:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78476:Expr_L17_C8"}, {"f": "ajibawa-2023/Python-Co... |
import gtk
import panelbase, rangewidget
from aksui.utils import midiutils
class FilterPanel(panelbase.PanelBase):
def __init__(self,kg,cb):
panelbase.PanelBase.__init__(self,kg,"Filter",cb)
def setup(self, kg):
self.clear_children(True)
self.kg = kg
... | ajibawa-2023/Python-Code-Large/train/row_78477 | 21 | 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_78477:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.027, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78477:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78477:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78477:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78477:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
# Custom widgets via Cairo: Knob, Level, Range, Keygroup etc.
import math, urllib
from urlparse import urlparse
import gobject, gtk
import hitbox, widget
from aksui.utils import modelutils, midiutils
from aksui.ak import *
class SliderWidget(hitbox.HitBox):
def __init__(self, min, max, w, h, value_descriptions... | ajibawa-2023/Python-Code-Large/train/row_78478 | 494 | 735 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78478:Import_L3_C0", "label": "math import math, urllib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0014, 0, 0.66, 0.0, 526, 0, 2, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math", "url... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78478:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78478:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78478:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78478:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Co... |
import gtk
import base, zoneeditor, keygroupdetails, keygroupfilter, keygroupenvelope
from aksui.ak import keygroup
class KeygroupEditor(base.Base):
def __init__(self, program, index):
base.Base.__init__(self, None, "notebookKeygroup")
self.s = program.s
self.p = program
self.inde... | ajibawa-2023/Python-Code-Large/train/row_78479 | 63 | 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_78479:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.012, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78479:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78479:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78479:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78479:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import gtk
import base, editors, keygrouppanel, zonepanel, modmatrix, filterpanel, lfopanel
import keygroupenvelope
from aksui.ak import keygroup
class KeygroupEditorWindow(gtk.Window):
def __init__(self, s, p):
gtk.Window.__init__(self)
self.connect("delete_event", self.delete_event)
sel... | ajibawa-2023/Python-Code-Large/train/row_78480 | 88 | 125 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78480:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.008, 0.008, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78480:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78480:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78480:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78480:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-... |
from aksui.UI import base
class ProgramDetails(base.Base):
def __init__(self, program):
base.Base.__init__(self, program, "windowProgramDetails")
self.editor.connect("delete-event", self.on_delete_event)
self.set_samplerobject(program)
def on_delete_event(self, wi... | ajibawa-2023/Python-Code-Large/train/row_78481 | 8 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78481:ImportFrom_L1_C0", "label": "from aksui.UI import base", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 174, 0, 1, 0, 0, 174, 0, 0], "semantic": {"name": "aksui.UI", "arg_names": [], "import_names": ["ba... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78481:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78481:FunctionDef_L5_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78481:FunctionDef_L5_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_78481:Expr_L6_C10"}, {"f": "ajibawa-2023/Python-Code-... |
import gtk
class AkWidget(gtk.DrawingArea):
"""
base for our widgets
"""
def __init__(self, so = None, soattr = None, interval = 10, units = "", value_offset = 0):
gtk.DrawingArea.__init__(self)
self.value_offset = value_offset
self.interval = interval
self.units = unit... | ajibawa-2023/Python-Code-Large/train/row_78482 | 57 | 102 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78482:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0098, 0.0098, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78482:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78482:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78482:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78482:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
import gtk
class PanelBase(gtk.VBox):
def __init__(self, so, title = None, set_callback = None):
gtk.VBox.__init__(self, False, 0)
if title:
self.title = title
else:
self.title = None
self.set_callback = set_callback
so.set_cal... | ajibawa-2023/Python-Code-Large/train/row_78483 | 23 | 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_78483:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78483:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78483:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78483:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78483:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import gtk
import os.path
import panelbase, rangewidget
from aksui.utils import midiutils
class ZonePanel(panelbase.PanelBase):
def __init__(self,kg,cb):
self.dnd_list = [ ( 'text/uri-list', 0, 80 ) ]
panelbase.PanelBase.__init__(self,kg,"Zones",cb)
def on_drag_data_received(s... | ajibawa-2023/Python-Code-Large/train/row_78485 | 39 | 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_78485:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0145, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78485:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78485:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78485:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78485:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
import base
class KeygroupDetails(base.Base):
def __init__(self, keygroup):
base.Base.__init__(self, keygroup, "tableKeygroupDetails") | ajibawa-2023/Python-Code-Large/train/row_78486 | 4 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78486:Import_L1_C0", "label": "base import base", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 47, 0, 1, 0, 0, 47, 0, 0], "semantic": {"name": "base", "arg_names": [], "import_names": ["base"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78486:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78486:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78486:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78486:Expr_L5_C8"}] |
import gtk
import panelbase, rangewidget
class KeygroupPanel(panelbase.PanelBase):
def __init__(self, kg, cb):
panelbase.PanelBase.__init__(self,kg,"Keygroup Details",cb)
def setup(self, kg):
self.clear_children(True)
print kg.index
self.kg = kg
... | ajibawa-2023/Python-Code-Large/train/row_78487 | 18 | 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_78487:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78487:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78487:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78487:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78487:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import gtk
import panelbase, editors
class KeygroupEnvelopes(panelbase.PanelBase):
def __init__(self, keygroup, cb):
self.env_labels = ["Amp Anvelope", "Filter Envelope", "Aux Envelope"]
panelbase.PanelBase.__init__(self, keygroup, "Envelopes", cb)
def setup(self, keygroup):
... | ajibawa-2023/Python-Code-Large/train/row_78488 | 26 | 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_78488:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0323, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78488:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78488:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78488:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78488:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
import gtk
import panelbase, rangewidget
from aksui.utils import midiutils
from aksui.ak import lfo
class LFOPanel(panelbase.PanelBase):
def __init__(self,kg,cb=None):
panelbase.PanelBase.__init__(self,kg,"LFOs",cb)
def setup(self, kg):
self.clear_children(True)
self.kg ... | ajibawa-2023/Python-Code-Large/train/row_78489 | 27 | 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_78489:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78489:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78489:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78489:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78489:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from aksui.ak import envelope
import hitbox
import gtk
class EnvelopeWidget(gtk.DrawingArea):
def __init__(self, kg, index):
# TODO: Enable scaling.
gtk.DrawingArea.__init__(self)
self.dragging = -1
self.xoffset = 10
self.yoffset = 10
self.set_size_request(250 + se... | ajibawa-2023/Python-Code-Large/train/row_78490 | 82 | 132 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78490:ImportFrom_L1_C0", "label": "from aksui.ak import envelope", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0076, 0, 0.66, 0.0, 903, 0, 1, 0, 0, 903, 0, 0], "semantic": {"name": "aksui.ak", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78490:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78490:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78490:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78490:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import gtk
# from aksui.utils.modelutils import *
LCD_PIXELS_WIDTH = 248
LCD_PIXELS_HEIGHT = 60
BORDER_PIXELS = 2
WINDOW_WIDTH = LCD_PIXELS_WIDTH * 2 + BORDER_PIXELS
WINDOW_HEIGHT = LCD_PIXELS_HEIGHT * 2 + BORDER_PIXELS
w,h = 8,256
mapmap = {}
for x in range(0,256):
ent = [0,0,0,0,0,0,0,0]
xx = 0
for p ... | ajibawa-2023/Python-Code-Large/train/row_78491 | 129 | 184 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78491:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0054, 0.0054, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78491:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78491:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78491:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78491:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
import gtk
import panelbase, rangewidget
from aksui.ak import modulationmatrix
"""
sources = ['NONE','MODWHEEL','BEND UP','BEND DOWN',
'AFTERTOUCH','VELOCITY','BIPOLAR VELOCITY','OFF VELOCITY',
'KEYBOARD','LFO1','LFO2','AMP ENV',
'FILTER EN... | ajibawa-2023/Python-Code-Large/train/row_78493 | 38 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78493:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0125, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78493:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78493:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78493:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78493:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-... |
# package | ajibawa-2023/Python-Code-Large/train/row_78494 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
import gtk
from aksui.ak import multifx
from aksui.utils import modelutils
class MultiFXChannelEditor(gtk.VBox):
def __init__(self,mMultiFXChannelEditor):
gtk.VBox.__init__(self)
self.mMultiFXChannelEditor = mMultiFXChannelEditor
self.channel = mMultiFXChannelEditor
self.moduleWid... | ajibawa-2023/Python-Code-Large/train/row_78495 | 93 | 137 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78495:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0073, 0.0073, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78495:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78495:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78495:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78495:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import gtk
class HitBox:
def __init__(self,x,y,w,h):
self.x = x
self.y = y
self.w = w
self.h = h
self.is_scaled = False
self.index = 0
def point_in(self,x,y):
horiz = False
vert = False
if x >= self.x and x <= self.x+self.w:
... | ajibawa-2023/Python-Code-Large/train/row_78496 | 74 | 108 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78496:Import_L1_C0", "label": "gtk import gtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0093, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_name"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78496:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78496:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78496:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78496:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
# package
| ajibawa-2023/Python-Code-Large/train/row_78497 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
from aksy.devices.akai import sysex
import logging, struct, StringIO
REQ_START = 'Request: '
LEN_REQ_START = len(REQ_START)
RESP_START = 'Response: '
LEN_RESP_START = len(RESP_START)
LOG = logging.getLogger("aksy.devices.akai.replaying_connector")
def encode(byte_str):
s = StringIO.StringIO(len(byte_str))
... | ajibawa-2023/Python-Code-Large/train/row_78498 | 58 | 81 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78498:ImportFrom_L1_C0", "label": "from aksy.devices.akai import sysex", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0123, 0.0123, 0, 0.66, 0.0, 149, 0, 1, 0, 0, 149, 0, 0], "semantic": {"name": "aksy.devices.akai", "arg_names": [], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78498:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78498:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78498:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78498:For_L15_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# package | ajibawa-2023/Python-Code-Large/train/row_78499 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
import os.path
script_dir = os.path.abspath(os.path.split(__file__)[0])
AKSY_SRCDIR = os.path.dirname(script_dir)
def get_aksydir(rel_path):
return os.path.join(AKSY_SRCDIR, rel_path)
def get_test_resource(name):
return os.path.join(script_dir, name) | ajibawa-2023/Python-Code-Large/train/row_78500 | 7 | 10 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78500:Import_L1_C0", "label": "os.path import os.path", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78500:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78500:Return_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78500:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78500:Return_L10_C4"}] |
# package
| ajibawa-2023/Python-Code-Large/train/row_78501 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
# package
| ajibawa-2023/Python-Code-Large/train/row_78502 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
# package devices
| ajibawa-2023/Python-Code-Large/train/row_78503 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
from aksy.devices.akai import transfertools
from aksyx import AkaiSampler
from aksy import fileutils
from aksyosc.server import OSCServer
from aksyosc.handler import SamplerCallbackManager
import logging, asyncore
from threading import Thread
log = logging.getLogger("aksy")
class Sampler(object):
"""Base clas... | ajibawa-2023/Python-Code-Large/train/row_78504 | 43 | 77 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78504:ImportFrom_L1_C0", "label": "from aksy.devices.akai import transfertools", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.013, 0.013, 0, 0.66, 0.0, 149, 0, 1, 0, 0, 149, 0, 0], "semantic": {"name": "aksy.devices.akai", "arg_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78504:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78504:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78504:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78504:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
import logging
import sysextools, disktools, programtools, sampletools, multitools, songtools
from aksy.devices.akai.sampler import Sampler
#from aksy.devices.akai import sysex
from aksy.devices.akai import model
log = logging.getLogger("aksy")
class S56K(Sampler):
"""S56K
"""
def __init__(se... | ajibawa-2023/Python-Code-Large/train/row_78505 | 24 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78505:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 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_78505:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78505:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78505:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78505:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-... |
""" Python equivalent of akai section songtools
Methods to manipulate in-memory songs
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Songtools:
def __init__(self, s56k):
self.sampler = s56k
self.set... | ajibawa-2023/Python-Code-Large/train/row_78506 | 55 | 101 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78506:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0347, 0.0396, 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_78506:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78506:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78506:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78506:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section sysextools
Methods to manipulate sysex parameters
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Sysextools:
def __init__(self, s56k):
self.sampler = s56k
self.... | ajibawa-2023/Python-Code-Large/train/row_78507 | 44 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78507:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.05, 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_78507:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78507:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78507:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78507:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section disktools
Methods to manipulate the sampler's filesystem
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Disktools:
def __init__(self, s56k):
self.sampler = s56k
... | ajibawa-2023/Python-Code-Large/train/row_78508 | 100 | 176 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78508:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0199, 0.0227, 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_78508:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78508:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78508:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78508:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section sampletools
Methods to manipulate in-memory samples
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
__credits__ = ["Mike Goins"]
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Sampletools:
def __init__(self, s56k):
s... | ajibawa-2023/Python-Code-Large/train/row_78509 | 68 | 128 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78509:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0273, 0.0312, 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_78509:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78509:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78509:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78509:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section multitools
Methods to manipulate in-memory multis
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Multitools:
def __init__(self, s56k):
self.sampler = s56k
self.... | ajibawa-2023/Python-Code-Large/train/row_78510 | 51 | 95 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78510:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0368, 0.0421, 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_78510:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78510:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78510:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78510:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section programtools
Methods to manipulate in-memory programs
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Programtools:
def __init__(self, s56k):
self.sampler = s56k
... | ajibawa-2023/Python-Code-Large/train/row_78511 | 335 | 628 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78511:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0056, 0.0064, 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_78511:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78511:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78511:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78511:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
import os, struct
from StringIO import StringIO
from aksy.devices.akai.filemodel import Zone, Program, Chunk, Keygroup
def parse_byte(chunk, offset):
return 1, struct.unpack('<b', chunk[offset])
def parse_string(chunk, offset, length=None):
if length is None:
length = struct.unpack('B', chunk[offset:o... | ajibawa-2023/Python-Code-Large/train/row_78512 | 65 | 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_78512:Import_L1_C0", "label": "os import os, struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0118, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "struct"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78512:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78512:Return_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78512:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78512:If_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
NOTE_NAMES = 'a', 'b', 'bes', 'c', 'cis', 'd' 'es', 'e', 'f', 'fis', 'g', 'gis'
class Envelope:
@staticmethod
def create_default():
env = Envelope()
env.attack = 0
env.decay = 50
env.release = 15
env.sustain = 100
env.velo_to_attack = 0
env.velo_on_to_rel... | ajibawa-2023/Python-Code-Large/train/row_78514 | 234 | 274 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78514:Assign_L1_C0", "label": "NOTE_NAMES =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.0036, 0.0036, 0, 0.66, 0.0, 811, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "NOTE_NAMES", "arg_names": [], "import_names": [], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78514:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78514:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78514:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78514:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code... |
import logging
import sysextools, disktools, programtools, multitools, songtools, multifxtools
import sampletools, systemtools, recordingtools, keygrouptools, zonetools, frontpaneltools
from aksy.devices.akai.sampler import Sampler
from aksy.devices.akai import model
log = logging.getLogger("aksy")
class Z4... | ajibawa-2023/Python-Code-Large/train/row_78515 | 31 | 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_78515:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0222, 0.0222, 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_78515:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78515:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78515:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78515:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-... |
""" Python equivalent of akai section multifxtools
Multi FX
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Multifxtools:
def __init__(self, z48):
self.sampler = z48
self.is_fxcard_installed_cmd = Co... | ajibawa-2023/Python-Code-Large/train/row_78516 | 180 | 357 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78516:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0098, 0.0112, 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_78516:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78516:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78516:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78516:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section songtools
Song
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Songtools:
def __init__(self, z48):
self.sampler = z48
self.get_no_items_cmd = Command('_', '\x28\... | ajibawa-2023/Python-Code-Large/train/row_78517 | 172 | 323 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78517:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0108, 0.0124, 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_78517:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78517:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78517:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78517:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section frontpaneltools
Methods to manipulate the front panel
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Frontpaneltools:
def __init__(self, connector):
self.connector = co... | ajibawa-2023/Python-Code-Large/train/row_78518 | 45 | 72 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78518:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0486, 0.0556, 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_78518:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78518:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78518:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78518:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section sysextools
Methods to manipulate sysex parameters
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Sysextools:
def __init__(self, z48):
self.sampler = z48
self.qu... | ajibawa-2023/Python-Code-Large/train/row_78519 | 44 | 77 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78519:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0455, 0.0519, 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_78519:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78519:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78519:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78519:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Disktools
Methods to manipulate the samplers filesystem
"""
__author__ = 'Walco van Loon'
__version__= "$Rev$"
import aksy.devices.akai.sysex
class Disktools:
def __init__(self, connector):
self.connector = connector
self.update_disklist_cmd = aksy.devices.akai.sysex.Command('\x5e', ... | ajibawa-2023/Python-Code-Large/train/row_78520 | 95 | 189 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78520:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0185, 0.0212, 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_78520:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78520:FunctionDef_L13_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78520:FunctionDef_L13_C5", "t": "ajibawa-2023/Python-Code-Large/train/row_78520:Assign_L14_C10"}, {"f": "ajibawa-2023/Python... |
""" Python equivalent of akai section zonetools
Manipulate the zones of a keygroup
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Zonetools:
def __init__(self, z48):
self.sampler = z48
self.get_samp... | ajibawa-2023/Python-Code-Large/train/row_78521 | 112 | 212 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78521:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0165, 0.0189, 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_78521:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78521:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78521:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78521:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section sampletools
Sample
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Sampletools:
def __init__(self, z48):
self.sampler = z48
self.get_no_items_cmd = Command('_', ... | ajibawa-2023/Python-Code-Large/train/row_78522 | 308 | 572 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78522:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0061, 0.007, 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_78522:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78522:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78522:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78522:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section systemtools
Methods to manipulate system parameters
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Systemtools:
def __init__(self, z48):
self.sampler = z48
self... | ajibawa-2023/Python-Code-Large/train/row_78523 | 424 | 804 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78523:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0044, 0.005, 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_78523:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78523:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78523:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78523:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section keygrouptools
Keygroup manipulation
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Keygrouptools:
def __init__(self, z48):
self.sampler = z48
self.set_curr_keyg... | ajibawa-2023/Python-Code-Large/train/row_78524 | 336 | 632 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78524:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0055, 0.0063, 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_78524:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78524:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78524:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78524:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
# package z48
| ajibawa-2023/Python-Code-Large/train/row_78525 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
""" Python equivalent of akai section multitools
Methods to manipulate multis
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Multitools:
def __init__(self, z48):
self.sampler = z48
self.get_no_items... | ajibawa-2023/Python-Code-Large/train/row_78526 | 440 | 824 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78526:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0042, 0.0049, 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_78526:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78526:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78526:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78526:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section programtools
Methods to manipulate sampler programs
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Programtools:
def __init__(self, z48):
self.sampler = z48
sel... | ajibawa-2023/Python-Code-Large/train/row_78527 | 448 | 836 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78527:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0042, 0.0048, 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_78527:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78527:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78527:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78527:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
""" Python equivalent of akai section recordingtools
Methods to facilitate recording
"""
__author__ = 'Walco van Loon'
__version__ = '0.2'
from aksy.devices.akai.sysex import Command
import aksy.devices.akai.sysex_types
class Recordingtools:
def __init__(self, z48):
self.sampler = z48
self.g... | ajibawa-2023/Python-Code-Large/train/row_78528 | 164 | 299 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78528:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0117, 0.0134, 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_78528:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78528:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78528:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78528:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
from StringIO import StringIO
import struct, os.path, os
"""
Reading/writing AKP files
Based on http://mda.smartelectronix.com/akai/AKPspec.html
"""
WAVE_FORMAT_PCM = 0x0001
class Sample:
""" Models a S5/6000/Z series sample
which is an ordinary wave file with sampler chunks.
-dwords manufacturer, produ... | ajibawa-2023/Python-Code-Large/train/row_78529 | 414 | 849 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78529:ImportFrom_L1_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0012, 0.0012, 0, 0.66, 0.0, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78529:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78529:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78529:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78529:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-... |
""" Transfertools
Methods to send and receive files from the sampler.
"""
__author__ = 'Walco van Loon'
__version__= "$Rev: 1354 $"
import os.path, logging
import aksy.devices.akai.sysex
from aksyx import AkaiSampler
LOG = logging.getLogger('aksy.devices.akai.transfertools')
class Transfertools:
def __init... | ajibawa-2023/Python-Code-Large/train/row_78530 | 30 | 50 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78530:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 5], "level": 0, "parent": null, "vector": [8, 0, 0.07, 0.08, 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_78530:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78530:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78530:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78530:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
from aksy.devices.akai import sysex
from aksyx import AkaiSampler
import logging
LOG = logging.getLogger("aksy.devices.akai.connector")
class USBConnector(AkaiSampler):
""" USB Connector for Akai Samplers.
"""
def __init__(self, device_id):
AkaiSampler.__init__(self, getattr(USBConnector, device... | ajibawa-2023/Python-Code-Large/train/row_78531 | 25 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78531:ImportFrom_L1_C0", "label": "from aksy.devices.akai import sysex", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.025, 0, 0.66, 0.0, 149, 0, 1, 0, 0, 149, 0, 0], "semantic": {"name": "aksy.devices.akai", "arg_names": [], "im... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78531:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78531:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78531:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78531:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
import struct, logging, errno
from aksy.devices.akai import sysex_types, model
from aksy.devices.akai.sysex_types import START_SYSEX, END_SYSEX
AKAI_ID = '\x47'
Z48_ID = '\x5f'
S56K_ID = '\x5e'
REPLY_ID_OK = '\x4f'
REPLY_ID_DONE = '\x44'
REPLY_ID_REPLY = '\x52'
REPLY_ID_ERROR = '\x45'
log = logging.getLogger("aksy")... | ajibawa-2023/Python-Code-Large/train/row_78532 | 144 | 258 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78532:Import_L1_C0", "label": "struct import struct, logging, errno", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.0039, 0, 0.66, 0.0, 399, 0, 3, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78532:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78532:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78532:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78532:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-... |
import struct, logging, types
START_SYSEX = '\xf0'
STRING_TERMINATOR = '\x00'
END_SYSEX = '\xf7'
POSTIVE = '\x00'
NEGATIVE = '\x01'
log = logging.getLogger("aksy.devices.akai.sysex_types")
log.disabled = True
def byte_repr(bytes):
return repr([ "%02x" %byte for byte in struct.unpack(str(len(bytes)) + 'B'... | ajibawa-2023/Python-Code-Large/train/row_78533 | 398 | 628 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78533:Import_L1_C0", "label": "struct import struct, logging, types", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0016, 0.0016, 0, 0.66, 0.0, 399, 0, 3, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78533:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78533:Return_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78533:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78533:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-... |
from aksy.devices.akai.filemodel import Chunk
import struct
def create_chunk(name, spec, *bytes):
raw_bytes = struct.pack(spec, *bytes)
return Chunk(name, raw_bytes,
len(raw_bytes)+8)
class ChunkBuilder:
def build(self, chunk, fh):
fh.write(struct.pack("<sl", chunk.name, chunk.length)... | ajibawa-2023/Python-Code-Large/train/row_78535 | 23 | 144 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78535:ImportFrom_L1_C0", "label": "from aksy.devices.akai.filemodel import Chunk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0069, 0.0069, 0, 0.66, 0.0, 613, 0, 1, 0, 0, 613, 0, 0], "semantic": {"name": "aksy.devices.akai.filemodel"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78535:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78535:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78535:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78535:Return_L6_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# package akai
| ajibawa-2023/Python-Code-Large/train/row_78536 | 0 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [] | [] |
#!/usr/bin/python
import os, os.path, fnmatch, sys
from aksy.device import Devices
from aksy import config
__author__ = 'Walco van Loon'
__version__ = '0.01'
def create_option_parser():
usage = """%prog [filename patterns]
Download all program files and multis from memory:
%prog *.akp *.akm
... | ajibawa-2023/Python-Code-Large/train/row_78537 | 69 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78537:Import_L3_C0", "label": "os import os, os.path, fnmatch\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0273, 0.0091, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["o... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78537:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78537:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78537:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78537:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Co... |
# -*- coding: latin-1 -*-
import os,os.path
from aksy.device import Devices
from aksy import config
from aksy.devices.akai.sampler import Sampler
from aksy.devices.akai import fileparser
import aksy.fileutils
__author__ = 'Joseph Misra/Walco van Loon'
__version__ = '0.01'
def create_option_parser():
usage = "%p... | ajibawa-2023/Python-Code-Large/train/row_78538 | 88 | 118 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78538:Import_L2_C0", "label": "os import os, os.path", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0169, 0.0085, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "os.path"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78538:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78538:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78538:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78538:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
import ConfigParser
import os.path, sys
from optparse import OptionParser
def create_option_parser(usage):
parser = OptionParser(usage=usage)
config = get_config()
parser.add_option("-t", nargs=1, dest="sampler_type",
help="Type of sampler (z48/mpc4k/s56k)", default=get_value(config, 'sampler', 'type... | ajibawa-2023/Python-Code-Large/train/row_78539 | 26 | 35 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78539:Import_L1_C0", "label": "ConfigParser import ConfigParser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0286, 0.0286, 0, 0.66, 0.0, 272, 0, 1, 0, 0, 272, 0, 0], "semantic": {"name": "ConfigParser", "arg_names": [], "import_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78539:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78539:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78539:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78539:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import wx
from wx import py
from wxPython.wx import wxPySimpleApp, wxFrame,wxID_ANY,wxDEFAULT_FRAME_STYLE,wxNO_FULL_REPAINT_ON_RESIZE,wxMenu
from wxPython.wx import wxNewId,wxMenuBar,EVT_MENU, EVT_CLOSE, wxMessageDialog, wxOK, wxSplitterWindow
from wxPython.wx import WXK_TAB
from aksy.device import Devices
import sys
... | ajibawa-2023/Python-Code-Large/train/row_78541 | 79 | 116 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_78541:Import_L1_C0", "label": "wx import wx", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0086, 0.0086, 0, 0.66, 0.0, 666, 0, 1, 0, 0, 666, 0, 0], "semantic": {"name": "wx", "arg_names": [], "import_names": ["wx"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78541:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78541:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78541:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78541:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Co... |
import threading
LOCK = threading.Lock()
def transaction(lock=LOCK):
def decorator(func):
def wrapper(*args, **kwargs):
lock.acquire()
try:
return func(*args, **kwargs)
finally:
lock.release()
return wrapper
re... | ajibawa-2023/Python-Code-Large/train/row_78542 | 11 | 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_78542:Import_L1_C0", "label": "threading import threading", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 83, 0, 1, 0, 0, 83, 0, 0], "semantic": {"name": "threading", "arg_names": [], "import_names": ["thread... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_78542:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_78542:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_78542:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_78542:FunctionDef_L6_C8"}, {"f": "ajibawa-2023/Pyt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.