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
# snippet to change the LookupTables (colourmaps) of the selected objects # this should be run in the introspection context of a slice3dVWR # $Id$ import os import tempfile import vtk className = obj.__class__.__name__ if className == 'slice3dVWR': # find all polydata objects so = obj._tdObjects._getSelecte...
ajibawa-2023/Python-Code-Large/train/row_2674
20
37
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2674:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1351, 0.027, 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_2674:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2674:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2674:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2674:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267...
# short DeVIDE matplotlib demo. from pylab import * # close previous figure if it exists try: obj.mpl_close_figure(numpy_test_figure) except NameError: pass # square figure and square axes looks better for polar plots numpy_test_figure = obj.mpl_new_figure(figsize=(8,8)) ax = axes([0.1, 0.1, 0.8, 0.8], polar...
ajibawa-2023/Python-Code-Large/train/row_2675
13
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_2675:ImportFrom_L3_C0", "label": "from pylab import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.0357, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "pylab", "arg_names": [], "import_names": ["*"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2675:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2675:Expr_L7_C4"}]
# snippet that illustrates programmatic setting of Window/Level # in the slice3dVWR introspection interface W = 500 L = 1000 sds = obj.sliceDirections._sliceDirectionsDict.values() for sd in sds: ipw = sd._ipws[0] ipw.SetWindowLevel(W, L, 0)
ajibawa-2023/Python-Code-Large/train/row_2676
6
10
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2676:Assign_L4_C0", "label": "W =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.4, 0.1, 0, 0.66, 0.0, 94, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "W", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotatio...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2676:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2676:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2676:For_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2676:Expr_L10_C4"}]
# this snippet will rotate the camera in the slice3dVWR that you have # selected and dump every frame as a PNG to the temporary directory # you can modify this snippet if you want to make movies of for instance # deforming surfaces and whatnot # 1. right click on a slice3dVWR in the graphEditor # 2. select "Mark Modul...
ajibawa-2023/Python-Code-Large/train/row_2677
24
49
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2677:Import_L12_C0", "label": "os import os", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.2449, 0.0204, 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_2677:If_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2677:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2677:If_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2677:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2677:If...
# short DeVIDE matplotlib demo. from pylab import * # close previous figure if it exists try: obj.mpl_close_figure(numpy_test_figure) except NameError: pass numpy_test_figure = obj.mpl_new_figure() # this example from http://matplotlib.sourceforge.net/screenshots/log_shot.py dt = 0.01 t = arange(dt, 20.0, d...
ajibawa-2023/Python-Code-Large/train/row_2678
18
29
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2678:ImportFrom_L3_C0", "label": "from pylab import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1034, 0.0345, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "pylab", "arg_names": [], "import_names": ["*"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2678:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2678:Expr_L7_C4"}]
# link cameras of all selected slice3dVWRs # after having run this, all selected slice3dVWRs will have linked # cameras, so if you change the view in anyone, all will follow. # 1. run this in the main DeVIDE introspection window after having # selected a number of slice3dVWRs # 2. to unlink views, type unlink_slic...
ajibawa-2023/Python-Code-Large/train/row_2679
27
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2679:FunctionDef_L11_C0", "label": "observer_istyle", "type": "function", "loc": [11, 26], "level": 0, "parent": null, "vector": [2, 0, 0.3936, 0.3404, 0, 0.66, 0.0, 99, 0, 2, 0, 0, 0, 0, 11], "semantic": {"name": "observer_istyle", "arg_names": ["s3d", "s3ds"], "import...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2679:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2679:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2679:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2679:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import vtk import wx def makeBorderPD(ipw): # setup source ps = vtk.vtkPlaneSource() ps.SetOrigin(ipw.GetOrigin()) ps.SetPoint1(ipw.GetPoint1()) ps.SetPoint2(ipw.GetPoint2()) fe = vtk.vtkFeatureEdges() fe.SetInput(ps.GetOutput()) tubef = vtk.vtkTubeFilter() tubef.SetNumberOfSides...
ajibawa-2023/Python-Code-Large/train/row_2680
34
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_2680:Import_L1_C0", "label": "vtk import vtk", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 665, 0, 1, 0, 0, 665, 0, 0], "semantic": {"name": "vtk", "arg_names": [], "import_names": ["vtk"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2680:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2680:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2680:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2680:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# short DeVIDE matplotlib demo. from pylab import * # close previous figure if it exists try: obj.mpl_close_figure(numpy_test_figure) except NameError: pass numpy_test_figure = obj.mpl_new_figure() a = arange(-30, 30, 0.01) plot(a, sin(a) / a, label='sinc(x)') plot(a, cos(a), label='cos(x)') legend() grid()...
ajibawa-2023/Python-Code-Large/train/row_2681
11
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2681:ImportFrom_L3_C0", "label": "from pylab import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0476, 0, 0.66, 0.0, 735, 0, 1, 0, 0, 735, 0, 0], "semantic": {"name": "pylab", "arg_names": [], "import_names": ["*"], "rhs_ca...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2681:Try_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2681:Expr_L7_C4"}]
# this DeVIDE snippet will determine the surface area of all selected # 3D objects in a marked slice3dVWR # in short: # 1. right click on a slice3dVWR in the graphEditor # 2. select "Mark Module" from the drop-down menu # 3. accept "slice3dVWR" as suggestion for the mark index name # 4. execute this snippet import vt...
ajibawa-2023/Python-Code-Large/train/row_2682
15
35
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2682:Import_L10_C0", "label": "vtk import vtk", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.2857, 0.0286, 0, 0.66, 0.0, 665, 0, 1, 0, 0, 665, 0, 0], "semantic": {"name": "vtk", "arg_names": [], "import_names": ["vtk"], "rhs_call_nam...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2682:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2682:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2682:If_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2682:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268...
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. # I could have done this with just a module variable, but I found this # Borg thingy too nice not to use. See: # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531 class CounterBorg: """Borg-pattern (similar ...
ajibawa-2023/Python-Code-Large/train/row_2683
9
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_2683:ClassDef_L9_C0", "label": "CounterBorg", "type": "class", "loc": [9, 28], "level": 0, "parent": null, "vector": [3, 0, 0.5781, 0.625, 0, 0.66, 0.0, 359, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "CounterBorg", "arg_names": [], "import_names": [], "rhs_call_name": ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2683:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2683:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2683:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2683:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. """itk_kit package driver file. Inserts the following modules in sys.modules: itk, InsightToolkit. @author: Charl P. Botha <http://cpbotha.net/> """ import os import re import sys VERSION = '' def setDLFlags(): # bro...
ajibawa-2023/Python-Code-Large/train/row_2687
42
112
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2687:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 10], "level": 0, "parent": null, "vector": [8, 0, 0.067, 0.0536, 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_2687:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2687:Try_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2687:Try_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2687:Import_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/...
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """matplotlib_kit package driver file. Inserts the following modules in sys.modu...
ajibawa-2023/Python-Code-Large/train/row_2688
18
82
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2688:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 12], "level": 0, "parent": null, "vector": [8, 0, 0.1159, 0.0732, 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_2688:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2688:If_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2688:If_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2688:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import gdcm def sort_ipp(filenames): """STOP PRESS. This is currently incomplete. I'm waiting to see what's going to happen with the IPPSorter in GDCM. Given a list of filenames, make use of the gdcm scanne...
ajibawa-2023/Python-Code-Large/train/row_2689
18
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2689:Import_L5_C0", "label": "gdcm import gdcm", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1316, 0.0263, 0, 0.66, 0.0, 188, 0, 1, 0, 0, 188, 0, 0], "semantic": {"name": "gdcm", "arg_names": [], "import_names": ["gdcm"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2689:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2689:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2689:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2689:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. """gdcm_kit driver module. This pre-loads GDCM2, the second generation Grass Roots Dicom library, used since 2008 by DeVIDE for improved DICOM loading / saving support. """ import os import sys VERSION = '' def init(modul...
ajibawa-2023/Python-Code-Large/train/row_2690
14
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2690:Expr_L6_C0", "label": "expression", "type": "expression", "loc": [6, 10], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.1042, 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_2690:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2690:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2690:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2690:Import_L26_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. class MedicalMetaData: def __init__(self): self.medical_image_properties = None self.direction_cosines = None def close(self): del self.medical_image_properties del self.direction_cosin...
ajibawa-2023/Python-Code-Large/train/row_2692
10
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_2692:ClassDef_L5_C0", "label": "MedicalMetaData", "type": "class", "loc": [5, 23], "level": 0, "parent": null, "vector": [3, 0, 0.5833, 0.7917, 0, 0.66, 0.0, 29, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "MedicalMetaData", "arg_names": [], "import_names": [], "rhs_call...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2692:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2692:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2692:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2692:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. class SubjectMixin(object): def __init__(self): # dictionary mapping from event name to list of observer # callables self._observers = {} def add_observer(self, event_name, observer): ...
ajibawa-2023/Python-Code-Large/train/row_2693
17
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_2693:ClassDef_L5_C0", "label": "SubjectMixin", "type": "class", "loc": [5, 39], "level": 0, "parent": null, "vector": [3, 0, 0.5366, 0.8537, 0, 0.66, 0.0, 779, 0, 5, 0, 0, 186, 0, 4], "semantic": {"name": "SubjectMixin", "arg_names": [], "import_names": [], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2693:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2693:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2693:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2693:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-La...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import sys VERSION = 'INTEGRATED' # debug print command: if DEBUG is true, outputs to stdout, if not # then outputs nothing. # import with: from module_kits.misc_kit import dprint DEBUG=False if DEBUG: def dprint(*msg): ...
ajibawa-2023/Python-Code-Large/train/row_2694
11
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2694:Import_L5_C0", "label": "sys import sys", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1613, 0.0323, 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_2694:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2694:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2694:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2694:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import wx from wx import py from wx import stc class DVEditWindow(py.editwindow.EditWindow): """DeVIDE EditWindow. This fixes all of the py screwups by providing a re-usable Python EditWindow component. The Py ...
ajibawa-2023/Python-Code-Large/train/row_2697
150
277
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2697:Import_L5_C0", "label": "wx import wx", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0181, 0.0036, 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_2697:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2697:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2697:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2697:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
import wx from wx import py class DVShell(py.shell.Shell): """DeVIDE shell. Once again, PyCrust makes some pretty bad calls here and there. With this override we fix some of them. 1. passing locals=None will result in shell.Shell setting locals to __main__.__dict__ (!!) in contrast to the defaul...
ajibawa-2023/Python-Code-Large/train/row_2698
8
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_2698:Import_L1_C0", "label": "wx import wx", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0345, 0.0345, 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_2698:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2698:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2698:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2698:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import wx def get_system_font_size(): # wx.SYS_ANSI_FIXED_FONT seems to return reliable settings under # Windows and Linux. SYS_SYSTEM_FONT doesn't do so well on Win. ft = wx.SystemSettings.GetFont(wx.SYS_ANSI_FI...
ajibawa-2023/Python-Code-Large/train/row_2699
11
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2699:Import_L5_C0", "label": "wx import wx", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1471, 0.0294, 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_2699:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2699:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2699:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2699:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """wxpython_kit package driver file. Inser...
ajibawa-2023/Python-Code-Large/train/row_2700
11
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2700:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 14], "level": 0, "parent": null, "vector": [8, 0, 0.3382, 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_2700:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2700:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2700:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2700:Import_L24_C4"}, {"f": "ajibawa-2023/Python-Code-L...
medical_image_properties_keywords = [ 'PatientName', 'PatientID', 'PatientAge', 'PatientSex', 'PatientBirthDate', 'ImageDate', 'ImageTime', 'ImageNumber', 'StudyDescription', 'StudyID', 'StudyDate', 'AcquisitionDate', ...
ajibawa-2023/Python-Code-Large/train/row_2701
1
31
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2701:Assign_L1_C0", "label": "medical_image_properties_keywords =", "type": "assigned_variable", "loc": [1, 30], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.9677, 0, 0.66, 0.0, 738, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "medical_image_properties_keywords",...
[]
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. """Utility methods for vtk_kit module kit. @author Charl P. Botha <http://cpbotha.net/> """ import vtk class DVOrientationWidget: """Convenience class for embedding orientation widget in any renderwindowinteractor....
ajibawa-2023/Python-Code-Large/train/row_2702
91
160
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2702:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0406, 0.025, 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_2702:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2702:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2702:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2702:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# $Id$ """Mixins that are useful for classes using vtk_kit. @author: Charl P. Botha <http://cpbotha.net/> """ from external.vtkPipeline.ConfigVtkObj import ConfigVtkObj from external.vtkPipeline.vtkMethodParser import VtkMethodParser from module_base import ModuleBase from module_mixins import IntrospectModuleMixin ...
ajibawa-2023/Python-Code-Large/train/row_2703
127
335
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2703:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0134, 0.0119, 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_2703:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2703:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2703:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2703:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# perceptually linear colour scales based on those published by Haim # Levkowitz at http://www.cs.uml.edu/~haim/ColorCenter/ # code by Peter R. Krekel (c) 2009 # modified by Charl Botha to cache lookuptable per range import vtk class ColorScales(): def __init__(self): self.BlueToYellow = {} self....
ajibawa-2023/Python-Code-Large/train/row_2705
819
848
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2705:Import_L6_C0", "label": "vtk import vtk", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0071, 0.0012, 0, 0.66, 0.0, 665, 0, 1, 0, 0, 665, 0, 0], "semantic": {"name": "vtk", "arg_names": [], "import_names": ["vtk"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2705:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2705:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2705:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2705:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-La...
# $Id$ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """vtk_kit package driver file. This performs all initialisation necessary to use VTK from DeVIDE. Makes sure that all VTK clas...
ajibawa-2023/Python-Code-Large/train/row_2706
39
127
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2706:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 16], "level": 0, "parent": null, "vector": [8, 0, 0.0906, 0.0787, 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_2706:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2706:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2706:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2706:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """numpy_kit package driver file. Inserts the following modules in sys.modules: ...
ajibawa-2023/Python-Code-Large/train/row_2707
14
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2707:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 12], "level": 0, "parent": null, "vector": [8, 0, 0.2209, 0.1395, 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_2707:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2707:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2707:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2707:Import_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import math import numpy epsilon = 1e-12 def abs(v1): return numpy.absolute(v1) def norm(v1): """Given vector v1, return its norm. """ v1a = numpy.array(v1) norm = numpy.sqrt(numpy.sum(v1a * v1a)) return norm def normalise_line(p1, p2): """Given two points, return normal vector, magnitu...
ajibawa-2023/Python-Code-Large/train/row_2708
102
219
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2708:Import_L1_C0", "label": "math import math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0046, 0.0046, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2708:FunctionDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2708:Return_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2708:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2708:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """geometry_kit package driver file. Inser...
ajibawa-2023/Python-Code-Large/train/row_2709
9
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2709:Expr_L9_C0", "label": "expression", "type": "expression", "loc": [9, 14], "level": 0, "parent": null, "vector": [8, 0, 0.2875, 0.15, 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_2709:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2709:Import_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2709:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2709:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. """sqlite_kit package driver file. With this we make sure that sqlite3 is always packaged. """ VERSION = '' def init(module_manager, pre_import=True): global sqlite3 import sqlite3 global VERSION VERSION = ...
ajibawa-2023/Python-Code-Large/train/row_2710
5
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2710:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 8], "level": 0, "parent": null, "vector": [8, 0, 0.3421, 0.2105, 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_2710:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2710:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2710:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2710:Assign_L17_C4"}]
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """vtktudoss_kit package driver file. Inserts the following modules in sys.modul...
ajibawa-2023/Python-Code-Large/train/row_2711
10
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_2711:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 12], "level": 0, "parent": null, "vector": [8, 0, 0.2879, 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_2711:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2711:Import_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2711:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2711:Try_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """itktudoss_kit package driver file. This driver makes sure that itktudoss has ...
ajibawa-2023/Python-Code-Large/train/row_2713
10
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2713:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 13], "level": 0, "parent": null, "vector": [8, 0, 0.3704, 0.2593, 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_2713:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2713:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2713:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2713:Import_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# $Id: __init__.py 1945 2006-03-05 01:06:37Z cpbotha $ # importing this module shouldn't directly cause other large imports # do large imports in the init() hook so that you can call back to the # ModuleManager progress handler methods. """stats_kit package driver file. Inserts the following modules in sys.modules: ...
ajibawa-2023/Python-Code-Large/train/row_2716
9
35
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2716:Expr_L7_C0", "label": "expression", "type": "expression", "loc": [7, 12], "level": 0, "parent": null, "vector": [8, 0, 0.2714, 0.1714, 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_2716:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2716:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2716:FunctionDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2716:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# $Id: module_index.py 2790 2008-02-29 08:33:14Z cpbotha $ class emp_test: kits = ['vtk_kit'] cats = ['Tests'] keywords = ['test', 'tests', 'testing'] help = \ """Module to test DeVIDE extra-module-paths functionality. """
ajibawa-2023/Python-Code-Large/train/row_2718
5
13
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2718:ClassDef_L3_C0", "label": "emp_test", "type": "class", "loc": [3, 9], "level": 0, "parent": null, "vector": [3, 0, 0.4615, 0.5385, 0, 0.66, 0.0, 657, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "emp_test", "arg_names": [], "import_names": [], "rhs_call_name": "", "a...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2718:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2718:Assign_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2718:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2718:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase import vtk class emp_test(SimpleVTKClassModuleBase): """This is the minimum you need to wrap a single VTK object. This __doc__ string will be replaced by the __doc__ string of the encapsulated VTK object, i.e. vtkStripper in this case. ...
ajibawa-2023/Python-Code-Large/train/row_2719
6
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_2719:ImportFrom_L1_C0", "label": "from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0455, 0.0455, 0, 0.66, 0.0, 67, 0, 1, 0, 0, 67, 0, 0], "semantic": {"name": "module_kits.v...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2719:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2719:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2719:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2719:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
"""Module to test basic matplotlib functionality. """ import os import unittest import tempfile class MPLTest(unittest.TestCase): def test_figure_output(self): """Test if matplotlib figure can be generated and wrote to disc. """ # make sure the pythonshell is running self._devide_...
ajibawa-2023/Python-Code-Large/train/row_2720
36
81
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2720:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0185, 0.0247, 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_2720:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2720:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2720:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2720:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Larg...
"""Module to test basic DeVIDE functionality. """ import unittest class BasicMiscTest(unittest.TestCase): def test_sqlite3(self): """Test if sqlite3 is available. """ import sqlite3 v = sqlite3.version conn = sqlite3.connect(':memory:') cur = conn.cursor(...
ajibawa-2023/Python-Code-Large/train/row_2724
22
42
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2724:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0357, 0.0476, 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_2724:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2724:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2724:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2724:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
# testing.__init__.py copyright 2006 by Charl P. Botha http://cpbotha.net/ # $Id$ # this drives the devide unit testing. neat huh? import os import time import unittest from testing import misc from testing import basic_vtk from testing import basic_wx from testing import graph_editor from testing import numpy_tests...
ajibawa-2023/Python-Code-Large/train/row_2725
58
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2725:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.042, 0.0084, 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_2725:For_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2725:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2725:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2725:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
"""Module to test basic DeVIDE functionality. """ import unittest class PythonShellTest(unittest.TestCase): def test_python_shell(self): """Test if PythonShell can be opened successfully. """ iface = self._devide_app.get_interface() iface._handler_menu_python_shell(None) se...
ajibawa-2023/Python-Code-Large/train/row_2726
28
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2726:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0312, 0.0417, 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_2726:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2726:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2726:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2726:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
hiddenimports = ['matplotlib.numerix', 'matplotlib.numerix.fft', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.ma', 'matplotlib.numerix.mlab', 'matplotlib.numerix.npyma', 'matplotlib.numerix.random_array', 'matplotlib.backends.backend_wxagg'] print "[...
ajibawa-2023/Python-Code-Large/train/row_2728
3
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2728:Assign_L1_C0", "label": "hiddenimports =", "type": "assigned_variable", "loc": [1, 8], "level": 0, "parent": null, "vector": [14, 0, 0.4091, 0.7273, 0, 0.66, 0.0, 892, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "hiddenimports", "arg_names": [], "import_names": [], ...
[]
# this hook is responsible for including everything that the DeVIDE # modules could need. The top-level spec file explicitly excludes # them. import os import sys # normalize path of this file, get dirname hookDir = os.path.dirname(os.path.normpath(__file__)) # split dirname, select everything except the ending "ins...
ajibawa-2023/Python-Code-Large/train/row_2729
23
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_2729:Import_L5_C0", "label": "os import os", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0806, 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_2729:Try_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2729:Import_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2729:Try_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2729:Expr_L56_C4"}]
# so vtktudoss.py uses a list of names to construct the various imports # at runtime, installer doesn't see this. :( import os if os.name == 'posix': hiddenimports = [ 'libvtktudossGraphicsPython', 'libvtktudossWidgetsPython', 'libvtktudossSTLibPython'] else: hiddenimports ...
ajibawa-2023/Python-Code-Large/train/row_2730
6
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_2730:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.2222, 0.0556, 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_2730:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2730:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2730:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2730:Assign_L12_C4"}]
# miscellaneous imports used by snippets hiddenimports = ['tempfile']
ajibawa-2023/Python-Code-Large/train/row_2731
1
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2731:Assign_L3_C0", "label": "hiddenimports =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.3333, 0, 0.66, 0.0, 892, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "hiddenimports", "arg_names": [], "import_names": [], "rh...
[]
hiddenimports = ['wx.aui', 'wx.lib.mixins'] print "[*] hook-wx.py - HIDDENIMPORTS" print hiddenimports
ajibawa-2023/Python-Code-Large/train/row_2732
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2732:Assign_L1_C0", "label": "hiddenimports =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 0.25, 0.25, 0, 0.66, 0.0, 892, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "hiddenimports", "arg_names": [], "import_names": [], "rhs...
[]
# so vtktud.py uses a list of names to construct the various imports # at runtime, installer doesn't see this. :( import os if os.name == 'posix': hiddenimports = ['libvtktudCommonPython', 'libvtktudImagingPython', 'libvtktudGraphicsPython', 'libvtktudWidgetsPython'] else: hiddenimport...
ajibawa-2023/Python-Code-Large/train/row_2733
6
16
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2733:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0625, 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_2733:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2733:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2733:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2733:Assign_L11_C4"}]
"""Module for independently packaging up whole WrapITK tree. """ import itkConfig import glob import os import shutil import sys # customise the following variables if os.name == 'nt': SO_EXT = 'dll' SO_GLOB = '*.%s' % (SO_EXT,) PYE_GLOB = '*.pyd' # this should be c:/opt/ITK/bin ITK_SO_DIR = os.p...
ajibawa-2023/Python-Code-Large/train/row_2735
85
166
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2735:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.009, 0.012, 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_2735:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2735:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2735:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2735:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273...
# example driver script for offline / command-line processing with DeVIDE # the following variables are magically set in this script: # interface - instance of ScriptInterface, with the following calls: # meta_modules = load_and_realise_network() # execute_network(self, meta_modules) # clear_network(self) # in...
ajibawa-2023/Python-Code-Large/train/row_2737
16
53
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2737:FunctionDef_L16_C0", "label": "main", "type": "function", "loc": [16, 51], "level": 0, "parent": null, "vector": [2, 0, 0.6321, 0.6792, 0, 0.66, 0.0, 624, 0, 0, 0, 0, 0, 0, 14], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2737:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2737:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2737:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2737:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-L...
# dummy
ajibawa-2023/Python-Code-Large/train/row_2738
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. import wx # todo: this should go away... import string import sys import traceback # todo: remove all VTK dependencies from this file!! def clampVariable(v, min, max): """Make sure variable is on the range [min,max]. R...
ajibawa-2023/Python-Code-Large/train/row_2739
72
165
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2739:Import_L5_C0", "label": "wx import wx", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0303, 0.0061, 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_2739:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2739:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2739:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2739:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t...
# Copyright (c) Charl P. Botha, TU Delft # All rights reserved. # See COPYRIGHT for details. import vtk from module_kits.misc_kit.mixins import SubjectMixin from devide_canvas_object import DeVIDECanvasGlyph import operator import wx # we're going to use this for event handling from module_kits.misc_kit import dprin...
ajibawa-2023/Python-Code-Large/train/row_2740
329
662
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2740:Import_L5_C0", "label": "vtk import vtk", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0076, 0.0015, 0, 0.66, 0.0, 665, 0, 1, 0, 0, 665, 0, 0], "semantic": {"name": "vtk", "arg_names": [], "import_names": ["vtk"], "rhs_call_name":...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2740:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2740:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2740:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2740:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code...
# dummy
ajibawa-2023/Python-Code-Large/train/row_2741
0
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
class canvasSubject: def __init__(self): self._observers = {} def addObserver(self, eventName, observer): """Add an observer for a particular event. eventName can be one of 'enter', 'exit', 'drag', 'buttonDown' or 'buttonUp'. observer is a callable object that will be ...
ajibawa-2023/Python-Code-Large/train/row_2743
9
19
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2743:ClassDef_L1_C0", "label": "canvasSubject", "type": "class", "loc": [1, 18], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.9474, 0, 0.66, 0.0, 205, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "canvasSubject", "arg_names": [], "import_names": [], "rhs_call_name"...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2743:ClassDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2743:FunctionDef_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2743:FunctionDef_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2743:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Lar...
from canvasObject import * from canvas import *
ajibawa-2023/Python-Code-Large/train/row_2744
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2744:ImportFrom_L1_C0", "label": "from canvasObject import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 120, 0, 1, 0, 0, 120, 0, 0], "semantic": {"name": "canvasObject", "arg_names": [], "import_names": ...
[]
from wxPython import wx from canvasSubject import canvasSubject ############################################################################# class canvasObject(canvasSubject): def __init__(self, position): # call parent ctor canvasSubject.__init__(self) self._position = posit...
ajibawa-2023/Python-Code-Large/train/row_2745
178
396
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2745:ImportFrom_L1_C0", "label": "from wxPython import wx", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0025, 0.0025, 0, 0.66, 0.0, 291, 0, 1, 0, 0, 291, 0, 0], "semantic": {"name": "wxPython", "arg_names": [], "import_names": ["wx"],...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2745:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2745:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2745:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2745:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
import wx from canvasSubject import canvasSubject from canvasObject import * class canvas(wx.wxScrolledWindow, canvasSubject): def __init__(self, parent, id = -1, size = wx.wxDefaultSize): # parent 1 ctor wx.wxScrolledWindow.__init__(self, parent, id, wx.wxPoint(0, 0), size, ...
ajibawa-2023/Python-Code-Large/train/row_2746
161
320
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2746:Import_L1_C0", "label": "wx import wx", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0031, 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_2746:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2746:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2746:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2746:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large...
# dummy
ajibawa-2023/Python-Code-Large/train/row_2747
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
# dummy
ajibawa-2023/Python-Code-Large/train/row_2748
0
1
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[]
[]
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. """Module containing base class for devide modules. author: Charl P. Botha <cpbotha@ieee.org> """ ######################################################################### class GenericObject(object): """Generic object ...
ajibawa-2023/Python-Code-Large/train/row_2750
51
236
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2750:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0275, 0.0169, 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_2750:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2750:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2750:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2750:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train...
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
ajibawa-2023/Python-Code-Large/train/row_2752
63
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2752:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2752:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2752:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2752:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2752:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
ajibawa-2023/Python-Code-Large/train/row_2753
42
149
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2753:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2753:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2753:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2753:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2753:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
ajibawa-2023/Python-Code-Large/train/row_2754
50
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2754:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2754:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2754:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2754:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2754:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-L...
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
ajibawa-2023/Python-Code-Large/train/row_2755
20
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2755:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2755:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2755:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2755:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2755:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_27...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
ajibawa-2023/Python-Code-Large/train/row_2756
44
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2756:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2756:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2756:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2756:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2756:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
import os, sys, time # usage: parse_log.py log-file [socket-index to focus on] socket_filter = None if len(sys.argv) >= 3: socket_filter = sys.argv[2].strip() if socket_filter == None: print "scanning for socket with the most packets" file = open(sys.argv[1], 'rb') sockets = {} for l in file: ...
ajibawa-2023/Python-Code-Large/train/row_2757
1
2
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2757:Import_L1_C0", "label": "os import os, sys, time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys", "time"], ...
[]
# -*- coding: utf-8 -*- import os from setuptools import setup, Library from utp import VERSION sources = [os.path.join("..", "utp.cpp"), os.path.join("..", "utp_utils.cpp")] include_dirs = ["..", os.path.join("..", "utp_config_lib")] define_macros = [] libraries = [] extra_link_args = [] if os.name == "nt...
ajibawa-2023/Python-Code-Large/train/row_2758
20
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2758:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0208, 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_2758:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2758:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2758:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2758:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2758:If...
import os import ctypes import socket import platform from utp.utp_h import * from utp.sockaddr_types import * basepath = os.path.join(os.path.dirname(__file__), "..") if platform.system() == "Windows": utp = ctypes.cdll.LoadLibrary(os.path.join(basepath, "utp.dll")) elif platform.system() == "Darwin": utp = c...
ajibawa-2023/Python-Code-Large/train/row_2759
107
164
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2759:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0061, 0.0061, 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_2759:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2759:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2759:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2759:If_L11_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2759:If_L...
# This module can go away when Python supports IPv6 (meaning inet_ntop and inet_pton on all platforms) # http://bugs.python.org/issue7171 import socket import ctypes from utp.utp_socket import utp # XXX: the exception types vary from socket.inet_ntop def inet_ntop(address_family, packed_ip): if address_f...
ajibawa-2023/Python-Code-Large/train/row_2760
26
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2760:Import_L4_C0", "label": "socket import socket", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0208, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2760:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2760:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2760:If_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2760:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row...
import ctypes from utp.sockaddr_types import * # hork if not hasattr(ctypes, "c_bool"): ctypes.c_bool = ctypes.c_byte # Lots of stuff which has to be kept in sync with utp.h... # I wish ctypes had a C header parser. UTP_STATE_CONNECT = 1 UTP_STATE_WRITABLE = 2 UTP_STATE_EOF = 3 UTP_STATE_DESTROYING = 4 # typed...
ajibawa-2023/Python-Code-Large/train/row_2761
18
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2761:Import_L1_C0", "label": "ctypes import ctypes", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0196, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2761:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2761:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2761:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2761:Assign_L37_C4"}]
VERSION = '0.1'
ajibawa-2023/Python-Code-Large/train/row_2762
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_2762: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, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_name": "...
[]
import sys import utp.utp_socket as utp import types import socket from cStringIO import StringIO from zope.interface import implements from twisted.python import failure, log from twisted.python.util import unsignedID from twisted.internet import abstract, main, interfaces, error, base, task from twisted.internet imp...
ajibawa-2023/Python-Code-Large/train/row_2763
339
514
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2763:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0019, 0.0019, 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_2763:FunctionDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2763:Return_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2763:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2763:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
import ctypes import socket import struct class SOCKADDR(ctypes.Structure): _fields_ = ( ('family', ctypes.c_ushort), ('data', ctypes.c_byte*14), ) LPSOCKADDR = ctypes.POINTER(SOCKADDR) class SOCKET_ADDRESS(ctypes.Structure): _fields_ = ( ('address', LPSOCKADDR), ('le...
ajibawa-2023/Python-Code-Large/train/row_2764
33
80
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2764:Import_L1_C0", "label": "ctypes import ctypes", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0125, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2764:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2764:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2764:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2764:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
ajibawa-2023/Python-Code-Large/train/row_2765
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2765:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 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_2765:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2765:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2765:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2765:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
ajibawa-2023/Python-Code-Large/train/row_2766
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2766:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 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_2766:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2766:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2766:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2766:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large...
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
ajibawa-2023/Python-Code-Large/train/row_2767
65
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_2767:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 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_2767:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2767:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2767:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_2767:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
ajibawa-2023/Python-Code-Large/train/row_2768
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2768:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2768:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2768:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2768:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2768:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_2769
8
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_2769:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 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_2769:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2769:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2769:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2769:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
ajibawa-2023/Python-Code-Large/train/row_2770
54
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_2770:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 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_2770:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2770:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2770:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2770:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
#!/usr/bin/python #Developed by Florin Nicusor Coada for 216 CR #Based on the udp_chat_server2.py tutorial from professor Christopher Peters import socket HOST = '192.168.1.2' #Defaults to "this machine" IPORT = 50007 #In OPORT = 50008 #Out in_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) ...
ajibawa-2023/Python-Code-Large/train/row_2771
77
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_2771:Import_L4_C0", "label": "socket import socket", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0284, 0.0071, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rhs...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2771:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2771:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2771:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2771:For_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/...
##Developed by Florin Nicusor Coada for 216CR ##Based on the tutorial offered by Christopher Peters import sqlite3 as sqlite import SimpleXMLRPCServer ##connect to the database and create a simple users table con = sqlite.connect(":memory:") con.execute("create table users(name varchar primary key, pass varchar, ban ...
ajibawa-2023/Python-Code-Large/train/row_2772
55
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_2772:Import_L3_C0", "label": "sqlite3 import sqlite", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0405, 0.0135, 0, 0.66, 0.0, 790, 0, 1, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite"], "r...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2772:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2772:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2772:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2772:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code...
#!/usr/bin/python #Developed by Florin Nicusor Coada for 216 CR #Based on the udp_chat_client2.py tutorial from professor Christopher Peters from Tkinter import * import socket,select from login import * import sys HOST = '192.168.1.2' #Server OPORT = 50007 # The same port as used by the server IPORT=50008 #Listeni...
ajibawa-2023/Python-Code-Large/train/row_2773
134
164
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2773:ImportFrom_L4_C0", "label": "from Tkinter import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0244, 0.0061, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2773:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2773:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2773:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2773:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code...
from Tkinter import * import xmlrpclib from time import clock, time server = xmlrpclib.ServerProxy("http://192.168.1.2:8888") def userType(user): return server.userType(user) def newName(oldUname,newUname): return server.newName(oldUname,newUname) def banUser(name): server.banUser(name) class MyDetails...
ajibawa-2023/Python-Code-Large/train/row_2774
150
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_2774:ImportFrom_L1_C0", "label": "from Tkinter import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0052, 0.0052, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rh...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2774:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2774:Return_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2774:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2774:Return_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar...
# This is Python example on how to use Mongoose embeddable web server, # http://code.google.com/p/mongoose # # Before using the mongoose module, make sure that Mongoose shared library is # built and present in the current (or system library) directory import mongoose import sys # Handle /show and /form URIs. def Even...
ajibawa-2023/Python-Code-Large/train/row_2775
33
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_2775:Import_L7_C0", "label": "mongoose import mongoose", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1129, 0.0161, 0, 0.66, 0.0, 755, 0, 1, 0, 0, 755, 0, 0], "semantic": {"name": "mongoose", "arg_names": [], "import_names": ["mongoose...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2775:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2775:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2775:If_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_2775:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_...
# Copyright (c) 2004-2009 Sergey Lyubka # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
ajibawa-2023/Python-Code-Large/train/row_2776
69
159
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2776:Expr_L23_C0", "label": "expression", "type": "expression", "loc": [23, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1855, 0.0881, 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_2776:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2776:Expr_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2776:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2776:Assign_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
''' Created on 30/03/2011 @author: Eran_Z Utilities ''' def sum(x,y): return x+y
ajibawa-2023/Python-Code-Large/train/row_2778
3
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2778:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.3636, 0.6364, 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_2778:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2778:Return_L10_C4"}]
''' Created on 08/04/2011 @author: Eran_Z Google search (num results), based on Dima's implementation currently uses deprecated API ''' import json import urllib #N = 25270000000L #25.27 billion, roughly google's index size. Should be reduced for other engines. N = 1870000000L #roughly the index of the...
ajibawa-2023/Python-Code-Large/train/row_2779
12
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2779:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1731, 0.3077, 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_2779:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2779:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2779:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2779:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-L...
''' Created on 29/03/2011 @author: Eran_Z Weighting ''' import search_m from util_m import sum from math import log #Helper functions def __singleNGDWeight(term1, term2): return 0 if term1 == term2 else max(0, 1 - search_m.NGD(term1, term2)) def __singleMutualInformationWeight(term1, term2): ...
ajibawa-2023/Python-Code-Large/train/row_2780
27
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2780:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.069, 0.1207, 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_2780:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2780:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2780:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2780:Return_L19_C4"}, {"f": "ajibawa-2023/Python-Code-L...
import json import urllib def showsome(searchfor): query = urllib.urlencode({'q': searchfor}) url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&%s'%query search_response = urllib.urlopen(url) search_results = search_response.read() results = json.loads(search_results) ...
ajibawa-2023/Python-Code-Large/train/row_2781
13
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_2781:Import_L1_C0", "label": "json import json", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": ["json"], "rhs_call_na...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2781:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2781:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2781:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2781:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
from apiclient.discovery import build def search(searchfor): service = build("customsearch", "v1", developerKey="AIzaSyB1KoWaQxP9_o--plv19-JYDevfdhKFzjs") res = service.cse().list( q=searchfor, cx='017576662512468239146:omuauf_lfve', ).execute() ret = res['queries'][...
ajibawa-2023/Python-Code-Large/train/row_2782
8
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_2782:ImportFrom_L3_C0", "label": "from apiclient.discovery import build", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1765, 0.0588, 0, 0.66, 0.0, 78, 0, 1, 0, 0, 78, 0, 0], "semantic": {"name": "apiclient.discovery", "arg_names": [], ...
[{"f": "ajibawa-2023/Python-Code-Large/train/row_2782:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2782:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2782:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2782:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large...
# 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_2784
20
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2784:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.2, 0.0588, 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_2784:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2784:ImportFrom_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2784:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2784:Assign_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/r...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
ajibawa-2023/Python-Code-Large/train/row_2785
369
735
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2785:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0163, 0.0313, 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_2785:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2785:ImportFrom_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2785:Try_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2785:ImportFrom_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
ajibawa-2023/Python-Code-Large/train/row_2786
9
40
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2786:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 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_2786:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2786:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2786:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2786:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
ajibawa-2023/Python-Code-Large/train/row_2787
10
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_2787:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 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_2787:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2787:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2787:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2787:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Larg...
# Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
ajibawa-2023/Python-Code-Large/train/row_2789
2
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2789:ImportFrom_L15_C0", "label": "from setuptools import setup", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.5769, 0.0385, 0, 0.66, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "setuptools", "arg_names": [], "import_names...
[]
# Copyright 2010 Google Inc. All Rights Reserved. """An OAuth 2.0 client Tools for interacting with OAuth 2.0 protected resources. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import copy import datetime import httplib2 import logging import urllib import urlparse try: # pragma: no cover import simple...
ajibawa-2023/Python-Code-Large/train/row_2790
163
443
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2790:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0113, 0.0113, 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_2790:Try_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2790:Import_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2790:Try_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2790:Try_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2790...
# Copyright 2010 Google Inc. All Rights Reserved. """Utilities for OAuth. Utilities for making it easier to work with OAuth 2.0 credentials. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import pickle import threading from client import Storage as BaseStorage class Storage(BaseStorage): """Store and ...
ajibawa-2023/Python-Code-Large/train/row_2791
28
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_2791:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.0962, 0.0962, 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_2791:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2791:Expr_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2791:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2791:FunctionDef_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Larg...
# Copyright 2010 Google Inc. All Rights Reserved. """OAuth 2.0 utilities for Django. Utilities for using OAuth 2.0 in conjunction with the Django datastore. """ __author__ = 'jcgregorio@google.com (Joe Gregorio)' import oauth2client import base64 import pickle from django.db import models from oauth2client.client ...
ajibawa-2023/Python-Code-Large/train/row_2792
55
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_2792:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 7], "level": 0, "parent": null, "vector": [8, 0, 0.049, 0.049, 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_2792:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2792:Assign_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2792:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2792:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-La...
# 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_2793
56
137
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2793:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.1204, 0.0292, 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_2793:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2793:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2793:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2793:Assign_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
# 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_2794
22
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_2794:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.2885, 0.0192, 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_2794:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2794:Expr_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2794:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2794:Assign_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Lar...
#!/usr/bin/python2.4 # # Copyright 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 o...
ajibawa-2023/Python-Code-Large/train/row_2797
86
174
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2797:Expr_L18_C0", "label": "expression", "type": "expression", "loc": [18, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1121, 0.023, 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_2797:Try_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2797:ImportFrom_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2797:Try_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2797:ImportFrom_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra...
#!/usr/bin/python2.4 # # Copyright 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 o...
ajibawa-2023/Python-Code-Large/train/row_2798
35
87
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_2798:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2011, 0.023, 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_2798:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2798:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_2798:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_2798:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/...