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 |
|---|---|---|---|---|---|---|---|
"""
0
1:MCSHA256DigestWithSalt
2:SecKeyFromPassphraseDataHMACSHA1
"""
from crypto.PBKDF2 import PBKDF2
import plistlib
import hashlib
SALT1 = "F92F024CA2CB9754".decode("hex")
hashMethods={
1: (lambda p,salt:hashlib.sha256(SALT1 + p)),
2: (lambda p,salt:PBKDF2(p, salt, iterations=1000).read(20))
... | ajibawa-2023/Python-Code-Large/train/row_76648 | 16 | 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_76648:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1111, 0.1852, 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_76648:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76648:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76648:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76648:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Co... |
from keychain import Keychain
from crypto.aes import AESdecryptCBC, AESencryptCBC
import hashlib
class Keychain3(Keychain):
def __init__(self, filename, key835=None):
Keychain.__init__(self, filename)
self.key835 = key835
def decrypt_data(self, data):
if data == None:... | ajibawa-2023/Python-Code-Large/train/row_76649 | 32 | 44 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76649:ImportFrom_L1_C0", "label": "from keychain import Keychain", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0227, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "keychain", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76649:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76649:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76649:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76649:Expr_L7_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
from store import PlistKeychain, SQLiteKeychain
from util import write_file
from util.asciitables import print_table
from util.bplist import BPlistReader
from util.cert import RSA_KEY_DER_to_PEM, CERT_DER_to_PEM
import M2Crypto
import hashlib
import plistlib
import sqlite3
import string
import struct
KSECA... | ajibawa-2023/Python-Code-Large/train/row_76650 | 171 | 237 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76650:ImportFrom_L1_C0", "label": "from store import PlistKeychain, SQLiteKeychain", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0042, 0.0042, 0, 0.66, 0.0, 354, 0, 2, 0, 0, 354, 0, 0], "semantic": {"name": "store", "arg_names": [], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76650:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76650:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76650:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76650:If_L25_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
from crypto.aes import AESdecryptCBC
import struct
"""
iOS 4 keychain-2.db data column format
version 0x00000000
key class 0x00000008
kSecAttrAccessibleWhenUnlocked 6
kSecAttrAccessibleAfterFirstUnlock 7
... | ajibawa-2023/Python-Code-Large/train/row_76651 | 59 | 92 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76651:ImportFrom_L1_C0", "label": "from crypto.aes import AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0109, 0.0109, 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_76651:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76651:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76651:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76651:If_L33_C8"}, {"f": "ajibawa-2023/Python-Code... |
import sqlite3
from keychain3 import Keychain3
from keychain4 import Keychain4
def keychain_load(filename, keybag, key835):
version = sqlite3.connect(filename).execute("SELECT version FROM tversion").fetchone()[0]
#print "Keychain version : %d" % version
if version == 3:
return Keychain3(fi... | ajibawa-2023/Python-Code-Large/train/row_76652 | 9 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76652:Import_L1_C0", "label": "sqlite3 import sqlite3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite3"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76652:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76652:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76652:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76652:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
import plistlib
import sqlite3
import struct
from util import readPlist
class KeychainStore(object):
def __init__(self):
pass
def convertDict(self, d):
return d
def returnResults(self, r):
for a in r:
yield self.convertDict(a)
def get_i... | ajibawa-2023/Python-Code-Large/train/row_76653 | 40 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76653:Import_L1_C0", "label": "plistlib import plistlib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0179, 0.0179, 0, 0.66, 0.0, 592, 0, 1, 0, 0, 592, 0, 0], "semantic": {"name": "plistlib", "arg_names": [], "import_names": ["plistli... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76653:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76653:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76653:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76653:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-C... |
#!/usr/bin/python
import plistlib
import zipfile
import struct
import sys
from optparse import OptionParser
from Crypto.Cipher import AES
from util.lzss import decompress_lzss
devices = {"n82ap": "iPhone1,2",
"n88ap": "iPhone2,1",
"n90ap": "iPhone3,1",
"n92ap": "iPhone3,3",
... | ajibawa-2023/Python-Code-Large/train/row_76654 | 94 | 198 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76654:Import_L3_C0", "label": "plistlib import plistlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0152, 0.0051, 0, 0.66, 0.0, 592, 0, 1, 0, 0, 592, 0, 0], "semantic": {"name": "plistlib", "arg_names": [], "import_names": ["plistli... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76654:ClassDef_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76654:FunctionDef_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76654:FunctionDef_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76654:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-... |
#!/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_76655 | 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_76655: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_76655:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76655:Import_L24_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76655:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76655:Assign_L25_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
from crypto.aes import AESdecryptCBC
from util import read_file, write_file
from util.ramdiskclient import RamdiskToolClient
import M2Crypto
import struct
import hashlib
import os
import sys
def decryptGID(data):
try:
client = RamdiskToolClient.get()
except:
return None
r = cl... | ajibawa-2023/Python-Code-Large/train/row_76656 | 207 | 290 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76656:ImportFrom_L1_C0", "label": "from crypto.aes import AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0034, 0.0034, 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_76656:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76656:Try_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76656:Try_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76656:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
from construct.core import Struct
from construct.macros import *
IMG2 = Struct("IMG2",
String("magic",4),
ULInt32("block_size"),
ULInt32("images_offset"),
ULInt32("images_block"),
ULInt32("images_length"),
Padding(0x1C),
... | ajibawa-2023/Python-Code-Large/train/row_76657 | 3 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76657:ImportFrom_L1_C0", "label": "from construct.core import Struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 880, 0, 1, 0, 0, 880, 0, 0], "semantic": {"name": "construct.core", "arg_names": [], "impor... | [] |
from construct.core import Struct
from construct.macros import *
from construct import RepeatUntil, OneOf
from util import hexdump
SCFGItem = Struct("SCFGItem",
String("tag", 4),
String("data", 16, padchar="\x00")
)
SCFG = Struct("SCFG",
... | ajibawa-2023/Python-Code-Large/train/row_76658 | 13 | 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_76658:ImportFrom_L1_C0", "label": "from construct.core import Struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 880, 0, 1, 0, 0, 880, 0, 0], "semantic": {"name": "construct.core", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76658:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76658:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76658:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76658:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Co... |
from crypto.aes import AESdecryptCBC
from hashlib import sha1
from struct import unpack
import os
MBDB_SIGNATURE = 'mbdb\x05\x00'
MASK_SYMBOLIC_LINK = 0xa000
MASK_REGULAR_FILE = 0x8000
MASK_DIRECTORY = 0x4000
def warn(msg):
print "WARNING: %s" % msg
class MBFileRecord(object):
def __init_... | ajibawa-2023/Python-Code-Large/train/row_76659 | 119 | 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_76659:ImportFrom_L1_C0", "label": "from crypto.aes import AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0061, 0.0061, 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_76659:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76659:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76659:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76659:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Co... |
from crypto.PBKDF2 import PBKDF2
from crypto.aes import AESdecryptCBC
from util import read_file, write_file, makedirs, readPlist
from util.bplist import BPlistReader
import hashlib
import struct
import glob
import sys
import os
"""
decrypt iOS 3 backup blob (metadata and file contents)
"""
def decrypt_... | ajibawa-2023/Python-Code-Large/train/row_76660 | 49 | 67 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76660:ImportFrom_L1_C0", "label": "from crypto.PBKDF2 import PBKDF2", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0149, 0.0149, 0, 0.66, 0.0, 428, 0, 1, 0, 0, 428, 0, 0], "semantic": {"name": "crypto.PBKDF2", "arg_names": [], "import_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76660:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76660:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76660:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76660:If_L17_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
from Crypto.Cipher import AES
ZEROIV = "\x00"*16
def removePadding(blocksize, s):
'Remove rfc 1423 padding from string.'
n = ord(s[-1]) # last byte contains number of padding bytes
if n > blocksize or n > len(s):
raise Exception('invalid padding')
return s[:-n]
def AESdecryptCBC(da... | ajibawa-2023/Python-Code-Large/train/row_76661 | 21 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76661:ImportFrom_L1_C0", "label": "from Crypto.Cipher import AES", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 663, 0, 1, 0, 0, 663, 0, 0], "semantic": {"name": "Crypto.Cipher", "arg_names": [], "import_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76661:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76661:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76661:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76661:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
import struct
from Crypto.Cipher import AES
"""
http://www.ietf.org/rfc/rfc3394.txt
quick'n'dirty AES wrap implementation
used by iOS 4 KeyStore kernel extension for wrapping/unwrapping encryption keys
"""
def unpack64bit(s):
return struct.unpack(">Q",s)[0]
def pack64bit(s):
return struc... | ajibawa-2023/Python-Code-Large/train/row_76662 | 44 | 70 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76662:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76662:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76662:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76662:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76662:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Cod... |
from Crypto.Util import number
CURVE_P = (2**255 - 19)
CURVE_A = 121665
def curve25519_monty(x1, z1, x2, z2, qmqp):
a = (x1 + z1) * (x2 - z2) % CURVE_P
b = (x1 - z1) * (x2 + z2) % CURVE_P
x4 = (a + b) * (a + b) % CURVE_P
e = (a - b) * (a - b) % CURVE_P
z4 = e * qmqp % CURVE_P
a ... | ajibawa-2023/Python-Code-Large/train/row_76664 | 50 | 74 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76664:ImportFrom_L1_C0", "label": "from Crypto.Util import number", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0135, 0, 0.66, 0.0, 888, 0, 1, 0, 0, 888, 0, 0], "semantic": {"name": "Crypto.Util", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76664:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76664:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76664:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76664:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/env python
from Crypto.Cipher import AES
from Crypto.Util import strxor
from struct import pack, unpack
def gcm_rightshift(vec):
for x in range(15, 0, -1):
c = vec[x] >> 1
c |= (vec[x-1] << 7) & 0x80
vec[x] = c
vec[0] >>= 1
return vec
def gcm_gf_mult(a, b):
mask = [... | ajibawa-2023/Python-Code-Large/train/row_76665 | 85 | 129 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76665:ImportFrom_L3_C0", "label": "from Crypto.Cipher import AES", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0233, 0.0078, 0, 0.66, 0.0, 663, 0, 1, 0, 0, 663, 0, 0], "semantic": {"name": "Crypto.Cipher", "arg_names": [], "import_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76665:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76665:For_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76665:For_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76665:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
from backups.backup3 import decrypt_backup3
from backups.backup4 import MBDB
from keystore.keybag import Keybag
from util import readPlist, makedirs
import os
import sys
import plistlib
showinfo = ["Device Name", "Display Name", "Last Backup Date", "IMEI",
"Serial Number", "Product Type", "Product... | ajibawa-2023/Python-Code-Large/train/row_76666 | 60 | 78 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76666:ImportFrom_L1_C0", "label": "from backups.backup3 import decrypt_backup3", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0128, 0.0128, 0, 0.66, 0.0, 256, 0, 1, 0, 0, 256, 0, 0], "semantic": {"name": "backups.backup3", "arg_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76666:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76666:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76666:If_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76666:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
def print_table(title, headers, rows):
widths = []
for i in xrange(len(headers)):
z = map(len, [row[i] for row in rows])
z.append(len(headers[i]))
widths.append(max(z))
width = sum(widths) + len(headers) + 1
print "-"* width
print "|" + title.center(widt... | ajibawa-2023/Python-Code-Large/train/row_76667 | 22 | 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_76667:FunctionDef_L2_C0", "label": "print_table", "type": "function", "loc": [2, 29], "level": 0, "parent": null, "vector": [2, 0, 0.5345, 0.9655, 0, 0.66, 0.0, 389, 0, 3, 0, 0, 0, 0, 27], "semantic": {"name": "print_table", "arg_names": ["title", "headers", "rows"], "i... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76667:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76667:Assign_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76667:FunctionDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76667:For_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
"""
/**************************************************************
LZSS.C -- A Data Compression Program
***************************************************************
4/6/1989 Haruhiko Okumura
Use, distribute, and modify this program freely.
Please send me your improved versions.
PC-VAN ... | ajibawa-2023/Python-Code-Large/train/row_76668 | 38 | 71 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76668:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 20], "level": 0, "parent": null, "vector": [8, 0, 0.1479, 0.2817, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76668:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76668:If_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76668:If_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76668:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
import base64
def chunks(l, n):
return (l[i:i+n] for i in xrange(0, len(l), n))
def RSA_KEY_DER_to_PEM(data):
a = ["-----BEGIN RSA PRIVATE KEY-----"]
a.extend(chunks(base64.b64encode(data),64))
a.append("-----END RSA PRIVATE KEY-----")
return "\n".join(a)
def CERT_DER_to_PEM(data):
... | ajibawa-2023/Python-Code-Large/train/row_76669 | 13 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76669:Import_L1_C0", "label": "base64 import base64", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76669:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76669:Return_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76669:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76669:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import struct
def tlvToDict(blob):
d = {}
for tag,data in loopTLVBlocks(blob):
d[tag] = data
return d
def tlvToList(blob):
return list(loopTLVBlocks(blob))
def loopTLVBlocks(blob):
i = 0
while i + 8 <= len(blob):
tag = blob[i:i+4]
length = struct.unp... | ajibawa-2023/Python-Code-Large/train/row_76670 | 15 | 19 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76670:Import_L1_C0", "label": "struct import struct", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0526, 0, 0.66, 0.0, 399, 0, 1, 0, 0, 399, 0, 0], "semantic": {"name": "struct", "arg_names": [], "import_names": ["struct"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76670:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76670:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76670:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76670:For_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
import os
import sys
from util import sizeof_fmt, hexdump
from progressbar import ProgressBar
from crypto.aes import AESdecryptCBC, AESencryptCBC
class FileBlockDevice(object):
def __init__(self, filename, offset=0, write=False):
flag = os.O_RDONLY if not write else os.O_RDWR
if sys.platfo... | ajibawa-2023/Python-Code-Large/train/row_76671 | 109 | 139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76671:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0072, 0.0072, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76671:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76671:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76671:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76671:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
"""
http://github.com/farcaller/bplist-python/blob/master/bplist.py
"""
import struct
import plistlib
from datetime import datetime, timedelta
class BPListWriter(object):
def __init__(self, objects):
self.bplist = ""
self.objects = objects
def binary(self):
'''binary -> string
... | ajibawa-2023/Python-Code-Large/train/row_76672 | 157 | 251 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76672:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 3], "level": 0, "parent": null, "vector": [8, 0, 0.008, 0.012, 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_76672:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76672:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76672:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76672:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod... |
from keystore.keybag import Keybag
from keystore.effaceable import EffaceableLockers
from util.ramdiskclient import RamdiskToolClient
import plistlib
COMPLEXITY={
0: "4 digits",
1: "n digits",
2: "n alphanum"
}
def checkPasscodeComplexity(data_volume):
p... | ajibawa-2023/Python-Code-Large/train/row_76673 | 57 | 70 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76673:ImportFrom_L1_C0", "label": "from keystore.keybag import Keybag", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0143, 0.0143, 0, 0.66, 0.0, 856, 0, 1, 0, 0, 856, 0, 0], "semantic": {"name": "keystore.keybag", "arg_names": [], "imp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76673:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76673:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76673:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76673:If_L14_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import glob
import plistlib
import os
from bplist import BPlistReader
import cPickle
import gzip
def read_file(filename):
f = open(filename, "rb")
data = f.read()
f.close()
return data
def write_file(filename,data):
f = open(filename, "wb")
f.write(data)
f.close()
def ma... | ajibawa-2023/Python-Code-Large/train/row_76674 | 94 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76674:Import_L1_C0", "label": "glob import glob", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0081, 0.0081, 0, 0.66, 0.0, 958, 0, 1, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["glob"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76674:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76674:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76674:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76674:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-... |
import plistlib
import struct
import socket
from datetime import datetime
from progressbar import ProgressBar, Percentage, Bar, SimpleProgress, ETA
from usbmux import usbmux
from util import sizeof_fmt
kIOAESAcceleratorEncrypt = 0
kIOAESAcceleratorDecrypt = 1
kIOAESAcceleratorGIDMask = 0x3E8
kIOAESAccele... | ajibawa-2023/Python-Code-Large/train/row_76675 | 120 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76675:Import_L1_C0", "label": "plistlib import plistlib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0058, 0.0058, 0, 0.66, 0.0, 592, 0, 1, 0, 0, 592, 0, 0], "semantic": {"name": "plistlib", "arg_names": [], "import_names": ["plistli... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76675:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76675:FunctionDef_L18_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76675:FunctionDef_L18_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_76675:Try_L19_C2"}, {"f": "ajibawa-2023/Python-Cod... |
from btree import AttributesTree, CatalogTree, ExtentsOverflowTree
from structs import *
from util import write_file
from util.bdev import FileBlockDevice
import datetime
import hashlib
import os
import struct
import sys
import zlib
def hfs_date(t):
return datetime.datetime(1904,1,1) + datetime.timedelta(seconds=t... | ajibawa-2023/Python-Code-Large/train/row_76676 | 241 | 315 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76676:ImportFrom_L1_C0", "label": "from btree import AttributesTree, CatalogTree, ExtentsOverflowTree", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 641, 0, 3, 0, 0, 641, 0, 0], "semantic": {"name": "btree",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76676:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76676:Return_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76676:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76676:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-... |
from crypto.aes import AESencryptCBC, AESdecryptCBC
from emf import cprotect_xattr, EMFFile
from structs import *
from util import write_file, sizeof_fmt
import hashlib
"""
Implementation of the following paper :
Using the HFS+ Journal For Deleted File Recovery. Aaron Burghardt, Adam Feldman. DFRWS 2008
http:... | ajibawa-2023/Python-Code-Large/train/row_76677 | 109 | 152 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76677:ImportFrom_L1_C0", "label": "from crypto.aes import AESencryptCBC, AESdecryptCBC", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0066, 0.0066, 0, 0.66, 0.0, 692, 0, 2, 0, 0, 692, 0, 0], "semantic": {"name": "crypto.aes", "arg_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76677:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76677:Try_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76677:Try_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76677:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
from construct import Struct, ULInt16, ULInt32, String
from construct.macros import ULInt64, Padding, If
from crypto.aes import AESencryptCBC, AESdecryptCBC
from hfs import HFSVolume, HFSFile
from keystore.keybag import Keybag
from structs import HFSPlusVolumeHeader, kHFSPlusFileRecord, getString, \
kHFSRootP... | ajibawa-2023/Python-Code-Large/train/row_76678 | 154 | 219 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76678:ImportFrom_L1_C0", "label": "from construct import Struct, ULInt16, ULInt32\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 0, 0.66, 0.0, 235, 0, 4, 0, 0, 235, 0, 0], "semantic": {"name": "construct", "arg_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76678:ClassDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76678:FunctionDef_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76678:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76678:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Co... |
from structs import *
"""
Probably buggy
HAX, only works on case SENSITIVE
"""
class BTree(object):
def __init__(self, file, keyStruct, dataStruct):
self.file = file
self.keyStruct = keyStruct
self.dataStruct = dataStruct
block0 = self.file.readBlock(0)
btnode ... | ajibawa-2023/Python-Code-Large/train/row_76679 | 200 | 268 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76679:ImportFrom_L1_C0", "label": "from structs import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0037, 0.0037, 0, 0.66, 0.0, 466, 0, 1, 0, 0, 466, 0, 0], "semantic": {"name": "structs", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76679:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76679:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76679:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76679:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod... |
from construct import *
from construct.macros import UBInt64
"""
http://developer.apple.com/library/mac/#technotes/tn/tn1150.html
"""
def getString(obj):
return obj.HFSUniStr255.unicode
S_IFLNK = 0120000
kSymLinkFileType = 0x736C6E6B
kSymLinkCreator = 0x72686170
kHardLinkFileType = 0x686C6E6B
kHF... | ajibawa-2023/Python-Code-Large/train/row_76680 | 78 | 340 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76680:ImportFrom_L1_C0", "label": "from construct import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0029, 0.0029, 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_76680:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76680:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76680:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76680:Return_L20_C4"}] |
import plistlib
import os
from keystore.keybag import Keybag
from keychain.keychain4 import Keychain4
from keychain.managedconfiguration import bruteforce_old_pass
from util.ramdiskclient import RamdiskToolClient
from util import write_file
def checkPasscodeComplexity(rdclient):
pl = rdclient.downloadFile... | ajibawa-2023/Python-Code-Large/train/row_76681 | 66 | 76 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76681:Import_L1_C0", "label": "plistlib import plistlib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0132, 0, 0.66, 0.0, 592, 0, 1, 0, 0, 592, 0, 0], "semantic": {"name": "plistlib", "arg_names": [], "import_names": ["plistli... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76681:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76681:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76681:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76681:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
import os
import plistlib
from keystore.keybag import Keybag
from util.ramdiskclient import RamdiskToolClient
"""
this wont work on iOS 5 unless the passcode was already bruteforced
"""
def escrow():
client = RamdiskToolClient()
di = client.getDeviceInfos()
key835 = di.get("key835").decode("hex"... | ajibawa-2023/Python-Code-Large/train/row_76682 | 28 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76682:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76682:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76682:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76682:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76682:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code... |
import os
import sys
from hfs.emf import EMFVolume
from hfs.journal import do_emf_carving
from util.bdev import FileBlockDevice
if __name__ == "__main__":
if len(sys.argv) < 2:
print "Usage: emf_undelete.py disk_image.bin"
sys.exit(0)
filename = sys.argv[1]
volume = EMFVolume(Fil... | ajibawa-2023/Python-Code-Large/train/row_76684 | 21 | 25 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76684:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.04, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76684:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76684:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76684:If_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76684:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76684:If_... |
from carver import NANDCarver
from construct.core import Struct
from construct.macros import ULInt32, ULInt16, Array, ULInt8, Padding
from pprint import pprint
from structs import SpareData
from util import hexdump
from vfl import VFL
import plistlib
"""
openiboot/plat-s5l8900/ftl.c
openiboot/plat-s5l8900/i... | ajibawa-2023/Python-Code-Large/train/row_76685 | 140 | 220 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76685:ImportFrom_L1_C0", "label": "from carver import NANDCarver", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0045, 0.0045, 0, 0.66, 0.0, 925, 0, 1, 0, 0, 925, 0, 0], "semantic": {"name": "carver", "arg_names": [], "import_names": ["... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76685:ClassDef_L69_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76685:FunctionDef_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76685:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76685:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-... |
from array import array
from construct.core import Struct, Union
from construct.macros import *
from progressbar import ProgressBar
from structs import *
import struct
#https://github.com/iDroid-Project/openiBoot/blob/master/openiboot/ftl-yaftl/yaftl.c
YAFTL_CXT = Struct("YAFTL_CXT",
String("version", 4... | ajibawa-2023/Python-Code-Large/train/row_76687 | 249 | 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_76687:ImportFrom_L1_C0", "label": "from array import array", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0028, 0.0028, 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_76687:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76687:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76687:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76687:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-... |
from progressbar import ProgressBar
from usbmux import usbmux
from util import hexdump, sizeof_fmt
import datetime
import hashlib
import struct
import os
CMD_DUMP = 0
CMD_PROXY = 1
kIOFlashStorageOptionRawPageIO = 0x002
kIOFlashStorageOptionBootPageIO = 0x100
class IOFlashStorageKitClient(object):
... | ajibawa-2023/Python-Code-Large/train/row_76688 | 82 | 99 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76688:ImportFrom_L1_C0", "label": "from progressbar import ProgressBar", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0101, 0.0101, 0, 0.66, 0.0, 349, 0, 1, 0, 0, 349, 0, 0], "semantic": {"name": "progressbar", "arg_names": [], "import... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76688:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76688:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76688:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76688:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-... |
from construct import *
from zipfile import crc32
GPT_HFS = "005346480000aa11aa1100306543ecac".decode("hex")
GPT_EMF = "00464d450000aa11aa1100306543ecac".decode("hex")
LWVM_partitionRecord = Struct("LWVM_partitionRecord",
String("type", 16),
String("... | ajibawa-2023/Python-Code-Large/train/row_76689 | 64 | 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_76689:ImportFrom_L1_C0", "label": "from construct import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0076, 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_76689:FunctionDef_L74_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76689:Try_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76689:Try_L75_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76689:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
import os
import struct
import sys
"""
row-by-row dump
page = data + spare metadata + iokit return code + iokit return code 2
"""
class NANDImageFlat(object):
def __init__(self, filename, geometry):
flags = os.O_RDONLY
if sys.platform == "win32":
flags |= os.O_BINARY
... | ajibawa-2023/Python-Code-Large/train/row_76690 | 68 | 86 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76690:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0116, 0.0116, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76690:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76690:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76690:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76690:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C... |
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_76691 | 334 | 422 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76691: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_76691:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76691:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76691:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76691: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_76692 | 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_76692: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_76692:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76692:Assign_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76692:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76692: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_76693 | 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_76693: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_76693:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76693:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76693:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76693: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_76694 | 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_76694: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_76694:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76694:FunctionDef_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76694:FunctionDef_L43_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76694: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_76695 | 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_76695: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_76695:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76695:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76695:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76695: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_76696 | 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_76696: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_76696:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76696:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76696:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76696: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_76697 | 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_76697: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_76697:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76697:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76697:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76697: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_76698 | 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_76698: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_76698:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76698:Import_L24_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76698:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76698: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_76699 | 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_76699: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_76699:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76699:FunctionDef_L29_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76699:FunctionDef_L29_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_76699:Assign_L30_C2"}, {"f": "ajibawa-2023/Python-... |
'''
Created on Feb 27, 2012
@author: anorberg
Plugin IModelBehavior that implements the "max" operation.
'''
from fakeDataGenerator.model import IModelBehavior
class max_n(IModelBehavior):
arity=(2, None)
isNoise = False
def calculate(self, *values):
return max(values)
def gen... | ajibawa-2023/Python-Code-Large/train/row_76700 | 9 | 17 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76700:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.2353, 0.4118, 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_76700:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76700:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76700:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76700:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 24, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
import math
class zeroOne_truncate_1noise(IModelBehavior):
arity = (1, 1)
isNoise = True
def calculate(self, value):
"""Truncate to the range [0, 1).
All integers w... | ajibawa-2023/Python-Code-Large/train/row_76701 | 19 | 60 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76701:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.05, 0.0833, 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_76701:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76701:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76701:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76701:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the blocky-scatter behavior.
"""
from fakeDataGenerator.model import IModelBehavior
from random import randint
class BlockyScatter(IModelBehavior):
arity=(1,1)
isNoise = True
def __init__(self):
self.unit = ran... | ajibawa-2023/Python-Code-Large/train/row_76702 | 12 | 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_76702:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2391, 0.3478, 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_76702:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76702:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76702:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76702:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Mar 13, 2012
@author: trobinso
Plugin IModelBehavior that implements randomized propagation of missing values.
'''
from fakeDataGenerator.model import IModelBehavior
import random
class sieve(IModelBehavior):
arity=(1, 0)
isNoise = True
DROP_PROBABILITY = 1/(random.randint(1,25)*10.0)
... | ajibawa-2023/Python-Code-Large/train/row_76703 | 11 | 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_76703:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.381, 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_76703:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76703:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76703:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76703:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the randFloatTrunc operator.
"""
from fakeDataGenerator.model import IModelBehavior
from random import randint
class RandFloatTrunc(IModelBehavior):
arity=(1,1)
isNoise = False
def calculate(self, value):
retur... | ajibawa-2023/Python-Code-Large/train/row_76704 | 10 | 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_76704:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.381, 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_76704:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76704:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76704:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76704:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
import random
class randUnif_gen(IModelBehavior):
arity=(0,0)
isNoise = False
def calculate(self):
return random.random()
def generate_name(self):
return "rand()" | ajibawa-2023/Python-Code-Large/train/row_76705 | 10 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76705:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1875, 0.3125, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76705:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76705:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76705:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76705:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the AND operator.
"""
from fakeDataGenerator.model import IModelBehavior
import math
class AndValues(IModelBehavior):
arity=(2,None)
isNoise = False
def calculate(self, *values):
if True in [math.isnan(value) o... | ajibawa-2023/Python-Code-Large/train/row_76706 | 14 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76706:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2115, 0.3077, 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_76706:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76706:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76706:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76706:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 28, 2012
@author: anorberg
'''
import ConfigParser
import os
import sys
SRC_EXT = ".py"
DEST_EXT = ".yapsy-plugin"
VERSION_NUM = "0.0.1"
WEBSITE = "http://www.systemsbiology.org"
AUTHOR = "Adam B. Norberg"
DESC = "{0} plugin for a computation in the Fake Data Generator. Form lette... | ajibawa-2023/Python-Code-Large/train/row_76707 | 32 | 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_76707:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76707:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76707:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76707:If_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76707:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_767... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
import math
from fakeDataGenerator.model import IModelBehavior
class ln_1noise(IModelBehavior):
arity=(1, 1)
isNoise = False
def calculate(self, value):
if value == 0: return 0 #wrong, but, eh, whatever. should probably just remove ln... | ajibawa-2023/Python-Code-Large/train/row_76708 | 15 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76708:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1364, 0.2273, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76708:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76708:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76708:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76708:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the XOR operator.
"""
from fakeDataGenerator.model import IModelBehavior
import math
class XorValues(IModelBehavior):
arity=(2,None)
isNoise = False
def calculate(self, *values):
if True in [math.isnan(value) o... | ajibawa-2023/Python-Code-Large/train/row_76709 | 14 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76709:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2115, 0.3077, 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_76709:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76709:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76709:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76709:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from __future__ import division
from fakeDataGenerator.model import IModelBehavior
class smallRatio_2(IModelBehavior):
arity=(2, 2)
isNoise = False
def calculate(self, a, b):
a, b = abs(a), abs(b)
if a > b:
a, b = ... | ajibawa-2023/Python-Code-Large/train/row_76710 | 15 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76710:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.15, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76710:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76710:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76710:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76710:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the scale operator.
"""
from fakeDataGenerator.model import IModelBehavior
from random import random
class Scale(IModelBehavior):
arity=(1,1)
isNoise = False
scaleValue = random.random() * 10.0
def calculate(self, ... | ajibawa-2023/Python-Code-Large/train/row_76711 | 11 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76711:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.25, 0.3636, 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_76711:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76711:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76711:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76711:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from __future__ import division
from fakeDataGenerator.model import IModelBehavior
import random
class randZeroOne_gen(IModelBehavior):
arity = (0, 0)
isNoise = False
RATE = 0.5
def calculate(self):
if random.random() < self.RAT... | ajibawa-2023/Python-Code-Large/train/row_76712 | 22 | 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_76712:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.1667, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76712:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76712:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76712:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76712:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
class oneminus_1noise(IModelBehavior):
arity = (1, 1)
isNoise = True
def calculate(self, arg):
return 1.0-arg
def generate_name(self, name):
return "1-"+name
if __name... | ajibawa-2023/Python-Code-Large/train/row_76713 | 12 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76713:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.15, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76713:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76713:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76713:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76713:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
'''
Created on Feb 24, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
class negate_1noise(IModelBehavior):
arity = (1, 1)
isNoise = True
def calculate(self, value):
"""Negates its argument.
>>> negate_1noise().calculate(-6)
6
>>>... | ajibawa-2023/Python-Code-Large/train/row_76714 | 14 | 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_76714:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0968, 0.1613, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76714:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76714:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76714:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76714:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
class mult_2(IModelBehavior):
arity=(2, 2)
isNoise = False
def calculate(self, a, b):
return a * b
def generate_name(self, a, b):
return "{0} * {1}".format(a, b)
if __... | ajibawa-2023/Python-Code-Large/train/row_76715 | 12 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76715:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.15, 0.25, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76715:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76715:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76715:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76715:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the or operator.
"""
from fakeDataGenerator.model import IModelBehavior
import math
class OrValues(IModelBehavior):
arity=(2,None)
isNoise = False
def calculate(self, *values):
if True in [math.isnan(value) or ... | ajibawa-2023/Python-Code-Large/train/row_76716 | 14 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76716:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2115, 0.3077, 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_76716:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76716:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76716:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76716:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 24, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
import operator
class add_n(IModelBehavior):
'''
IModelBehavior for an n-ary function that adds values together.
'''
arity=(2, None)
isNoise = False
def calculate(self, *args):
... | ajibawa-2023/Python-Code-Large/train/row_76717 | 11 | 19 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76717:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1579, 0.2632, 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_76717:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76717:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76717:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76717:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the convertToBase operator.
"""
from fakeDataGenerator.model import IModelBehavior
import math
from random import randint
from string import digits
class ConvertToBase(IModelBehavior):
arity=(1,1)
isNoise = False
conve... | ajibawa-2023/Python-Code-Large/train/row_76718 | 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_76718:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.1486, 0.2162, 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_76718:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76718:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76718:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76718:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 28, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
class discretize_1noise(IModelBehavior):
"""IModelBehavior that converts one value to either a 1 or a 0 based on a fixed cutoff."""
arity=(1,1)
isNoise = True
THRESHOLD = 0.5
def calc... | ajibawa-2023/Python-Code-Large/train/row_76719 | 13 | 19 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76719:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1579, 0.2632, 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_76719:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76719:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76719:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76719:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
class absDiff_2(IModelBehavior):
arity=(2, 2)
isNoise = False
def calculate(self, a, b):
return abs(a-b)
def generate_name(self, aName, bName):
return " |{0}-{1}| ".for... | ajibawa-2023/Python-Code-Large/train/row_76720 | 12 | 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_76720:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1429, 0.2381, 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_76720:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76720:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76720:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76720:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
import random
class randGauss_gen(IModelBehavior):
arity = (0, 0)
isNoise = False
STDDEV_MEAN = 0.5
MEAN_MEAN = 0
MEAN_STDDEV = 0.2
STDDEV_STDDEV = 0.4
def __init__(s... | ajibawa-2023/Python-Code-Large/train/row_76721 | 17 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76721:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.2083, 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_76721:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76721:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76721:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76721:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 24, 2012
@author: anorberg
'''
from __future__ import division
from fakeDataGenerator.model import IModelBehavior
from operator import add
EXPRESSIVE_NAME = False
class avg_n(IModelBehavior):
'''
A model behavior that performs an averaging.
'''
arity=(2, None)
... | ajibawa-2023/Python-Code-Large/train/row_76722 | 18 | 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_76722:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1034, 0.1724, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76722:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76722:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76722:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76722:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the translate operator.
"""
from fakeDataGenerator.model import IModelBehavior
from random import random
class Translate(IModelBehavior):
arity=(1,1)
isNoise = False
translationValue = (random.random() * 20.0) - 10.0
... | ajibawa-2023/Python-Code-Large/train/row_76723 | 11 | 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_76723:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2391, 0.3478, 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_76723:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76723:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76723:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76723:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
class recip_1noise(IModelBehavior):
arity=(1, 1)
isNoise = True
def calculate(self, value):
if value == 0:
return 0 #to do something other than fail
return 1/valu... | ajibawa-2023/Python-Code-Large/train/row_76724 | 14 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76724:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1364, 0.2273, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76724:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76724:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76724:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76724:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements the int operator.
"""
from fakeDataGenerator.model import IModelBehavior
import math
class IntCoerce(IModelBehavior):
arity=(1,1)
isNoise = False
def calculate(self, value):
# Note: retains floating-point type
... | ajibawa-2023/Python-Code-Large/train/row_76725 | 12 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76725:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2292, 0.3333, 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_76725:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76725:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76725:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76725:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
import random
class gaussianFuzz_1noise(IModelBehavior):
arity = (1, 1)
isNoise = True
STDDEV_STDDEV = 0.75
MEAN_STDDEV = 0.25
STDDEV_MEAN = 1
def __init__(self):
... | ajibawa-2023/Python-Code-Large/train/row_76726 | 16 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76726:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.2083, 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_76726:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76726:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76726:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76726:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""
Created on Feb 27, 2012
@author: trobinso
Plugin IModelBehavior that implements something similar to conflicting upregulation/downregulation factors.
"""
from fakeDataGenerator.model import IModelBehavior
class Downregulate(IModelBehavior):
arity=(2,None)
isNoise = False
def calculate(self, *value... | ajibawa-2023/Python-Code-Large/train/row_76727 | 14 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76727:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2115, 0.3077, 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_76727:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76727:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76727:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76727:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
Plugin IModelBehavior that implements the "min" operation.
'''
from fakeDataGenerator.model import IModelBehavior
class min_n(IModelBehavior):
arity=(2, None)
isNoise = False
def calculate(self, *values):
return min(values)
def gen... | ajibawa-2023/Python-Code-Large/train/row_76728 | 9 | 17 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76728:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.2353, 0.4118, 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_76728:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76728:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76728:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76728:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
'''
Created on Feb 27, 2012
@author: anorberg
'''
from fakeDataGenerator.model import IModelBehavior
class cmp_2(IModelBehavior):
arity = (2, 2)
isNoise = False
def calculate(self, a, b):
if(a > b): return 0
if(b > a): return 1
return 0.5
def generate_name(self,... | ajibawa-2023/Python-Code-Large/train/row_76729 | 16 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76729:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1364, 0.2273, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76729:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76729:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76729:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76729:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
'''
Created on Mar 7, 2012
@author: anorberg
'''
from __future__ import division
from fakeDataGenerator import model
from fakeDataGenerator import config
from random import shuffle
import csv
import random
def weldGraphViz(gvStrList):
if len(gvStrList) < 2:
if not gvStrList:
return "... | ajibawa-2023/Python-Code-Large/train/row_76730 | 41 | 73 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76730:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0411, 0.0685, 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_76730:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76730:If_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76730:If_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76730:If_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
'''
Created on Jan 24, 2012
@author: anorberg
'''
import csv
import sys
MIRN = ':MIRN:'
if __name__ == "__main__":
source = open(sys.argv[1], "rb")
fromCol = int(sys.argv[2])
toCol = int(sys.argv[3])
table = csv.reader(source, dialect=csv.excel_tab)
print "digraph Relatio... | ajibawa-2023/Python-Code-Large/train/row_76731 | 16 | 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_76731:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1034, 0.1724, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76731:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76731:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76731:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76731:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
'''
Created on Dec 21, 2011
@author: anorberg
'''
from __future__ import division
import random
import yapsy
from yapsy.PluginManager import PluginManager
import spiralPointDistribution
import pointsToOutwardDigraph
from yapsy.IPlugin import IPlugin
graphviz_recursion_depth = 1 #todo: replace reference... | ajibawa-2023/Python-Code-Large/train/row_76732 | 220 | 420 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76732:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0071, 0.0119, 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_76732:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76732:Return_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76732:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76732:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
'''
Created on Jan 25, 2012
@author: anorberg
A module to scatter points in branching, cluster-y shapes. When a Delaunay triangulation
is calculated, the result should be similar to an interaction network graph
once certain edges are pruned.
This strange approach was a desperate effort to come up with some ... | ajibawa-2023/Python-Code-Large/train/row_76733 | 111 | 327 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76733:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0291, 0.055, 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_76733:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76733:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76733:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76733:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code... |
'''
Created on Mar 7, 2012
@author: anorberg
'''
import os.path
import sys
import candidate_test_pruners
import optparse
import ConfigParser
NULL = candidate_test_pruners.nullPruner()
UNIFOUR = candidate_test_pruners.uniformThroughFour()
GLOBALCUT = candidate_test_pruners.globalCutoff()
MINFRAC = cand... | ajibawa-2023/Python-Code-Large/train/row_76734 | 89 | 162 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76734:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0185, 0.0309, 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_76734:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76734:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76734:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76734:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
'''
Created on Feb 22, 2012
@author: anorberg
Classes that implement the IPruneEdges plugin interface, as
candidate implementations to whittle the triangulation graph
down to the desired branching network.
TODO: pull all of these out into proper plugins.
'''
from pointsToOutwardDigraph import (IPruneEdg... | ajibawa-2023/Python-Code-Large/train/row_76735 | 96 | 153 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76735:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 11], "level": 0, "parent": null, "vector": [8, 0, 0.0392, 0.0719, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76735:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76735:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76735:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76735:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
'''
Created on Jan 27, 2012
@author: anorberg
Module to convert a series of points distributed by spiralPointDistribution into a graph inspired by proto-adjacency.
Requires spiralPointDistribution as its source, since it's making assumptions about list ordering.
'''
from __future__ import division
from numpy... | ajibawa-2023/Python-Code-Large/train/row_76736 | 75 | 149 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76736:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0302, 0.0537, 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_76736:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76736:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76736:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76736:If_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
#
# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | ajibawa-2023/Python-Code-Large/train/row_76737 | 11 | 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_76737:ImportFrom_L17_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0294, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76737:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76737:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76737:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76737:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Co... |
#Copyright (c) 1999 Christian Scholz (ruebe@aachen.heimat.de)
#
#This library is free software; you can redistribute it and/or
#modify it under the terms of the GNU Library General Public
#License as published by the Free Software Foundation; either
#version 2 of the License, or (at your option) any later version.
#
#T... | ajibawa-2023/Python-Code-Large/train/row_76738 | 23 | 53 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76738:ImportFrom_L18_C0", "label": "from fileauth import DAVAuthHandler", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.3396, 0.0189, 0, 0.66, 0.0, 730, 0, 1, 0, 0, 730, 0, 0], "semantic": {"name": "fileauth", "arg_names": [], "import... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76738:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76738:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76738:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76738:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#Copyright (c) 1999 Christian Scholz (ruebe@aachen.heimat.de)
#
#This library is free software; you can redistribute it and/or
#modify it under the terms of the GNU Library General Public
#License as published by the Free Software Foundation; either
#version 2 of the License, or (at your option) any later version.
#
#T... | ajibawa-2023/Python-Code-Large/train/row_76741 | 20 | 59 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76741:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3475, 0.1017, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76741:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76741:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76741:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76741:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
'WebDAV library including a standalone server for python'
__version__ = '0.9.9'
__author__ = 'Simon Pamies'
__email__ = 'spamsch@gmail.com'
__license__ = 'GPL v2'
| ajibawa-2023/Python-Code-Large/train/row_76743 | 5 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76743:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.2, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ... | [] |
"""
basic interface class
use this for subclassing when writing your own interface
class.
"""
from xml.dom import minidom
from locks import LockManager
from errors import *
import time
from string import lower
class dav_interface:
""" interface class for implementing DAV servers """
### defined propertie... | ajibawa-2023/Python-Code-Large/train/row_76745 | 86 | 281 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76745:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.016, 0.0285, 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_76745:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76745:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76745:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76745:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
import time
import re
from xml.dom import minidom
import urlparse
from string import lower, split, atoi, joinfields
from StringIO import StringIO
from constants import RT_ALLPROP, RT_PROPNAME, RT_PROP
from BaseHTTPServer import BaseHTTPRequestHandler
def gen_estring(ecode):
""" generate an error string from the... | ajibawa-2023/Python-Code-Large/train/row_76746 | 150 | 225 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76746:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0044, 0.0044, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76746:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76746:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76746:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76746:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code... |
import os
import string
import urllib
from StringIO import StringIO
from utils import gen_estring, quote_uri, make_xmlresponse
from davcmd import deltree
class DELETE:
def __init__(self,uri,dataclass):
self.__dataclass=dataclass
self.__uri=uri
def delcol(self):
""" delete a collectio... | ajibawa-2023/Python-Code-Large/train/row_76748 | 21 | 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_76748:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76748:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76748:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76748:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76748:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C... |
import os
import sys
import time
import socket
import string
import posixpath
import base64
import urlparse
import urllib
import random
import logging
log = logging.getLogger(__name__)
import xml.dom
from xml.dom import minidom
from utils import rfc1123_date, IfParser, tokenFinder
from string import atoi,split
from... | ajibawa-2023/Python-Code-Large/train/row_76749 | 154 | 255 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76749:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.0039, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76749:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76749:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76749:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76749:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-... |
from propfind import PROPFIND
from xml.dom import minidom
domimpl = minidom.getDOMImplementation()
from utils import get_parenturi
class REPORT(PROPFIND):
def __init__(self, uri, dataclass, depth, body):
PROPFIND.__init__(self, uri, dataclass, depth, body)
doc = minidom.parseString(body)
... | ajibawa-2023/Python-Code-Large/train/row_76750 | 74 | 120 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76750:ImportFrom_L1_C0", "label": "from propfind import PROPFIND", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0083, 0, 0.66, 0.0, 901, 0, 1, 0, 0, 901, 0, 0], "semantic": {"name": "propfind", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76750:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76750:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76750:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76750:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-... |
# definition for resourcetype
COLLECTION=1
OBJECT=None
# attributes for resources
DAV_PROPS=['creationdate', 'displayname', 'getcontentlanguage', 'getcontentlength', 'getcontenttype', 'getetag', 'getlastmodified', 'lockdiscovery', 'resourcetype', 'source', 'supportedlock']
# Request classes in propfind
RT_ALLPROP=1
R... | ajibawa-2023/Python-Code-Large/train/row_76754 | 8 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76754:Assign_L2_C0", "label": "COLLECTION =", "type": "assigned_variable", "loc": [2, 2], "level": 0, "parent": null, "vector": [14, 0, 0.0833, 0.0417, 0, 0.66, 0.0, 661, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "COLLECTION", "arg_names": [], "import_names": [], "rhs_... | [] |
STATUS_CODES={
100: "Continue",
102: "Processing",
200: "Ok",
201: "Created",
204: "No Content",
207: "Multi-Status",
201: "Created",
400: "Bad Request",
403: "Forbidden",
404: "Not Found",
405: "Me... | ajibawa-2023/Python-Code-Large/train/row_76755 | 1 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76755:Assign_L2_C0", "label": "STATUS_CODES =", "type": "assigned_variable", "loc": [2, 24], "level": 0, "parent": null, "vector": [14, 0, 0.5417, 0.9583, 0, 0.66, 0.0, 698, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "STATUS_CODES", "arg_names": [], "import_names": [], ... | [] |
from ConfigParser import SafeConfigParser
class Configuration:
def __init__(self, fileName):
cp = SafeConfigParser()
cp.read(fileName)
self.__parser = cp
self.fileName = fileName
def __getattr__(self, name):
if name in self.__parser.sections():
return Sectio... | ajibawa-2023/Python-Code-Large/train/row_76756 | 43 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76756:ImportFrom_L1_C0", "label": "from ConfigParser import SafeConfigParser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0172, 0.0172, 0, 0.66, 0.0, 272, 0, 1, 0, 0, 272, 0, 0], "semantic": {"name": "ConfigParser", "arg_names": [], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76756:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76756:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76756:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76756:Assign_L5_C8"}, {"f": "ajibawa-2023/Python-Code... |
"""
Exceptions for the DAVserver implementation
"""
class DAV_Error(Exception):
""" in general we can have the following arguments:
1. the error code
2. the error result element, e.g. a <multistatus> element
"""
def __init__(self,*args):
if len(args)==1:
self.args=(args[... | ajibawa-2023/Python-Code-Large/train/row_76758 | 29 | 62 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76758:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0484, 0.0806, 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_76758:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76758:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76758:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76758:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
"""Authenticating HTTP Server
This module builds on BaseHTTPServer and implements basic authentication
"""
import base64
import binascii
import BaseHTTPServer
DEFAULT_AUTH_ERROR_MESSAGE = """
<head>
<title>%(code)s - %(message)s</title>
</head>
<body>
<h1>Authorization Required</h1>
this server could not verify th... | ajibawa-2023/Python-Code-Large/train/row_76759 | 48 | 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_76759:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0294, 0.049, 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_76759:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76759:Return_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76759:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76759:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.