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
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ajibawa-2023/Python-Code-Large/train/row_91091
29
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_91091:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91091:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91091:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91091:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91091:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ajibawa-2023/Python-Code-Large/train/row_91092
55
135
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91092:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91092:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91092:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91092:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91092:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
#!/usr/bin/python2.4 # # Copyright (C) 2010 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 l...
ajibawa-2023/Python-Code-Large/train/row_91094
56
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_91094:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 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_91094:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91094:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91094:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91094:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
__version__ = "1.0c2"
ajibawa-2023/Python-Code-Large/train/row_91095
1
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91095:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call...
[]
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ajibawa-2023/Python-Code-Large/train/row_91096
114
303
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91096:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 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_91096:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91096:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91096:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91096:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ajibawa-2023/Python-Code-Large/train/row_91097
7
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_91097:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 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_91097:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91097:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91097:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91097:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
ajibawa-2023/Python-Code-Large/train/row_91098
112
147
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91098:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91098:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91098:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91098:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_91098:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this l...
ajibawa-2023/Python-Code-Large/train/row_91099
51
187
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91099:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 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_91099:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91099:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91099:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91099:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
ajibawa-2023/Python-Code-Large/train/row_91100
213
438
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91100:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 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_91100:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91100:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91100:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91100:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio ([email protected])" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
ajibawa-2023/Python-Code-Large/train/row_91101
43
110
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91101:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 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_91101:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91101:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91101:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91101:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/env python from urllib import urlopen as uo from urllib import urlencode as ue import sys try: import lxml.etree as etree except: sys.exit("You must have the lxml python module to use this utility") parser = etree.HTMLParser() from optparse import OptionParser oparser = OptionParser() oparser.add_o...
ajibawa-2023/Python-Code-Large/train/row_91104
30
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_91104:ImportFrom_L2_C0", "label": "from urllib import uo", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0227, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["uo"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91104:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91104:Import_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91104:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91104:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_911...
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
ajibawa-2023/Python-Code-Large/train/row_91105
51
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91105:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91105:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91105:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91105:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91105:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
ajibawa-2023/Python-Code-Large/train/row_91106
51
98
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91106:Import_L8_C0", "label": "os import os, re, mimetypes\u2026", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0816, 0.0102, 0, 0.66, 0.0, 688, 0, 4, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91106:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91106:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91106:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91106:Assign_L33_C8"}, {"f": "ajibawa-2023/Python-...
#Add comment to test version control! import sys from PyQt4 import QtCore, QtGui from edytor import Ui_notepad class StartQt4(QtGui.QMainWindow): def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_notepad() self.ui.setupUi(self) if __name__ == "__main__": ...
ajibawa-2023/Python-Code-Large/train/row_91107
13
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91107:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.0556, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91107:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91107:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91107:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91107:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L...
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
ajibawa-2023/Python-Code-Large/train/row_91108
38
74
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91108:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91108:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91108:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91108:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91108:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import shutil import sys # Bump pyglet/__init__.py version as well. VERSION = '1.2dev' long_description = '''pyglet provides an object-oriented programming interface for developing games and other visually-rich applicat...
ajibawa-2023/Python-Code-Large/train/row_91109
105
301
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91109:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0116, 0.0066, 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_91109:If_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91109:ImportFrom_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91109:If_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91109:Assign_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import math import warnings import pyglet import pyglet.image try: from pyglet.gl.VERSION_1_5 import * except ImportError: warnings.warn('OpenGL 1.5 or later is required collision detection. '\ 'Please u...
ajibawa-2023/Python-Code-Large/train/row_91110
93
145
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91110:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0241, 0.0138, 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_91110:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91110:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91110:Try_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91110:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import ctypes as c import gzip import marshal import sys class AnonymousStruct(c.Structure): __slots__ = () _fields_ = ( ('foo', c.c_int), ) class AnonymousUnion(c.Union): __slots__ = () _fields_ = (...
ajibawa-2023/Python-Code-Large/train/row_91112
109
185
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91112:Import_L1_C0", "label": "ctypes import c", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0054, 0.0054, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["c"], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91112:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91112:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91112:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91112:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import gzip import cPickle as marshal import optparse import os import sys import xml.sax def parse_type(type_string): '''Get a tuple of the type components for a SWIG-formatted type. For example, given the type "p.f(p....
ajibawa-2023/Python-Code-Large/train/row_91113
322
456
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91113:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0077, 0.0044, 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_91113:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91113:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91113:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91113:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python # $Id:$ # Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU. # Caveats: # - Requires a filename (not from memory or stream yet). Looks like we need # to manually implement a filter which provides an output IPin. Lot of # work. # - Theoretically can traverse the graph to...
ajibawa-2023/Python-Code-Large/train/row_91114
23
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_91114:Import_L16_C0", "label": "ctypes import ctypes", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.2712, 0.0169, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91114:While_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91114:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91114:While_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91114:If_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/env python # Play an audio file with QuickTime. Tested ok with MP3, WAV. # Notes # - Easy enough to read from a stream instead of filename, use DataRef # interface # - Not sure about playing same sound multiple times without reloading. # - No direct support for OpenAL, could be tricky/impossible ...
ajibawa-2023/Python-Code-Large/train/row_91115
29
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91115:Assign_L11_C0", "label": "__docformat__ =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.1803, 0.0164, 0, 0.66, 0.0, 959, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__docformat__", "arg_names": [], "import_names": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91115:Try_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91115:While_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91115:While_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91115:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
#!/usr/bin/env python ''' Ref: http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import util import os import time def get_library(name): path = util.find_library(name) if not path: # HACK libavformat/li...
ajibawa-2023/Python-Code-Large/train/row_91116
109
192
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91116:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0234, 0.0208, 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_91116:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91116:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91116:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91116:If_L18_C4"}, {"f": "ajibawa-2023/Python-Code-L...
from ctypes import * from pyglet.gl import * class GLSLException(Exception): pass def glsl_log(handle): if handle == 0: return '' log_len = c_int(0) glGetObjectParameterivARB(handle, GL_OBJECT_INFO_LOG_LENGTH_ARB, byref(log_len)) if log_len.value == 0: return '' log = ...
ajibawa-2023/Python-Code-Large/train/row_91117
177
254
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91117:ImportFrom_L1_C0", "label": "from ctypes import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.0039, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["*"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91117:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91117:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91117:If_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91117:Return_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train...
#!/usr/bin/python # $Id:$ import random import sys from pyglet.gl import * from pyglet import clock from pyglet import font from pyglet import graphics from pyglet import window MAX_STREAMERS = 1000 if len(sys.argv) > 1: MAX_STREAMERS = int(sys.argv[1]) MAX_ADD_STREAMERS = MAX_STREAMERS // 10 MIN_STREAMER_LENGTH...
ajibawa-2023/Python-Code-Large/train/row_91118
70
117
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91118:Import_L4_C0", "label": "random import random", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0342, 0.0085, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91118:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91118:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91118:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91118:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
#!/usr/bin/python # $Id:$ import os import sys import time sys.path.insert(0, os.path.dirname(__file__)) from pyglet.gl import * from pyglet import clock from pyglet import font from pyglet import resource from pyglet import window from pyglet.window import key, mouse from pyglet import graphics from pyglet.text im...
ajibawa-2023/Python-Code-Large/train/row_91119
103
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_91119:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.0068, 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_91119:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91119:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91119:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91119:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python from math import pi, sin, cos import sys from pyglet.gl import * from pyglet import clock from pyglet.graphics import vertexdomain from pyglet import window try: # Try and create a window with multisampling (antialiasing) config = Config(sample_buffers=1, samples=4, ...
ajibawa-2023/Python-Code-Large/train/row_91120
98
155
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91120:ImportFrom_L3_C0", "label": "from math import pi, sin, cos", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0194, 0.0065, 0, 0.66, 0.0, 526, 0, 3, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["pi...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91120:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91120:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91120:Try_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91120:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
#!/usr/bin/python # $Id:$ import random import sys from pyglet.gl import * from pyglet import clock from pyglet import font from pyglet import graphics from pyglet import window BARS = 100 if len(sys.argv) > 1: BARS = int(sys.argv[1]) MIN_BAR_LENGTH = 4 MAX_BAR_LENGTH = 100 BAR_SEGMENT_HEIGHT = 10 UPDATE_PERIOD...
ajibawa-2023/Python-Code-Large/train/row_91121
60
109
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91121:Import_L4_C0", "label": "random import random", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0367, 0.0092, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91121:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91121:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91121:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91121:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
#!/usr/bin/python # $Id:$ import random import sys from pyglet.gl import * from pyglet import clock from pyglet import image from pyglet import window from pyglet.graphics import vertexdomain if len(sys.argv) > 1: SPRITES = int(sys.argv[1]) else: SPRITES = 2000 SPRITE_IMAGE = 'examples/noisy/ball.png' # Ho...
ajibawa-2023/Python-Code-Large/train/row_91122
66
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91122:Import_L4_C0", "label": "random import random", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0348, 0.0087, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91122:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91122:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91122:If_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91122:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#!/usr/bin/python # $Id:$ import random import sys from pyglet.gl import * from pyglet import clock from pyglet import font from pyglet import graphics from pyglet import window MAX_PARTICLES = 1000 if len(sys.argv) > 1: MAX_PARTICLES = int(sys.argv[1]) MAX_ADD_PARTICLES = 100 GRAVITY = -100 win = window.Windo...
ajibawa-2023/Python-Code-Large/train/row_91123
48
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_91123:Import_L4_C0", "label": "random import random", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.0135, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91123:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91123:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91123:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91123:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
# ---------------------------------------------------------------------------- # Copyright (c) 2008 Andrew D. Straw and Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redist...
ajibawa-2023/Python-Code-Large/train/row_91124
108
247
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91124:Import_L37_C0", "label": "ctypes import ctypes", "type": "import", "loc": [37, 37], "level": 0, "parent": null, "vector": [1, 0, 0.1498, 0.004, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91124:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91124:FunctionDef_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91124:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91124:Assign_L46_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import ctypes import pyglet from pyglet.window.carbon import CarbonEventHandler, carbon, _oscheck from pyglet.window.carbon.constants import * from pyglet.window.carbon.constants import _name kEventTabletPoint = 1 kEventTabletP...
ajibawa-2023/Python-Code-Large/train/row_91125
57
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_91125:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0229, 0.0131, 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_91125:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91125:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91125:ClassDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91125:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python # $Id:$ import ctypes import pyglet from pyglet import com from pyglet.window.win32 import _kernel32 lib = ctypes.oledll.dinput8 LPVOID = ctypes.c_void_p WORD = ctypes.c_uint16 DWORD = ctypes.c_uint32 LPDWORD = ctypes.POINTER(DWORD) BOOL = ctypes.c_int WCHAR = ctypes.c_wchar UINT ...
ajibawa-2023/Python-Code-Large/train/row_91126
292
531
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91126:Import_L4_C0", "label": "ctypes import ctypes", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0019, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91126:ClassDef_L213_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91126:Assign_L214_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91126:ClassDef_L228_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91126:Assign_L229_C4"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import input # (usage_page, usage): Device class ''' device_usage_map = { (0x01, 0x01): input.PointerDevice, (0x01, 0x01): input.MouseDevice, (0x01, 0x04): input.JoystickDevice, (0x01, 0x05): input.GamePadDevice,...
ajibawa-2023/Python-Code-Large/train/row_91128
18
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91128:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0636, 0.0364, 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_91128:FunctionDef_L39_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91128:If_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91128:If_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91128:Return_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai...
#!/usr/bin/env python '''Event constants from /usr/include/linux/input.h ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' EV_SYN = 0x00 EV_KEY = 0x01 EV_REL = 0x02 EV_ABS = 0x03 EV_MSC = 0x04 EV_LED = 0x11 EV_SND = 0x12 EV_REP = 0x14 EV_FF = 0x15 EV_PWR = 0x16 EV_FF_STATUS = 0x17 EV_MAX = 0x1f # Synchro...
ajibawa-2023/Python-Code-Large/train/row_91129
477
531
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91129:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0066, 0.0038, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import ctypes import pyglet from pyglet.libs.darwin import carbon, _oscheck, create_cfstring from pyglet.libs.darwin.constants import * import input import usage # non-broken c_void_p void_p = ctypes.POINTER(ctypes.c_int) cla...
ajibawa-2023/Python-Code-Large/train/row_91130
194
404
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91130:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0087, 0.005, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91130:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91130:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91130:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91130:Assign_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
'''Wrapper for Xi Generated with: tools/genwrappers.py xinput Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('Xi') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): # Some b...
ajibawa-2023/Python-Code-Large/train/row_91131
576
1,650
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91131:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0024, 0.0042, 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_91131:For_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91131:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91131:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91131:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import pyglet import input devices = input.get_devices() show_all = True window = pyglet.window.Window(1024, 768) batch = pyglet.graphics.Batch() class TrackedElement(object): def __init__(self, element): self.elem...
ajibawa-2023/Python-Code-Large/train/row_91132
39
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_91132:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0522, 0.0299, 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_91132:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91132:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91132:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91132:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import sys class InputException(Exception): pass class InputDeviceExclusiveException(InputException): pass if sys.platform == 'darwin': import osx get_devices = osx.get_devices elif sys.platform.startswith('lin...
ajibawa-2023/Python-Code-Large/train/row_91133
15
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_91133:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.14, 0.08, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91133:If_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91133:Import_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91133:If_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91133:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from fcntl import ioctl import array import ctypes import errno import os import struct import sys import pyglet from linux_const import * c = ctypes.cdll.LoadLibrary('libc.so.6') _IOC_NRBITS = 8 _IOC_TYPEBITS = 8 _IOC_SIZEBITS...
ajibawa-2023/Python-Code-Large/train/row_91134
164
258
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91134:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0136, 0.0078, 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_91134:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91134:Return_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91134:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91134:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Co...
'''Wrapper for avcodec Generated with: ../tools/wraptypes/wrap.py /usr/include/ffmpeg/avcodec.h -o lib_avcodec.py -lavcodec .. Then hacked. DO NOT REGENERATE. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * from avcodec import get_library _lib = get_library('avcodec...
ajibawa-2023/Python-Code-Large/train/row_91135
562
1,413
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91135:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0028, 0.005, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91135:For_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91135:If_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91135:If_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91135:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from timeit import Timer NUMBER=100000 setup=''' from pyglet.gl.VERSION_1_1 import glBindTexture, glEnable, GL_TEXTURE_2D from pyglet.gl.VERSION_1_1 import glBegin, glEnd, glVertex2f, GL_LINES from pyglet.window import Window fro...
ajibawa-2023/Python-Code-Large/train/row_91136
5
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91136:ImportFrom_L1_C0", "label": "from timeit import Timer", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 200, 0, 1, 0, 0, 200, 0, 0], "semantic": {"name": "timeit", "arg_names": [], "import_names": ["Timer...
[]
#!/usr/bin/python # $Id:$ from docutils.core import publish_doctree from docutils import nodes import pyglet from pyglet.text.formats import structured class Stylesheet(object): default = dict( font_name='Times New Roman', font_size=12, margin_bottom=12) emphasis = dict( ital...
ajibawa-2023/Python-Code-Large/train/row_91137
78
147
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91137:ImportFrom_L4_C0", "label": "from docutils.core import publish_doctree", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0272, 0.0068, 0, 0.66, 0.0, 219, 0, 1, 0, 0, 219, 0, 0], "semantic": {"name": "docutils.core", "arg_names": [],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91137:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91137:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91137:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91137:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python # $Id:$ import ctypes import math import optparse import pyglet root2 = math.sqrt(2) def gen_dist_field(img, width, height, spread, bidirectional=True): sample_width = img.width // width sample_height = img.height // height max_dist = spread * root2 dist_scale = 127. / max_dist ...
ajibawa-2023/Python-Code-Large/train/row_91138
74
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_91138:Import_L4_C0", "label": "ctypes import ctypes", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0392, 0.0098, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91138:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91138:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91138:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91138:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import code import sys import traceback import pyglet.event import pyglet.text from pyglet.window import key from pyglet.gl import * class Console(object): def __init__(self, width, height, globals=None, locals=None): ...
ajibawa-2023/Python-Code-Large/train/row_91140
105
141
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91140:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0248, 0.0142, 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_91140:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91140:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91140:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91140:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from math import * from ctypes import * from pyglet.gl import * from euclid import * def FloatArray(*args): t = (c_float * len(args)) return t(*args) def IndexArray(*args): t = (c_uint * len(args)) return t(*args...
ajibawa-2023/Python-Code-Large/train/row_91142
91
142
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91142:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0246, 0.0141, 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_91142:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91142:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91142:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91142:Return_L17_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/python # $Id:$ from pyglet.gl import * from pyglet import window class MoveWindow(object): def __init__(self, window, x, y): self.offset = x, y self.window = window def on_mouse_drag(self, x, y, dx, dy, buttons, modifiers): sx, sy = self.window.get_location() ox, oy...
ajibawa-2023/Python-Code-Large/train/row_91143
51
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_91143:ImportFrom_L4_C0", "label": "from pyglet.gl import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.0135, 0, 0.66, 0.0, 531, 0, 1, 0, 0, 531, 0, 0], "semantic": {"name": "pyglet.gl", "arg_names": [], "import_names": ["*"]...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91143:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91143:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91143:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91143:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code...
'''Wrapper for avformat Generated with: ../tools/wraptypes/wrap.py /usr/include/ffmpeg/avformat.h -o lib_avformat.py .. Then hacked. DON'T REGENERATE. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * from avcodec import get_library _lib = get_library('avformat') _in...
ajibawa-2023/Python-Code-Large/train/row_91144
378
1,429
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91144:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0028, 0.0049, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91144:For_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91144:If_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91144:If_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91144:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
#!/usr/bin/python # $Id:$ import ctypes import pyglet from pyglet.window.xlib import xlib from pyglet.gl import * from pyglet.gl.glx import * def reshape(width, height): h = height / float(width) glViewport(0, 0, width, height) glMatrixMode(GL_PROJECTION) glLoadIdentity() glFrustum(-1.0, 1.0, -h, h, 5...
ajibawa-2023/Python-Code-Large/train/row_91145
65
106
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91145:Import_L4_C0", "label": "ctypes import ctypes", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0377, 0.0094, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91145:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91145:Assign_L12_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91145:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91145:Expr_L13_C3"}, {"f": "ajibawa-2023/Python-Code...
# Number MacBook # 500 59.1715965271 # 1000 29.5857982635 # 2000 19.8412704468 import os import sys import random import pygame import pygame.time from pygame.locals import * pygame.init() win = pygame.display.set_mode((600, 600)) ww, wh = win.get_size() img = pygame.image.load('examples/nois...
ajibawa-2023/Python-Code-Large/train/row_91146
49
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_91146:Import_L9_C0", "label": "os import os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.1452, 0.0161, 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_91146:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91146:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91146:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91146:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-...
import sys import time from ctypes import * from exceptions import * import random # disable error checking (python -O) to make this code work :) from pyglet import options import pyglet.window from pyglet import clock from pyglet.shader import * from pyglet.ext.model.geometric import * from pyglet.gl import * from ...
ajibawa-2023/Python-Code-Large/train/row_91147
488
889
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91147:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0011, 0.0011, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91147:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91147:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91147:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91147:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
ajibawa-2023/Python-Code-Large/train/row_91148
116
241
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91148:Expr_L35_C0", "label": "expression", "type": "expression", "loc": [35, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1473, 0.0083, 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_91148:ClassDef_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91148:Assign_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91148:ClassDef_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91148:FunctionDef_L73_C4"}, {"f": "ajibawa-2023/Python-Cod...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
ajibawa-2023/Python-Code-Large/train/row_91149
516
1,081
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91149:Expr_L36_C0", "label": "expression", "type": "expression", "loc": [36, 70], "level": 0, "parent": null, "vector": [8, 0, 0.049, 0.0324, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91149:ClassDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91149:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91149:ClassDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91149:Assign_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python # $Id:$ import ctypes import Queue import pyglet from pyglet.window.win32 import _kernel32, _user32, constants, types class MTWin32EventLoop(pyglet.app.win32.Win32EventLoop): def __init__(self, *args, **kwargs): super(MTWin32EventLoop, self).__init__(*args, **kwargs) ...
ajibawa-2023/Python-Code-Large/train/row_91150
43
75
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91150:Import_L4_C0", "label": "ctypes import ctypes", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0533, 0.0133, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91150:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91150:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91150:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91150:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are ...
ajibawa-2023/Python-Code-Large/train/row_91151
212
336
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91151:Expr_L36_C0", "label": "expression", "type": "expression", "loc": [36, 37], "level": 0, "parent": null, "vector": [8, 0, 0.1086, 0.006, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91151:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91151:Expr_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91151:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91151:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import setup_path import sys import pyglet import mt_media import mt_procedural as procedural player = mt_media.Player() player.queue(procedural.Sine(0.5, 300)) player.queue(procedural.Sine(0.5, 330)) player.queue(procedural.S...
ajibawa-2023/Python-Code-Large/train/row_91152
19
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91152:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.0714, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[]
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import setup_path import pyglet import mt_media import sys source = mt_media.load(sys.argv[1]) player = mt_media.Player() player.queue(source) player.play() player.on_eos = lambda: pyglet.app.exit() pyglet.app.run()
ajibawa-2023/Python-Code-Large/train/row_91153
13
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_91153:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1591, 0.0909, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import threading import time import mt_media import pyglet _debug = pyglet.options['debug_media'] class SilentAudioPlayer(mt_media.AbstractAudioPlayer): # When playing video, length of audio (in secs) to buffer ahead. ...
ajibawa-2023/Python-Code-Large/train/row_91154
91
161
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91154:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0217, 0.0124, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91154:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91154:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91154:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91154:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
ajibawa-2023/Python-Code-Large/train/row_91155
134
408
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91155:Import_L36_C0", "label": "ctypes import ctypes", "type": "import", "loc": [36, 36], "level": 0, "parent": null, "vector": [1, 0, 0.0882, 0.0025, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91155:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91155:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91155:ClassDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91155:Assign_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python # $Id:$ import ctypes import math import sys import threading import time import pyglet _debug = pyglet.options['debug_media'] import mt_media import lib_dsound as lib from pyglet.window.win32 import _user32, _kernel32 class DirectSoundException(mt_media.MediaException): pas...
ajibawa-2023/Python-Code-Large/train/row_91156
343
538
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91156:Import_L4_C0", "label": "ctypes import ctypes", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0074, 0.0019, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91156:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91156:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91156:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91156:If_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
'''Wrapper for pulse Generated with: tools/genwrappers.py pulseaudio Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: wrap.py 1694 2008-01-30 23:12:00Z Alex.Holkner $' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('pulse') _int_types = (c_...
ajibawa-2023/Python-Code-Large/train/row_91157
1,040
2,068
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91157:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0019, 0.0034, 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_91157:For_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91157:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91157:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91157:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
ajibawa-2023/Python-Code-Large/train/row_91159
382
651
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91159:Expr_L34_C0", "label": "expression", "type": "expression", "loc": [34, 41], "level": 0, "parent": null, "vector": [8, 0, 0.0576, 0.0123, 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_91159:For_L61_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91159:If_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91159:If_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91159:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
ajibawa-2023/Python-Code-Large/train/row_91160
150
286
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91160:Expr_L34_C0", "label": "expression", "type": "expression", "loc": [34, 40], "level": 0, "parent": null, "vector": [8, 0, 0.1294, 0.0245, 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_91160:For_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91160:If_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91160:If_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91160:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
ajibawa-2023/Python-Code-Large/train/row_91161
302
528
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91161:Import_L36_C0", "label": "ctypes import ctypes", "type": "import", "loc": [36, 36], "level": 0, "parent": null, "vector": [1, 0, 0.0682, 0.0019, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91161:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91161:Assign_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91161:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91161:Assign_L59_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/python # $Id: setup_path.py 1580 2008-01-15 15:08:39Z Alex.Holkner $ import os.path import sys script_dir = os.path.dirname(__file__) sys.path.insert(0, os.path.join(script_dir, '..', '..')) sys.path.insert(0, script_dir)
ajibawa-2023/Python-Code-Large/train/row_91163
5
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91163:Import_L4_C0", "label": "os.path import os.path", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.4444, 0.1111, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "...
[]
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
ajibawa-2023/Python-Code-Large/train/row_91164
103
181
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91164:ImportFrom_L36_C0", "label": "from mt_media import Source, AudioFormat, AudioData", "type": "import", "loc": [36, 36], "level": 0, "parent": null, "vector": [1, 0, 0.1989, 0.0055, 0, 0.66, 0.0, 308, 0, 3, 0, 0, 308, 0, 0], "semantic": {"name": "mt_media", "arg_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91164:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91164:FunctionDef_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91164:FunctionDef_L43_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91164:Assign_L44_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python ''' Hack synchronisation into pyglet event loop. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import select import threading import pyglet class XlibEventDispatcher(object): def fileno(self): raise NotImplementedError('abstract') def dispatch_events(self): ...
ajibawa-2023/Python-Code-Large/train/row_91165
77
124
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91165:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0323, 0.0242, 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_91165:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91165:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91165:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91165:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Pytho...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import time from pyglet.ext.layout import * from pyglet.window import * window = Window(visible=False) def print_time(start, msg): dt = time.time() - start print '%f\t%s' % (dt, msg) def profile(xhtml, widths=[800,600,4...
ajibawa-2023/Python-Code-Large/train/row_91166
29
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_91166:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0186, 0.0106, 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_91166:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91166:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91166:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91166:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code...
'''Wrapper for pulse Generated with: tools/genwrappers.py pulseaudio Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: wrap.py 1694 2008-01-30 23:12:00Z Alex.Holkner $' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('pulse') _int_types = (c_...
ajibawa-2023/Python-Code-Large/train/row_91168
1,040
2,065
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91168:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0019, 0.0034, 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_91168:For_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91168:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91168:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91168:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import sys from pyglet import clock from pyglet import image from pyglet import window w = window.Window() class AnimationPlayer(object): expected_delay = 0 def __init__(self, animation): self.animation = animat...
ajibawa-2023/Python-Code-Large/train/row_91169
38
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91169:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0648, 0.037, 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_91169:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91169:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91169:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91169:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Cod...
#!/usr/bin/env python '''Press R,G,B,S keys to alter target color and saturation. ''' print __doc__ __docformat__ = 'restructuredtext' __version__ = '$Id: $' from ctypes import * from pyglet.gl import * from pyglet import clock from pyglet.image import * from pyglet.window import * from pyglet.window.event import ...
ajibawa-2023/Python-Code-Large/train/row_91170
52
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_91170:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0422, 0.0241, 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_91170:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91170:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91170:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91170:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/env python import sys from pyglet.gl import * from pyglet import window, image import shader w = window.Window(512, 512) kitten = image.load('../examples/programming_guide/kitten.jpg') pinch_f = ''' uniform sampler2D tex; uniform vec2 size; uniform vec2 mouse; uniform float strength; void main() { v...
ajibawa-2023/Python-Code-Large/train/row_91171
25
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_91171:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0179, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91171:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91171:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91171:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91171:Return_L40_C4"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/env python # -*- coding: latin-1 -*- ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import math import random import re import os.path import pyglet from pyglet.gl import * import xml.dom import xml.dom.minidom class SmoothLineGroup(pyglet.graphics.Group): def set_state(self): ...
ajibawa-2023/Python-Code-Large/train/row_91172
193
352
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91172:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0128, 0.0057, 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_91172:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91172:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91172:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91172:Expr_L21_C8"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/python # $Id:$ # wxPython + pyglet integration, by subclassing wx.Window. # Win32 works fine, though flickery resize. # GDK sort of works, but keeps getting overdrawn by the window background # (resize to see). import wx import pyglet from pyglet.gl import * import sys if sys.platform == ...
ajibawa-2023/Python-Code-Large/train/row_91173
124
194
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91173:Import_L9_C0", "label": "wx import wx", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0464, 0.0052, 0, 0.66, 0.0, 666, 0, 1, 0, 0, 666, 0, 0], "semantic": {"name": "wx", "arg_names": [], "import_names": ["wx"], "rhs_call_name": ""...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91173:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91173:ImportFrom_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91173:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91173:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# Copyright 2009 Joe Wreschnig and others. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following di...
ajibawa-2023/Python-Code-Large/train/row_91174
126
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_91174:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 26], "level": 0, "parent": null, "vector": [8, 0, 0.0821, 0.0336, 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_91174:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91174:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91174:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91174:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-...
'''Wrapper for Xxf86vm Generated with: tools/genwrappers.py Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('Xxf86vm') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): # Som...
ajibawa-2023/Python-Code-Large/train/row_91175
146
350
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91175:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0114, 0.02, 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_91175:For_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91175:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91175:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91175:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
'''Wrapper for Xrandr Generated with: tools/genwrappers.py xrandr Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('Xrandr') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): ...
ajibawa-2023/Python-Code-Large/train/row_91176
296
746
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91176:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0054, 0.0094, 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_91176:For_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91176:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91176:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91176:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes import pyglet from pyglet.window.xlib import xlib import lib_xrandr as xrandr def _check_extension(display): major_opcode = ctypes.c_int() first_event = ctypes.c_int() first_error = ctypes.c_int() x...
ajibawa-2023/Python-Code-Large/train/row_91177
42
66
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91177:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.053, 0.0303, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91177:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91177:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91177:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91177:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Co...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes import os import fcntl import mutex import time import select import struct import signal import sys import threading from pyglet.window.xlib import xlib import lib_xf86vmode as xf86vmode class ModeList(object): ...
ajibawa-2023/Python-Code-Large/train/row_91178
136
224
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91178:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0156, 0.0089, 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_91178:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91178:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91178:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91178:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Cod...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' # Patch for window/carbon/__init__.py:: # (in _create) # # fs_width = c_short(width) # fs_height = c_short(width) # # ... that's it :-)
ajibawa-2023/Python-Code-Large/train/row_91179
3
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91179:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.2333, 0.1333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[]
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import pyglet from pyglet.gl import * window = pyglet.window.Window(fullscreen=True) @window.event def on_draw(): glClearColor(.5, .5, .5, 1) glClear(GL_COLOR_BUFFER_BIT) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE) ...
ajibawa-2023/Python-Code-Large/train/row_91180
15
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_91180:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1458, 0.0833, 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_91180:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91180:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91180:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91180:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python # $Id:$ import ctypes import pyglet from pyglet.window.win32 import _user32 from pyglet.window.win32.constants import * from pyglet.window.win32.types import * WCHAR = ctypes.c_wchar BCHAR = ctypes.c_wchar class MONITORINFOEX(ctypes.Structure): _fields_ = ( ('cbSize', DW...
ajibawa-2023/Python-Code-Large/train/row_91181
51
128
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91181:Import_L4_C0", "label": "ctypes import ctypes", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0078, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91181:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91181:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91181:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91181:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python # $Id:$ import os.path import sys script_dir = os.path.dirname(__file__) sys.path.insert(0, os.path.join(script_dir, '..', '..')) sys.path.insert(0, script_dir)
ajibawa-2023/Python-Code-Large/train/row_91182
5
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91182:Import_L4_C0", "label": "os.path import os.path", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.4444, 0.1111, 0, 0.66, 0.0, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "...
[]
#!/usr/bin/python # $Id:$ import os import sys import unittest from pyglet.gl import * from pyglet import image from pyglet import resource from pyglet import window __noninteractive = True # Test image is laid out # M R # B G # In this test the image is sampled at four points from top-right cloc...
ajibawa-2023/Python-Code-Large/train/row_91183
53
84
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91183:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0119, 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_91183:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91183:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91183:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91183:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' __noninteractive = True ''' Layout: . (script home) file.txt F1 dir1/ file.txt F2 dir1/ file.txt F3 res.zip/...
ajibawa-2023/Python-Code-Large/train/row_91184
91
161
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91184:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0217, 0.0124, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_91184:ClassDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91184:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91184:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91184:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python '''Test that rendering of bullet glyphs works. You should see 5 bullet glyphs rendered in the bottom-left of the window. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import font import base_text class TEST_HALIGN(base_text.TextTestBase): font...
ajibawa-2023/Python-Code-Large/train/row_91185
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_91185:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1957, 0.1739, 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_91185:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91185:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91185:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91185:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python '''Test that a font likely to be installed on the computer can be loaded and displayed correctly. One window will open, it should show "Quickly brown fox" at 24pt using: * "Helvetica" on Mac OS X * "Arial" on Windows ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import un...
ajibawa-2023/Python-Code-Large/train/row_91186
16
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_91186:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 11], "level": 0, "parent": null, "vector": [8, 0, 0.2188, 0.2812, 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_91186:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91186:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91186:If_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91186:If_L22_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_911...
#!/usr/bin/env python '''Base class for text tests. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import sys from pyglet.gl import * from pyglet import font from pyglet.window import * from pyglet.window.event import * from tests.regression import ImageRegressionTestCase class Text...
ajibawa-2023/Python-Code-Large/train/row_91187
39
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91187:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.0636, 0.0364, 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_91187:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91187:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91187:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91187:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python '''Test that font.Text alignment works with multiple lines. Three labels will be rendered at the top-left, center and bottom-right of the window. Resize the window to ensure the alignment is as specified. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pygl...
ajibawa-2023/Python-Code-Large/train/row_91188
24
54
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91188:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0926, 0.0926, 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_91188:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91188:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91188:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91188:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python '''Test that text will not wrap when its width is set to its calculated width. You should be able to clearly see "TEST TEST" on a single line (not two) and "SPAM SPAM SPAM" over two lines, not three. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_text...
ajibawa-2023/Python-Code-Large/train/row_91189
20
33
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91189:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.1818, 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_91189:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91189:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91189:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91189:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python '''Test that the horizontal font metrics are calculated correctly. Some text in various fonts will be displayed. Green vertical lines mark the left edge of the text. Blue vertical lines mark the right edge of the text. Press ESC to end the test. ''' __docformat__ = 'restructuredtext' __versi...
ajibawa-2023/Python-Code-Large/train/row_91190
33
63
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91190:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1032, 0.127, 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_91190:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91190:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91190:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91190:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Cod...
#!/usr/bin/env python '''Test that font colour is applied correctly. Default font should appear blue. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_text from pyglet import font class TEST_COLOR(base_text.TextTestBase): def render(self): fnt = font.load(self.f...
ajibawa-2023/Python-Code-Large/train/row_91191
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_91191:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.1429, 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_91191:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91191:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91191:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91191:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python '''Test that a font with no name given still renders using some sort of default system font. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_text class TEST_DEFAULT(base_text.TextTestBase): font_name = '' if __name__ == '__main__': unittest.ma...
ajibawa-2023/Python-Code-Large/train/row_91192
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_91192:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.2353, 0.1765, 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_91192:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91192:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91192:If_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91192:Expr_L17_C4"}]
#!/usr/bin/env python '''Test that font.Text vertical alignment works. Four labels will be aligned top, center, baseline and bottom. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import gl from pyglet import font import base_text class TEST_VALIGN(base_text.TextTestBas...
ajibawa-2023/Python-Code-Large/train/row_91193
29
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91193:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0978, 0.087, 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_91193:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91193:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91193:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91193:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python '''Test that a specific DPI can be set to render the text with. Some text in Action Man font will be displayed. A green box should exactly bound the top and bottom of the text. Press ESC to end the test. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import os import unittest ...
ajibawa-2023/Python-Code-Large/train/row_91194
32
55
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91194:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 9], "level": 0, "parent": null, "vector": [8, 0, 0.1091, 0.1273, 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_91194:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91194:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91194:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91194:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Cod...
#!/usr/bin/env python '''Test that font colour is applied correctly. Default font should appear at 0.1 opacity (faint white) ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_text from pyglet import font class TEST_COLOR_BLEND(base_text.TextTestBase): def render(self): ...
ajibawa-2023/Python-Code-Large/train/row_91195
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_91195:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.1429, 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_91195:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91195:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91195:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91195:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python '''Test that font.Text horizontal alignment works. Three labels will be rendered aligned left, center and right. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest from pyglet import font import base_text class TEST_HALIGN(base_text.TextTestBase): font_name = ...
ajibawa-2023/Python-Code-Large/train/row_91196
21
41
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91196:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.1098, 0.0976, 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_91196:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91196:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91196:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91196:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Cod...
#!/usr/bin/env python '''Test that a font distributed with the application can be displayed. Four lines of text should be displayed, each in a different variant (bold/italic/regular) of Action Man at 24pt. The Action Man fonts are included in the test directory (tests/font) as action_man*.ttf. Press ESC to end the ...
ajibawa-2023/Python-Code-Large/train/row_91197
26
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91197:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 10], "level": 0, "parent": null, "vector": [8, 0, 0.125, 0.1538, 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_91197:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91197:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91197:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91197:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Cod...
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest from pyglet.image import get_buffer_manager class ImageRegressionTestCase(unittest.TestCase): _enable_regression_image = False _enable_interactive = True _captured_image = None def capture_regress...
ajibawa-2023/Python-Code-Large/train/row_91199
14
24
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91199:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 4], "level": 0, "parent": null, "vector": [8, 0, 0.1458, 0.0833, 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_91199:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91199:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91199:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91199:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/env python '''Test that audio playback works. You should hear a tone at 440Hz (A above middle C) for 1.0 seconds. The test will exit immediately after. You may want to turn down the volume of your speakers. ''' import unittest from pyglet import media from pyglet.media import procedural ...
ajibawa-2023/Python-Code-Large/train/row_91200
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_91200:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2069, 0.2414, 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_91200:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91200:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91200:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91200:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-...
#!/usr/bin/env python '''Test that audio playback works. You should hear white noise (static) for 0.5 seconds. The test will exit immediately after. You may want to turn down the volume of your speakers. ''' import unittest from pyglet import media from pyglet.media import procedural class TEST_...
ajibawa-2023/Python-Code-Large/train/row_91201
15
28
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_91201:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 9], "level": 0, "parent": null, "vector": [8, 0, 0.2143, 0.25, 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_91201:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_91201:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_91201:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_91201:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-...