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 |
|---|---|---|---|---|---|---|---|
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_99163 | 10 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99163:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99163:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99163:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99163:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99163:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_99165 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99165:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99165:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99165:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99165:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99165:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99166 | 396 | 1,139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99166:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 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_99166:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99166:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99166:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99166:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99167 | 46 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99167:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 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_99167:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99167:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99167:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99167:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99168 | 63 | 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_99168:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 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_99168:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99168:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99168:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99168:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_99170 | 86 | 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_99170:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99170:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99170:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99170:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99170:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99171 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99171:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 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_99171:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99171:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99171:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99171:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_99173 | 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_99173:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99174 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99174:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99174:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99174:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99174:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99174:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_99175 | 115 | 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_99175:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99175:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99175:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99175:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_99175:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_99176 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99176:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99176:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99176:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99176:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99176:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99178 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99178:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99178:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99178:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99178:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99178:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_99179 | 154 | 385 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99179:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 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_99179:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99179:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99179:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99179:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99181 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99181:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 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_99181:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99181:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99181:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99181:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99182 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99182:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99182:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99182:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99182:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99182:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99183 | 55 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99183:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99183:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99183:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99183:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99183:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_99185 | 56 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99185:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99185:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99185:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99185:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99185:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_99186 | 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_99186:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99187 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99187:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99187:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99187:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99187:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99187:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_99188 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99188:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99188:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99188:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99188:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99188:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_99189 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99189:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99189:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99189:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99189:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_99189:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_99190 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99190:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99190:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99190:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99190:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99190:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_99191 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99191:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99191:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99191:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99191:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99191:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_99192 | 43 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99192:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99192:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99192:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99192:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99192:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
import os
import sys
import threading
from jobutil import *
__author__="qingkaishi"
__date__ ="$Apr 21, 2014 9:45:11 AM$"
alljobs = []
alljobslock = threading.Lock()
def parse_job_files(group):
jobs = []
for item in group:
if item[0].endswith('.json'):
job = ApsaraJob.pa... | ajibawa-2023/Python-Code-Large/train/row_99196 | 67 | 99 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99196:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0202, 0.0101, 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_99196:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99196:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99196:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99196:For_L15_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
import os
import sys
import threading
from jobutil import *
__author__="qingkaishi"
__date__ ="$Apr 21, 2014 9:45:11 AM$"
alljobs = []
alljobslock = threading.Lock()
def parse_job_files(group):
jobs = []
for item in group:
if item[0].endswith('.json'):
job = ApsaraJob.pa... | ajibawa-2023/Python-Code-Large/train/row_99198 | 67 | 99 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99198:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0202, 0.0101, 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_99198:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99198:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99198:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99198:For_L15_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
import cairo, gobject, gtk, gtk.gdk, gtk.glade, os, pygtk, re, sys, thread
BRUSHES_ZOOM = 0.5
DOWN_KEY = 65364
INITIAL_ZOOM = 0.5
LEFT_KEY = 65361
LEVEL_WIDTH = 100
LEVEL_HEIGHT = 100
MAX_ZOOM = 4
MIN_ZOOM = 0.25
RIGHT_KEY = 65363
SCROLL_STEP = 64
SETTINGS_DIR = os.getenv("HOME") + '/.abb_editor'
L... | ajibawa-2023/Python-Code-Large/train/row_99199 | 267 | 377 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99199:Import_L3_C0", "label": "cairo import cairo, gobject, gtk\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.008, 0.0027, 0, 0.66, 0.0, 747, 0, 10, 0, 0, 747, 0, 0], "semantic": {"name": "cairo", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99199:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99199:FunctionDef_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99199:FunctionDef_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_99199:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
import cairo, gobject, gtk, gtk.gdk, gtk.glade, os, pygtk, re, sys, thread
BRUSHES_ZOOM = 0.5
DOWN_KEY = 65364
INITIAL_ZOOM = 0.5
LEFT_KEY = 65361
LEVEL_WIDTH = 100
LEVEL_HEIGHT = 100
MAX_ZOOM = 4
MIN_ZOOM = 0.25
RIGHT_KEY = 65363
SCROLL_STEP = 64
SETTINGS_DIR = os.getenv("HOME") + '/.abb_editor'
L... | ajibawa-2023/Python-Code-Large/train/row_99200 | 267 | 377 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99200:Import_L3_C0", "label": "cairo import cairo, gobject, gtk\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.008, 0.0027, 0, 0.66, 0.0, 747, 0, 10, 0, 0, 747, 0, 0], "semantic": {"name": "cairo", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99200:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99200:FunctionDef_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99200:FunctionDef_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_99200:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import random
import sys
import roslib; roslib.load_manifest("hrl_object_fetching")
import rospy
import actionlib
from pr2_overhead_grasping.msg import *
#from pr2_playpen.srv import *
from hrl_lib.keyboard_input import KeyboardInput
from pr2_overhead_grasping.helpers import log
from tabletop_objec... | ajibawa-2023/Python-Code-Large/train/row_99201 | 21 | 137 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99201:Import_L2_C0", "label": "random import random", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0146, 0.0073, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99201:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99201:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99201:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99201:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import numpy as np, math
import scipy.io as spio
import roslib; roslib.load_manifest('hrl_object_fetching')
import rospy
import hrl_lib.util as hrl_util
from std_msgs.msg import Float64MultiArray, Bool
from pr2_msgs.msg import AccelerometerState, PressureState
from sensor_msgs.msg import JointState
f... | ajibawa-2023/Python-Code-Large/train/row_99202 | 36 | 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_99202:Import_L2_C0", "label": "numpy import np, math", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0328, 0.0164, 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_99202:If_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99202:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99202:If_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99202:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
#! /usr/bin/python
import numpy as np, math
import scipy.io as spio
import roslib; roslib.load_manifest('hrl_object_fetching')
import rospy
import hrl_lib.util as hrl_util
from std_msgs.msg import Float64MultiArray, Bool
from pr2_msgs.msg import AccelerometerState, PressureState
from sensor_msgs.msg import JointState
f... | ajibawa-2023/Python-Code-Large/train/row_99203 | 35 | 47 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99203:Import_L2_C0", "label": "numpy import np, math", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0426, 0.0213, 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_99203:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99203:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99203:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99203:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import roslib
roslib.load_manifest('hrl_trajectory_playback')
import rospy
import actionlib
import trajectory_msgs.msg as tm
import pr2_controllers_msgs.msg as pm
import hrl_lib.util as hrl_util
#from hrl_pr2_lib.pr2 import PR2, Joint
from hrl_trajectory_playback.srv import TrajPlaybackSrv, TrajPlay... | ajibawa-2023/Python-Code-Large/train/row_99204 | 94 | 158 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99204:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0063, 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_99204:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99204:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99204:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99204:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import roslib
roslib.load_manifest('hrl_trajectory_playback')
import rospy
import hrl_lib.util as hrl_util
from sensor_msgs.msg import JointState
from collections import deque # fast appends
import numpy as np, math
# Hack (this code currently only supports the right arm!)
JOINT_NAMES = ['%s_shoul... | ajibawa-2023/Python-Code-Large/train/row_99205 | 49 | 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_99205:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0235, 0.0118, 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_99205:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99205:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99205:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99205:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
__all__ = [
'playback',
'record'
]
| ajibawa-2023/Python-Code-Large/train/row_99206 | 1 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99206:Assign_L1_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [1, 4], "level": 0, "parent": null, "vector": [14, 0, 0.625, 1.0, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name"... | [] |
import scipy.optimize as so
import math, numpy as np
import pylab as pl
import sys, optparse, time
import copy
from enthought.mayavi import mlab
#import util as ut
import roslib; roslib.load_manifest('doors_forces_kinematics')
roslib.load_manifest('epc_core')
import cody_arms.arms as ca
#import mekabot.coord_frame... | ajibawa-2023/Python-Code-Large/train/row_99207 | 516 | 1,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_99207:Import_L2_C0", "label": "scipy.optimize import so", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0017, 0.0009, 0, 0.66, 0.0, 359, 0, 1, 0, 0, 359, 0, 0], "semantic": {"name": "scipy.optimize", "arg_names": [], "import_names": ["s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99207:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99207:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99207:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99207:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-... |
import scipy.optimize as so
import matplotlib.pyplot as pp
import matplotlib_util.util as mpu
import numpy as np, math
import sys, os, time
sys.path.append(os.environ['HRLBASEPATH']+'/src/projects/modeling_forces/handheld_hook')
import ram_db as rd
import mechanism_analyse_RAM as mar
import mechanism_analyse_advait as... | ajibawa-2023/Python-Code-Large/train/row_99208 | 419 | 571 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99208:Import_L2_C0", "label": "scipy.optimize import so", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0035, 0.0018, 0, 0.66, 0.0, 359, 0, 1, 0, 0, 359, 0, 0], "semantic": {"name": "scipy.optimize", "arg_names": [], "import_names": ["s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99208:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99208:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99208:If_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99208:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#! /usr/bin/python
import roslib; roslib.load_manifest('hrl_pr2_lib')
import rospy
import tf.transformations as tr
import hrl_lib.tf_utils as tfu
import hrl_lib.util as ut
import tf
import geometry_msgs.msg as gm
import sys
import math
import numpy as np
import actionlib
import hrl_pr2_lib.msg as hm
class MoveBase:
... | ajibawa-2023/Python-Code-Large/train/row_99209 | 88 | 215 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99209:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0093, 0.0047, 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_99209:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99209:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99209:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99209:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Co... |
import sensor_msgs.msg as sm
import pr2_arm_navigation_perception.srv as snp
#import tf
#import tf.msg
import rospy
import numpy as np
import hrl_lib.rutils as ru
##
# Converts a list of pr2_msgs/PressureState into a matrix
#
# @return left mat, right mat, array
def pressure_state_to_mat(contact_msgs):
times = n... | ajibawa-2023/Python-Code-Large/train/row_99210 | 42 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99210:Import_L2_C0", "label": "sensor_msgs.msg import sm", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0317, 0.0159, 0, 0.66, 0.0, 531, 0, 1, 0, 0, 531, 0, 0], "semantic": {"name": "sensor_msgs.msg", "arg_names": [], "import_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99210:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99210:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99210:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99210:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Co... |
#
# Temoprarily in this package. Advait needs to move it to a better
# location.
#
import numpy as np, math
import copy
import roslib; roslib.load_manifest('hrl_pr2_lib')
import rospy
import hrl_lib.util as ut
## Class defining the core EPC function and a few simple examples.
# More complex behaviors that use EPC ... | ajibawa-2023/Python-Code-Large/train/row_99211 | 109 | 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_99211:Import_L7_C0", "label": "numpy import np, math", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0343, 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_99211:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99211:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99211:FunctionDef_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99211:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import roslib
roslib.load_manifest("rospy")
roslib.load_manifest("sensor_msgs")
import rospy
from sensor_msgs.msg import PointCloud2
class Poller:
def __init__(self):
self.ind = 0
def callback(self,msg):
self.ind += 1
node_name = 'kinect_poller'
rospy.init_node(node_name)
p... | ajibawa-2023/Python-Code-Large/train/row_99213 | 21 | 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_99213:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0741, 0.037, 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_99213:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99213:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99213:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99213:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-C... |
import roslib; roslib.load_manifest('hrl_pr2_lib')
import rospy
import numpy as np
import pr2_msgs.msg as pm
class PressureListener:
def __init__(self, topic='/pressure/l_gripper_motor', safe_pressure_threshold = 4000):
rospy.Subscriber(topic, pm.PressureState, self.press_cb)
self.lmat = None
... | ajibawa-2023/Python-Code-Large/train/row_99214 | 52 | 71 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99214:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0141, 0.0141, 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_99214:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99214:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99214:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99214:Expr_L9_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
import roslib; roslib.load_manifest('hrl_pr2_lib')
import rospy
import pr2_gripper_reactive_approach.reactive_grasp as rgr
import pr2_gripper_reactive_approach.controller_manager as con
import object_manipulator.convert_functions as cf
from actionlib_msgs.msg import GoalStatus
from geometry_msgs.msg import Pose, Pose... | ajibawa-2023/Python-Code-Large/train/row_99215 | 288 | 529 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99215:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0019, 0.0019, 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_99215:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99215:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99215:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99215:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-... |
import numpy as np, math
import copy
from threading import RLock
import roslib; roslib.load_manifest('hrl_pr2_lib')
roslib.load_manifest('equilibrium_point_control')
import rospy
from equilibrium_point_control.msg import MechanismKinematicsRot
from equilibrium_point_control.msg import MechanismKinematicsJac
from equ... | ajibawa-2023/Python-Code-Large/train/row_99217 | 224 | 363 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99217:Import_L2_C0", "label": "numpy import np, math", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0055, 0.0028, 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_99217:ClassDef_L19_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99217:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99217:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99217:Expr_L21_C8"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
import roslib; roslib.load_manifest("pr2_laser_pointer_grasp")
import rospy
import copy
from std_msgs.msg import Bool, Float64
from pr2_msgs.msg import PressureState
from pr2_laser_pointer_grasp.srv import GripperMonitor
from numpy import sqrt
def loginfo(str):
rospy.loginfo("PressureMonitor: " ... | ajibawa-2023/Python-Code-Large/train/row_99218 | 75 | 87 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99218:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.023, 0.0115, 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_99218:FunctionDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99218:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99218:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99218:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
import roslib; roslib.load_manifest('hrl_pr2_lib')
import rospy
import math
from geometry_msgs.msg import WrenchStamped, PoseStamped, Point, PointStamped
from tf import TransformListener, transformations
from visualization_msgs.msg import Marker
class Pointmass_Adjust:
pub_marker = True #Set... | ajibawa-2023/Python-Code-Large/train/row_99219 | 88 | 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_99219:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0288, 0.0096, 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_99219:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99219:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99219:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99219:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#! /usr/bin/python
import roslib; roslib.load_manifest('hrl_pr2_lib')
import rospy
import sensor_msgs.msg as sm
# import planning_environment_msgs.srv as psrv
import arm_navigation_msgs.srv as psrv
import numpy as np
import time
import hrl_pr2_lib.msg as hmsg
class CollisionClient:
def __init__(self, arm):
... | ajibawa-2023/Python-Code-Large/train/row_99220 | 79 | 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_99220:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0106, 0.0053, 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_99220:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99220:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99220:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99220:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99223 | 327 | 505 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99223:Import_L29_C0", "label": "numpy import np", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.0574, 0.002, 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_99223:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99223:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99223:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99223:Expr_L36_C8"}, {"f": "ajibawa-2023/Python-Co... |
#from sound_play.libsoundplay import SoundClient
import hrl_lib.tf_utils as tfu
from std_msgs.msg import String
import rospy
import tf
import subprocess as sb
import numpy as np
import geometry_msgs.msg as gms
import os
class LaserPointerClient:
def __init__(self, target_frame='/base_link', tf_listener=None):
... | ajibawa-2023/Python-Code-Large/train/row_99224 | 42 | 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_99224:Import_L2_C0", "label": "hrl_lib.tf_utils import tfu", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0323, 0.0161, 0, 0.66, 0.0, 5, 0, 1, 0, 0, 5, 0, 0], "semantic": {"name": "hrl_lib.tf_utils", "arg_names": [], "import_names": ["... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99224:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99224:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99224:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99224:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-... |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99225 | 191 | 566 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99225:Import_L29_C0", "label": "os import os", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.0512, 0.0018, 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_99225:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99225:For_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99225:For_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99225:Expr_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99226 | 26 | 65 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99226:Import_L29_C0", "label": "numpy import np", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.4462, 0.0154, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99226:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99226:If_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99226:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99226:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
from pkg import *
import cv
import laser_interface.blob as blob
class CombineMasks:
def __init__(self, sample_image, channels=1):
self.combined = cv.CreateImage(cv.GetSize(sample_image), 8 , channels)
def combine(self, images):
cv.Set(self.combined, 1)
for img in images:
cv... | ajibawa-2023/Python-Code-Large/train/row_99228 | 71 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99228:ImportFrom_L1_C0", "label": "from pkg import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0095, 0.0095, 0, 0.66, 0.0, 489, 0, 1, 0, 0, 489, 0, 0], "semantic": {"name": "pkg", "arg_names": [], "import_names": ["*"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99228:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99228:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99228:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99228:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99229 | 13 | 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_99229:Import_L31_C0", "label": "numpy import np", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.1813, 0.0058, 0, 0.66, 0.0, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["np"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99229:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99229:Return_L35_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99229:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99229:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99230 | 10 | 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_99230:Import_L27_C0", "label": "roslib import roslib", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.7297, 0.027, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "... | [] |
from pkg import *
from geometry_msgs.msg import Point
import sys
class Echo:
def echo(self, point):
print 'x y z', point.x, point.y, point.z
rospy.Publisher(CURSOR_TOPIC, Point, Echo().echo)
rospy.init_node('cursor3d_listener')
rospy.spin()
| ajibawa-2023/Python-Code-Large/train/row_99231 | 9 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99231:ImportFrom_L1_C0", "label": "from pkg import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 489, 0, 1, 0, 0, 489, 0, 0], "semantic": {"name": "pkg", "arg_names": [], "import_names": ["*"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99231:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99231:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99231:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99231:Expr_L7_C8"}] |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99233 | 144 | 273 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99233:ImportFrom_L32_C0", "label": "from pkg import *", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.1172, 0.0037, 0, 0.66, 0.0, 489, 0, 1, 0, 0, 489, 0, 0], "semantic": {"name": "pkg", "arg_names": [], "import_names": ["*"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99233:FunctionDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99233:Assign_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99233:FunctionDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99233:Assign_L64_C4"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99234 | 77 | 269 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99234:ImportFrom_L29_C0", "label": "from pkg import *", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.1078, 0.0037, 0, 0.66, 0.0, 489, 0, 1, 0, 0, 489, 0, 0], "semantic": {"name": "pkg", "arg_names": [], "import_names": ["*"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99234:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99234:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99234:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99234:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-... |
import roslib
roslib.load_manifest('laser_interface')
import laser_interface.camera as cam
from laser_interface.laser_detector import *
import rospy
import cv
stereo_camera = '/wide_stereo'
image_type = 'image_rect_color'
coi = 1
stereo = cam.ROSStereoListener([stereo_camera + '/left/' + image_type, stereo_camera +... | ajibawa-2023/Python-Code-Large/train/row_99235 | 36 | 50 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99235:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.02, 0.02, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99235:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99235:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99235:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99235:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | ajibawa-2023/Python-Code-Large/train/row_99236 | 10 | 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_99236:Import_L27_C0", "label": "roslib import roslib", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.7297, 0.027, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "... | [] |
#!/usr/bin/env python
# Copyright (c) 2008, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# n... | ajibawa-2023/Python-Code-Large/train/row_99238 | 109 | 173 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99238:ImportFrom_L30_C0", "label": "from pkg import *", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.1734, 0.0058, 0, 0.66, 0.0, 489, 0, 1, 0, 0, 489, 0, 0], "semantic": {"name": "pkg", "arg_names": [], "import_names": ["*"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99238:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99238:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99238:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99238:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/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_99239 | 30 | 90 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99239:Import_L31_C0", "label": "roslib import roslib", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.3444, 0.0111, 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_99239:FunctionDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99239:Expr_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99239:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99239:Expr_L55_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/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_99240 | 35 | 98 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99240:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 34], "level": 0, "parent": null, "vector": [8, 0, 0.3367, 0.0306, 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_99240:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99240:Expr_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99240:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99240:Expr_L60_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/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_99241 | 51 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99241:Import_L30_C0", "label": "roslib import roslib", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.2041, 0.0068, 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_99241:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99241:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99241:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99241:Expr_L47_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_99242 | 28 | 83 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99242:Import_L30_C0", "label": "roslib import roslib", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.3614, 0.012, 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_99242:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99242:Expr_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99242:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99242:Assign_L52_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_99243 | 30 | 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_99243:Import_L31_C0", "label": "roslib import roslib", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.2123, 0.0068, 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_99243:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99243:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99243:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99243:Try_L55_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_99245 | 30 | 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_99245: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_99245:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99245:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99245:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99245:Assign_L13_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_99247 | 35 | 88 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99247:Import_L30_C0", "label": "roslib import roslib", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.3409, 0.0114, 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_99247:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99247:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99247:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99247:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code... |
import roslib; roslib.load_manifest('face_reinterpret')
from sensor_msgs.msg import PointCloud
from visualization_msgs.msg import Marker
import rospy
class FaceBox:
def __init__(self):
rospy.Subscriber('/face_detector/faces_cloud', PointCloud, self.callback)
self.box_pub = rospy.Publisher('/face_de... | ajibawa-2023/Python-Code-Large/train/row_99248 | 35 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99248:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 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_99248:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99248:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99248:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99248:Expr_L8_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/python
import roslib
roslib.load_manifest( 'robotis' )
import rospy
import robotis.lib_robotis as rs
import time
import math
if __name__ == '__main__':
rospy.logout( 'pr2_ears_stow_startup: Stowing RFID Ears Servos' )
rospy.logout( 'pr2_ears_stow_startup: Connecting to servos' )
dyn_left ... | ajibawa-2023/Python-Code-Large/train/row_99249 | 24 | 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_99249:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0811, 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_99249:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99249:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99249:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99249:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_992... |
##
# Representation of a dataset, operations that can be performed on it, and quantities that can be calculated from it
import numpy as np
import copy
class Dataset:
##
# inputs coded as numpy array, column vectors
# outputs also as numpy array, column vectors
def __init__(self, inputs, outputs):
... | ajibawa-2023/Python-Code-Large/train/row_99250 | 76 | 153 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99250:Import_L3_C0", "label": "numpy import np", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0196, 0.0065, 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_99250:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99250:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99250:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99250:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C... |
## @author Hai Nguyen/hai@gatech.edu
import roslib; roslib.load_manifest('ml_lib')
import numpy as np
import itertools as it
import functools as ft
import time
import dataset as ds
##
# Base class for random forest classifier
#
class RFBase:
##
# @param dataset Dataset object
# @param number_of_dimension... | ajibawa-2023/Python-Code-Large/train/row_99251 | 343 | 508 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99251:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0039, 0.002, 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_99251:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99251:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99251:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99251:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-... |
## @author Hai Nguyen/hai@gatech.edu
import roslib
roslib.load_manifest('ml_lib')
import numpy as np
import dataset as ds
import hrl_lib.util as ut
def pca_gain_threshold(s, percentage_change_threshold=.15):
if s.__class__ != np.ndarray:
raise ValueError('Need ndarray as input.')
shifted = np.co... | ajibawa-2023/Python-Code-Large/train/row_99252 | 58 | 109 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99252:Import_L2_C0", "label": "roslib import roslib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0183, 0.0092, 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_99252:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99252:If_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99252:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99252:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
##
# Taken from http://opencv.willowgarage.com/wiki/PythonInterface
#
import roslib
roslib.load_manifest('hrl_opencv')
import cv
import Image #PIL
import numpy as np
def pil2cv(pi):
cv_im = cv.CreateImageHeader(pi.size, cv.IPL_DEPTH_8U, 1)
cv.SetData(cv_im, pi.tostring())
return cv_im
def cv2pil(cv_im):
... | ajibawa-2023/Python-Code-Large/train/row_99254 | 33 | 77 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99254:Import_L4_C0", "label": "roslib import roslib", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0519, 0.013, 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_99254:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99254:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99254:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99254:Expr_L12_C4"}, {"f": "ajibawa-2023/Python-Code... |
import roslib
roslib.load_manifest('hrl_opencv')
import cv
def print_mat(m):
for j in range(m.height):
for i in range(m.width):
print m[j,i], ' ',
print ''
##Display a list of OpenCV images tiled across the screen
#with maximum width of max_x and maximum height of max_y
# @param save_... | ajibawa-2023/Python-Code-Large/train/row_99255 | 29 | 44 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99255:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0227, 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_99255:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99255:For_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99255:For_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99255:For_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
import roslib
roslib.load_manifest('hrl_opencv')
#from sensor_msgs.msg import Image as RosImage
from std_msgs.msg import UInt8MultiArray
from std_msgs.msg import MultiArrayLayout
from std_msgs.msg import MultiArrayDimension
import opencv as cv
import opencv.highgui as hg
import opencv.adaptors as ad
import Image as pi... | ajibawa-2023/Python-Code-Large/train/row_99256 | 91 | 213 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99256:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0047, 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_99256:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99256:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99256:FunctionDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99256:If_L25_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#!/usr/bin/env python
import roslib
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'std_msgs' )
import rospy
from std_msgs.msg import Float64, Int8
import numpy as np
rospy.init_node( 'move_joint_node' )
topic = 'r_shoulder_pan_controller/command'
topic = 'r_forearm_roll_controller/command'
pub = rospy.Pu... | ajibawa-2023/Python-Code-Large/train/row_99258 | 25 | 45 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99258:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0222, 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_99258:While_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99258:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99258:While_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99258:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
#!/usr/bin/env python
import roslib
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'kinematics_msgs' )
roslib.load_manifest( 'geometry_msgs' )
import rospy
from kinematics_msgs.srv import \
GetPositionIK, GetPositionIKRequest
from geometry_msgs.msg import \
Pose, Point, ... | ajibawa-2023/Python-Code-Large/train/row_99259 | 6 | 10 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99259:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs_call... | [] |
#!/usr/bin/python
from scipy import pi, sin, cos, array, asarray, linspace, zeros, ones, sqrt
import matplotlib.pyplot as plt
import roslib
roslib.load_manifest( 'pr2_controllers_msgs' )
roslib.load_manifest( 'trajectory_msgs' )
roslib.load_manifest( 'actionlib' )
import rospy
from pr2_controllers_msgs.msg import J... | ajibawa-2023/Python-Code-Large/train/row_99260 | 56 | 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_99260:ImportFrom_L3_C0", "label": "from scipy import pi, sin, cos\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0221, 0.0074, 0, 0.66, 0.0, 265, 0, 9, 0, 0, 265, 0, 0], "semantic": {"name": "scipy", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99260:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99260:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99260:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99260:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
import matplotlib
matplotlib.interactive( True )
matplotlib.use( 'WXAgg' )
import numpy as np
import wx
import sys
import roslib
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'sensor_msgs' )
roslib.load_manifest( 'std_msgs' )
import rospy
from sensor_msgs.msg import JointState
from st... | ajibawa-2023/Python-Code-Large/train/row_99261 | 184 | 293 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99261:Import_L3_C0", "label": "matplotlib import matplotlib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0102, 0.0034, 0, 0.66, 0.0, 75, 0, 1, 0, 0, 75, 0, 0], "semantic": {"name": "matplotlib", "arg_names": [], "import_names": ["mat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99261:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99261:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99261:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99261:ImportFrom_L25_C8"}, {"f": "ajibawa-2023/Pyt... |
import roslib
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'rosparam' )
roslib.load_manifest( 'actionlib' )
roslib.load_manifest( 'trajectory_msgs' )
roslib.load_manifest( 'pr2_controllers_msgs' )
import rospy
import rosparam
import csv
from actionlib import \
SimpleActionClient
from trajectory_msgs.ms... | ajibawa-2023/Python-Code-Large/train/row_99262 | 124 | 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_99262:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0056, 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_99262:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99262:If_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99262:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99262:Return_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
#!/usr/bin/env python
import roslib
roslib.load_manifest( 'rospy' )
import rospy
import sys
import numpy as np
import dynamics_utils as dynutils
if __name__== '__main__':
if ( len( sys.argv ) != 2 ):
rospy.logerr( 'no filename passed to play_motion.py' )
exit(-1)
fname = sys.argv[1];
... | ajibawa-2023/Python-Code-Large/train/row_99263 | 29 | 61 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99263:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0492, 0.0164, 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_99263:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99263:If_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99263:If_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99263:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99263... |
#!/usr/bin/env python
""" Provides tools to compute root mean squared error for each joint in JointTrajectoryControllerState messages, either on-line by listening to a speciefied topic - or offline by reading a bag file."""
import numpy as np
import sys
import roslib
roslib.load_manifest( 'gpr_controller' )
import r... | ajibawa-2023/Python-Code-Large/train/row_99264 | 53 | 76 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99264:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0395, 0.0132, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99264:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99264:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99264:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99264:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
import roslib
roslib.load_manifest( 'rospy' )
import rospy
roslib.load_manifest( 'rosbag' )
import rosbag
import numpy as np
import csv
import sys
def read_file( fname, topic ):
bag = rosbag.Bag( fname )
time = rospy.Time.from_sec(0.0)
msgs = []
for topic, msg, t in bag.read_mess... | ajibawa-2023/Python-Code-Large/train/row_99265 | 56 | 84 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99265:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0357, 0.0119, 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_99265:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99265:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99265:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99265:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
from xml.dom import minidom
arm_joint_names = ['lr_shoulder_pan_joint',
'lr_shoulder_lift_joint',
'lr_upper_arm_roll_joint',
'lr_elbow_flex_joint',
'lr_forearm_roll_joint',
'lr_wrist_flex_joint',
... | ajibawa-2023/Python-Code-Large/train/row_99267 | 63 | 100 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99267:ImportFrom_L3_C0", "label": "from xml.dom import minidom", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.03, 0.01, 0, 0.66, 0.0, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["minid... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99267:For_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99267:If_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99267:For_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99267:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_9... |
#!/usr/bin/env python
import dynamics_utils as dynutils
(name, time, pos, vel, acc) = dynutils.load_motion_ascii("/u/dhennes/Desktop/reaching.txt")
dynutils.save_motion("../motions/reaching.pkl", name, time, pos, vel, acc)
| ajibawa-2023/Python-Code-Large/train/row_99268 | 3 | 7 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99268:Import_L3_C0", "label": "dynamics_utils import dynutils", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.4286, 0.1429, 0, 0.66, 0.0, 318, 0, 1, 0, 0, 318, 0, 0], "semantic": {"name": "dynamics_utils", "arg_names": [], "import_names... | [] |
#!/usr/bin/python
from scipy import pi, sin, cos, array, asarray, linspace, zeros, ones, sqrt
import matplotlib.pyplot as plt
import roslib
roslib.load_manifest( 'pr2_controllers_msgs' )
roslib.load_manifest( 'trajectory_msgs' )
roslib.load_manifest( 'actionlib' )
import rospy
from pr2_controllers_msgs.msg import J... | ajibawa-2023/Python-Code-Large/train/row_99270 | 56 | 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_99270:ImportFrom_L3_C0", "label": "from scipy import pi, sin, cos\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0221, 0.0074, 0, 0.66, 0.0, 265, 0, 9, 0, 0, 265, 0, 0], "semantic": {"name": "scipy", "arg_names": [], "import_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99270:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99270:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99270:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99270:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/env python
import roslib
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'kinematics_msgs' )
roslib.load_manifest( 'geometry_msgs' )
import rospy
from kinematics_msgs.srv import \
GetPositionIK, GetPositionIKRequest
from geometry_msgs.msg import \
Pose, Point, Quaternion
import numpy as np
i... | ajibawa-2023/Python-Code-Large/train/row_99271 | 6 | 10 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99271:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rhs_call... | [] |
#!/usr/bin/env python
import roslib
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'rospy' )
roslib.load_manifest( 'kinematics_msgs' )
roslib.load_manifest( 'geometry_msgs' )
import rospy
from kinematics_msgs.srv import \
GetPositionIK, GetPositionIKRequest
from geometry_msgs.msg import \
Pose, Point, ... | ajibawa-2023/Python-Code-Large/train/row_99273 | 6 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99273:Import_L1_C0", "label": "roslib import roslib", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 796, 0, 1, 0, 0, 796, 0, 0], "semantic": {"name": "roslib", "arg_names": [], "import_names": ["roslib"], "rh... | [] |
#! /usr/bin/python
import numpy as np
import sys
from collections import deque
import roslib
roslib.load_manifest('hrl_pr2_arms')
roslib.load_manifest('ar_pose')
roslib.load_manifest('visualization_msgs')
roslib.load_manifest('pykdl_utils')
import rospy
import tf.transformations as tf_trans
from geometry_msgs.msg im... | ajibawa-2023/Python-Code-Large/train/row_99274 | 241 | 318 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99274:Import_L3_C0", "label": "numpy import np", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0031, 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_99274:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99274:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99274:FunctionDef_L28_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99274:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-... |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Sat Feb 11 08:02:58 2012
# by: The Resource Compiler for PyQt (Qt v4.6.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x05\x49\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x... | ajibawa-2023/Python-Code-Large/train/row_99275 | 9 | 2,644 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99275:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0038, 0.0004, 0, 0.66, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtC... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99275:FunctionDef_L2638_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99275:Expr_L2639_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99275:FunctionDef_L2641_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99275:Expr_L2642_C4"}] |
#! /usr/bin/python
import roslib; roslib.load_manifest('kelsey_sandbox')
import rospy
import roslib.message
import rosbag
import sys
import rosservice
from pr2_msgs.msg import AccelerometerState
import scipy.io
class AccelSaver:
def __init__(self):
self.data = []
self.first = True
def proc_ac... | ajibawa-2023/Python-Code-Large/train/row_99276 | 32 | 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_99276:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.075, 0.025, 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_99276:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99276:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99276:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99276:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-... |
#######################################################################
#
# USE pr2_object_manipulation/pr2_gripper_reactive_approach/controller_manager.py
# That code has much of the ideas at the bottom, with more.
#
#######################################################################
# TODO Update code t... | ajibawa-2023/Python-Code-Large/train/row_99277 | 527 | 992 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99277:Import_L15_C0", "label": "numpy import np, math", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0151, 0.001, 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_99277:FunctionDef_L54_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99277:Expr_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99277:FunctionDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99277:If_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'controller_gui.ui'
#
# Created: Thu Feb 2 04:31:00 2012
# by: PyQt4 UI code generator 4.7.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_Frame(object):
def setupUi(self, Frame)... | ajibawa-2023/Python-Code-Large/train/row_99278 | 37 | 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_99278:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1887, 0.0189, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99278:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99278:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99278:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99278:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import numpy as np
import sys
import roslib
roslib.load_manifest('hrl_pr2_arms')
import rospy
import tf
import tf.transformations as tf_trans
from std_srvs.srv import Empty, EmptyResponse
from hrl_generic_arms.ep_trajectory_controller import EPArmController
from hrl_pr2_arms.pr2_arm import create... | ajibawa-2023/Python-Code-Large/train/row_99280 | 34 | 46 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99280:Import_L3_C0", "label": "numpy import np", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0652, 0.0217, 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_99280:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99280:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99280:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99280:Expr_L22_C4"}, {"f": "ajibawa-2023/Python-Code... |
##
# Periodically logs the output of a callback function by calling it at a certain
# rate and gathering up the results into a list
class PeriodicLogger():
##
# initializes the logger but doesn't start it
#
# @param callback the function to be called each time
# @param rate the rate in secon... | ajibawa-2023/Python-Code-Large/train/row_99281 | 120 | 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_99281:ClassDef_L4_C0", "label": "PeriodicLogger", "type": "class", "loc": [4, 72], "level": 0, "parent": null, "vector": [3, 0, 0.199, 0.3613, 0, 0.66, 0.0, 422, 0, 5, 0, 0, 0, 0, 11], "semantic": {"name": "PeriodicLogger", "arg_names": [], "import_names": [], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99281:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99281:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99281:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99281:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C... |
#! /usr/bin/python
import sys
from PyQt4 import QtCore, QtGui, uic
import roslib
roslib.load_manifest("rospy")
import rospy
from controller_gui import Ui_Frame as QTControllerGUIFrame
from subprocess import Popen
class ControllerGUIFrame(QtGui.QFrame):
def __init__(self):
super(ControllerGUIFrame, self)... | ajibawa-2023/Python-Code-Large/train/row_99282 | 45 | 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_99282: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_99282:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99282:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99282:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99282:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import roslib
roslib.load_manifest('tf')
roslib.load_manifest('rosparam')
roslib.load_manifest('sensor_msgs')
import rospy
import rosparam
import rosbag
from sensor_msgs.msg import PointCloud2
from hrl_generic_arms.pose_converter import PoseConverter
from kelsey_sandbox.msg import PHRIPointCloudCa... | ajibawa-2023/Python-Code-Large/train/row_99283 | 50 | 69 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99283:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0145, 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_99283:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99283:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99283:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99283:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-... |
#! /usr/bin/python
import sys
import numpy as np
import copy
import roslib
roslib.load_manifest("hrl_pr2_arms")
roslib.load_manifest("kelsey_sandbox")
import rospy
from visualization_msgs.msg import Marker, MarkerArray
from geometry_msgs.msg import Point, Quaternion, Vector3, PoseStamped
from std_msgs.msg import Colo... | ajibawa-2023/Python-Code-Large/train/row_99284 | 89 | 118 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99284:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0254, 0.0085, 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_99284:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99284:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99284:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99284:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-... |
import sys
import subprocess
import numpy as np
from collections import deque
import roslib
roslib.load_manifest("rospy")
roslib.load_manifest("tf")
roslib.load_manifest("hrl_pr2_arms")
roslib.load_manifest("smach_ros")
roslib.load_manifest("actionlib")
import tf
import tf.transformations as tf_trans
import rospy
from... | ajibawa-2023/Python-Code-Large/train/row_99285 | 22 | 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_99285:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0417, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name"... | [] |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'arm_cart_control_gui.ui'
#
# Created: Sat Feb 11 08:02:57 2012
# by: PyQt4 UI code generator 4.7.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_Frame(object):
def setupUi(self, ... | ajibawa-2023/Python-Code-Large/train/row_99286 | 210 | 238 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_99286:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.042, 0.0042, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_99286:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99286:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99286:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_99286:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Co... |
#! /usr/bin/python
import roslib; roslib.load_manifest('kelsey_sandbox')
import rospy
import roslib.message
import rosbag
import sys
import rosservice
from datetime import datetime
from hrl_lib.util import save_pickle
import yaml
#from hrl_lib import *
#from tabletop_object_detector.srv import TabletopDetection
if _... | ajibawa-2023/Python-Code-Large/train/row_99287 | 20 | 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_99287:Import_L3_C0", "label": "roslib import roslib", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1154, 0.0385, 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_99287:If_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99287:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99287:If_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_99287:For_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_99... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.