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 |
|---|---|---|---|---|---|---|---|
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | ajibawa-2023/Python-Code-Large/train/row_76875 | 50 | 111 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76875:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76875:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76875:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76875:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76875:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Co... |
#!/usr/bin/python
import os
import subprocess
import sys
BASEDIR = '../main/src/com/joelapenna/foursquare'
TYPESDIR = '../captures/types/v1'
captures = sys.argv[1:]
if not captures:
captures = os.listdir(TYPESDIR)
for f in captures:
basename = f.split('.')[0]
javaname = ''.join([c.capitalize() for c in basena... | ajibawa-2023/Python-Code-Large/train/row_76876 | 20 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76876:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76876:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76876:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76876:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76876:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | ajibawa-2023/Python-Code-Large/train/row_76877 | 44 | 114 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76877:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76877:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76877:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76877:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76877:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
import time
t = time.time()
u = time.gmtime(t)
s = time.strftime('%a, %e %b %Y %T GMT', u)
print 'Content-Type: text/javascript'
print 'Cache-Control: no-cache'
print 'Date: ' + s
print 'Expires: ' + s
print ''
print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
| ajibawa-2023/Python-Code-Large/train/row_76878 | 10 | 11 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76878:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [] |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_76879 | 133 | 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_76879:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76879:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76879:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76879:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76879:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_76880 | 218 | 605 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76880:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76880:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76880:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76880:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76880:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_76882 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76882:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76882:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76882:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76882:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76882:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_76884 | 86 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76884:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76884:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76884:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76884:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76884:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_76886 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76886:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76886:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76886:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76886:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76886:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76887 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76887:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76887:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76887:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76887:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76887:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76889 | 396 | 1,139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76889:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76889:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76889:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76889:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76889:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76890 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76890:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76890:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76890:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76890:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76890:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76891 | 46 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76891:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76891:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76891:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76891:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76891:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_76892 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76892:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76893 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76893:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76893:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76893:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76893:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76893:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_76895 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76895:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76895:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76895:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76895:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76895:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76896 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76896:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76896:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76896:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76896:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76896:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76897 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76897:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76897:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76897:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76897:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76897:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76898 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76898:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76898:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76898:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76898:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76898:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76900 | 55 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76900:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76900:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76900:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76900:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76900:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76902 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76902:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76902:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76902:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76902:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76902:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76903 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76903:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76903:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76903:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76903:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76903:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_76904 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76904:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_76905 | 154 | 385 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76905:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76905:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76905:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76905:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76905:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_76906 | 56 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76906:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76906:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76906:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76906:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76906:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_76907 | 43 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76907:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76907:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76907:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76907:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76907:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_76909 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76909:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76909:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76909:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76909:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76909:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_76910 | 115 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76910:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76910:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76910:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76910:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_76910:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_76911 | 8 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76911:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76911:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76911:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76911:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76911:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_76912 | 10 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76912:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76912:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76912:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76912:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76912:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_76913 | 9 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76913:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76913:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76913:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76913:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76913:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_76915 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76915:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76915:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76915:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76915:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_76915:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
import logging
import urllib
from xml.etree import ElementTree as ET
from pprint import pformat
xml_to_dict_map = {
'CountryCode': 'country',
'RegionName': 'region_name',
'RegionCode': 'region_code',
'City': 'city'
}
def ip_info(ip):
"""
<?xml version="1.0" encoding="UTF-8"?>
<Respo... | ajibawa-2023/Python-Code-Large/train/row_76916 | 23 | 55 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76916:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0182, 0.0182, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76916:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76916:Expr_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76916:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76916:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code... |
import datetime
from google.appengine.ext import db
class MetricEntry(db.Model):
ip = db.StringProperty()
city = db.StringProperty()
region_code = db.StringProperty()
region_name = db.StringProperty()
country = db.StringProperty()
dt_version_major = db.IntegerProperty()
dt_version... | ajibawa-2023/Python-Code-Large/train/row_76917 | 13 | 16 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76917:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0625, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetim... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76917:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76917:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76917:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76917:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
from google.appengine.ext import webapp
from google.appengine.api import memcache
from google.appengine.ext.webapp.util import run_wsgi_app
from versionhandler import VersionHandler
from metrichandler import MetricHandler
class MainPage(webapp.RequestHandler):
def get(self):
self.response.headers... | ajibawa-2023/Python-Code-Large/train/row_76918 | 15 | 23 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76918:ImportFrom_L1_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0435, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76918:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76918:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76918:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76918:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Cod... |
import logging
import pprint
import re
from google.appengine.ext import webapp
from metricentry import MetricEntry
from utils import ip_info
CURRENT_VERSION = "0.6.10"
RX_VERSION_CHUNKER = re.compile(r"\s*DwarfTherapist\s+(\d+)\.(\d+)\.(\d+)\s*")
class VersionHandler(webapp.RequestHandler):
def get(self,... | ajibawa-2023/Python-Code-Large/train/row_76919 | 27 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76919:Import_L1_C0", "label": "logging import logging", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76919:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76919:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76919:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76919:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-... |
from google.appengine.ext import webapp
import pprint
import logging
class MetricHandler(webapp.RequestHandler):
def get(self, *args):
self.response.headers['Content-Type'] = 'text/html'
info = ip_info("96.253.131.222")
self.response.out.write("Metrics must be posted! %s<br/>%s" % (... | ajibawa-2023/Python-Code-Large/train/row_76920 | 12 | 17 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76920:ImportFrom_L1_C0", "label": "from google.appengine.ext import webapp", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0588, 0, 0.66, 0.0, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76920:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76920:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76920:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76920:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_76921 | 133 | 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_76921:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0557, 0.0033, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76921:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76921:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76921:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76921:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | ajibawa-2023/Python-Code-Large/train/row_76922 | 218 | 605 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76922:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0281, 0.0017, 0, 0.66, 0.0, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76922:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76922:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76922:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76922:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | ajibawa-2023/Python-Code-Large/train/row_76924 | 51 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76924:Expr_L32_C0", "label": "expression", "type": "expression", "loc": [32, 36], "level": 0, "parent": null, "vector": [8, 0, 0.1818, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76924:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76924:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76924:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76924:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | ajibawa-2023/Python-Code-Large/train/row_76926 | 86 | 244 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76926:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0738, 0.0041, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76926:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76926:Expr_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76926:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76926:FunctionDef_L39_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off o... | ajibawa-2023/Python-Code-Large/train/row_76928 | 155 | 378 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76928:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0437, 0.0741, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76928:ClassDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76928:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76928:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76928:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76929 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76929:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76929:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76929:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76929:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76929:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76931 | 396 | 1,139 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76931:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0145, 0.0035, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76931:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76931:ImportFrom_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76931:Try_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76931:ImportFrom_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76932 | 33 | 105 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76932:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1619, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76932:ClassDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76932:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76932:ClassDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76932:Expr_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76933 | 46 | 106 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76933:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1604, 0.0472, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76933:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76933:Expr_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76933:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76933:FunctionDef_L35_C2"}, {"f": "ajibawa-2023/Python-Code-... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_76934 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76934:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76935 | 63 | 124 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76935:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1371, 0.0403, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76935:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76935:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76935:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76935:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_76937 | 57 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76937:Expr_L5_C0", "label": "expression", "type": "expression", "loc": [5, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0814, 0.1105, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76937:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76937:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76937:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76937:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76938 | 114 | 303 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76938:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 58], "level": 0, "parent": null, "vector": [8, 0, 0.1205, 0.1452, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76938:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76938:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76938:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76938:FunctionDef_L71_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76939 | 7 | 32 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76939:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.5312, 0.1562, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76939:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76939:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76939:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76939:Try_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76940 | 201 | 483 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76940:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0342, 0.0083, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76940:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76940:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76940:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76940:ImportFrom_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76942 | 55 | 135 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76942:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1259, 0.037, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annot... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76942:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76942:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76942:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76942:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76944 | 28 | 63 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76944:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.2619, 0.0635, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76944:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76944:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76944:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76944:FunctionDef_L31_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_76945 | 29 | 56 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76945:Import_L15_C0", "label": "apiclient import apiclient", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.2679, 0.0179, 0, 0.66, 0.0, 629, 0, 1, 0, 0, 629, 0, 0], "semantic": {"name": "apiclient", "arg_names": [], "import_names": ["a... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76945:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76945:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76945:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76945:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
__version__ = "1.0c2"
| ajibawa-2023/Python-Code-Large/train/row_76946 | 1 | 1 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76946:Assign_L1_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [1, 1], "level": 0, "parent": null, "vector": [14, 0, 1.0, 1.0, 0, 0.66, 0.0, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call... | [] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_76947 | 154 | 385 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76947:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0519, 0.0182, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76947:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76947:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76947:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76947:FunctionDef_L53_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | ajibawa-2023/Python-Code-Large/train/row_76948 | 56 | 123 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76948:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1545, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76948:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76948:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76948:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76948:Expr_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/t... |
"""
iri2uri
Converts an IRI to a URI.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright 2006, Joe Gregorio"
__contributors__ = []
__version__ = "1.0.0"
__license__ = "MIT"
__history__ = """
"""
import urlparse
# Convert an IRI to a URI following the rules in RFC 3987
#
# The characte... | ajibawa-2023/Python-Code-Large/train/row_76949 | 43 | 110 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76949:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0318, 0.0545, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76949:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76949:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76949:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76949:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Co... |
"""SocksiPy - Python SOCKS module.
Version 1.00
Copyright 2006 Dan-Haim. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
... | ajibawa-2023/Python-Code-Large/train/row_76951 | 213 | 438 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76951:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 31], "level": 0, "parent": null, "vector": [8, 0, 0.0365, 0.0708, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annota... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76951:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76951:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76951:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76951:Assign_L102_C4"}, {"f": "ajibawa-2023/Python-Cod... |
import Cookie
import datetime
import time
import email.utils
import calendar
import base64
import hashlib
import hmac
import re
import logging
# Ripped from the Tornado Framework's web.py
# http://github.com/facebook/tornado/commit/39ac6d169a36a54bb1f6b9bf1fdebb5c9da96e09
#
# Tornado is licensed under the Apache Licen... | ajibawa-2023/Python-Code-Large/train/row_76952 | 115 | 168 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76952:Import_L1_C0", "label": "Cookie import Cookie", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.006, 0, 0.66, 0.0, 32, 0, 1, 0, 0, 32, 0, 0], "semantic": {"name": "Cookie", "arg_names": [], "import_names": ["Cookie"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76952:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76952:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76952:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_76952:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code... |
# This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | ajibawa-2023/Python-Code-Large/train/row_76953 | 8 | 18 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76953:Assign_L3_C0", "label": "manual_verstr =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0556, 0, 0.66, 0.0, 189, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "manual_verstr", "arg_names": [], "import_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76953:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76953:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76953:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76953:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_76954 | 10 | 41 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76954:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.2927, 0.561, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76954:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76954:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76954:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76954:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-... |
"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | ajibawa-2023/Python-Code-Large/train/row_76955 | 9 | 40 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76955:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 23], "level": 0, "parent": null, "vector": [8, 0, 0.3, 0.575, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76955:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76955:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76955:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76955:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | ajibawa-2023/Python-Code-Large/train/row_76957 | 112 | 147 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76957:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0204, 0.0068, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76957:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76957:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76957:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_76957:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
#====================================================================
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you ... | ajibawa-2023/Python-Code-Large/train/row_76958 | 38 | 74 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76958:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76958:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76958:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76958:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76958:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, notes module.
# Copyright (C) 2008-2009, Bart Spaans
# Copyright (C) 2011, Carlo Stemberger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | ajibawa-2023/Python-Code-Large/train/row_76959 | 63 | 172 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76959:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1395, 0.0407, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76959:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76959:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76959:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76959:If_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Music theory Python package, intervals module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation... | ajibawa-2023/Python-Code-Large/train/row_76960 | 219 | 511 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76960:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 32], "level": 0, "parent": null, "vector": [8, 0, 0.0509, 0.0254, 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_76960:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76960:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76960:FunctionDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76960:If_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, progressions module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwar... | ajibawa-2023/Python-Code-Large/train/row_76962 | 233 | 498 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76962:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0502, 0.0221, 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_76962:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76962:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76962:FunctionDef_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76962:If_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, mt_exceptions module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwa... | ajibawa-2023/Python-Code-Large/train/row_76963 | 6 | 48 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76963:ClassDef_L20_C0", "label": "Error", "type": "class", "loc": [20, 22], "level": 0, "parent": null, "vector": [3, 0, 0.4375, 0.0625, 0, 0.66, 0.0, 529, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "Error", "arg_names": [], "import_names": [], "rhs_call_name": "", "a... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, scales module.
# Copyright (C) 2008-2009, Bart Spaans
# Copyright (C) 2011, Carlo Stemberger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | ajibawa-2023/Python-Code-Large/train/row_76964 | 271 | 606 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76964:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 53], "level": 0, "parent": null, "vector": [8, 0, 0.0611, 0.0545, 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_76964:FunctionDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76964:Expr_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76964:FunctionDef_L60_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76964:Assign_L69_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Mingus - Music theory Python module, core package.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwa... | ajibawa-2023/Python-Code-Large/train/row_76965 | 1 | 30 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76965:Assign_L20_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [20, 30], "level": 0, "parent": null, "vector": [14, 0, 0.8333, 0.3667, 0, 0.66, 0.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_cal... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, meter module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Found... | ajibawa-2023/Python-Code-Large/train/row_76966 | 27 | 83 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76966:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 24], "level": 0, "parent": null, "vector": [8, 0, 0.2651, 0.0602, 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_76966:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76966:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76966:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76966:If_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, value module.
# Copyright (C) 2008-2009, Bart Spaans, Javier Palanca
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... | ajibawa-2023/Python-Code-Large/train/row_76967 | 71 | 275 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76967:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 39], "level": 0, "parent": null, "vector": [8, 0, 0.1073, 0.0727, 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_76967:FunctionDef_L125_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76967:Expr_L126_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76967:FunctionDef_L125_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76967:Return_L132_C4"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, keys module.
# Copyright (C) 2010-2011, Carlo Stemberger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software F... | ajibawa-2023/Python-Code-Large/train/row_76968 | 87 | 191 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76968:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 23], "level": 0, "parent": null, "vector": [8, 0, 0.1126, 0.0209, 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_76968:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76968:Expr_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76968:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76968:For_L57_C4"}, {"f": "ajibawa-2023/Python-Code-La... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, bar module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundat... | ajibawa-2023/Python-Code-Large/train/row_76969 | 155 | 251 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76969:ImportFrom_L20_C0", "label": "from mingus.core import _meter", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0797, 0.004, 0, 0.66, 0.0, 962, 0, 1, 0, 0, 962, 0, 0], "semantic": {"name": "mingus.core", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76969:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76969:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76969:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76969:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, track module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Found... | ajibawa-2023/Python-Code-Large/train/row_76970 | 113 | 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_76970:ImportFrom_L20_C0", "label": "from mt_exceptions import InstrumentRangeError", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0913, 0.0046, 0, 0.66, 0.0, 416, 0, 1, 0, 0, 416, 0, 0], "semantic": {"name": "mt_exceptions", "arg_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76970:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76970:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76970:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76970:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, composition module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software... | ajibawa-2023/Python-Code-Large/train/row_76971 | 56 | 113 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76971:ImportFrom_L20_C0", "label": "from mt_exceptions import UnexpectedObjectError", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.177, 0.0088, 0, 0.66, 0.0, 416, 0, 1, 0, 0, 416, 0, 0], "semantic": {"name": "mt_exceptions", "arg_nam... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76971:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76971:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76971:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76971:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, instrument module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software ... | ajibawa-2023/Python-Code-Large/train/row_76972 | 62 | 256 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76972:ImportFrom_L20_C0", "label": "from mingus.containers.note import Note", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0781, 0.0039, 0, 0.66, 0.0, 594, 0, 1, 0, 0, 594, 0, 0], "semantic": {"name": "mingus.containers.note", "arg_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76972:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76972:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76972:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76972:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, suite module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Found... | ajibawa-2023/Python-Code-Large/train/row_76973 | 36 | 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_76973:ImportFrom_L20_C0", "label": "from mt_exceptions import UnexpectedObjectError", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0125, 0, 0.66, 0.0, 416, 0, 1, 0, 0, 416, 0, 0], "semantic": {"name": "mt_exceptions", "arg_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76973:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76973:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76973:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76973:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, mt_exceptions module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwa... | ajibawa-2023/Python-Code-Large/train/row_76974 | 4 | 38 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76974:ClassDef_L20_C0", "label": "NoteFormatError", "type": "class", "loc": [20, 22], "level": 0, "parent": null, "vector": [3, 0, 0.5526, 0.0789, 0, 0.66, 0.0, 667, 0, 0, 0, 0, 645, 0, 0], "semantic": {"name": "NoteFormatError", "arg_names": [], "import_names": [], "rh... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, containers package.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software... | ajibawa-2023/Python-Code-Large/train/row_76975 | 7 | 26 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76975:ImportFrom_L20_C0", "label": "from note import Note", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.7692, 0.0385, 0, 0.66, 0.0, 952, 0, 1, 0, 0, 952, 0, 0], "semantic": {"name": "note", "arg_names": [], "import_names": ["Note"],... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, note module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Founda... | ajibawa-2023/Python-Code-Large/train/row_76976 | 136 | 292 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76976:ImportFrom_L20_C0", "label": "from mingus.core import notes, intervals", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0685, 0.0034, 0, 0.66, 0.0, 962, 0, 2, 0, 0, 962, 0, 0], "semantic": {"name": "mingus.core", "arg_names": [],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76976:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76976:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76976:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76976:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, note_container module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softw... | ajibawa-2023/Python-Code-Large/train/row_76977 | 188 | 358 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76977:ImportFrom_L20_C0", "label": "from note import Note", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0559, 0.0028, 0, 0.66, 0.0, 952, 0, 1, 0, 0, 952, 0, 0], "semantic": {"name": "note", "arg_names": [], "import_names": ["Note"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76977:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76977:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76977:ClassDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76977:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either v... | ajibawa-2023/Python-Code-Large/train/row_76978 | 1 | 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_76978:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 20], "level": 0, "parent": null, "vector": [8, 0, 0.9524, 0.0476, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, sequencer module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software F... | ajibawa-2023/Python-Code-Large/train/row_76979 | 198 | 363 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76979:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 29], "level": 0, "parent": null, "vector": [8, 0, 0.0675, 0.0275, 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_76979:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76979:Expr_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76979:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76979:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, midi_file_out module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwa... | ajibawa-2023/Python-Code-Large/train/row_76980 | 111 | 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_76980:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1206, 0.0118, 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_76980:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76980:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76980:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76980:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Headers
FILE_HEADER = 'MThd'
TRACK_HEADER = 'MTrk'
# MIDI Channel Events
NOTE_OFF = 0x08
NOTE_ON = 0x09
NOTE_AFTERTOUCH = 0x0A
CONTROLLER = 0x0B
PROGRAM_CHANGE = 0x0C
CHANNEL_AFTERTOUCH = 0x0D
PITCH_BEND = 0x0E
META_EVENT = '\xff'
# MIDI Controller Type
BANK_SELECT = 0x00
... | ajibawa-2023/Python-Code-Large/train/row_76981 | 36 | 46 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76981:Assign_L5_C0", "label": "FILE_HEADER =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1087, 0.0217, 0, 0.66, 0.0, 284, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FILE_HEADER", "arg_names": [], "import_names": [], "rh... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, fluidsynth module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software ... | ajibawa-2023/Python-Code-Large/train/row_76982 | 97 | 211 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76982:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 32], "level": 0, "parent": null, "vector": [8, 0, 0.1232, 0.0616, 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_76982:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76982:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76982:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76982:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, midi_file_in module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwar... | ajibawa-2023/Python-Code-Large/train/row_76983 | 205 | 392 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76983:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 20], "level": 0, "parent": null, "vector": [8, 0, 0.051, 0.0026, 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_76983:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76983:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76983:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76983:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, sequencer_observer module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | ajibawa-2023/Python-Code-Large/train/row_76984 | 47 | 117 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76984:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2009, 0.0684, 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_76984:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76984:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76984:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76984:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# mingus - Music theory Python package, win32midisequencer module.
# Copyright (C) 2008-2010, Bart Spaans, Ben Fisher
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either... | ajibawa-2023/Python-Code-Large/train/row_76985 | 25 | 65 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76985:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 25], "level": 0, "parent": null, "vector": [8, 0, 0.3231, 0.1385, 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_76985:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76985:Import_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76985:If_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76985:ImportFrom_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, midi package.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Found... | ajibawa-2023/Python-Code-Large/train/row_76986 | 3 | 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_76986:ImportFrom_L20_C0", "label": "from sequencer import Sequencer", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.6897, 0.0345, 0, 0.66, 0.0, 253, 0, 1, 0, 0, 253, 0, 0], "semantic": {"name": "sequencer", "arg_names": [], "import_na... | [] |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# pyFluidSynth
#
# Python bindings for FluidSynth
#
# Copyright 2008-2009, Nathan Whitehead <nwhitehe@gmail.com>
# Currently maintained by Bart Spaans <onderstekop@gmail.com>
# Released under the LGPL
"""Python bindings for FluidSynth.
FluidSynth is a software... | ajibawa-2023/Python-Code-Large/train/row_76987 | 91 | 178 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76987:Import_L1_C0", "label": "time import time", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0056, 0.0056, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_n... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76987:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76987:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76987:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76987:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, midi_track module.
# Copyright (C) 2008-2009, Bart Spaans
# Copyright (C) 2011, Carlo Stemberger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licen... | ajibawa-2023/Python-Code-Large/train/row_76988 | 177 | 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_76988:Expr_L21_C0", "label": "expression", "type": "expression", "loc": [21, 25], "level": 0, "parent": null, "vector": [8, 0, 0.0793, 0.0172, 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_76988:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76988:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76988:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76988:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Real-time MIDI playback in Win32
# No extra dlls or modules needed, uses built-in ctypes module.
# By Ben Fisher, 2009, GPLv3
# referencing code:
# http://www.sabren.net/rants/2000/01/20000129a.php3 (uses out-of-date libraries)
# http://msdn.microsoft.com/en-us/library/ms711632.aspx
# Note: will raise Win3... | ajibawa-2023/Python-Code-Large/train/row_76989 | 52 | 93 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76989:Import_L12_C0", "label": "sys import sys", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.129, 0.0108, 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_76989:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76989:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76989:FunctionDef_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_76989:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, fft module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundat... | ajibawa-2023/Python-Code-Large/train/row_76990 | 98 | 187 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76990:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 24], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.0267, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "anno... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_76990:For_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76990:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76990:FunctionDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76990:Expr_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/tra... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, tunings module.
# Copyright (C) 2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundati... | ajibawa-2023/Python-Code-Large/train/row_76991 | 311 | 701 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76991:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 21], "level": 0, "parent": null, "vector": [8, 0, 0.0292, 0.0029, 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_76991:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76991:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76991:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76991:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, lilypond module.
# Copyright (C) 2008-2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fo... | ajibawa-2023/Python-Code-Large/train/row_76992 | 110 | 228 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76992:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 24], "level": 0, "parent": null, "vector": [8, 0, 0.0965, 0.0219, 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_76992:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76992:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76992:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76992:If_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, tablature module.
# Copyright (C) 2009, Bart Spaans
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Founda... | ajibawa-2023/Python-Code-Large/train/row_76994 | 228 | 441 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_76994:Expr_L20_C0", "label": "expression", "type": "expression", "loc": [20, 20], "level": 0, "parent": null, "vector": [8, 0, 0.0454, 0.0023, 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_76994:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76994:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_76994:FunctionDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_76994:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.