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 |
|---|---|---|---|---|---|---|---|
'''
Created on Dec 4, 2011
@author: ppa
'''
from ultrafinance.dam.DAMFactory import DAMFactory
from os import path
import optparse
from threading import Thread
from threading import Lock
BATCH_SIZE = 30
THREAD_TIMEOUT = 5
MAX_TRY = 3
class FundamentalCrawler(object):
''' collect fundamental for a list of symbol... | ajibawa-2023/Python-Code-Large/train/row_81110 | 89 | 144 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81110:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0208, 0.0347, 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_81110:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81110:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81110:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81110:FunctionDef_L19_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#! -*- python -*-
#
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import make_nacl_env
import os
#src_dir = os.path.abspath("c")
src_dir = "c"
nacl_env = make_nacl_env.NaClEnvironment(nacl_pla... | ajibawa-2023/Python-Code-Large/train/row_81111 | 11 | 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_81111:Import_L7_C0", "label": "make_nacl_env import make_nacl_env", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.2333, 0.0333, 0, 0.66, 0.0, 70, 0, 1, 0, 0, 70, 0, 0], "semantic": {"name": "make_nacl_env", "arg_names": [], "import_name... | [] |
#!/usr/bin/python
#
# Copyright (c) 2011, The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
"""A tiny web server.
This is intended to be used for testing, and only run from within the examples
directory.
"""
import... | ajibawa-2023/Python-Code-Large/train/row_81112 | 69 | 126 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81112:Expr_L8_C0", "label": "expression", "type": "expression", "loc": [8, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0794, 0.0397, 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_81112:FunctionDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81112:If_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81112:If_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81112:Return_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
'''
Module which prompts the user for translations and saves them.
TODO: implement
@author: Rodrigo Damazio
'''
class Translator(object):
'''
classdocs
'''
def __init__(self, language):
'''
Constructor
'''
self._language = language
def Translate(self, string_names):
print string_names | ajibawa-2023/Python-Code-Large/train/row_81113 | 8 | 21 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81113:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81113:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81113:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81113:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81113:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
'''
Module which brings history information about files from Mercurial.
@author: Rodrigo Damazio
'''
import re
import subprocess
REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')
def _GetOutputLines(args):
'''
Runs an external process and returns its output as a list of lines.
@param args: the argume... | ajibawa-2023/Python-Code-Large/train/row_81114 | 38 | 94 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81114:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81114:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81114:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81114:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81114:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code... |
'''
Module which parses a string XML file.
@author: Rodrigo Damazio
'''
from xml.parsers.expat import ParserCreate
import re
#import xml.etree.ElementTree as ET
class StringsParser(object):
'''
Parser for string XML files.
This object is not thread-safe and should be used for parsing a single file at
a time... | ajibawa-2023/Python-Code-Large/train/row_81115 | 54 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81115:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81115:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81115:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81115:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81115:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/python
'''
Entry point for My Tracks i18n tool.
@author: Rodrigo Damazio
'''
import mytracks.files
import mytracks.translate
import mytracks.validate
import sys
def Usage():
print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0]
print 'Commands are:'
print ' cleanup'
print ' translate'
p... | ajibawa-2023/Python-Code-Large/train/row_81116 | 58 | 96 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81116:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81116:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81116:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81116:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81116:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Module which compares languague files to the master file and detects
issues.
@author: Rodrigo Damazio
'''
import os
from mytracks.parser import StringsParser
import mytracks.history
class Validator(object):
def __init__(self, languages):
'''
Builds a strings file validator.
Params:
@para... | ajibawa-2023/Python-Code-Large/train/row_81117 | 65 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81117:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81117:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81117:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81117:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81117:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
'''
Module for dealing with resource files (but not their contents).
@author: Rodrigo Damazio
'''
import os.path
from glob import glob
import re
MYTRACKS_RES_DIR = 'MyTracks/res'
ANDROID_MASTER_VALUES = 'values'
ANDROID_VALUES_MASK = 'values-*'
def GetMyTracksDir():
'''
Returns the directory in which the MyTrac... | ajibawa-2023/Python-Code-Large/train/row_81118 | 25 | 45 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81118:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81118:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81118:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81118:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81118:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code... |
'''
Module which brings history information about files from Mercurial.
@author: Rodrigo Damazio
'''
import re
import subprocess
REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')
def _GetOutputLines(args):
'''
Runs an external process and returns its output as a list of lines.
@param args: the argume... | ajibawa-2023/Python-Code-Large/train/row_81119 | 38 | 94 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81119:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81119:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81119:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81119:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81119:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/python
'''
Entry point for My Tracks i18n tool.
@author: Rodrigo Damazio
'''
import mytracks.files
import mytracks.translate
import mytracks.validate
import sys
def Usage():
print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0]
print 'Commands are:'
print ' cleanup'
print ' translate'
p... | ajibawa-2023/Python-Code-Large/train/row_81120 | 58 | 96 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81120:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81120:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81120:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81120:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81120:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-L... |
'''
Module which prompts the user for translations and saves them.
TODO: implement
@author: Rodrigo Damazio
'''
class Translator(object):
'''
classdocs
'''
def __init__(self, language):
'''
Constructor
'''
self._language = language
def Translate(self, string_names):
print string_names | ajibawa-2023/Python-Code-Large/train/row_81121 | 8 | 21 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81121:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81121:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81121:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81121:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81121:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-La... |
'''
Module which compares languague files to the master file and detects
issues.
@author: Rodrigo Damazio
'''
import os
from mytracks.parser import StringsParser
import mytracks.history
class Validator(object):
def __init__(self, languages):
'''
Builds a strings file validator.
Params:
@para... | ajibawa-2023/Python-Code-Large/train/row_81122 | 65 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81122:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81122:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81122:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81122:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81122:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Co... |
'''
Module for dealing with resource files (but not their contents).
@author: Rodrigo Damazio
'''
import os.path
from glob import glob
import re
MYTRACKS_RES_DIR = 'MyTracks/res'
ANDROID_MASTER_VALUES = 'values'
ANDROID_VALUES_MASK = 'values-*'
def GetMyTracksDir():
'''
Returns the directory in which the MyTrac... | ajibawa-2023/Python-Code-Large/train/row_81123 | 25 | 45 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81123:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81123:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81123:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81123:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81123:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code... |
'''
Module which parses a string XML file.
@author: Rodrigo Damazio
'''
from xml.parsers.expat import ParserCreate
import re
#import xml.etree.ElementTree as ET
class StringsParser(object):
'''
Parser for string XML files.
This object is not thread-safe and should be used for parsing a single file at
a time... | ajibawa-2023/Python-Code-Large/train/row_81124 | 54 | 115 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81124:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotat... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81124:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81124:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81124:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81124:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-... |
import datetime
import time
import os
import htmllib, formatter, urllib, urlparse
DBG = 0
TRC = 1
WARN = 2
ERR = 3
LOG_LEVEL = DBG
LOG_TYPE_INFO = {DBG:"DEBUG", TRC:"TRACE", WARN:"WARNING", ERR:"ERROR"}
class Log(object):
@classmethod
def init(cls):
dateStr = Log.getEscapedDateStr... | ajibawa-2023/Python-Code-Large/train/row_81127 | 64 | 99 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81127:Import_L1_C0", "label": "datetime import datetime", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0101, 0.0101, 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_81127:ClassDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81127:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81127:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81127:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-... |
class Utils(object):
@classmethod
def removeEmptyLines(cls, lines):
lns = list()
for ln in lines:
if ln.strip() != "":
lns.append(ln)
return lns | ajibawa-2023/Python-Code-Large/train/row_81128 | 7 | 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_81128:ClassDef_L3_C0", "label": "Utils", "type": "class", "loc": [3, 11], "level": 0, "parent": null, "vector": [3, 0, 0.6364, 0.8182, 0, 0.66, 0.0, 842, 0, 1, 0, 0, 186, 0, 3], "semantic": {"name": "Utils", "arg_names": [], "import_names": [], "rhs_call_name": "", "ann... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81128:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81128:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81128:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81128:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
import os, subprocess
APP_NAME = "cherrytree"
LOCALE_DIR = os.getcwd()
for dirpath, dirnames, filenames in os.walk(LOCALE_DIR):
for filename in filenames:
if dirpath == LOCALE_DIR:
nation, ext = os.path.splitext(filename)
if ext != ".po": continue
... | ajibawa-2023/Python-Code-Large/train/row_81129 | 11 | 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_81129:Import_L3_C0", "label": "os import os, subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0625, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "subproc... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81129:For_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81129:For_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81129:For_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81129:If_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81129... |
#!/usr/bin/env python
import os, subprocess
APP_NAME = "cherrytree"
LOCALE_DIR = os.getcwd()
for dirpath, dirnames, filenames in os.walk(LOCALE_DIR):
for filename in filenames:
if dirpath == LOCALE_DIR:
nation, ext = os.path.splitext(filename)
if ext != ".po": continue
... | ajibawa-2023/Python-Code-Large/train/row_81130 | 16 | 19 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81130:Import_L3_C0", "label": "os import os, subprocess", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1579, 0.0526, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "subproc... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81130:For_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81130:For_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81130:For_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81130:If_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81130... |
# -*- coding: UTF-8 -*-
#
# codeboxes.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 versio... | ajibawa-2023/Python-Code-Large/train/row_81132 | 193 | 239 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81132:Import_L22_C0", "label": "gtk import gtk, gtksourceview2, pango", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0921, 0.0042, 0, 0.66, 0.0, 166, 0, 3, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81132:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81132:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81132:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81132:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: UTF-8 -*-
#
# main.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version 2 o... | ajibawa-2023/Python-Code-Large/train/row_81134 | 175 | 234 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81134:Import_L22_C0", "label": "gtk import gtk, gobject", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.094, 0.0043, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "gobj... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81134:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81134:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81134:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81134:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: UTF-8 -*-
#
# findreplace.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 vers... | ajibawa-2023/Python-Code-Large/train/row_81135 | 511 | 581 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81135:Import_L22_C0", "label": "gtk import gtk, gobject", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0379, 0.0017, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "gob... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81135:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81135:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81135:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81135:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: UTF-8 -*-
#
# config.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version 2... | ajibawa-2023/Python-Code-Large/train/row_81137 | 406 | 458 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81137:Import_L22_C0", "label": "os import os, sys, ConfigParser\u2026", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.048, 0.0022, 0, 0.66, 0.0, 688, 0, 7, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81137:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81137:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81137:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81137:If_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# -*- coding: UTF-8 -*-
#
# clipboard.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 versio... | ajibawa-2023/Python-Code-Large/train/row_81138 | 376 | 474 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81138:Import_L22_C0", "label": "gtk import gtk, os, xml.dom.minidom\u2026", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0464, 0.0021, 0, 0.66, 0.0, 166, 0, 6, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81138:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81138:Expr_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81138:ClassDef_L37_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81138:FunctionDef_L40_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: UTF-8 -*-
#
# cons.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version 2 o... | ajibawa-2023/Python-Code-Large/train/row_81139 | 137 | 1,073 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81139:Import_L22_C0", "label": "os import os, sys", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0205, 0.0009, 0, 0.66, 0.0, 688, 0, 2, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", "sys"], "rhs... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81139:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81139:Assign_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81139:If_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81139:Assign_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row... |
# -*- coding: UTF-8 -*-
#
# machines.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version... | ajibawa-2023/Python-Code-Large/train/row_81140 | 671 | 809 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81140:Import_L22_C0", "label": "gtk import gtk, xml.dom.minidom, re\u2026", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0272, 0.0012, 0, 0.66, 0.0, 166, 0, 6, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81140:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81140:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81140:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81140:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: UTF-8 -*-
#
# support.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version ... | ajibawa-2023/Python-Code-Large/train/row_81141 | 331 | 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_81141:Import_L22_C0", "label": "gtk import gtk, os", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0561, 0.0026, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "os"], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81141:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81141:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81141:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81141:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code... |
# -*- coding: UTF-8 -*-
#
# tablez.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version 2... | ajibawa-2023/Python-Code-Large/train/row_81142 | 377 | 456 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81142:Import_L22_C0", "label": "gtk import gtk, pango", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0482, 0.0022, 0, 0.66, 0.0, 166, 0, 2, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk", "pango... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81142:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81142:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81142:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81142:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: UTF-8 -*-
#
# ctdb.py
#
# Copyright 2012 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version 2 of the... | ajibawa-2023/Python-Code-Large/train/row_81144 | 472 | 573 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81144:Import_L22_C0", "label": "gtk import gtk", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0384, 0.0017, 0, 0.66, 0.0, 166, 0, 1, 0, 0, 166, 0, 0], "semantic": {"name": "gtk", "arg_names": [], "import_names": ["gtk"], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81144:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81144:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81144:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81144:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: UTF-8 -*-
#
# exports.py
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 version ... | ajibawa-2023/Python-Code-Large/train/row_81146 | 594 | 781 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81146:Import_L22_C0", "label": "os import os, cgi, base64\u2026", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.0282, 0.0013, 0, 0.66, 0.0, 688, 0, 5, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81146:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81146:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81146:ClassDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81146:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-... |
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
#
# cherrytree
#
# Copyright 2009-2013 Giuseppe Penone <giuspen@gmail.com>
#
# 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 Foun... | ajibawa-2023/Python-Code-Large/train/row_81147 | 35 | 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_81147:Import_L23_C0", "label": "os import os, sys, __builtin__", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.3538, 0.0154, 0, 0.66, 0.0, 688, 0, 3, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os",... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81147:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81147:Import_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81147:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81147:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/r... |
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
import os, re, argparse, glob, gtk
parser = argparse.ArgumentParser()
parser.add_argument("source_file", help="source svg file")
parser.add_argument("dest_dir", help="destination directory")
args = parser.parse_args()
pixbuf = gtk.gdk.pixbuf_new_from_file(args.source_f... | ajibawa-2023/Python-Code-Large/train/row_81148 | 8 | 14 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81148:Import_L4_C0", "label": "os import os, re, argparse\u2026", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.2857, 0.0714, 0, 0.66, 0.0, 688, 0, 5, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os", ... | [] |
'''
Created on 21-03-2011
@author: maciek
'''
def formatString(format, **kwargs):
'''
'''
if not format: return ''
for arg in kwargs.keys():
format = format.replace("{" + arg + "}", "##" + arg + "##")
format = format.replace ("{", "{{")
format = format.replace("}", "}}")
for... | ajibawa-2023/Python-Code-Large/train/row_81149 | 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_81149:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1304, 0.2174, 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_81149:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81149:Expr_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81149:FunctionDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81149:If_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/... |
'''
Created on 21-03-2011
@author: maciek
'''
from IndexGenerator import IndexGenerator
from optparse import OptionParser
import os
import tempfile
import shutil
import logging
logging.basicConfig(level = logging.DEBUG)
parser = OptionParser()
parser.add_option('-n', '--app-name', action='store', dest='appName', hel... | ajibawa-2023/Python-Code-Large/train/row_81150 | 69 | 88 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81150:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0341, 0.0568, 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_81150:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81150:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81150:If_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81150:If_L28_C0"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81150... |
'''
Created on 21-03-2011
@author: maciek
'''
from formater import formatString
import os
class IndexGenerator(object):
'''
Generates Index.html for iOS app OTA distribution
'''
basePath = os.path.dirname(__file__)
templateFile = os.path.join(basePath,"templates/index.tmpl")
releaseUrls = ""
... | ajibawa-2023/Python-Code-Large/train/row_81151 | 31 | 57 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81151:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0526, 0.0877, 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_81151:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81151:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81151:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81151:Assign_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/env python
from __future__ import division
import sys
import mpq
archive = mpq.Archive(sys.argv[1])
print "Name: %s" % sys.argv[1]
print "Version: %s" % archive.filename
print "Offset: %s" % archive.offset
print "Packed size: %s" % archive.packed_size
print "Unpac... | ajibawa-2023/Python-Code-Large/train/row_81153 | 10 | 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_81153:ImportFrom_L3_C0", "label": "from __future__ import division", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0625, 0, 0.66, 0.0, 777, 0, 1, 0, 0, 777, 0, 0], "semantic": {"name": "__future__", "arg_names": [], "import_name... | [] |
#!/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_81155 | 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_81155: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_81155:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81155:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81155:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81155: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_81156 | 189 | 572 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81156:Assign_L17_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0297, 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_81156:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81156:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81156:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81156: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_81158 | 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_81158: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_81158:ClassDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81158:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81158:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81158:Expr_L46_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_81159 | 214 | 544 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81159:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0303, 0.0074, 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_81159:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81159:Import_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81159:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81159:Try_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
#!/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_81160 | 90 | 253 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81160:Import_L18_C0", "label": "base64 import base64", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0711, 0.004, 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_81160:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81160:Import_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81160:Try_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81160:Try_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
# 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_81161 | 155 | 366 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81161:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 30], "level": 0, "parent": null, "vector": [8, 0, 0.0451, 0.0765, 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_81161:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81161:Import_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81161:Try_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81161:Try_L43_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_81163 | 348 | 953 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81163:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 18], "level": 0, "parent": null, "vector": [8, 0, 0.0173, 0.0042, 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_81163:Try_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81163:ImportFrom_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81163:Try_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81163:ImportFrom_L38_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_81164 | 37 | 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_81164:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1504, 0.0442, 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_81164:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81164:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81164:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81164: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_81165 | 38 | 92 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81165:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1848, 0.0543, 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_81165:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81165:Import_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81165:Try_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81165:Try_L29_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_81166 | 55 | 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_81166:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 19], "level": 0, "parent": null, "vector": [8, 0, 0.1491, 0.0439, 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_81166:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81166:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81166:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81166:FunctionDef_L34_C2"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | ajibawa-2023/Python-Code-Large/train/row_81167 | 374 | 940 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81167:Expr_L15_C0", "label": "expression", "type": "expression", "loc": [15, 20], "level": 0, "parent": null, "vector": [8, 0, 0.0186, 0.0064, 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_81167:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81167:Expr_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81167:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81167:FunctionDef_L54_C2"}, {"f": "ajibawa-2023/Python-Code-... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | ajibawa-2023/Python-Code-Large/train/row_81168 | 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_81168: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_81168:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81168:Expr_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81168:FunctionDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81168: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_81169 | 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_81169: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_81169:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81169:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81169:ClassDef_L68_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81169: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_81170 | 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_81170: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_81170:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81170:Import_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81170:Try_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81170: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_81171 | 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_81171: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_81171:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81171:ImportFrom_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81171:Try_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81171: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_81173 | 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_81173: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_81173:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81173:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81173:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81173: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_81175 | 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_81175: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_81175:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81175:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81175:ClassDef_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81175: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_81176 | 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_81176: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_81176:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81176:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81176:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81176:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Cod... |
#!/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_81177 | 145 | 366 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81177:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 23], "level": 0, "parent": null, "vector": [8, 0, 0.0546, 0.0191, 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_81177:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81177:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81177:ClassDef_L45_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81177: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_81178 | 49 | 114 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81178:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 21], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.0439, 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_81178:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81178:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81178:ClassDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81178: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_81179 | 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_81179: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_81179:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81179:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81179:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81179: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_81181 | 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_81181: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_81181:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81181:Expr_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81181:FunctionDef_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81181: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_81182 | 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_81182: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_81182:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81182:FunctionDef_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81182:FunctionDef_L26_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81182: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_81183 | 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_81183: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_81183:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81183:ImportFrom_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81183:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81183: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_81184 | 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_81184: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_81184:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81184:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81184:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81184: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_81185 | 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_81185: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_81185:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81185:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81185:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81185: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_81187 | 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_81187: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_81187:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81187:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81187:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_81187:If_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/ro... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81188 | 95 | 192 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81188:ImportFrom_L18_C0", "label": "from django.db import models", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0052, 0, 0.66, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81188:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81188:Expr_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81188:ClassDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81188:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81190 | 9 | 28 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81190:Import_L18_C0", "label": "doctest import doctest", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.6429, 0.0357, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "doctest", "arg_names": [], "import_names": ["doctest... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81190:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81190:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81190:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81190:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81191 | 7 | 71 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81191:Assign_L18_C0", "label": "USE_I18N =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.2535, 0.0141, 0, 0.66, 0.0, 547, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "USE_I18N", "arg_names": [], "import_names": [], "rhs_c... | [] |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81192 | 5 | 52 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81192:ImportFrom_L18_C0", "label": "from django.conf.urls.defaults import *", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.3462, 0.0192, 0, 0.66, 0.0, 341, 0, 1, 0, 0, 341, 0, 0], "semantic": {"name": "django.conf.urls.defaults", "ar... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81192:FunctionDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81192:Return_L21_C4"}] |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81194 | 20 | 66 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81194:ImportFrom_L18_C0", "label": "from django import template", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.2727, 0.0152, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": [... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81194:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81194:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81194:FunctionDef_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81194:If_L30_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81195 | 30 | 73 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81195:ImportFrom_L18_C0", "label": "from email.utils import getaddresses, formataddr", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.2466, 0.0137, 0, 0.66, 0.0, 88, 0, 2, 0, 0, 88, 0, 0], "semantic": {"name": "email.utils", "arg_names... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81195:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81195:ClassDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81195:ClassDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81195:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-L... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81196 | 3 | 20 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81196:FunctionDef_L18_C0", "label": "settings", "type": "function", "loc": [18, 20], "level": 0, "parent": null, "vector": [2, 0, 0.95, 0.15, 0, 0.66, 0.0, 168, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "settings", "arg_names": ["request"], "import_names": [], "rhs_cal... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81196:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81196:ImportFrom_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81196:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81196:Return_L20_C4"}] |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81197 | 15 | 58 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81197:ImportFrom_L18_C0", "label": "from django.core.management.base import NoArgsCommand, CommandError", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.3103, 0.0172, 0, 0.66, 0.0, 931, 0, 2, 0, 0, 931, 0, 0], "semantic": {"name": "dja... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81197:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81197:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81197:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81197:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81198 | 10 | 35 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81198:ImportFrom_L18_C0", "label": "from django.core.management.base import NoArgsCommand, CommandError", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.5143, 0.0286, 0, 0.66, 0.0, 931, 0, 2, 0, 0, 931, 0, 0], "semantic": {"name": "dja... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81198:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81198:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81198:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81198:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81199 | 44 | 99 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81199:Import_L20_C0", "label": "re import re", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.202, 0.0101, 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_81199:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81199:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81199:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81199:If_L28_C8"}, {"f": "ajibawa-2023/Python-C... |
# Copyright 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your option) any... | ajibawa-2023/Python-Code-Large/train/row_81201 | 6 | 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_81201:ImportFrom_L18_C0", "label": "from django.core.management.base import NoArgsCommand, CommandError", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.6923, 0.0385, 0, 0.66, 0.0, 931, 0, 2, 0, 0, 931, 0, 0], "semantic": {"name": "dja... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81201:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81201:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81201:ClassDef_L20_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81201:FunctionDef_L23_C4"}, {"f": "ajibawa-2023/Python-Cod... |
# Copyright 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your option) any... | ajibawa-2023/Python-Code-Large/train/row_81202 | 25 | 57 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81202:ImportFrom_L18_C0", "label": "from django.core.management.base import BaseCommand, CommandError", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.3158, 0.0175, 0, 0.66, 0.0, 931, 0, 2, 0, 0, 931, 0, 0], "semantic": {"name": "djang... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81202:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81202:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81202:ClassDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81202:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Lar... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81203 | 37 | 95 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81203:Import_L18_C0", "label": "datetime import datetime", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.1895, 0.0105, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["date... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81203:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81203:Expr_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81203:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81203:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81204 | 6 | 25 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81204:FunctionDef_L18_C0", "label": "user", "type": "function", "loc": [18, 25], "level": 0, "parent": null, "vector": [2, 0, 0.86, 0.32, 0, 0.66, 0.0, 503, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "user", "arg_names": ["request"], "import_names": [], "rhs_call_name":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81204:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81204:Expr_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81204:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81204:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81205 | 4 | 22 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81205:FunctionDef_L18_C0", "label": "make_random_password", "type": "function", "loc": [18, 22], "level": 0, "parent": null, "vector": [2, 0, 0.9091, 0.2273, 0, 0.66, 0.0, 300, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "make_random_password", "arg_names": ["length"], "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81205:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81205:ImportFrom_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81205:FunctionDef_L18_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81205:Assign_L21_C4"}, {"f": "ajibawa-2023/Pytho... |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81206 | 5 | 25 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81206:ImportFrom_L18_C0", "label": "from django import http", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.72, 0.04, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["http"],... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81206:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81206:Expr_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81206:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81206:Return_L25_C4"}] |
# Copyright 2009, 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your optio... | ajibawa-2023/Python-Code-Large/train/row_81207 | 22 | 64 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81207:ImportFrom_L18_C0", "label": "from django import http", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.2812, 0.0156, 0, 0.66, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["htt... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81207:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81207:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81207:ClassDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81207:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-... |
# -*- coding: utf-8 -*-
# Copyright 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, ... | ajibawa-2023/Python-Code-Large/train/row_81208 | 23 | 76 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81208:Import_L22_C0", "label": "os import os", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.2895, 0.0132, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name":... | [] |
# Copyright 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your option) any... | ajibawa-2023/Python-Code-Large/train/row_81209 | 5 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81209:ImportFrom_L18_C0", "label": "from django.conf import settings", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.5294, 0.0294, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import... | [] |
# Copyright 2010 Sander Dijkhuis <sander.dijkhuis@gmail.com>
#
# This file is part of Pleft.
#
# Pleft 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 version 3 of the License, or
# (at your option) any... | ajibawa-2023/Python-Code-Large/train/row_81210 | 7 | 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_81210:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.6667, 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": ... | [] |
#!/usr/bin/python
import sys
sys.path.append(sys.path[0] + '/..')
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appe... | ajibawa-2023/Python-Code-Large/train/row_81211 | 10 | 15 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81211:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0667, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81211:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81211:Import_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81211:Try_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81211:Import_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
#! /usr/bin/env python
#-*- coding: utf-8 -*-
import os
from libs import read
class Dict:
def __init__(self, lang):
self.lang = lang
locales = os.path.join('.', 'locales', lang)
self.path = os.path.join(locales, 'dict')
self.grampath = os.path.join(locales, 'grammar')
s... | ajibawa-2023/Python-Code-Large/train/row_81212 | 94 | 120 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81212:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0083, 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_81212:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81212:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81212:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81212:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C... |
#-------------------------------------------------------------------------------
# Name: processor
# Purpose:
#
# Author: TheAer
#
# Created: 01.10.2012
# Copyright: (c) TheAer 2012
# Licence: CC by-nc-sa
#-------------------------------------------------------------------------------
#!/usr/bin/e... | ajibawa-2023/Python-Code-Large/train/row_81213 | 11 | 14 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81213:Import_L1_C0", "label": "di import di", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 700, 0, 1, 0, 0, 700, 0, 0], "semantic": {"name": "di", "arg_names": [], "import_names": ["di"], "rhs_call_name": ""... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81213:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81213:For_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81213:For_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81213:If_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
def read(filepath):
try:
handle = open(filepath)
content = handle.read()
handle.close()
except IOError:
raise IOError
return content
def write(filepath, contents):
handle = open(filepath, 'w')
handle.write(contents)
handle.close()
try:
if read(filepa... | ajibawa-2023/Python-Code-Large/train/row_81214 | 67 | 97 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81214:FunctionDef_L1_C0", "label": "read", "type": "function", "loc": [1, 8], "level": 0, "parent": null, "vector": [2, 0, 0.0464, 0.0825, 0, 0.66, 0.0, 453, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "read", "arg_names": ["filepath"], "import_names": [], "rhs_call_name... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81214:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81214:Try_L2_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81214:Try_L2_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81214:Assign_L3_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/... |
#! /usr/bin/env python
#-*- coding: utf-8 -*-
import os
from libs import read
class Dict:
def __init__(self, lang):
self.lang = lang
locales = os.path.join('.', 'locales', lang)
self.path = os.path.join(locales, 'dict')
self.grampath = os.path.join(locales, 'grammar')
s... | ajibawa-2023/Python-Code-Large/train/row_81215 | 94 | 120 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81215:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0083, 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_81215:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81215:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81215:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81215:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-C... |
#!/usr/bin/python
import sys,os;
mega = 1000*1024;
chunksize=int(1.4*mega);
def split(fromfile, todir, chunksize=chunksize):
if not os.path.exists(todir):
os.mkdir(todir);
else:
if os.listdir(todir):
if raw_input('Are you sure you want to overwrite this directory?') == 'y' :
for fname in os.listdir(todi... | ajibawa-2023/Python-Code-Large/train/row_81216 | 21 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81216:Import_L1_C0", "label": "sys import sys, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81216:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81216:If_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81216:If_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_81216:Expr_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
#!/usr/bin/python
import sys,os;
mega = 1000*1024;
chunksize=int(1.4*mega);
def split(fromfile, todir, chunksize=chunksize):
if not os.path.exists(todir):
os.mkdir(todir);
else:
if os.listdir(todir):
if raw_input('Are you sure you want to overwrite this directory?') == 'y' :
for fname in os.listdir(todi... | ajibawa-2023/Python-Code-Large/train/row_81217 | 21 | 27 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81217:Import_L1_C0", "label": "sys import sys, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.037, 0.037, 0, 0.66, 0.0, 509, 0, 2, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os"], "rhs_ca... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81217:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81217:If_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81217:If_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_81217:Expr_L5_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_... |
def filterFile(old, new):
f1 = open(old, 'r');
f2 = open(new, 'w');
while True:
line = f1.readline();
if line == '':
break;
if line[0] == '#':
continue; # skip this line
f2.write(line);
f1.close();
f2.close();
return;
| ajibawa-2023/Python-Code-Large/train/row_81219 | 11 | 13 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81219:FunctionDef_L1_C0", "label": "filterFile", "type": "function", "loc": [1, 12], "level": 0, "parent": null, "vector": [2, 0, 0.5, 0.9231, 0, 0.66, 0.0, 248, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "filterFile", "arg_names": ["old", "new"], "import_names": [], "r... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81219:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81219:Assign_L2_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81219:FunctionDef_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81219:Assign_L3_C1"}, {"f": "ajibawa-2023/Python-Code-L... |
for i in range(1,10):
for j in range(1,i+1):
print j, "x", i, "=", i*j, "\t",
print;
| ajibawa-2023/Python-Code-Large/train/row_81220 | 4 | 4 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81220:For_L1_C0", "label": "for i", "type": "for", "loc": [1, 4], "level": 0, "parent": null, "vector": [6, 0, 0.625, 1.0, 0, 0.66, 0.0, 826, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "sn... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81220:For_L1_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81220:For_L2_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81220:For_L2_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_81220:Expr_L3_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81220:... |
import socket
import re
def matchesGet(text):
m = re.match("GET .* HTTP/1\.1", text)
if m:
print repr(m.group(0))
return True
else:
return False
#initialize socket
host = ''
port = 8082
server = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
server.setsockopt(soc... | ajibawa-2023/Python-Code-Large/train/row_81221 | 29 | 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_81221:Import_L1_C0", "label": "socket import socket", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0217, 0.0217, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rh... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81221:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81221:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81221:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81221:If_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large... |
#!/usr/bin/python
def which(program):
import os
def is_exe(fpath):
return os.path.exists(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep... | ajibawa-2023/Python-Code-Large/train/row_81222 | 13 | 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_81222:FunctionDef_L3_C0", "label": "which", "type": "function", "loc": [3, 18], "level": 0, "parent": null, "vector": [2, 0, 0.5833, 0.8889, 0, 0.66, 0.0, 971, 0, 1, 1, 0, 0, 0, 7], "semantic": {"name": "which", "arg_names": ["program"], "import_names": [], "rhs_call_na... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81222:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81222:Import_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81222:FunctionDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81222:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-C... |
import workerpool, urllib2, gobject, os
class IconDownloader(workerpool.Job):
def __init__(self, basehost, channel, imageurl, callback):
self.basehost = basehost
self.channel = channel
self.imageurl = imageurl
self.callback = callback
if not os.path.exists(os.environ['HOME'] + '/.tvmaxe'):
os.mkdir(os... | ajibawa-2023/Python-Code-Large/train/row_81224 | 29 | 34 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81224:Import_L1_C0", "label": "workerpool import workerpool, urllib2, gobject\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0294, 0.0294, 0, 0.66, 0.0, 163, 0, 4, 0, 0, 163, 0, 0], "semantic": {"name": "workerpool", "arg_names":... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81224:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81224:FunctionDef_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81224:FunctionDef_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_81224:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code... |
import sqlite3, os
class Blacklist:
def __init__(self):
self.conn = sqlite3.connect(os.getenv('HOME') + '/.tvmaxe/blacklist.db')
self.conn.row_factory = sqlite3.Row
self.conn.text_factory = str
self.data = self.conn.cursor()
self.data.execute("CREATE TABLE IF NOT EXISTS blacklist (id, name)")
self.conn.co... | ajibawa-2023/Python-Code-Large/train/row_81226 | 58 | 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_81226:Import_L1_C0", "label": "sqlite3 import sqlite3, os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0154, 0.0154, 0, 0.66, 0.0, 790, 0, 2, 0, 0, 790, 0, 0], "semantic": {"name": "sqlite3", "arg_names": [], "import_names": ["sqlite... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81226:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81226:FunctionDef_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81226:FunctionDef_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_81226:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code... |
import subprocess
def get_mp3_encoder():
encoder = None
s = subprocess.Popen(['ffmpeg', '-codecs'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
for line in s.stdout.readlines():
if 'libmp3lame' in line:
if line.replace(' ', '')[1] == 'E':
enco... | ajibawa-2023/Python-Code-Large/train/row_81227 | 9 | 12 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81227:Import_L1_C0", "label": "subprocess import subprocess", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0833, 0, 0.66, 0.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["s... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81227:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81227:Assign_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81227:FunctionDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81227:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-L... |
import vlc, os, subprocess, threading, urllib2, random, time, gobject
class Player:
def __init__(self, callback, xid):
self.name = 'VLC-tvmx'
self.callback = callback
self.xid = xid
self.mprunning = False
def play(self, url):
Instance = vlc.Instance()
self.mp = vlc.MediaPlayer(Instance)
self.mp.set_xw... | ajibawa-2023/Python-Code-Large/train/row_81229 | 106 | 130 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81229:Import_L1_C0", "label": "vlc import vlc, os, subprocess\u2026", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0077, 0.0077, 0, 0.66, 0.0, 272, 0, 8, 0, 0, 272, 0, 0], "semantic": {"name": "vlc", "arg_names": [], "import_names": ["... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81229:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81229:FunctionDef_L4_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81229:FunctionDef_L4_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_81229:Assign_L5_C2"}, {"f": "ajibawa-2023/Python-Code... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#### Copyright (c) Clovis Fabricio Costa
import functools
import time
import os
import types
import sys
from subprocess import Popen, PIPE
from pprint import pformat
from collections import deque
from select import select
from thread import start_new_thread
from mpylayer... | ajibawa-2023/Python-Code-Large/train/row_81231 | 187 | 260 | 15 | ["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"] | [{"id": "ajibawa-2023/Python-Code-Large/train/row_81231:Import_L5_C0", "label": "functools import functools", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0192, 0.0038, 0, 0.66, 0.0, 711, 0, 1, 0, 0, 711, 0, 0], "semantic": {"name": "functools", "arg_names": [], "import_names": ["func... | [{"f": "ajibawa-2023/Python-Code-Large/train/row_81231:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81231:If_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81231:If_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81231:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/trai... |
"""
Script to generate module file that describes available properties.
Since there is no way to get this table directly from mplayer, I am hard-coding
it from mplayer documentation.
If it changes, you can just pass the name of a text file containing the
property table as an argument to this module:
$ python -m mpy... | ajibawa-2023/Python-Code-Large/train/row_81232 | 26 | 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_81232:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 14], "level": 0, "parent": null, "vector": [8, 0, 0.0556, 0.1037, 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_81232:FunctionDef_L94_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_81232:Try_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_81232:Try_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_81232:Return_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/tr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.