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 |
|---|---|---|---|---|---|---|---|
import numpy as np, math
X,Y = np.meshgrid( np.arange(0.0,11.0), np.arange(0.0,7.0) )
xy = np.column_stack([ X.flatten(), Y.flatten() ])
cap = ''
for i in xy:
for j in [0.0, 90.0, 180.0, 270.0]:
# for j in [0.0, 180.0]:
cap += ' - [%6.1f, %6.1f, %6.1f]\n' % (i[0],i[1],j)
f = open( 'captures.yaml'... | ajibawa-2023/Python-Code-Large/train/row_99400 | 9 | 14 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99400:Import_L1_C0", "label": "numpy import np, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99400:For_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99400:For_L8_C4"}] |
import numpy as np
from numpy import pi
import time
import transforms as tr
import pylab as pl
import functools as fct
import pickle as pkl
from scipy.special import erf
import prob as pb
import optparse
waveLen = 3e8 / 900e6 # Middle of UHF RFID band
class AntennaGain():
def __init__(self, RadiationPattern, Gma... | ajibawa-2023/Python-Code-Large/train/row_99401 | 111 | 189 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99401:Import_L1_C0", "label": "numpy import np", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0053, 0.0053, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99401:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99401:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99401:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99401:If_L16_C8"}, {"f": "ajibawa-2023/Python-Code... |
#! /usr/bin/python
import roslib
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('robotis')
roslib.load_manifest('geometry_msgs')
roslib.load_manifest('move_base_msgs')
roslib.load_manifest('std_msgs')
roslib.load_manifest('tf')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('robotis')
import... | ajibawa-2023/Python-Code-Large/train/row_99403 | 51 | 170 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99403:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0118, 0.0059, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99403:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99403:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99403:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99403:Expr_L37_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# Basically a giant script.
import roslib
roslib.load_manifest( 'geometry_msgs' ) # the pickle files containe Point and Pose Stamped.
import rospy
from geometry_msgs.msg import PointStamped, PoseStamped
import sys
import glob
import yaml
import time
import optparse
import cPickle as pkl
import n... | ajibawa-2023/Python-Code-Large/train/row_99404 | 155 | 284 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99404:Import_L5_C0", "label": "roslib import roslib", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0176, 0.0035, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99404:If_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99404:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99404:If_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99404:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
import numpy as np, math
import numpy
import math
import sys
##
# Bound the value of a number to be above lower, and lower than upper
# @return a number
def bound(value, lower, upper):
raise RuntimeError('math_util.bound moved to hrl_lib.util')
#sys.exit()
# if lower >= upper:
# t = lower
# l... | ajibawa-2023/Python-Code-Large/train/row_99405 | 103 | 204 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99405:Import_L1_C0", "label": "numpy import np, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0049, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99405:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99405:If_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99405:If_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99405:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/python
import roslib
roslib.load_manifest('geometry_msgs')
roslib.load_manifest('tf')
import rospy
import tf
from geometry_msgs.msg import PointStamped
import time
rospy.init_node('ground_truth_tag_pose')
listener = tf.TransformListener()
# listener.waitForTransform('/l_gripper_tool_frame', '/ear_antenn... | ajibawa-2023/Python-Code-Large/train/row_99406 | 19 | 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_99406:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0968, 0.0323, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99406:While_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99406:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99406:While_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99406:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/python
# Basically a giant script.
import roslib
roslib.load_manifest( 'geometry_msgs' ) # the pickle files containe Point and Pose Stamped.
import rospy
from geometry_msgs.msg import PointStamped, PoseStamped
import sys
import glob
import yaml
import time
import optparse
import cPickle as pkl
import n... | ajibawa-2023/Python-Code-Large/train/row_99407 | 228 | 360 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99407:Import_L5_C0", "label": "roslib import roslib", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0139, 0.0028, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99407:If_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99407:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99407:If_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99407:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
import numpy as np, math
import numpy
import math
import sys
##
# Bound the value of a number to be above lower, and lower than upper
# @return a number
def bound(value, lower, upper):
raise RuntimeError('math_util.bound moved to hrl_lib.util')
#sys.exit()
# if lower >= upper:
# t = lower
# l... | ajibawa-2023/Python-Code-Large/train/row_99408 | 103 | 204 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99408:Import_L1_C0", "label": "numpy import np, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0049, 0.0049, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99408:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99408:If_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99408:If_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99408:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#! /usr/bin/python
import roslib
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('move_base_msgs')
roslib.load_manifest('pr2_controllers_msgs')
roslib.load_manifest('rfid_hardware')
import rospy
import smach
from smach_ros import SimpleActionState, ServiceState, IntrospectionServer
import actionlib
from... | ajibawa-2023/Python-Code-Large/train/row_99409 | 81 | 191 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99409:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0052, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99409:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99409:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99409:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99409:Expr_L25_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
# Basically a giant script.
import roslib
roslib.load_manifest( 'geometry_msgs' ) # the pickle files containe Point and Pose Stamped.
import rospy
from geometry_msgs.msg import PointStamped, PoseStamped
import sys
import glob
import yaml
import time
import optparse
import cPickle as pkl
import n... | ajibawa-2023/Python-Code-Large/train/row_99410 | 169 | 328 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99410:Import_L5_C0", "label": "roslib import roslib", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0152, 0.003, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99410:If_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99410:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99410:If_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99410:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#!/usr/bin/python
import roslib
roslib.load_manifest( 'tf' )
roslib.load_manifest( 'hrl_lib' )
import rospy
import tf
from hrl_lib.cmd_process import CmdProcess
from threading import Thread
import time
def bagplay( fname ):
# to use:
# bp = bagplay( my_file_name )
# bp.run() # starts the execution
... | ajibawa-2023/Python-Code-Large/train/row_99411 | 40 | 93 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99411:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0108, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99411:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99411:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99411:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99411:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code... |
#! /usr/bin/python
import roslib
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('geometry_msgs')
roslib.load_manifest('move_base_msgs')
roslib.load_manifest('tf')
roslib.load_manifest('sound_play')
roslib.load_manifest('hrl_lib')
import rospy
import smach
from smach_ros import SimpleActionState, Service... | ajibawa-2023/Python-Code-Large/train/row_99412 | 163 | 230 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99412:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0087, 0.0043, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99412:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99412:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99412:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99412:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('tf')
roslib.load_manifest('rfid_pf')
import rospy
... | ajibawa-2023/Python-Code-Large/train/row_99413 | 100 | 209 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99413:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0096, 0.0048, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99413:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99413:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99413:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99413:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
import rospy
import smach
import actionlib
from smach_ros import Simpl... | ajibawa-2023/Python-Code-Large/train/row_99414 | 59 | 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_99414:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0175, 0.0088, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99414:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99414:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99414:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99414:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('tf')
roslib.load_manifest('sensor_msgs')
roslib.lo... | ajibawa-2023/Python-Code-Large/train/row_99415 | 84 | 202 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99415:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0099, 0.005, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99415:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99415:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99415:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99415:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('tf')
roslib.load_manifest('sensor_msgs')
roslib.lo... | ajibawa-2023/Python-Code-Large/train/row_99416 | 56 | 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_99416:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0174, 0.0087, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99416:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99416:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99416:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99416:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('tf')
roslib.load_manifest('sensor_msgs')
roslib.lo... | ajibawa-2023/Python-Code-Large/train/row_99417 | 40 | 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_99417:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0161, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99417:If_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99417:Import_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99417:If_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99417:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
import rospy
tdb = { 0: ['OrangeMedBot',[]],
1: ['TravisTVremo... | ajibawa-2023/Python-Code-Large/train/row_99418 | 61 | 134 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99418:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0149, 0.0075, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99418:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99418:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99418:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99418:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('tf')
roslib.load_manifest('sensor_msgs')
roslib.lo... | ajibawa-2023/Python-Code-Large/train/row_99419 | 98 | 171 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99419:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0117, 0.0058, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99419:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99419:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99419:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99419:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code... |
x = '''
\\begin{landscape}
\\begin{table}[p]
\\newcolumntype{x}[1]{>{\\centering\\hspace{0pt}}p{#1}}
\\newcolumntype{y}[1]{>{\\raggedleft\\hspace{0pt}}p{#1}}
\\centering
\\begin{tabular}{ | y{2cm} | c | c | c | c | r }
\\toprule
\\textbf{\\Large Object:} & Orange Meds & TV Remote & Red Bottle & Keys & \... | ajibawa-2023/Python-Code-Large/train/row_99420 | 1 | 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_99420:Assign_L1_C0", "label": "x =", "type": "assigned_variable", "loc": [1, 48], "level": 0, "parent": null, "vector": [14, 0, 0.5104, 1.0, 0, 0.66, 0.0, 190, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [] |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
import rospy
import smach
import actionlib
from smach_ros import Simpl... | ajibawa-2023/Python-Code-Large/train/row_99421 | 38 | 75 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99421:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0267, 0.0133, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99421:If_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99421:Import_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99421:If_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99421:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('tf')
import rospy
import rfid_datacapture.math_ut... | ajibawa-2023/Python-Code-Large/train/row_99422 | 33 | 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_99422:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0233, 0.0233, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99422:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99422:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99422:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99422:If_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#! /usr/bin/python
import roslib
roslib.load_manifest('pr2_controllers_msgs')
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
import rospy
import smach
import actionlib
from smach_ros import SimpleActionState, ServiceState, IntrospectionServer
from pr2_cont... | ajibawa-2023/Python-Code-Large/train/row_99423 | 68 | 146 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99423:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0137, 0.0068, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99423:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99423:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99423:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99423:FunctionDef_L22_C8"}, {"f": "ajibawa-2023/Pyth... |
__all__ = [
'utils'
'process_bags_friis'
'process_bags_utils'
]
| ajibawa-2023/Python-Code-Large/train/row_99424 | 1 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99424:Assign_L1_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [1, 5], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.8333, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name... | [] |
#! /usr/bin/python
import roslib
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('rfid_demos')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('rosbag')
import rospy
import tf
from rfid_behavi... | ajibawa-2023/Python-Code-Large/train/row_99425 | 88 | 138 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99425:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0145, 0.0072, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99425:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99425:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99425:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99425:Expr_L34_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
# Basically a giant script.
import roslib
roslib.load_manifest( 'geometry_msgs' ) # the pickle files containe Point and Pose Stamped.
roslib.load_manifest( 'sensor_msgs' )
import rospy
from geometry_msgs.msg import PointStamped, PoseStamped
from sensor_msgs.msg import PointCloud
import sys
impor... | ajibawa-2023/Python-Code-Large/train/row_99426 | 104 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99426:Import_L5_C0", "label": "roslib import roslib", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0298, 0.006, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99426:If_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99426:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99426:If_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99426:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
import roslib
roslib.load_manifest('sensor_msgs')
roslib.load_manifest('geometry_msgs')
import rospy
from sensor_msgs.msg import PointCloud
from geometry_msgs.msg import Point32
from sensor_msgs.msg import ChannelFloat32
import numpy as np
import time
## PointCloud -> 3xN np matrix
# @param ros_pointcloud - robot_ms... | ajibawa-2023/Python-Code-Large/train/row_99427 | 28 | 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_99427:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0204, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99427:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99427:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99427:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99427:Return_L18_C4"}, {"f": "ajibawa-2023/Python-Code... |
#! /usr/bin/python
import roslib
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('robotis')
roslib.load_manifest('geometry_msgs')
roslib.load_manifest('move_base_msgs')
roslib.load_manifest('std_msgs')
roslib.load_manifest('tf')
import rospy
import smach
from smach_ros import SimpleActionState, ServiceSt... | ajibawa-2023/Python-Code-Large/train/row_99428 | 44 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99428:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0154, 0.0077, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99428:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99428:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99428:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99428:Expr_L34_C8"}, {"f": "ajibawa-2023/Python-Code... |
import numpy as np, math
import pylab as pl
ar = [[ 0, 104 ],
[ 1, 104 ],
[ 2, 104 ],
[ 3, 104 ],
[ 4, 104 ],
[ 8, 100 ],
[ 9, 97 ],
[ 10, 96 ],
[ 11, 95 ],
[ 12, 93 ],
[ 13, 91 ],
[ 14, 90 ],
[ 15, 89 ],
[ 16, 87 ],
[ 1... | ajibawa-2023/Python-Code-Large/train/row_99429 | 19 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99429:Import_L1_C0", "label": "numpy import np, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0185, 0.0185, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99429:If_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99429:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99429:If_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99429:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_994... |
import numpy as np, math
import pylab as pl
SENSITIVITY = -80 # dBm
THRESHOLD = -18 # dBm
# P^inc_rdr = P_rdr + 2*alpha > SENSITIVITY (1)
# P^inc_tag = P_rdr + alpha > THRESHOLD (2)
# crossover = (1) - (2)
crossover_alpha = SENSITIVITY - THRESHOLD
crossover_Prdr = THRESHOLD - crossover_alpha
# alpha > 0.5 * ... | ajibawa-2023/Python-Code-Large/train/row_99430 | 20 | 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_99430:Import_L1_C0", "label": "numpy import np, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0233, 0.0233, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"],... | [] |
#! /usr/bin/python
import time
import roslib
roslib.load_manifest('rospy')
roslib.load_manifest('tf')
roslib.load_manifest('geometry_msgs')
roslib.load_manifest('std_msgs')
roslib.load_manifest('hrl_rfid')
roslib.load_manifest('robotis')
roslib.load_manifest('rfid_behaviors')
import rospy
import tf
import tf.transform... | ajibawa-2023/Python-Code-Large/train/row_99431 | 161 | 237 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99431:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0084, 0.0042, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99431:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99431:Return_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99431:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99431:If_L47_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#! /usr/bin/python
import time
import roslib
roslib.load_manifest('rospy')
roslib.load_manifest('actionlib')
roslib.load_manifest( 'move_base_msgs' )
roslib.load_manifest('tf')
roslib.load_manifest('geometry_msgs')
roslib.load_manifest('std_msgs')
roslib.load_manifest('hrl_rfid')
roslib.load_manifest('robotis')
roslib.... | ajibawa-2023/Python-Code-Large/train/row_99432 | 119 | 217 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99432:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0046, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99432:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99432:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99432:If_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99432:Return_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#! /usr/bin/python
import roslib
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('pr2_msgs')
roslib.load_manifest('std_msgs')
import rospy
from pr2_msgs.msg import PressureState
from std_msgs.msg import Float64
from rfid_behaviors.srv import FloatFloat_Int32
import numpy as np, math
import time, string
d... | ajibawa-2023/Python-Code-Large/train/row_99433 | 84 | 136 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99433:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0147, 0.0074, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99433:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99433:Return_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99433:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99433:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import roslib
roslib.load_manifest('rfid_behaviors')
import rospy
from rfid_behaviors.srv import FlapEarsSrv, FlapperSrv
from threading import Thread
# All this guy does is call flap repeatedly until receiving a stop signal.
class Flapper( Thread ):
def __init__( self, serv_name = 'rfid_orien... | ajibawa-2023/Python-Code-Large/train/row_99434 | 38 | 59 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99434:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0339, 0.0169, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99434:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99434:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99434:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99434:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import roslib
roslib.load_manifest('rfid_behaviors')
import rospy
import tf
from rfid_behaviors.srv import RecorderSrv, RecorderSrvResponse
from rfid_behaviors.srv import NextBestVantage
from rfid_behaviors.msg import RecorderReads
import hrl_rfid.ros_M5e_client as rmc
from geometry_msgs.msg import... | ajibawa-2023/Python-Code-Large/train/row_99435 | 92 | 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_99435:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0142, 0.0071, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99435:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99435:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99435:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99435:Expr_L18_C8"}, {"f": "ajibawa-2023/Python-Co... |
import subprocess as sb
import os
class CmdProcess:
def __init__(self, cmd_list):
self.cmd_list= cmd_list
self.process = None
def run(self):
self.process = sb.Popen(self.cmd_list)
def kill(self):
os.system('kill -2 %d' % self.process.pid)
| ajibawa-2023/Python-Code-Large/train/row_99436 | 10 | 14 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99436:Import_L1_C0", "label": "subprocess import sb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["sb"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99436:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99436:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99436:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99436:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
#! /usr/bin/python
import roslib;
roslib.load_manifest('hrl_pr2_kinematics_tutorials')
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('std_srvs')
import rospy
import hrl_pr2_kinematics_tutorials.hrl_pr2 as hrl_pr2
import hrl_lib.transforms as tr
import rfid_behaviors.tact... | ajibawa-2023/Python-Code-Large/train/row_99437 | 114 | 180 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99437:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0167, 0.0056, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99437:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99437:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99437:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99437:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
import numpy as np, math
import cPickle as pkl
import yaml
import scipy.stats as stats
class RfidModel:
def __init__( self, yaml_fname ):
# yaml_fname is yaml file something like: cap_360/rad_plot_combined.yaml
# you will need to have run: ./../process_radpat_plots.py --yaml rad_... | ajibawa-2023/Python-Code-Large/train/row_99438 | 97 | 205 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99438:Import_L3_C0", "label": "numpy import np, math", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0146, 0.0049, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99438:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99438:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99438:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99438:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python
## I'm less than enthused about the ("optimization") bloat in
## hrl/pfilter. This implementation draws from that one, but
## eliminates a bunch of cruft and focuses on our particular details.
import random as rd
import numpy as np, math
class PFilter:
def __init__(self, motion_model, measurem... | ajibawa-2023/Python-Code-Large/train/row_99439 | 80 | 122 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99439:Import_L7_C0", "label": "random import rd", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0574, 0.0082, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["rd"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99439:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99439:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99439:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99439:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-... |
import numpy as np, math
import cPickle as pkl
EXT = 10.0
DIVS = 200 # Keep this even
d = {}
d['xedges'] = np.linspace( -1 * EXT, EXT, DIVS )
d['yedges'] = np.linspace( -1 * EXT, EXT, DIVS )
d['stddev_model'] = np.ma.array(np.ones( (DIVS,DIVS) ))
d['detect_model'] = np.ma.array(np.ones( (DIVS,DIVS) ))
d['rssi_model... | ajibawa-2023/Python-Code-Large/train/row_99440 | 15 | 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_99440:Import_L1_C0", "label": "numpy import np, math", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"],... | [] |
import roslib
roslib.load_manifest( 'costmap_services' )
import rospy
import numpy as np, math
import costmap_services.python_client as costmap
from display_particles import DisplayParticles
import cPickle as pkl
if __name__ == '__main__':
import optparse
p = optparse.OptionParser()
p.add_option('--rec... | ajibawa-2023/Python-Code-Large/train/row_99442 | 59 | 95 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99442:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0105, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99442:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99442:Import_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99442:If_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99442:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/usr/bin/python
import time
import roslib
roslib.load_manifest( 'rosgraph_msgs' )
roslib.load_manifest( 'rospy' )
import rospy
from rosgraph_msgs.msg import Clock
rospy.init_node( 'clock_pub' )
time.sleep( 0.2 )
pub = rospy.Publisher( '/clock', Clock )
while not rospy.is_shutdown():
pub.publish( Clock().clo... | ajibawa-2023/Python-Code-Large/train/row_99444 | 12 | 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_99444:Import_L3_C0", "label": "time import time", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1579, 0.0526, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99444:While_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99444:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99444:While_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99444:Expr_L19_C4"}] |
__all__ = [
'pf_stats',
'pub_clock',
'stats_best_uniform'
]
| ajibawa-2023/Python-Code-Large/train/row_99446 | 1 | 6 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99446:Assign_L1_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [1, 5], "level": 0, "parent": null, "vector": [14, 0, 0.5, 0.8333, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name... | [] |
#!/usr/bin/python
import rfid_model
import lib_pfilter
import roslib
roslib.load_manifest('rfid_behaviors')
roslib.load_manifest('rfid_datacapture')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('visualization_msgs')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('pfilter')
import rospy
import hrl_lib.t... | ajibawa-2023/Python-Code-Large/train/row_99447 | 173 | 402 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99447:Import_L3_C0", "label": "rfid_model import rfid_model", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0025, 0, 0.66, 0.0, 973, 0, 1, 0, 0, 973, 0, 0], "semantic": {"name": "rfid_model", "arg_names": [], "import_names": ["r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99447:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99447:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99447:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99447:If_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
import rfid_model
import lib_pfilter
import roslib
roslib.load_manifest('visualization_msgs')
roslib.load_manifest('hrl_lib')
roslib.load_manifest('pfilter')
import rospy
import visualization_msgs.msg as vm
import hrl_lib.transforms as tr
import hrl_lib.viz as viz
vsm = viz.single_marker
import pfi... | ajibawa-2023/Python-Code-Large/train/row_99448 | 139 | 247 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99448:Import_L3_C0", "label": "rfid_model import rfid_model", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0121, 0.004, 0, 0.66, 0.0, 973, 0, 1, 0, 0, 973, 0, 0], "semantic": {"name": "rfid_model", "arg_names": [], "import_names": ["rf... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99448:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99448:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99448:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99448:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
import roslib
roslib.load_manifest('rfid_hardware')
import rospy
from std_msgs.msg import Float64
import tf
import time
import numpy as np, math
import functools
class tf_updater():
def __init__(self, name,
right_pan = '/robotis/servo_right_pan',
right_tilt =... | ajibawa-2023/Python-Code-Large/train/row_99449 | 27 | 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_99449:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0366, 0.0122, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99449:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99449:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99449:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99449:Try_L20_C8"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python
import roslib
roslib.load_manifest( 'rfid_hardware' )
import rospy
import robotis.ros_robotis as rr
import time
import math
if __name__ == '__main__':
p_left = rr.ROS_Robotis_Client( 'left_pan' )
t_left = rr.ROS_Robotis_Client( 'left_tilt' )
p_left.move_angle( 1.370, math.radians(1... | ajibawa-2023/Python-Code-Large/train/row_99450 | 15 | 24 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99450:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0417, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99450:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99450:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99450:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99450:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/usr/bin/python
# Merges functionality from ros_M5e in hrl_rfid package.
# if opt.device == 'ears':
# print 'Starting Ears RFID Services'
# ros_rfid = ROS_M5e( name = 'ears', readPwr = opt.power,
# portStr = '/dev/robot/RFIDreader',
# antFun... | ajibawa-2023/Python-Code-Large/train/row_99451 | 22 | 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_99451:Import_L14_C0", "label": "roslib import roslib", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.2642, 0.0189, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99451:If_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99451:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99451:If_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99451:Import_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#!/usr/bin/python
#
# Copyright (c) 2009, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
#... | ajibawa-2023/Python-Code-Large/train/row_99453 | 156 | 258 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99453:Import_L34_C0", "label": "roslib import roslib", "type": "import", "loc": [34, 34], "level": 0, "parent": null, "vector": [1, 0, 0.1318, 0.0039, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99453:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99453:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99453:ClassDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99453:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
import roslib; roslib.load_manifest('hrl_lib'); import rospy
# from hrl_lib.msg import String
# from hrl_lib.msg import RFID_Interface
import hrl_lib.util as ut
import hrl_lib.rutils as ru
import time
import pygame
import pygame.display
import pygame.locals
import pygame.transform
import numpy as np,... | ajibawa-2023/Python-Code-Large/train/row_99455 | 210 | 326 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99455:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0092, 0.0031, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99455:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99455:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99455:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99455:If_L18_C8"}, {"f": "ajibawa-2023/Python-Code... |
#
# Copyright (c) 2009, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99456 | 1 | 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_99456:Assign_L31_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [31, 36], "level": 0, "parent": null, "vector": [14, 0, 0.9054, 0.1622, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_cal... | [] |
#!/usr/bin/python
#
# Copyright (c) 2009, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
#... | ajibawa-2023/Python-Code-Large/train/row_99458 | 116 | 196 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99458:Import_L34_C0", "label": "roslib import roslib", "type": "import", "loc": [34, 34], "level": 0, "parent": null, "vector": [1, 0, 0.1735, 0.0051, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99458:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99458:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99458:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99458:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#
# Copyright (c) 2009, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99459 | 42 | 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_99459:Import_L33_C0", "label": "roslib import roslib", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.3511, 0.0106, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99459:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99459:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99459:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99459:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
import numpy as np
import pickle
import matplotlib.pyplot as plt
def main():
with open('pickled_mn_std.pkl','rb') as f:
(means, stds) = pickle.load(f)
width = 1./means.shape[1]
ind = np.arange(means.shape[0])*2
#
# b = ['']*means.shape[0]
colors=[(1,0,0),
... | ajibawa-2023/Python-Code-Large/train/row_99460 | 14 | 29 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99460:Import_L3_C0", "label": "numpy import np", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1034, 0.0345, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99460:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99460:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99460:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99460:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
import sys
import csv
def extract_data(files):
data = []
for data_file in files:
with open(data_file, 'rb') as f:
reader = csv.reader(f)
for row in reader:
data.append(row)
print "Processing: %s , %s rows" %(data_file, reader.line_nu... | ajibawa-2023/Python-Code-Large/train/row_99461 | 16 | 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_99461:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0476, 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_99461:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99461:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99461:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99461:For_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
import sys
import roslib; roslib.load_manifest('wouse')
import rospy
from wouse.srv import WouseRunStop, WouseRunStopRequest
rospy.init_node('wouse_reset')
try:
rospy.wait_for_service('/wouse_run_stop', 10)
reset_client = rospy.ServiceProxy('wouse_run_stop', WouseRunStop)
rospy.logi... | ajibawa-2023/Python-Code-Large/train/row_99463 | 18 | 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_99463:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 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_99463:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99463:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99463:Try_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99463:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#!/usr/bin/env python
import pickle
import numpy as np
from scipy import interp
import pylab as pl
from sklearn import preprocessing as pps, svm
from sklearn.metrics import roc_curve, auc
from sklearn.cross_validation import StratifiedKFold, LeaveOneOut
with open('../data/svm_data.pkl', 'rb') as f:
svm_data = pi... | ajibawa-2023/Python-Code-Large/train/row_99464 | 41 | 67 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99464:Import_L3_C0", "label": "pickle import pickle", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0448, 0.0149, 0, 0.66, 0.0, 848, 0, 1, 0, 0, 848, 0, 0], "semantic": {"name": "pickle", "arg_names": [], "import_names": ["pickle"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99464:For_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99464:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99464:For_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99464:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/env python
import roslib; roslib.load_manifest('wouse')
import rospy
from std_msgs.msg import Header, Bool, String
from pr2_power_board.srv import PowerBoardCommand2, PowerBoardCommand2Request
from std_srvs.srv import Empty, EmptyRequest
from sound_play.libsoundplay import SoundClient
from wouse.srv import... | ajibawa-2023/Python-Code-Large/train/row_99465 | 97 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99465:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0242, 0.0081, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99465:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99465:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99465:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99465:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python
import sys
import numpy as np
from threading import Condition
import pickle
import csv
import pygame
from sklearn import preprocessing as pps, svm
import roslib; roslib.load_manifest('wouse')
from Object import ROSObject
import rospy
from std_msgs.msg import Header
from geometry_msgs.msg impo... | ajibawa-2023/Python-Code-Large/train/row_99467 | 81 | 104 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99467:Import_L5_C0", "label": "sys import sys", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0481, 0.0096, 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_99467:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99467:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99467:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99467:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python
import sys
import os
import random
import csv
import math
import pygame
import roslib; roslib.load_manifest('wouse')
import rospy
from geometry_msgs.msg import Vector3Stamped
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtUiTools import QUiLoader
#DEGREES = ['WEAK', 'AVERA... | ajibawa-2023/Python-Code-Large/train/row_99468 | 115 | 148 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99468:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0135, 0.0068, 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_99468:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99468:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99468:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99468:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python
import sys
import numpy as np
from threading import Condition
import pickle
import csv
import pygame
from sklearn import preprocessing as pps, svm
import roslib; roslib.load_manifest('wouse')
import rospy
from std_msgs.msg import Header
from geometry_msgs.msg import Vector3Stamped
from wouse.s... | ajibawa-2023/Python-Code-Large/train/row_99469 | 68 | 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_99469:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0353, 0.0118, 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_99469:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99469:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99469:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99469:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python
import camera_setup_lib as csl
import camera_config as cc
##
# Createss a dictionary mapping camera UUID to OpenCV IDs
def camera_ids():
uidIndexDict = {}
numCameras = csl.init_bus1394()
for i in range(numCameras):
uidIndexDict[csl.getCameraUID(i)] = i
csl.endCameraSetup()
return uidIndexD... | ajibawa-2023/Python-Code-Large/train/row_99471 | 25 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99471:Import_L2_C0", "label": "camera_setup_lib import csl", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.05, 0.025, 0, 0.66, 0.0, 303, 0, 1, 0, 0, 303, 0, 0], "semantic": {"name": "camera_setup_lib", "arg_names": [], "import_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99471:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99471:Assign_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99471:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99471:Assign_L9_C1"}, {"f": "ajibawa-2023/Python-Code-L... |
import roslib
roslib.load_manifest('hrl_camera')
import cv
camera_parameters = {
#A sample configuration
'default' :
{
'calibration_image_width' : 320.0,
'calibration_image_height' : 240.0,
'focal_length_x_in_pixels' : 161.80593,
'focal_length_y_... | ajibawa-2023/Python-Code-Large/train/row_99472 | 4 | 247 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99472:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.004, 0.004, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs_... | [] |
import camera
class firefly(camera.camera):
def __init__(self, camera_configuration, opencv_id):
camera.camera.__init__(self, camera_configuration, opencv_id)
| ajibawa-2023/Python-Code-Large/train/row_99473 | 4 | 5 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99473:Import_L1_C0", "label": "camera import camera", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 848, 0, 1, 0, 0, 848, 0, 0], "semantic": {"name": "camera", "arg_names": [], "import_names": ["camera"], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99473:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99473:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99473:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99473:Expr_L5_C8"}] |
import roslib # Needed to load opencv
roslib.load_manifest('hrl_camera') #
import cv
import camera_setup_lib as csl
import camera
class dragonfly2(camera.camera):
def __init__(self, camera_configuration, opencv_id):
self.config = camera_configuration
self.device = opencv_id
... | ajibawa-2023/Python-Code-Large/train/row_99474 | 29 | 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_99474:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0208, 0.0208, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99474:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99474:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99474:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99474:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code... |
import camera_config as cc
import camera_uuid as cu
def find_camera(name):
parameters = cc.camera_parameters[name]
opencv_id = cu.lookup_by_name(name)
classname = parameters['class']
import_statement = 'import ' + classname
instantiation = classname + '.' + classname + '(parameters, opencv_id)'
... | ajibawa-2023/Python-Code-Large/train/row_99475 | 22 | 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_99475:Import_L1_C0", "label": "camera_config import cc", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0385, 0.0385, 0, 0.66, 0.0, 94, 0, 1, 0, 0, 94, 0, 0], "semantic": {"name": "camera_config", "arg_names": [], "import_names": ["cc"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99475:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99475:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99475:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99475:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import _camera_setup_lib
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
except: strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
import types
try:
_object = types.ObjectType
_newclass = 1
except AttributeError:
class _... | ajibawa-2023/Python-Code-Large/train/row_99476 | 90 | 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_99476:Import_L1_C0", "label": "_camera_setup_lib import _camera_setup_lib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0063, 0, 0.66, 0.0, 740, 0, 1, 0, 0, 740, 0, 0], "semantic": {"name": "_camera_setup_lib", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99476:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99476:Try_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99476:Try_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99476:Assign_L4_C9"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
import roslib # Needed to load opencv
roslib.load_manifest('hrl_camera') #
import cv
import hrl_opencv.adaptors as ad
import camera_setup_lib as csl
import numpy as np
class NoFrameException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
... | ajibawa-2023/Python-Code-Large/train/row_99477 | 76 | 134 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99477:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99477:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99477:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99477:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99477:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C... |
#!/usr/bin/env python
import roslib
roslib.load_manifest('hrl_camera')
import ros_camera as rc
import sys
import cv
import rospy
if __name__ == '__main__':
if len(sys.argv) < 2:
print 'Views images published through ROS.'
print 'Usage: ./image_listener.py ROS_TOPIC_NAME'
else:
ros_topic... | ajibawa-2023/Python-Code-Large/train/row_99478 | 17 | 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_99478:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0909, 0.0455, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99478:If_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99478:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99478:If_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99478:Expr_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99478:... |
## Copyright (c) 2004-2007, Andrew D. Straw. All rights reserved.
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
## * Redistributions of source code must retain the above copyright
## notice, this list o... | ajibawa-2023/Python-Code-Large/train/row_99480 | 145 | 336 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99480:Import_L36_C0", "label": "numpy import np", "type": "import", "loc": [36, 36], "level": 0, "parent": null, "vector": [1, 0, 0.1071, 0.003, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99480:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99480:Expr_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99480:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99480:Expr_L50_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99481 | 23 | 67 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99481:ClassDef_L29_C0", "label": "label_object", "type": "class", "loc": [29, 67], "level": 0, "parent": null, "vector": [3, 0, 0.7164, 0.5821, 0, 0.66, 0.0, 589, 0, 9, 0, 0, 186, 0, 3], "semantic": {"name": "label_object", "arg_names": [], "import_names": [], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99481:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99481:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99481:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99481:Expr_L33_C8"}, {"f": "ajibawa-2023/Python-Co... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99482 | 71 | 144 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99482:Import_L30_C0", "label": "label_object import label_object, scan_dataset", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.2083, 0.0069, 0, 0.66, 0.0, 589, 0, 2, 0, 0, 589, 0, 0], "semantic": {"name": "label_object", "arg_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99482:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99482:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99482:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99482:FunctionDef_L40_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99483 | 49 | 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_99483:ImportFrom_L30_C0", "label": "from classifier import classifier", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.2632, 0.0088, 0, 0.66, 0.0, 71, 0, 1, 0, 0, 71, 0, 0], "semantic": {"name": "classifier", "arg_names": [], "import_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99483:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99483:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99483:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99483:FunctionDef_L55_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99484 | 12 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99484:ClassDef_L29_C0", "label": "features", "type": "class", "loc": [29, 53], "level": 0, "parent": null, "vector": [3, 0, 0.7593, 0.463, 0, 0.66, 0.0, 479, 0, 4, 0, 0, 186, 0, 0], "semantic": {"name": "features", "arg_names": [], "import_names": [], "rhs_call_name": "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99484:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99484:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99484:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99484:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99485 | 50 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99485:Import_L28_C0", "label": "numpy import np, math", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.2545, 0.0091, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99485:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99485:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99485:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99485:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99486 | 89 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99486:Import_L31_C0", "label": "numpy import np, math", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.127, 0.0041, 0, 0.66, 0.0, 954, 0, 2, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np", "math"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99486:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99486:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99486:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99486:FunctionDef_L60_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99487 | 31 | 78 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99487:Import_L29_C0", "label": "label_object import label_object", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.3718, 0.0128, 0, 0.66, 0.0, 589, 0, 1, 0, 0, 589, 0, 0], "semantic": {"name": "label_object", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99487:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99487:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99487:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99487:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
#... | ajibawa-2023/Python-Code-Large/train/row_99488 | 693 | 1,028 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99488:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.0331, 0.0049, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99488:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99488:Assign_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99488:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99488:Assign_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#Used for first set of util functions
import os
import numpy as np
import pickle as pk
import time
# ** Do we need this? **
###from hrl_lib.msg import NumpyArray
# ** removed dependancy for laser_camera_segmentation use **
#Used for second set of util functions
from opencv.cv import *
from opencv.highgui import *
im... | ajibawa-2023/Python-Code-Large/train/row_99490 | 131 | 338 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99490:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0089, 0.003, 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_99490:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99490:Return_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99490:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99490:If_L24_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99492 | 52 | 116 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99492:Import_L30_C0", "label": "util import ut", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.2586, 0.0086, 0, 0.66, 0.0, 811, 0, 1, 0, 0, 811, 0, 0], "semantic": {"name": "util", "arg_names": [], "import_names": ["ut"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99492:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99492:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99492:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99492:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99493 | 42 | 155 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99493:Import_L30_C0", "label": "util import ut", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.1935, 0.0065, 0, 0.66, 0.0, 811, 0, 1, 0, 0, 811, 0, 0], "semantic": {"name": "util", "arg_names": [], "import_names": ["ut"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99493:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99493:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99493:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99493:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Co... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | ajibawa-2023/Python-Code-Large/train/row_99495 | 224 | 449 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99495:ImportFrom_L30_C0", "label": "from features import features", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.0668, 0.0022, 0, 0.66, 0.0, 479, 0, 1, 0, 0, 479, 0, 0], "semantic": {"name": "features", "arg_names": [], "import_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99495:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99495:Expr_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99495:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99495:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-... |
from _direction import *
| ajibawa-2023/Python-Code-Large/train/row_99500 | 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_99500:ImportFrom_L1_C0", "label": "from _direction import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 1.0, 1.0, 0, 0.66, 0.0, 390, 0, 1, 0, 0, 390, 0, 0], "semantic": {"name": "_direction", "arg_names": [], "import_names": ["*"], "r... | [] |
#! /usr/bin/python
#
# Copyright (c) 2009, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
... | ajibawa-2023/Python-Code-Large/train/row_99501 | 87 | 230 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99501:Assign_L31_C0", "label": "GRASP_LOCATION =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.1348, 0.0043, 0, 0.66, 0.0, 861, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "GRASP_LOCATION", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99501:ClassDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99501:FunctionDef_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99501:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99501:Expr_L58_C8"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import sys
import numpy as np
import roslib
roslib.load_manifest('hrl_pr2_arms')
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
import rospy
import smach
from smach_ros import SimpleActionState, ServiceState, IntrospectionServer
import actionlib
import tf
import tf.transformat... | ajibawa-2023/Python-Code-Large/train/row_99502 | 116 | 189 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99502:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0159, 0.0053, 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_99502:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99502:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99502:FunctionDef_L28_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99502:Expr_L29_C8"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import sys
import numpy as np
import scipy.io
import roslib
roslib.load_manifest('hrl_phri_2011')
import rospy
import rosbag
def main():
field_map = {
"time_offset" : "time_offset",
"tool_frame.transform.translation.x" : "pos_x",
"tool_frame.transform.translation.y" :... | ajibawa-2023/Python-Code-Large/train/row_99503 | 22 | 61 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99503:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0492, 0.0164, 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_99503:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99503:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99503:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99503:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import sys
import numpy as np
import roslib
roslib.load_manifest('hrl_pr2_arms')
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
import rospy
import smach
from smach_ros import SimpleActionState, ServiceState, IntrospectionServer
import actionlib
import tf
import tf.transformat... | ajibawa-2023/Python-Code-Large/train/row_99504 | 53 | 73 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99504:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0411, 0.0137, 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_99504:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99504:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99504:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99504:ImportFrom_L30_C4"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import sys
import numpy as np
import scipy.io
import roslib
roslib.load_manifest('hrl_phri_2011')
import rospy
import rosbag
def main():
field_map = {
"/l_cart/f_cmd" :
{
"wrench.force.x" : "f_cmd_x",
"wrench.force.y" : "f_cmd_y",
"wrench.... | ajibawa-2023/Python-Code-Large/train/row_99505 | 24 | 107 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99505:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.028, 0.0093, 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_99505:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99505:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99505:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99505:Assign_L90_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import sys
import numpy as np
import scipy.io
import scipy.stats
import matplotlib.pyplot as plt
import roslib
roslib.load_manifest('hrl_phri_2011')
import rospy
import rosbag
def main():
bag = rosbag.Bag(sys.argv[1], 'r')
x_forces, cur_x_forces = [], []
for topic, msg, t in bag.read_... | ajibawa-2023/Python-Code-Large/train/row_99507 | 30 | 39 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99507:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0256, 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_99507:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99507:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99507:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99507:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import sys
import numpy as np
import scipy.io
import roslib
roslib.load_manifest('hrl_phri_2011')
import rospy
import rosbag
def main():
bag = rosbag.Bag(sys.argv[1], 'r')
prefix = ".".join(sys.argv[1].split(".")[:-1])
fixed_file = prefix + "_fixed.bag"
fixed_bag = rosbag.Bag(fixe... | ajibawa-2023/Python-Code-Large/train/row_99508 | 25 | 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_99508:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0312, 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_99508:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99508:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99508:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99508:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import roslib
roslib.load_manifest('hrl_generic_arms')
import rospy
import tf
import tf.transformations as tf_trans
from hrl_generic_arms.pose_converter import PoseConverter
def main():
rospy.init_node("tf_link_flipper")
child_frame = rospy.get_param("~child_frame")
parent_frame = rospy... | ajibawa-2023/Python-Code-Large/train/row_99509 | 29 | 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_99509:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0541, 0.027, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99509:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99509:Expr_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99509:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99509:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#! /usr/bin/python
import sys
import numpy as np
import roslib
roslib.load_manifest('hrl_pr2_arms')
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
import rospy
import rosbag
import smach
from smach_ros import SimpleActionState, ServiceState, IntrospectionServer
import actionlib
import tf
import ... | ajibawa-2023/Python-Code-Large/train/row_99510 | 62 | 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_99510:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0405, 0.0135, 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_99510:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99510:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99510:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99510:ImportFrom_L30_C4"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import sys
import numpy as np
import roslib
roslib.load_manifest('hrl_pr2_arms')
roslib.load_manifest('smach_ros')
roslib.load_manifest('actionlib')
import rospy
import rosbag
import smach
from smach_ros import SimpleActionState, ServiceState, IntrospectionServer
import actionlib
import tf
import ... | ajibawa-2023/Python-Code-Large/train/row_99511 | 82 | 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_99511:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.009, 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_99511:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99511:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99511:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99511:ImportFrom_L30_C4"}, {"f": "ajibawa-2023/Python-... |
class TaskError(Exception):
def __init__(self, value):
self.parameter = value
def __str__(self):
return repr(self.parameter)
class ActionType:
def __init__(self, inputs, outputs):
self.inputs = inputs
self.outputs = outputs
class ParamType:
def __init__(self, name, pt... | ajibawa-2023/Python-Code-Large/train/row_99513 | 26 | 1,619 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99513:ClassDef_L2_C0", "label": "TaskError", "type": "class", "loc": [2, 7], "level": 0, "parent": null, "vector": [3, 0, 0.0028, 0.0037, 0, 0.66, 0.0, 591, 0, 2, 0, 0, 645, 0, 1], "semantic": {"name": "TaskError", "arg_names": [], "import_names": [], "rhs_call_name": "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99513:ClassDef_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99513:FunctionDef_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99513:FunctionDef_L3_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99513:Assign_L4_C8"}, {"f": "ajibawa-2023/Python-Code... |
#! /usr/bin/python
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyrigh... | ajibawa-2023/Python-Code-Large/train/row_99514 | 51 | 113 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99514:Import_L30_C0", "label": "roslib import roslib", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.2655, 0.0088, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99514:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99514:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99514:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99514:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, th... | ajibawa-2023/Python-Code-Large/train/row_99515 | 125 | 201 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99515:Import_L28_C0", "label": "roslib import roslib", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.1393, 0.005, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99515:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99515:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99515:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99515:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Co... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, th... | ajibawa-2023/Python-Code-Large/train/row_99519 | 0 | 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"] | [] | [] |
#!/usr/bin/python
import roslib; roslib.load_manifest('trf_learn')
import trf_learn.recognize_3d as r3d
import hrl_lib.util as ut
import pylab as pb
from PIL import Image
import os.path as pt
import pdb
import numpy as np
import os
def minmax(mat):
return (np.min(mat[0,:]), np.max(mat[0,:]),
np.min(ma... | ajibawa-2023/Python-Code-Large/train/row_99520 | 63 | 95 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99520:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0211, 0.0105, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99520:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99520:Return_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99520:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99520:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Co... |
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, th... | ajibawa-2023/Python-Code-Large/train/row_99521 | 124 | 209 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99521:Import_L28_C0", "label": "roslib import roslib", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.134, 0.0048, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99521:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99521:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99521:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99521:Assign_L45_C4"}, {"f": "ajibawa-2023/Python-Co... |
#
#
# Copyright (c) 2010, Georgia Tech Research Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, ... | ajibawa-2023/Python-Code-Large/train/row_99522 | 93 | 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_99522:Import_L32_C0", "label": "sys import sys, time", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.1839, 0.0057, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "time"]... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99522:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99522:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99522:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99522:Expr_L47_C4"}, {"f": "ajibawa-2023/Python-Code... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.