code stringlengths 1 1.49M | file_id stringlengths 42 46 | node_count int64 0 7.38k | total_lines int64 1 20.9k | vector_dim int64 15 15 | vector_labels stringclasses 1
value | nodes stringlengths 2 3.75M | connections stringlengths 2 964k |
|---|---|---|---|---|---|---|---|
# Copyright 2013 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5719 | 195 | 454 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5719:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.033, 0.0022, 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_5719:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5719:Expr_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5719:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5719:FunctionDef_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5720 | 53 | 219 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5720:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0685, 0.0046, 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_5720:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5720:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5720:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5720:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# -*- coding: utf-8; -*-
# Copyright 2014 Google Inc. All Rights Reserved.
#
# 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 requi... | ajibawa-2023/Python-Code-Large/train/row_5721 | 31 | 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_5721:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 16], "level": 0, "parent": null, "vector": [8, 0, 0.1088, 0.0068, 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_5721:FunctionDef_L94_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5721:Assign_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5721:FunctionDef_L94_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5721:Return_L97_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2013 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5722 | 103 | 185 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5722:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0811, 0.0054, 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_5722:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5722:Expr_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5722:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5722:If_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python
# Copyright 2014 Google Inc. All Rights Reserved.
#
# 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... | ajibawa-2023/Python-Code-Large/train/row_5723 | 134 | 232 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5723:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.0733, 0.0043, 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_5723:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5723:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5723:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5723:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
"""Classes to build sanitized HTML."""
__author__ = 'John Orr (jorr@google.com)'
import cgi
import re
def escape(strg):
return cgi.escape(strg, quote=1).replace("'", ''').replace('`', '`')
class Node(object):
"""Base class for the sanitizing module."""
def __init__(self):
self._parent... | ajibawa-2023/Python-Code-Large/train/row_5724 | 174 | 316 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5724:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 1], "level": 0, "parent": null, "vector": [8, 0, 0.0032, 0.0032, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5724:FunctionDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5724:Return_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5724:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5724:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5725 | 97 | 247 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5725:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0607, 0.004, 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_5725:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5725:If_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5725:If_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5725:Return_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
# Copyright 2014 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5726 | 130 | 308 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5726:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0487, 0.0032, 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_5726:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5726:ImportFrom_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5726:Try_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5726:If_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5... |
# -*- coding: utf-8 -*-
# Copyright 2014 Google Inc. All Rights Reserved.
#
# 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 requir... | ajibawa-2023/Python-Code-Large/train/row_5727 | 1,189 | 2,834 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5727:Expr_L16_C0", "label": "expression", "type": "expression", "loc": [16, 116], "level": 0, "parent": null, "vector": [8, 0, 0.0233, 0.0356, 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_5727:FunctionDef_L169_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5727:Assign_L170_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5727:FunctionDef_L169_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5727:Assign_L171_C4"}, {"f": "ajibawa-2023/Python-Co... |
# Copyright 2014 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5728 | 334 | 547 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5728:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0274, 0.0018, 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_5728:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5728:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5728:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5728:Assign_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5729 | 394 | 668 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5729:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.0225, 0.0015, 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_5729:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5729:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5729:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5729:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# Copyright 2014 Google Inc. All Rights Reserved.
#
# 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 ... | ajibawa-2023/Python-Code-Large/train/row_5730 | 52 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5730:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 15], "level": 0, "parent": null, "vector": [8, 0, 0.1154, 0.0077, 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_5730:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5730:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5730:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5730:ClassDef_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/license... | ajibawa-2023/Python-Code-Large/train/row_5731 | 80 | 160 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5731:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0719, 0.1375, 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_5731:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5731:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5731:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5731:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5735 | 23 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5735:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5735:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5735:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5735:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5735:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5737 | 28 | 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_5737:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 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_5737:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5737:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5737:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5737:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5738 | 41 | 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_5738:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 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_5738:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5738:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5738:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5738:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5739 | 41 | 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_5739:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0132, 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_5739:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5739:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5739:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5739:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5741 | 46 | 116 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5741:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1207, 0.1983, 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_5741:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5741:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5741:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5741:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5743 | 41 | 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_5743:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 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_5743:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5743:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5743:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5743:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5744 | 41 | 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_5744:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0132, 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_5744:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5744:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5744:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5744:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5746 | 46 | 116 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5746:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1207, 0.1983, 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_5746:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5746:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5746:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5746:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5747 | 23 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5747:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5747:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5747:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5747:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5747:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5748 | 28 | 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_5748:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 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_5748:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5748:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5748:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5748:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
# -*- coding: utf-8 -*-
#
# jQuery File Upload Plugin GAE Python Example 2.1.0
# https://github.com/blueimp/jQuery-File-Upload
#
# Copyright 2011, Sebastian Tschan
# https://blueimp.net
#
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT
#
from __future__ import with_statement
from google.appe... | ajibawa-2023/Python-Code-Large/train/row_5750 | 90 | 165 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5750:ImportFrom_L13_C0", "label": "from __future__ import with_statement", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0788, 0.0061, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "imp... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5750:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5750:Expr_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5750:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5750:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
#####################################################
# Python Watch and Warn Files Modification script #
#####################################################
# Vallee Cedric #
# 20/12/2011 #
# Network and Systems Security #
#####################################################
import r... | ajibawa-2023/Python-Code-Large/train/row_5753 | 110 | 206 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5753:Import_L9_C0", "label": "re import re", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0437, 0.0049, 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_5753:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5753:FunctionDef_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5753:FunctionDef_L22_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5753:Assign_L23_C2"}, {"f": "ajibawa-2023/Python-Code... |
# email_spam.py
#
# This file does the actual spam detection in Peter Ballard's email spam filter.
# The function check() takes in an email message (the "message" class from
# the standard Python module email), and returns a status
# ("wham", "mham", "spam" or "ham") as well as a one line description.
#
# Feel free to... | ajibawa-2023/Python-Code-Large/train/row_5757 | 185 | 334 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5757:Import_L31_C0", "label": "string import string", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.0928, 0.003, 0, 0.66, 0.0, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5757:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5757:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5757:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5757:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# email_defs.py
#
# This file is the "local definitions" part of Peter Ballard's email spam filter.
# Some of this you will need to change,
# and most of this you will want to change.
#
# Note the definitions for whitelist and blackdomains are not done here,
# but are in separate files. This is because these two lists... | ajibawa-2023/Python-Code-Large/train/row_5758 | 31 | 170 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5758:Assign_L37_C0", "label": "SYSMAILDIR =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.2176, 0.0059, 0, 0.66, 0.0, 17, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SYSMAILDIR", "arg_names": [], "import_names": [], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5758:FunctionDef_L169_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5758:Return_L170_C4"}] |
# email_filter.py
#
# This file is the "bookkeeping" part of Peter Ballard's email spam filter.
# This is the top level program.
# It reads the user options, opens and closes the files, and sends emails
# to the appropriate files.
# However it is the function check() in the module email_spam, which this
# program call... | ajibawa-2023/Python-Code-Large/train/row_5759 | 8 | 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_5759:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 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 -*-
#!/usr/bin/env python
import sys
sys.path.append("~/5a-bucarest-vallee-cedric/asois/project")
import orange
class Filter:
def __init__(self):
print "init filt"
self.file=""
def isSpam(mail):
pass
def userDecision():
pass
class kwordFilter(Filter):
def __init__(self):
print "in... | ajibawa-2023/Python-Code-Large/train/row_5761 | 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_5761:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0811, 0.027, 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_5761:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5761:FunctionDef_L8_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5761:FunctionDef_L8_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5761:Expr_L9_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5762 | 28 | 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_5762:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 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_5762:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5762:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5762:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5762:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5763 | 48 | 119 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5763:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.1933, 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_5763:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5763:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5763:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5763:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5765 | 28 | 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_5765:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 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_5765:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5765:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5765:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_5765:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5766 | 41 | 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_5766:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 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_5766:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5766:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5766:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5766:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5767 | 23 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5767:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5767:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5767:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5767:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5767:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5769 | 43 | 79 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5769:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 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_5769:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5769:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5769:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5769:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5772 | 48 | 119 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5772:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.1933, 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_5772:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5772:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5772:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5772:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | ajibawa-2023/Python-Code-Large/train/row_5775 | 41 | 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_5775:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 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_5775:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5775:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5775:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5775:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Larg... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5777 | 23 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5777:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotati... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5777:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5777:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5777:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5777:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | ajibawa-2023/Python-Code-Large/train/row_5778 | 43 | 79 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5778:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 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_5778:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5778:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5778:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5778:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/... |
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/license... | ajibawa-2023/Python-Code-Large/train/row_5780 | 80 | 160 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5780:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0719, 0.1375, 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_5780:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5780:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5780:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5780:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#-------------------------------------------------------------------------------
# Name: analyze_graph
# Purpose:
#
# Author: Azfar Khandoker
#
# Created: 10/04/2013
# Copyright: (c) Azfar Khandoker 2013
# Licence: <your licence>
#-------------------------------------------------------------------... | ajibawa-2023/Python-Code-Large/train/row_5781 | 18 | 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_5781:ImportFrom_L12_C0", "label": "from igraph import *", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.2264, 0.0189, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5781:For_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5781:Expr_L49_C4"}] |
#-------------------------------------------------------------------------------
# Name: amazon_generator
# Purpose:
#
# Author: Azfar Khandoker
#
# Created: 17/04/2013
# Copyright: (c) Azfar Khandoker 2013
# Licence: <your licence>
#-------------------------------------------------------... | ajibawa-2023/Python-Code-Large/train/row_5782 | 20 | 73 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5782:ImportFrom_L12_C0", "label": "from igraph import *", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.1644, 0.0137, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5782:For_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5782:Assign_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5782:For_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5782:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5... |
#original Amazon data from
#http://snap.stanford.edu/data/bigdata/amazon/amazon-meta.txt.gz
f = open("amazon-meta.txt", "r")
#the ASIN id
count = 0
#dictionary associates an ASIN with
#its title and similar products
d = dict()
#list to keep the ASINs ordered according to
#order in which they were encountered
l = []
... | ajibawa-2023/Python-Code-Large/train/row_5783 | 24 | 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_5783:Assign_L3_C0", "label": "f = open()", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.0435, 0.0145, 0, 0.66, 0.0, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5783:For_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5783:If_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5783:If_L19_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5783:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5783:I... |
#!/bin/usr/python
from igraph import *
print "Filename: "
file = raw_input()
g = Graph.Read_GML(file)
print g.summary()
n = g.degree_distribution().n
f = open(file + "_deg_dist.csv", 'w')
for left, right, count in g.degree_distribution().bins():
print >>f, "%d,%f" % (left, float(float(count)/n))
f.close()
| ajibawa-2023/Python-Code-Large/train/row_5784 | 1 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5784:ImportFrom_L1_C0", "label": "from igraph import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "rhs_call_n... | [] |
from igraph import *
num_gs_only = 0; # gs = Google Sets
num_shared = 0;
num_not_gs = 0;
g_name = raw_input("Google sets graph: ")
g = Graph.Read_GML(g_name);
h_name = raw_input("Amazon graph: ")
h = Graph.Read_GML(h_name);
for v in g.vs:
query = v["label"]
query = query.tit... | ajibawa-2023/Python-Code-Large/train/row_5785 | 19 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5785:ImportFrom_L1_C0", "label": "from igraph import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0294, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "rhs_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5785:For_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5785:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5785:For_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5785:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5... |
#-------------------------------------------------------------------------------
# Name: wiki_generator
# Purpose: Generates subgraphs with k = 4 for the given seed words
#
# Author: Ryan Miller
#
# Created: 17/04/2013
# Copyright: (c) Not Azfar Khandoker 2013
# Licence: <your licence>
#------... | ajibawa-2023/Python-Code-Large/train/row_5786 | 23 | 53 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5786:ImportFrom_L12_C0", "label": "from igraph import *", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.2264, 0.0189, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5786:For_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5786:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5786:For_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5786:Expr_L43_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5786:... |
from igraph import *
import matplotlib.pyplot as plt
plt.figure()
g = Graph.Read_GML(raw_input())
dd = g.degree_distribution()
xs, ys = zip(*[(left, count / float(dd.n)) for left, _, count in dd.bins()])
plt.xscale('log')
plt.yscale('log')
plt.title(r"$\mathrm{"+name+"\ Degree\ Distribution}$")
plt... | ajibawa-2023/Python-Code-Large/train/row_5787 | 13 | 21 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5787:ImportFrom_L1_C0", "label": "from igraph import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0476, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "rhs_... | [] |
def cosine_similarity(g,i,j):
adj = g.get_adjacency()
n = 0.0
for k in range(adj.shape[0]):
n = n + (adj[i,k] * adj[k,j])
sim = n / math.sqrt(g.vs[i].degree() * g.vs[j].degree())
return sim
# warning: takes a long time
def all_cosine_similarity(g):
list = []
for i in range(len(g.vs)):
for j ... | ajibawa-2023/Python-Code-Large/train/row_5788 | 13 | 15 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5788:FunctionDef_L1_C0", "label": "cosine_similarity", "type": "function", "loc": [1, 7], "level": 0, "parent": null, "vector": [2, 0, 0.2667, 0.4667, 0, 0.66, 0.0, 567, 0, 3, 1, 0, 0, 0, 5], "semantic": {"name": "cosine_similarity", "arg_names": ["g", "i", "j"], "impor... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5788:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5788:Assign_L2_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5788:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5788:Assign_L3_C1"}, {"f": "ajibawa-2023/Python-Code-Large... |
#-------------------------------------------------------------------------------
# Name: edge_list_to_gml
# Purpose:
#
# Author: Azfar Khandoker
#
# Created: 17/04/2013
# Copyright: (c) Azfar Khandoker 2013
# Licence: <your licence>
#-------------------------------------------------------... | ajibawa-2023/Python-Code-Large/train/row_5789 | 13 | 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_5789:ImportFrom_L12_C0", "label": "from igraph import *", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.2667, 0.0222, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5789:For_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5789:Expr_L33_C4"}] |
#!/bin/usr/python
from igraph import *
print "Filename: "
file = raw_input()
g = Graph.Read_GML(file)
print g.summary()
n = g.degree_distribution().n
f = open(file + "_deg_dist.csv", 'w')
for left, right, count in g.degree_distribution().bins():
print >>f, "%d,%f" % (left, float(float(count)/n))
f.close()
| ajibawa-2023/Python-Code-Large/train/row_5790 | 1 | 2 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5790:ImportFrom_L1_C0", "label": "from igraph import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.5, 0, 0.66, 0.0, 107, 0, 1, 0, 0, 107, 0, 0], "semantic": {"name": "igraph", "arg_names": [], "import_names": ["*"], "rhs_call_n... | [] |
#!/usr/bin/python
import sys
W = {}
W['A'] = []
W['W'] = []
W['F'] = W['W']
for line in sys.stdin:
i = line.find ('#')
if i >= 0:
line = line[:i]
line = line.strip ()
if not len (line):
continue
fields = [x.strip () for x in line.split (';')]
chars = fields[0]
width = fields[1]
if width not in ['A', 'W... | ajibawa-2023/Python-Code-Large/train/row_5791 | 35 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5791:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0556, 0.0185, 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_5791:For_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5791:Assign_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5791:For_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5791:If_L12_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5791:... |
import sys
import gdb
# Update module path.
dir_ = '/usr/local/share/glib-2.0/gdb'
if not dir_ in sys.path:
sys.path.insert(0, dir_)
from glib import register
register (gdb.current_objfile ())
| ajibawa-2023/Python-Code-Large/train/row_5793 | 7 | 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_5793:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 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_5793:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5793:Expr_L7_C4"}] |
import gdb
# This is not quite right, as local vars may override symname
def read_global_var (symname):
return gdb.selected_frame().read_var(symname)
def g_quark_to_string (quark):
if quark == None:
return None
quark = long(quark)
if quark == 0:
return None
val = read_global_var ("... | ajibawa-2023/Python-Code-Large/train/row_5794 | 178 | 249 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5794:Import_L1_C0", "label": "gdb import gdb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.004, 0.004, 0, 0.66, 0.0, 430, 0, 1, 0, 0, 430, 0, 0], "semantic": {"name": "gdb", "arg_names": [], "import_names": ["gdb"], "rhs_call_name": "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5794:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5794:Return_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5794:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5794:If_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
import sys
import gdb
# Update module path.
dir_ = '/usr/local/share/glib-2.0/gdb'
if not dir_ in sys.path:
sys.path.insert(0, dir_)
from gobject import register
register (gdb.current_objfile ())
| ajibawa-2023/Python-Code-Large/train/row_5795 | 7 | 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_5795:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.1, 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_5795:If_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5795:Expr_L7_C4"}] |
import gdb
import glib
import gdb.backtrace
import gdb.command.backtrace
# This is not quite right, as local vars may override symname
def read_global_var (symname):
return gdb.selected_frame().read_var(symname)
def g_type_to_name (gtype):
def lookup_fundamental_type (typenode):
if typenode == 0:
... | ajibawa-2023/Python-Code-Large/train/row_5796 | 231 | 305 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5796:Import_L1_C0", "label": "gdb import gdb", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0033, 0.0033, 0, 0.66, 0.0, 430, 0, 1, 0, 0, 430, 0, 0], "semantic": {"name": "gdb", "arg_names": [], "import_names": ["gdb"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5796:FunctionDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5796:Return_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5796:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5796:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Cod... |
#!/usr/bin/env python
import gobject
import time
import dbus
import dbus.service
import dbus.mainloop.glib
class TestException(dbus.DBusException):
_dbus_error_name = 'com.example.TestException'
class TestService(dbus.service.Object):
# ---------------------------------------------------------------------... | ajibawa-2023/Python-Code-Large/train/row_5797 | 151 | 287 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5797:Import_L3_C0", "label": "gobject import gobject", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0105, 0.0035, 0, 0.66, 0.0, 90, 0, 1, 0, 0, 90, 0, 0], "semantic": {"name": "gobject", "arg_names": [], "import_names": ["gobject"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5797:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5797:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5797:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5797:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/env python
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at y... | ajibawa-2023/Python-Code-Large/train/row_5798 | 11 | 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_5798:Import_L25_C0", "label": "os import os", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.6098, 0.0244, 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_5798:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5798:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5798:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5798:If_L32_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5798:If... |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5799 | 251 | 325 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5799:Import_L24_C0", "label": "sys import sys", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0031, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5799:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5799:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5799:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5799:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5800 | 351 | 419 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5800:ImportFrom_L24_C0", "label": "from import utils", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.0573, 0.0024, 0, 0.66, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": ["utils"], "rhs_call_... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5800:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5800:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5800:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5800:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5801 | 3 | 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_5801:Assign_L24_C0", "label": "DATADIR =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.8889, 0.037, 0, 0.66, 0.0, 366, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DATADIR", "arg_names": [], "import_names": [], "rhs_call_... | [] |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5802 | 126 | 200 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5802:Import_L24_C0", "label": "sys import sys", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.12, 0.005, 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_5802:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5802:For_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5802:For_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5802:If_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5803 | 1,184 | 3,356 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5803:Import_L24_C0", "label": "sys import sys", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.0072, 0.0003, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5803:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5803:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5803:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_5803:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code... |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5804 | 59 | 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_5804:Import_L24_C0", "label": "distutils.version import distutils.version", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0096, 0, 0.66, 0.0, 42, 0, 1, 0, 0, 42, 0, 0], "semantic": {"name": "distutils.version", "arg_names": []... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5804:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5804:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5804:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5804:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5805 | 4 | 29 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5805:Import_L24_C0", "label": "os import os", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.8276, 0.0345, 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_5805:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5805:Expr_L29_C4"}] |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5806 | 3 | 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_5806:Assign_L24_C0", "label": "DATADIR =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.8889, 0.037, 0, 0.66, 0.0, 366, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DATADIR", "arg_names": [], "import_names": [], "rhs_call_... | [] |
# -*- Mode: Python -*-
# GDBus - GLib D-Bus Library
#
# Copyright (C) 2008-2011 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at ... | ajibawa-2023/Python-Code-Large/train/row_5807 | 210 | 290 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5807:Import_L24_C0", "label": "sys import sys", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.0828, 0.0034, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5807:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5807:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5807:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5807:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/env python
# -*- encoding:utf8 -*-
# protoc-gen-erl
# Google's Protocol Buffers project, ported to lua.
# https://code.google.com/p/protoc-gen-lua/
#
# Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com
# All rights reserved.
#
# Use, modification and distribution are subject to the "New BSD License"
#... | ajibawa-2023/Python-Code-Large/train/row_5808 | 295 | 450 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5808:Import_L13_C0", "label": "sys import sys", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0289, 0.0022, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5808:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5808:Import_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5808:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5808:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5808:... |
#!/usr/bin/python2
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 5sing-crawler contributors
#
# 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.... | ajibawa-2023/Python-Code-Large/train/row_5809 | 109 | 192 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5809:Assign_L19_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.099, 0.0052, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5809:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5809:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5809:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5809:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# Copyright 2011 Tom SF Haines
# 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 writing, softwar... | ajibawa-2023/Python-Code-Large/train/row_5810 | 150 | 196 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5810:Import_L11_C0", "label": "math import math", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0561, 0.0051, 0, 0.66, 0.0, 526, 0, 1, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math"], "rhs_call... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5810:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5810:Expr_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5810:ClassDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5810:Assign_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5811 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5811:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5811:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5811:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5811:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5811:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5812 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5812:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5812:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5812:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5812:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5812:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5813 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5813:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5814 | 3 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5814:ImportFrom_L15_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0125, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [],... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5815 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5815:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5815:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5815:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5815:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5815:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5816 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5816:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5816:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5816:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5816:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5816:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5817 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5817:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5818 | 3 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5818:ImportFrom_L15_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0125, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [],... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5819 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5819:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5819:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5819:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5819:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5819:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5820 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5820:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5820:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5820:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5820:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5820:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5821 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5821:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5822 | 3 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5822:ImportFrom_L15_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0125, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [],... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5823 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5823:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5823:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5823:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5823:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5823:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5824 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5824:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5824:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5824:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5824:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5824:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5825 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5825:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5826 | 3 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5826:ImportFrom_L15_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0125, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [],... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5827 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5827:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5827:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5827:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5827:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5827:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5828 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5828:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5828:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5828:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5828:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5828:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5829 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5829:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5830 | 3 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5830:ImportFrom_L15_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0125, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [],... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5831 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5831:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5831:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5831:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5831:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5831:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5832 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5832:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5832:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5832:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5832:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5832:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5833 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5833:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5834 | 3 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5834:ImportFrom_L15_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0125, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [],... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5835 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5835:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5835:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5835:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5835:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5835:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5836 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5836:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5836:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5836:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5836:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5836:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5837 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5837:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2011, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5838 | 3 | 80 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5838:ImportFrom_L15_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0125, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [],... | [] |
# -*- coding: utf-8 -*-
# Copyright (c) 2010, Tom SF Haines
# 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... | ajibawa-2023/Python-Code-Large/train/row_5839 | 28 | 51 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5839:Import_L15_C0", "label": "sys import sys", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2941, 0.0196, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5839:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5839:Expr_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5839:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5839:FunctionDef_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Larg... |
# -*- coding: utf-8 -*-
# Code copied from http://opencv.willowgarage.com/wiki/PythonInterface - license unknown, but presumed to be at least as liberal as bsd (The license for opencv.).
import cv
import numpy as np
def cv2array(im):
"""Converts a cv array to a numpy array."""
depth2dtype = {
cv.IPL_... | ajibawa-2023/Python-Code-Large/train/row_5840 | 18 | 54 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5840:Import_L7_C0", "label": "cv import cv", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1296, 0.0185, 0, 0.66, 0.0, 492, 0, 1, 0, 0, 492, 0, 0], "semantic": {"name": "cv", "arg_names": [], "import_names": ["cv"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_5840:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5840:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_5840:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_5840:Assign_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright (c) 2012, Tom SF Haines
# 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 conditions and the follo... | ajibawa-2023/Python-Code-Large/train/row_5841 | 2 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_5841:ImportFrom_L13_C0", "label": "from utils.start_cpp import start_cpp", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.1, 0.0077, 0, 0.66, 0.0, 972, 0, 1, 0, 0, 972, 0, 0], "semantic": {"name": "utils.start_cpp", "arg_names": [], "i... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.